From 2a06afb374e03a538bf986bd5c08f07102fdb4a8 Mon Sep 17 00:00:00 2001 From: Sergey Date: Fri, 4 Jul 2025 02:49:36 +0300 Subject: [PATCH] 1.21.3 --- com/mojang/blaze3d/ProjectionType.java | 4 +- com/mojang/blaze3d/TracyFrameCapture.java | 30 +- com/mojang/blaze3d/buffers/BufferType.java | 4 +- com/mojang/blaze3d/buffers/BufferUsage.java | 8 +- com/mojang/blaze3d/buffers/GpuBuffer.java | 52 +- com/mojang/blaze3d/buffers/GpuFence.java | 4 +- .../blaze3d/font/TrueTypeGlyphProvider.java | 30 +- .../blaze3d/framegraph/FrameGraphBuilder.java | 138 ++-- com/mojang/blaze3d/framegraph/FramePass.java | 10 +- com/mojang/blaze3d/pipeline/RenderTarget.java | 24 +- .../blaze3d/pipeline/TextureTarget.java | 6 +- .../platform/ClientShutdownWatchdog.java | 4 +- .../platform/FramerateLimitTracker.java | 4 +- .../blaze3d/platform/GlStateManager.java | 6 +- com/mojang/blaze3d/platform/NativeImage.java | 26 +- com/mojang/blaze3d/platform/Window.java | 12 +- .../preprocessor/GlslPreprocessor.java | 10 +- .../resource/CrossFrameResourcePool.java | 22 +- .../resource/GraphicsResourceAllocator.java | 12 +- .../blaze3d/resource/ResourceDescriptor.java | 2 +- .../blaze3d/shaders/CompiledShader.java | 28 +- com/mojang/blaze3d/shaders/Uniform.java | 31 +- com/mojang/blaze3d/vertex/BufferBuilder.java | 3 +- com/mojang/blaze3d/vertex/PoseStack.java | 4 +- com/mojang/blaze3d/vertex/VertexBuffer.java | 30 +- com/mojang/blaze3d/vertex/VertexConsumer.java | 4 +- com/mojang/blaze3d/vertex/VertexFormat.java | 8 +- com/mojang/math/MatrixUtil.java | 6 +- com/mojang/realmsclient/RealmsMainScreen.java | 101 +-- .../realmsclient/client/FileUpload.java | 17 +- .../realmsclient/client/RealmsClient.java | 8 +- .../realmsclient/client/UploadStatus.java | 8 +- .../worldupload/RealmsCreateWorldFlow.java | 38 +- .../RealmsUploadFailedException.java | 8 +- .../RealmsUploadTooLargeException.java | 4 +- .../worldupload/RealmsUploadWorldPacker.java | 34 +- .../client/worldupload/RealmsWorldUpload.java | 14 +- com/mojang/realmsclient/dto/RealmsServer.java | 17 +- .../realmsclient/dto/RealmsWorldOptions.java | 66 +- com/mojang/realmsclient/gui/RowButton.java | 32 +- .../gui/screens/RealmsCreateRealmScreen.java | 34 +- .../screens/RealmsPendingInvitesScreen.java | 10 +- .../util/task/GetServerDetailsTask.java | 4 +- .../city/entrance/entrance_connector.nbt | 2 +- .../city/entrance/entrance_path_1.nbt | 2 +- .../city/entrance/entrance_path_2.nbt | 2 +- .../city/entrance/entrance_path_3.nbt | 2 +- .../city/entrance/entrance_path_4.nbt | 2 +- .../city/entrance/entrance_path_5.nbt | 2 +- .../city_center/city_center_1.nbt | 2 +- .../city_center/city_center_2.nbt | 2 +- .../city_center/city_center_3.nbt | 2 +- .../city_center/walls/bottom_1.nbt | 2 +- .../city_center/walls/bottom_2.nbt | 2 +- .../city_center/walls/bottom_left_corner.nbt | 2 +- .../city_center/walls/bottom_right_corner.nbt | 2 +- .../walls/bottom_right_corner_1.nbt | 2 +- .../walls/bottom_right_corner_2.nbt | 2 +- .../ancient_city/city_center/walls/left.nbt | 2 +- .../ancient_city/city_center/walls/right.nbt | 2 +- .../ancient_city/city_center/walls/top.nbt | 2 +- .../city_center/walls/top_left_corner.nbt | 2 +- .../city_center/walls/top_right_corner.nbt | 2 +- .../ancient_city/structures/barracks.nbt | 2 +- .../ancient_city/structures/camp_1.nbt | 2 +- .../ancient_city/structures/camp_2.nbt | 2 +- .../ancient_city/structures/camp_3.nbt | 2 +- .../ancient_city/structures/chamber_1.nbt | 2 +- .../ancient_city/structures/chamber_2.nbt | 2 +- .../ancient_city/structures/chamber_3.nbt | 2 +- .../ancient_city/structures/ice_box_1.nbt | 2 +- .../structures/large_pillar_1.nbt | 2 +- .../ancient_city/structures/large_ruin_1.nbt | 2 +- .../structures/medium_pillar_1.nbt | 2 +- .../ancient_city/structures/medium_ruin_1.nbt | 2 +- .../ancient_city/structures/medium_ruin_2.nbt | 2 +- .../ancient_city/structures/sauna_1.nbt | 2 +- .../ancient_city/structures/small_ruin_1.nbt | 2 +- .../ancient_city/structures/small_ruin_2.nbt | 2 +- .../ancient_city/structures/small_statue.nbt | 2 +- .../ancient_city/structures/tall_ruin_1.nbt | 2 +- .../ancient_city/structures/tall_ruin_2.nbt | 2 +- .../ancient_city/structures/tall_ruin_3.nbt | 2 +- .../ancient_city/structures/tall_ruin_4.nbt | 2 +- .../walls/intact_corner_wall_1.nbt | 2 +- .../walls/intact_horizontal_wall_1.nbt | 2 +- .../walls/intact_horizontal_wall_2.nbt | 2 +- .../walls/intact_horizontal_wall_bridge.nbt | 2 +- .../intact_horizontal_wall_passage_1.nbt | 2 +- .../walls/intact_horizontal_wall_stairs_1.nbt | 2 +- .../walls/intact_horizontal_wall_stairs_2.nbt | 2 +- .../walls/intact_horizontal_wall_stairs_3.nbt | 2 +- .../walls/intact_horizontal_wall_stairs_4.nbt | 2 +- .../walls/intact_intersection_wall_1.nbt | 2 +- .../walls/intact_lshape_wall_1.nbt | 2 +- .../walls/ruined_corner_wall_1.nbt | 2 +- .../walls/ruined_corner_wall_2.nbt | 2 +- .../walls/ruined_horizontal_wall_stairs_1.nbt | 2 +- .../walls/ruined_horizontal_wall_stairs_2.nbt | 2 +- .../walls/ruined_horizontal_wall_stairs_3.nbt | 2 +- .../walls/ruined_horizontal_wall_stairs_4.nbt | 2 +- .../structure/bastion/blocks/air.nbt | 2 +- .../structure/bastion/blocks/gold.nbt | 2 +- .../bastion/bridge/bridge_pieces/bridge.nbt | 2 +- .../bridge/connectors/back_bridge_bottom.nbt | 2 +- .../bridge/connectors/back_bridge_top.nbt | 2 +- .../structure/bastion/bridge/legs/leg_0.nbt | 2 +- .../structure/bastion/bridge/legs/leg_1.nbt | 2 +- .../bastion/bridge/rampart_plates/plate_0.nbt | 2 +- .../bastion/bridge/ramparts/rampart_0.nbt | 2 +- .../bastion/bridge/ramparts/rampart_1.nbt | 2 +- .../bridge/starting_pieces/entrance.nbt | 2 +- .../bridge/starting_pieces/entrance_base.nbt | 2 +- .../bridge/starting_pieces/entrance_face.nbt | 2 +- .../bastion/bridge/walls/wall_base_0.nbt | 2 +- .../bastion/bridge/walls/wall_base_1.nbt | 2 +- .../bastion/hoglin_stable/air_base.nbt | 2 +- .../connectors/end_post_connector.nbt | 2 +- .../hoglin_stable/large_stables/inner_0.nbt | 2 +- .../hoglin_stable/large_stables/inner_1.nbt | 2 +- .../hoglin_stable/large_stables/inner_2.nbt | 2 +- .../hoglin_stable/large_stables/inner_3.nbt | 2 +- .../hoglin_stable/large_stables/inner_4.nbt | 2 +- .../hoglin_stable/large_stables/outer_0.nbt | 2 +- .../hoglin_stable/large_stables/outer_1.nbt | 2 +- .../hoglin_stable/large_stables/outer_2.nbt | 2 +- .../hoglin_stable/large_stables/outer_3.nbt | 2 +- .../hoglin_stable/large_stables/outer_4.nbt | 2 +- .../bastion/hoglin_stable/posts/end_post.nbt | 2 +- .../hoglin_stable/posts/stair_post.nbt | 2 +- .../rampart_plates/rampart_plate_1.nbt | 2 +- .../hoglin_stable/ramparts/ramparts_1.nbt | 4 +- .../hoglin_stable/ramparts/ramparts_2.nbt | 2 +- .../hoglin_stable/ramparts/ramparts_3.nbt | 4 +- .../hoglin_stable/small_stables/inner_0.nbt | 2 +- .../hoglin_stable/small_stables/inner_1.nbt | 2 +- .../hoglin_stable/small_stables/inner_2.nbt | 2 +- .../hoglin_stable/small_stables/inner_3.nbt | 2 +- .../hoglin_stable/small_stables/outer_0.nbt | 2 +- .../hoglin_stable/small_stables/outer_1.nbt | 2 +- .../hoglin_stable/small_stables/outer_2.nbt | 4 +- .../hoglin_stable/small_stables/outer_3.nbt | 2 +- .../hoglin_stable/stairs/stairs_1_0.nbt | 2 +- .../hoglin_stable/stairs/stairs_1_1.nbt | 2 +- .../hoglin_stable/stairs/stairs_1_2.nbt | 2 +- .../hoglin_stable/stairs/stairs_1_3.nbt | 2 +- .../hoglin_stable/stairs/stairs_1_4.nbt | 2 +- .../hoglin_stable/stairs/stairs_2_0.nbt | 2 +- .../hoglin_stable/stairs/stairs_2_1.nbt | 2 +- .../hoglin_stable/stairs/stairs_2_2.nbt | 2 +- .../hoglin_stable/stairs/stairs_2_3.nbt | 2 +- .../hoglin_stable/stairs/stairs_2_4.nbt | 2 +- .../hoglin_stable/stairs/stairs_3_0.nbt | 2 +- .../hoglin_stable/stairs/stairs_3_1.nbt | 2 +- .../hoglin_stable/stairs/stairs_3_2.nbt | 2 +- .../hoglin_stable/stairs/stairs_3_3.nbt | 2 +- .../hoglin_stable/stairs/stairs_3_4.nbt | 2 +- .../starting_pieces/stairs_0_mirrored.nbt | 2 +- .../starting_pieces/stairs_1_mirrored.nbt | 2 +- .../starting_pieces/stairs_2_mirrored.nbt | 2 +- .../starting_pieces/stairs_3_mirrored.nbt | 2 +- .../starting_pieces/stairs_4_mirrored.nbt | 2 +- .../starting_pieces/starting_stairs_0.nbt | 2 +- .../starting_pieces/starting_stairs_1.nbt | 2 +- .../starting_pieces/starting_stairs_2.nbt | 2 +- .../starting_pieces/starting_stairs_3.nbt | 2 +- .../starting_pieces/starting_stairs_4.nbt | 2 +- .../hoglin_stable/walls/side_wall_0.nbt | 2 +- .../hoglin_stable/walls/side_wall_1.nbt | 2 +- .../bastion/hoglin_stable/walls/wall_base.nbt | 2 +- .../bastion/mobs/crossbow_piglin.nbt | 2 +- .../structure/bastion/mobs/empty.nbt | 2 +- .../structure/bastion/mobs/hoglin.nbt | 4 +- .../structure/bastion/mobs/melee_piglin.nbt | 2 +- .../bastion/mobs/melee_piglin_always.nbt | 2 +- .../structure/bastion/mobs/sword_piglin.nbt | 2 +- .../treasure/bases/centers/center_0.nbt | 2 +- .../treasure/bases/centers/center_1.nbt | 2 +- .../treasure/bases/centers/center_2.nbt | 2 +- .../treasure/bases/centers/center_3.nbt | 2 +- .../bastion/treasure/bases/lava_basin.nbt | 2 +- .../bastion/treasure/big_air_full.nbt | 2 +- .../bastion/treasure/brains/center_brain.nbt | 2 +- .../connectors/center_to_wall_middle.nbt | 2 +- .../connectors/center_to_wall_top.nbt | 2 +- .../center_to_wall_top_entrance.nbt | 2 +- .../treasure/corners/bottom/corner_0.nbt | 2 +- .../treasure/corners/bottom/corner_1.nbt | 2 +- .../bastion/treasure/corners/edges/bottom.nbt | 2 +- .../bastion/treasure/corners/edges/middle.nbt | 2 +- .../bastion/treasure/corners/edges/top.nbt | 2 +- .../treasure/corners/middle/corner_0.nbt | 2 +- .../treasure/corners/middle/corner_1.nbt | 2 +- .../bastion/treasure/corners/top/corner_0.nbt | 2 +- .../bastion/treasure/corners/top/corner_1.nbt | 2 +- .../bastion/treasure/entrances/entrance_0.nbt | 2 +- .../bastion/treasure/extensions/empty.nbt | 2 +- .../bastion/treasure/extensions/fire_room.nbt | 2 +- .../bastion/treasure/extensions/house_0.nbt | 2 +- .../bastion/treasure/extensions/house_1.nbt | 2 +- .../treasure/extensions/large_bridge_0.nbt | 2 +- .../treasure/extensions/large_bridge_1.nbt | 2 +- .../treasure/extensions/large_bridge_2.nbt | 2 +- .../treasure/extensions/large_bridge_3.nbt | 2 +- .../treasure/extensions/roofed_bridge.nbt | 2 +- .../treasure/extensions/small_bridge_0.nbt | 2 +- .../treasure/extensions/small_bridge_1.nbt | 2 +- .../treasure/extensions/small_bridge_2.nbt | 2 +- .../treasure/extensions/small_bridge_3.nbt | 2 +- .../treasure/ramparts/bottom_wall_0.nbt | 2 +- .../treasure/ramparts/lava_basin_main.nbt | 2 +- .../treasure/ramparts/lava_basin_side.nbt | 2 +- .../treasure/ramparts/mid_wall_main.nbt | 2 +- .../treasure/ramparts/mid_wall_side.nbt | 2 +- .../bastion/treasure/ramparts/top_wall.nbt | 2 +- .../bastion/treasure/roofs/center_roof.nbt | 2 +- .../bastion/treasure/roofs/corner_roof.nbt | 2 +- .../bastion/treasure/roofs/wall_roof.nbt | 4 +- .../bastion/treasure/stairs/lower_stairs.nbt | 2 +- .../bastion/treasure/walls/bottom/wall_0.nbt | 2 +- .../bastion/treasure/walls/bottom/wall_1.nbt | 2 +- .../bastion/treasure/walls/bottom/wall_2.nbt | 2 +- .../bastion/treasure/walls/bottom/wall_3.nbt | 2 +- .../bastion/treasure/walls/entrance_wall.nbt | 2 +- .../bastion/treasure/walls/lava_wall.nbt | 4 +- .../bastion/treasure/walls/mid/wall_0.nbt | 2 +- .../bastion/treasure/walls/mid/wall_1.nbt | 2 +- .../bastion/treasure/walls/mid/wall_2.nbt | 2 +- .../treasure/walls/outer/bottom_corner.nbt | 2 +- .../walls/outer/medium_outer_wall.nbt | 2 +- .../treasure/walls/outer/mid_corner.nbt | 2 +- .../treasure/walls/outer/outer_wall.nbt | 2 +- .../treasure/walls/outer/tall_outer_wall.nbt | 2 +- .../treasure/walls/outer/top_corner.nbt | 2 +- .../treasure/walls/top/main_entrance.nbt | 2 +- .../bastion/treasure/walls/top/wall_0.nbt | 2 +- .../bastion/treasure/walls/top/wall_1.nbt | 2 +- .../structure/bastion/units/air_base.nbt | 2 +- .../bastion/units/center_pieces/center_0.nbt | 2 +- .../bastion/units/center_pieces/center_1.nbt | 2 +- .../bastion/units/center_pieces/center_2.nbt | 2 +- .../structure/bastion/units/edges/edge_0.nbt | 2 +- .../bastion/units/fillers/stage_0.nbt | 2 +- .../bastion/units/pathways/pathway_0.nbt | 2 +- .../bastion/units/pathways/pathway_wall_0.nbt | 2 +- .../bastion/units/rampart_plates/plate_0.nbt | 2 +- .../bastion/units/ramparts/ramparts_0.nbt | 2 +- .../bastion/units/ramparts/ramparts_1.nbt | 2 +- .../bastion/units/ramparts/ramparts_2.nbt | 2 +- .../bastion/units/stages/rot/stage_1_0.nbt | 2 +- .../bastion/units/stages/stage_0_0.nbt | 2 +- .../bastion/units/stages/stage_0_1.nbt | 2 +- .../bastion/units/stages/stage_0_2.nbt | 2 +- .../bastion/units/stages/stage_0_3.nbt | 2 +- .../bastion/units/stages/stage_1_0.nbt | 2 +- .../bastion/units/stages/stage_1_1.nbt | 2 +- .../bastion/units/stages/stage_1_2.nbt | 2 +- .../bastion/units/stages/stage_1_3.nbt | 2 +- .../bastion/units/stages/stage_2_0.nbt | 2 +- .../bastion/units/stages/stage_2_1.nbt | 2 +- .../bastion/units/stages/stage_3_0.nbt | 2 +- .../bastion/units/stages/stage_3_1.nbt | 2 +- .../bastion/units/stages/stage_3_2.nbt | 2 +- .../bastion/units/stages/stage_3_3.nbt | 2 +- .../bastion/units/wall_units/edge_0_large.nbt | 2 +- .../bastion/units/wall_units/unit_0.nbt | 2 +- .../bastion/units/walls/connected_wall.nbt | 2 +- .../bastion/units/walls/wall_base.nbt | 2 +- .../structure/end_city/base_floor.nbt | 2 +- .../structure/end_city/base_roof.nbt | 2 +- .../structure/end_city/bridge_end.nbt | 2 +- .../end_city/bridge_gentle_stairs.nbt | 2 +- .../structure/end_city/bridge_piece.nbt | 2 +- .../end_city/bridge_steep_stairs.nbt | 2 +- .../structure/end_city/fat_tower_base.nbt | 2 +- .../structure/end_city/fat_tower_middle.nbt | 2 +- .../structure/end_city/fat_tower_top.nbt | 2 +- .../structure/end_city/second_floor_1.nbt | 2 +- .../structure/end_city/second_floor_2.nbt | 2 +- .../structure/end_city/second_roof.nbt | 2 +- data/minecraft/structure/end_city/ship.nbt | 2 +- .../structure/end_city/third_floor_1.nbt | 2 +- .../structure/end_city/third_floor_2.nbt | 2 +- .../structure/end_city/third_roof.nbt | 2 +- .../structure/end_city/tower_base.nbt | 2 +- .../structure/end_city/tower_floor.nbt | 2 +- .../structure/end_city/tower_piece.nbt | 2 +- .../structure/end_city/tower_top.nbt | 2 +- data/minecraft/structure/fossil/skull_1.nbt | 2 +- .../structure/fossil/skull_1_coal.nbt | 2 +- data/minecraft/structure/fossil/skull_2.nbt | 2 +- .../structure/fossil/skull_2_coal.nbt | 2 +- data/minecraft/structure/fossil/skull_3.nbt | 2 +- .../structure/fossil/skull_3_coal.nbt | 2 +- data/minecraft/structure/fossil/skull_4.nbt | 2 +- .../structure/fossil/skull_4_coal.nbt | 2 +- data/minecraft/structure/fossil/spine_1.nbt | 2 +- .../structure/fossil/spine_1_coal.nbt | 2 +- data/minecraft/structure/fossil/spine_2.nbt | 2 +- .../structure/fossil/spine_2_coal.nbt | 2 +- data/minecraft/structure/fossil/spine_3.nbt | 2 +- .../structure/fossil/spine_3_coal.nbt | 2 +- data/minecraft/structure/fossil/spine_4.nbt | 2 +- .../structure/fossil/spine_4_coal.nbt | 2 +- data/minecraft/structure/igloo/bottom.nbt | 2 +- data/minecraft/structure/igloo/middle.nbt | 2 +- data/minecraft/structure/igloo/top.nbt | 2 +- .../structure/nether_fossils/fossil_1.nbt | 2 +- .../structure/nether_fossils/fossil_10.nbt | 2 +- .../structure/nether_fossils/fossil_11.nbt | 2 +- .../structure/nether_fossils/fossil_12.nbt | 2 +- .../structure/nether_fossils/fossil_13.nbt | 2 +- .../structure/nether_fossils/fossil_14.nbt | 2 +- .../structure/nether_fossils/fossil_2.nbt | 2 +- .../structure/nether_fossils/fossil_3.nbt | 2 +- .../structure/nether_fossils/fossil_4.nbt | 2 +- .../structure/nether_fossils/fossil_5.nbt | 2 +- .../structure/nether_fossils/fossil_6.nbt | 2 +- .../structure/nether_fossils/fossil_7.nbt | 2 +- .../structure/nether_fossils/fossil_8.nbt | 2 +- .../structure/nether_fossils/fossil_9.nbt | 2 +- .../structure/pillager_outpost/base_plate.nbt | 2 +- .../pillager_outpost/feature_cage1.nbt | 2 +- .../pillager_outpost/feature_cage2.nbt | 2 +- .../feature_cage_with_allays.nbt | 2 +- .../pillager_outpost/feature_logs.nbt | 2 +- .../pillager_outpost/feature_plate.nbt | 2 +- .../pillager_outpost/feature_targets.nbt | 2 +- .../pillager_outpost/feature_tent1.nbt | 2 +- .../pillager_outpost/feature_tent2.nbt | 2 +- .../structure/pillager_outpost/watchtower.nbt | 2 +- .../pillager_outpost/watchtower_overgrown.nbt | 2 +- .../ruined_portal/giant_portal_1.nbt | 2 +- .../ruined_portal/giant_portal_2.nbt | 2 +- .../ruined_portal/giant_portal_3.nbt | 2 +- .../structure/ruined_portal/portal_1.nbt | 2 +- .../structure/ruined_portal/portal_10.nbt | 2 +- .../structure/ruined_portal/portal_2.nbt | 4 +- .../structure/ruined_portal/portal_3.nbt | 2 +- .../structure/ruined_portal/portal_4.nbt | 2 +- .../structure/ruined_portal/portal_5.nbt | 2 +- .../structure/ruined_portal/portal_6.nbt | 2 +- .../structure/ruined_portal/portal_7.nbt | 2 +- .../structure/ruined_portal/portal_8.nbt | 2 +- .../structure/ruined_portal/portal_9.nbt | 2 +- .../shipwreck/rightsideup_backhalf.nbt | 2 +- .../rightsideup_backhalf_degraded.nbt | 2 +- .../shipwreck/rightsideup_fronthalf.nbt | 2 +- .../rightsideup_fronthalf_degraded.nbt | 2 +- .../structure/shipwreck/rightsideup_full.nbt | 2 +- .../shipwreck/rightsideup_full_degraded.nbt | 2 +- .../structure/shipwreck/sideways_backhalf.nbt | 2 +- .../shipwreck/sideways_backhalf_degraded.nbt | 2 +- .../shipwreck/sideways_fronthalf.nbt | 2 +- .../shipwreck/sideways_fronthalf_degraded.nbt | 2 +- .../structure/shipwreck/sideways_full.nbt | 2 +- .../shipwreck/sideways_full_degraded.nbt | 2 +- .../shipwreck/upsidedown_backhalf.nbt | 2 +- .../upsidedown_backhalf_degraded.nbt | 2 +- .../shipwreck/upsidedown_fronthalf.nbt | 2 +- .../upsidedown_fronthalf_degraded.nbt | 2 +- .../structure/shipwreck/upsidedown_full.nbt | 2 +- .../shipwreck/upsidedown_full_degraded.nbt | 2 +- .../structure/shipwreck/with_mast.nbt | 2 +- .../shipwreck/with_mast_degraded.nbt | 2 +- .../trail_ruins/buildings/group_full_1.nbt | 2 +- .../trail_ruins/buildings/group_full_2.nbt | 2 +- .../trail_ruins/buildings/group_full_3.nbt | 2 +- .../trail_ruins/buildings/group_full_4.nbt | 2 +- .../trail_ruins/buildings/group_full_5.nbt | 2 +- .../trail_ruins/buildings/group_hall_1.nbt | 2 +- .../trail_ruins/buildings/group_hall_2.nbt | 2 +- .../trail_ruins/buildings/group_hall_3.nbt | 2 +- .../trail_ruins/buildings/group_hall_4.nbt | 2 +- .../trail_ruins/buildings/group_hall_5.nbt | 2 +- .../trail_ruins/buildings/group_lower_1.nbt | 2 +- .../trail_ruins/buildings/group_lower_2.nbt | 2 +- .../trail_ruins/buildings/group_lower_3.nbt | 2 +- .../trail_ruins/buildings/group_lower_4.nbt | 2 +- .../trail_ruins/buildings/group_lower_5.nbt | 2 +- .../trail_ruins/buildings/group_room_1.nbt | 2 +- .../trail_ruins/buildings/group_room_2.nbt | 2 +- .../trail_ruins/buildings/group_room_3.nbt | 2 +- .../trail_ruins/buildings/group_room_4.nbt | 2 +- .../trail_ruins/buildings/group_room_5.nbt | 2 +- .../trail_ruins/buildings/group_upper_1.nbt | 2 +- .../trail_ruins/buildings/group_upper_2.nbt | 2 +- .../trail_ruins/buildings/group_upper_3.nbt | 2 +- .../trail_ruins/buildings/group_upper_4.nbt | 2 +- .../trail_ruins/buildings/group_upper_5.nbt | 2 +- .../trail_ruins/buildings/large_room_1.nbt | 2 +- .../trail_ruins/buildings/large_room_2.nbt | 2 +- .../trail_ruins/buildings/large_room_3.nbt | 2 +- .../trail_ruins/buildings/large_room_4.nbt | 2 +- .../trail_ruins/buildings/large_room_5.nbt | 2 +- .../trail_ruins/buildings/one_room_1.nbt | 2 +- .../trail_ruins/buildings/one_room_2.nbt | 2 +- .../trail_ruins/buildings/one_room_3.nbt | 2 +- .../trail_ruins/buildings/one_room_4.nbt | 2 +- .../trail_ruins/buildings/one_room_5.nbt | 2 +- .../structure/trail_ruins/decor/decor_1.nbt | 2 +- .../structure/trail_ruins/decor/decor_2.nbt | 2 +- .../structure/trail_ruins/decor/decor_3.nbt | 2 +- .../structure/trail_ruins/decor/decor_4.nbt | 2 +- .../structure/trail_ruins/decor/decor_5.nbt | 2 +- .../structure/trail_ruins/decor/decor_6.nbt | 2 +- .../structure/trail_ruins/decor/decor_7.nbt | 2 +- .../trail_ruins/roads/long_road_end.nbt | 2 +- .../trail_ruins/roads/road_end_1.nbt | 2 +- .../trail_ruins/roads/road_section_1.nbt | 2 +- .../trail_ruins/roads/road_section_2.nbt | 2 +- .../trail_ruins/roads/road_section_3.nbt | 2 +- .../trail_ruins/roads/road_section_4.nbt | 2 +- .../trail_ruins/roads/road_spacer_1.nbt | 2 +- .../structure/trail_ruins/tower/hall_1.nbt | 2 +- .../structure/trail_ruins/tower/hall_2.nbt | 2 +- .../structure/trail_ruins/tower/hall_3.nbt | 2 +- .../structure/trail_ruins/tower/hall_4.nbt | 2 +- .../structure/trail_ruins/tower/hall_5.nbt | 2 +- .../trail_ruins/tower/large_hall_1.nbt | 2 +- .../trail_ruins/tower/large_hall_2.nbt | 2 +- .../trail_ruins/tower/large_hall_3.nbt | 2 +- .../trail_ruins/tower/large_hall_4.nbt | 2 +- .../trail_ruins/tower/large_hall_5.nbt | 2 +- .../trail_ruins/tower/one_room_1.nbt | 2 +- .../trail_ruins/tower/one_room_2.nbt | 2 +- .../trail_ruins/tower/one_room_3.nbt | 2 +- .../trail_ruins/tower/one_room_4.nbt | 2 +- .../trail_ruins/tower/one_room_5.nbt | 2 +- .../trail_ruins/tower/platform_1.nbt | 2 +- .../trail_ruins/tower/platform_2.nbt | 2 +- .../trail_ruins/tower/platform_3.nbt | 2 +- .../trail_ruins/tower/platform_4.nbt | 2 +- .../trail_ruins/tower/platform_5.nbt | 4 +- .../structure/trail_ruins/tower/stable_1.nbt | 2 +- .../structure/trail_ruins/tower/stable_2.nbt | 2 +- .../structure/trail_ruins/tower/stable_3.nbt | 2 +- .../structure/trail_ruins/tower/stable_4.nbt | 2 +- .../structure/trail_ruins/tower/stable_5.nbt | 2 +- .../structure/trail_ruins/tower/tower_1.nbt | 2 +- .../structure/trail_ruins/tower/tower_2.nbt | 2 +- .../structure/trail_ruins/tower/tower_3.nbt | 2 +- .../structure/trail_ruins/tower/tower_4.nbt | 2 +- .../structure/trail_ruins/tower/tower_5.nbt | 2 +- .../trail_ruins/tower/tower_top_1.nbt | 2 +- .../trail_ruins/tower/tower_top_2.nbt | 2 +- .../trail_ruins/tower/tower_top_3.nbt | 2 +- .../trail_ruins/tower/tower_top_4.nbt | 2 +- .../trail_ruins/tower/tower_top_5.nbt | 2 +- .../chamber/addon/c1_breeze.nbt | 2 +- .../chamber/addon/full_corner_column.nbt | 4 +- .../chamber/addon/full_stacked_walkway.nbt | 2 +- .../chamber/addon/full_stacked_walkway_2.nbt | 2 +- .../chamber/addon/grate_bridge.nbt | 2 +- .../chamber/addon/hanging_platform.nbt | 2 +- .../chamber/addon/lower_staircase_down.nbt | 2 +- .../chamber/addon/short_grate_platform.nbt | 2 +- .../chamber/addon/short_platform.nbt | 2 +- .../chamber/addon/walkway_with_bridge_1.nbt | 2 +- .../trial_chambers/chamber/assembly.nbt | 2 +- .../chamber/assembly/cover_1.nbt | 2 +- .../chamber/assembly/cover_2.nbt | 2 +- .../chamber/assembly/cover_3.nbt | 2 +- .../chamber/assembly/cover_4.nbt | 2 +- .../chamber/assembly/cover_5.nbt | 2 +- .../chamber/assembly/cover_6.nbt | 2 +- .../chamber/assembly/cover_7.nbt | 2 +- .../chamber/assembly/full_column.nbt | 2 +- .../chamber/assembly/hanging_1.nbt | 2 +- .../chamber/assembly/hanging_2.nbt | 2 +- .../chamber/assembly/hanging_3.nbt | 2 +- .../chamber/assembly/hanging_4.nbt | 2 +- .../chamber/assembly/hanging_5.nbt | 2 +- .../chamber/assembly/left_staircase_1.nbt | 2 +- .../chamber/assembly/left_staircase_2.nbt | 2 +- .../chamber/assembly/left_staircase_3.nbt | 2 +- .../chamber/assembly/platform_1.nbt | 2 +- .../chamber/assembly/right_staircase_1.nbt | 2 +- .../chamber/assembly/right_staircase_2.nbt | 2 +- .../chamber/assembly/right_staircase_3.nbt | 2 +- .../chamber/assembly/spawner_1.nbt | 2 +- .../trial_chambers/chamber/chamber_1.nbt | 2 +- .../trial_chambers/chamber/chamber_2.nbt | 2 +- .../trial_chambers/chamber/chamber_4.nbt | 2 +- .../trial_chambers/chamber/chamber_8.nbt | 2 +- .../trial_chambers/chamber/entrance_cap.nbt | 2 +- .../trial_chambers/chamber/eruption.nbt | 2 +- .../chamber/eruption/breeze_slice_1.nbt | 2 +- .../chamber/eruption/center_1.nbt | 2 +- .../chamber/eruption/quadrant_1.nbt | 2 +- .../chamber/eruption/quadrant_2.nbt | 2 +- .../chamber/eruption/quadrant_3.nbt | 2 +- .../chamber/eruption/quadrant_4.nbt | 2 +- .../chamber/eruption/quadrant_5.nbt | 2 +- .../chamber/eruption/slice_1.nbt | 2 +- .../chamber/eruption/slice_2.nbt | 2 +- .../chamber/eruption/slice_3.nbt | 2 +- .../trial_chambers/chamber/pedestal.nbt | 2 +- .../chamber/pedestal/center_1.nbt | 2 +- .../chamber/pedestal/ominous_slice_1.nbt | 2 +- .../chamber/pedestal/quadrant_1.nbt | 2 +- .../chamber/pedestal/quadrant_2.nbt | 2 +- .../chamber/pedestal/quadrant_3.nbt | 2 +- .../chamber/pedestal/slice_1.nbt | 2 +- .../chamber/pedestal/slice_2.nbt | 2 +- .../chamber/pedestal/slice_3.nbt | 2 +- .../chamber/pedestal/slice_4.nbt | 2 +- .../chamber/pedestal/slice_5.nbt | 2 +- .../trial_chambers/chamber/slanted.nbt | 2 +- .../trial_chambers/chamber/slanted/center.nbt | 2 +- .../chamber/slanted/hallway_1.nbt | 2 +- .../chamber/slanted/hallway_2.nbt | 2 +- .../chamber/slanted/hallway_3.nbt | 2 +- .../chamber/slanted/ominous_upper_arm_1.nbt | 2 +- .../chamber/slanted/quadrant_1.nbt | 4 +- .../chamber/slanted/quadrant_2.nbt | 4 +- .../chamber/slanted/quadrant_3.nbt | 4 +- .../chamber/slanted/quadrant_4.nbt | 2 +- .../trial_chambers/chamber/slanted/ramp_1.nbt | 2 +- .../trial_chambers/chamber/slanted/ramp_2.nbt | 2 +- .../trial_chambers/chamber/slanted/ramp_3.nbt | 2 +- .../trial_chambers/chamber/slanted/ramp_4.nbt | 2 +- .../chests/connectors/supply.nbt | 2 +- .../trial_chambers/chests/supply.nbt | 2 +- .../corridor/addon/arrow_dispenser.nbt | 2 +- .../corridor/addon/bridge_lower.nbt | 2 +- .../corridor/addon/chandelier_upper.nbt | 2 +- .../corridor/addon/decoration_upper.nbt | 2 +- .../corridor/addon/display_1.nbt | 2 +- .../corridor/addon/display_2.nbt | 2 +- .../corridor/addon/display_3.nbt | 2 +- .../corridor/addon/head_upper.nbt | 2 +- .../corridor/addon/ladder_to_middle.nbt | 2 +- .../corridor/addon/open_walkway.nbt | 2 +- .../corridor/addon/open_walkway_upper.nbt | 2 +- .../corridor/addon/reward_upper.nbt | 2 +- .../corridor/addon/staircase.nbt | 2 +- .../trial_chambers/corridor/addon/wall.nbt | 2 +- .../corridor/addon/walled_walkway.nbt | 2 +- .../corridor/atrium/bogged_relief.nbt | 2 +- .../corridor/atrium/breeze_relief.nbt | 2 +- .../corridor/atrium/grand_staircase_1.nbt | 2 +- .../corridor/atrium/grand_staircase_2.nbt | 2 +- .../corridor/atrium/grand_staircase_3.nbt | 2 +- .../corridor/atrium/spider_relief.nbt | 2 +- .../corridor/atrium/spiral_relief.nbt | 2 +- .../trial_chambers/corridor/atrium_1.nbt | 2 +- .../trial_chambers/corridor/end_1.nbt | 2 +- .../trial_chambers/corridor/end_2.nbt | 2 +- .../trial_chambers/corridor/entrance_1.nbt | 2 +- .../trial_chambers/corridor/entrance_2.nbt | 2 +- .../trial_chambers/corridor/entrance_3.nbt | 2 +- .../trial_chambers/corridor/first_plate.nbt | 2 +- .../trial_chambers/corridor/second_plate.nbt | 2 +- .../trial_chambers/corridor/straight_1.nbt | 2 +- .../trial_chambers/corridor/straight_2.nbt | 2 +- .../trial_chambers/corridor/straight_3.nbt | 2 +- .../trial_chambers/corridor/straight_4.nbt | 2 +- .../trial_chambers/corridor/straight_5.nbt | 2 +- .../trial_chambers/corridor/straight_6.nbt | 2 +- .../trial_chambers/corridor/straight_7.nbt | 2 +- .../trial_chambers/corridor/straight_8.nbt | 2 +- .../structure/trial_chambers/decor/barrel.nbt | 2 +- .../trial_chambers/decor/black_bed.nbt | 2 +- .../trial_chambers/decor/blue_bed.nbt | 2 +- .../trial_chambers/decor/brown_bed.nbt | 2 +- .../trial_chambers/decor/candle_1.nbt | 2 +- .../trial_chambers/decor/candle_2.nbt | 2 +- .../trial_chambers/decor/candle_3.nbt | 2 +- .../trial_chambers/decor/candle_4.nbt | 2 +- .../trial_chambers/decor/cyan_bed.nbt | 2 +- .../trial_chambers/decor/dead_bush_pot.nbt | 2 +- .../trial_chambers/decor/disposal.nbt | 2 +- .../trial_chambers/decor/empty_pot.nbt | 2 +- .../trial_chambers/decor/flow_pot.nbt | 2 +- .../trial_chambers/decor/gray_bed.nbt | 2 +- .../trial_chambers/decor/green_bed.nbt | 2 +- .../trial_chambers/decor/guster_pot.nbt | 2 +- .../trial_chambers/decor/light_blue_bed.nbt | 2 +- .../trial_chambers/decor/light_gray_bed.nbt | 2 +- .../trial_chambers/decor/lime_bed.nbt | 2 +- .../trial_chambers/decor/magenta_bed.nbt | 2 +- .../trial_chambers/decor/orange_bed.nbt | 2 +- .../trial_chambers/decor/pink_bed.nbt | 2 +- .../trial_chambers/decor/purple_bed.nbt | 2 +- .../trial_chambers/decor/red_bed.nbt | 2 +- .../trial_chambers/decor/scrape_pot.nbt | 2 +- .../trial_chambers/decor/undecorated_pot.nbt | 2 +- .../trial_chambers/decor/white_bed.nbt | 2 +- .../trial_chambers/decor/yellow_bed.nbt | 2 +- .../trial_chambers/dispensers/chamber.nbt | 2 +- .../dispensers/floor_dispenser.nbt | 2 +- .../dispensers/wall_dispenser.nbt | 2 +- .../trial_chambers/hallway/cache_1.nbt | 2 +- .../hallway/corner_staircase.nbt | 2 +- .../hallway/corner_staircase_down.nbt | 2 +- .../hallway/corridor_connector_1.nbt | 2 +- .../trial_chambers/hallway/encounter_1.nbt | 2 +- .../trial_chambers/hallway/encounter_2.nbt | 2 +- .../trial_chambers/hallway/encounter_3.nbt | 2 +- .../trial_chambers/hallway/encounter_4.nbt | 2 +- .../trial_chambers/hallway/encounter_5.nbt | 2 +- .../trial_chambers/hallway/left_corner.nbt | 2 +- .../hallway/long_straight_staircase.nbt | 2 +- .../hallway/long_straight_staircase_down.nbt | 2 +- .../hallway/lower_hallway_connector.nbt | 2 +- .../trial_chambers/hallway/right_corner.nbt | 2 +- .../trial_chambers/hallway/rubble.nbt | 2 +- .../trial_chambers/hallway/rubble_chamber.nbt | 2 +- .../hallway/rubble_chamber_thin.nbt | 2 +- .../trial_chambers/hallway/rubble_thin.nbt | 2 +- .../trial_chambers/hallway/straight.nbt | 2 +- .../hallway/straight_staircase.nbt | 2 +- .../hallway/straight_staircase_down.nbt | 2 +- .../hallway/trapped_staircase.nbt | 2 +- .../hallway/upper_hallway_connector.nbt | 2 +- .../intersection/intersection_1.nbt | 2 +- .../intersection/intersection_2.nbt | 2 +- .../intersection/intersection_3.nbt | 2 +- .../trial_chambers/reward/ominous_vault.nbt | 2 +- .../structure/trial_chambers/reward/vault.nbt | 2 +- .../trial_chambers/spawner/breeze/breeze.nbt | 2 +- .../spawner/connectors/breeze.nbt | 2 +- .../spawner/connectors/melee.nbt | 2 +- .../spawner/connectors/ranged.nbt | 2 +- .../spawner/connectors/slow_ranged.nbt | 2 +- .../spawner/connectors/small_melee.nbt | 2 +- .../trial_chambers/spawner/melee/husk.nbt | 2 +- .../trial_chambers/spawner/melee/spider.nbt | 2 +- .../trial_chambers/spawner/melee/zombie.nbt | 2 +- .../spawner/ranged/poison_skeleton.nbt | 2 +- .../spawner/ranged/skeleton.nbt | 2 +- .../trial_chambers/spawner/ranged/stray.nbt | 2 +- .../spawner/slow_ranged/poison_skeleton.nbt | 2 +- .../spawner/slow_ranged/skeleton.nbt | 2 +- .../spawner/slow_ranged/stray.nbt | 2 +- .../spawner/small_melee/baby_zombie.nbt | 2 +- .../spawner/small_melee/cave_spider.nbt | 2 +- .../spawner/small_melee/silverfish.nbt | 2 +- .../spawner/small_melee/slime.nbt | 2 +- .../structure/underwater_ruin/big_brick_1.nbt | 2 +- .../structure/underwater_ruin/big_brick_2.nbt | 2 +- .../structure/underwater_ruin/big_brick_3.nbt | 2 +- .../structure/underwater_ruin/big_brick_8.nbt | 2 +- .../underwater_ruin/big_cracked_1.nbt | 2 +- .../underwater_ruin/big_cracked_2.nbt | 2 +- .../underwater_ruin/big_cracked_3.nbt | 2 +- .../underwater_ruin/big_cracked_8.nbt | 2 +- .../structure/underwater_ruin/big_mossy_1.nbt | 2 +- .../structure/underwater_ruin/big_mossy_2.nbt | 2 +- .../structure/underwater_ruin/big_mossy_3.nbt | 2 +- .../structure/underwater_ruin/big_mossy_8.nbt | 2 +- .../structure/underwater_ruin/big_warm_4.nbt | 2 +- .../structure/underwater_ruin/big_warm_5.nbt | 2 +- .../structure/underwater_ruin/big_warm_6.nbt | 2 +- .../structure/underwater_ruin/big_warm_7.nbt | 2 +- .../structure/underwater_ruin/brick_1.nbt | 2 +- .../structure/underwater_ruin/brick_2.nbt | 2 +- .../structure/underwater_ruin/brick_3.nbt | 2 +- .../structure/underwater_ruin/brick_4.nbt | 2 +- .../structure/underwater_ruin/brick_5.nbt | 2 +- .../structure/underwater_ruin/brick_6.nbt | 2 +- .../structure/underwater_ruin/brick_7.nbt | 2 +- .../structure/underwater_ruin/brick_8.nbt | 2 +- .../structure/underwater_ruin/cracked_1.nbt | 2 +- .../structure/underwater_ruin/cracked_2.nbt | 2 +- .../structure/underwater_ruin/cracked_3.nbt | 2 +- .../structure/underwater_ruin/cracked_4.nbt | 2 +- .../structure/underwater_ruin/cracked_5.nbt | 2 +- .../structure/underwater_ruin/cracked_6.nbt | 2 +- .../structure/underwater_ruin/cracked_7.nbt | 2 +- .../structure/underwater_ruin/cracked_8.nbt | 2 +- .../structure/underwater_ruin/mossy_1.nbt | 2 +- .../structure/underwater_ruin/mossy_2.nbt | 2 +- .../structure/underwater_ruin/mossy_3.nbt | 2 +- .../structure/underwater_ruin/mossy_4.nbt | 2 +- .../structure/underwater_ruin/mossy_5.nbt | 2 +- .../structure/underwater_ruin/mossy_6.nbt | 2 +- .../structure/underwater_ruin/mossy_7.nbt | 2 +- .../structure/underwater_ruin/mossy_8.nbt | 2 +- .../structure/underwater_ruin/warm_1.nbt | 2 +- .../structure/underwater_ruin/warm_2.nbt | 2 +- .../structure/underwater_ruin/warm_3.nbt | 2 +- .../structure/underwater_ruin/warm_4.nbt | 2 +- .../structure/underwater_ruin/warm_5.nbt | 2 +- .../structure/underwater_ruin/warm_6.nbt | 2 +- .../structure/underwater_ruin/warm_7.nbt | 2 +- .../structure/underwater_ruin/warm_8.nbt | 2 +- .../village/common/animals/cat_black.nbt | 2 +- .../village/common/animals/cat_british.nbt | 4 +- .../village/common/animals/cat_calico.nbt | 4 +- .../village/common/animals/cat_jellie.nbt | 2 +- .../village/common/animals/cat_persian.nbt | 4 +- .../village/common/animals/cat_ragdoll.nbt | 2 +- .../village/common/animals/cat_red.nbt | 2 +- .../village/common/animals/cat_siamese.nbt | 4 +- .../village/common/animals/cat_tabby.nbt | 4 +- .../village/common/animals/cat_white.nbt | 2 +- .../village/common/animals/cows_1.nbt | 2 +- .../village/common/animals/horses_1.nbt | 2 +- .../village/common/animals/horses_2.nbt | 4 +- .../village/common/animals/horses_3.nbt | 2 +- .../village/common/animals/horses_4.nbt | 2 +- .../village/common/animals/horses_5.nbt | 2 +- .../village/common/animals/pigs_1.nbt | 2 +- .../village/common/animals/sheep_1.nbt | 2 +- .../village/common/animals/sheep_2.nbt | 4 +- .../structure/village/common/iron_golem.nbt | 4 +- .../structure/village/common/well_bottom.nbt | 2 +- .../structure/village/decays/grass_11x13.nbt | 2 +- .../structure/village/decays/grass_16x16.nbt | 2 +- .../structure/village/decays/grass_9x9.nbt | 2 +- .../structure/village/desert/camel_spawn.nbt | 2 +- .../village/desert/desert_lamp_1.nbt | 2 +- .../desert/houses/desert_animal_pen_1.nbt | 2 +- .../desert/houses/desert_animal_pen_2.nbt | 2 +- .../desert/houses/desert_armorer_1.nbt | 2 +- .../desert/houses/desert_butcher_shop_1.nbt | 2 +- .../houses/desert_cartographer_house_1.nbt | 2 +- .../village/desert/houses/desert_farm_1.nbt | 2 +- .../village/desert/houses/desert_farm_2.nbt | 2 +- .../village/desert/houses/desert_fisher_1.nbt | 2 +- .../desert/houses/desert_fletcher_house_1.nbt | 2 +- .../desert/houses/desert_large_farm_1.nbt | 2 +- .../desert/houses/desert_library_1.nbt | 2 +- .../village/desert/houses/desert_mason_1.nbt | 2 +- .../desert/houses/desert_medium_house_1.nbt | 4 +- .../desert/houses/desert_medium_house_2.nbt | 2 +- .../desert/houses/desert_shepherd_house_1.nbt | 2 +- .../desert/houses/desert_small_house_1.nbt | 2 +- .../desert/houses/desert_small_house_2.nbt | 2 +- .../desert/houses/desert_small_house_3.nbt | 2 +- .../desert/houses/desert_small_house_4.nbt | 2 +- .../desert/houses/desert_small_house_5.nbt | 2 +- .../desert/houses/desert_small_house_6.nbt | 2 +- .../desert/houses/desert_small_house_7.nbt | 2 +- .../desert/houses/desert_small_house_8.nbt | 2 +- .../desert/houses/desert_tannery_1.nbt | 2 +- .../village/desert/houses/desert_temple_1.nbt | 2 +- .../village/desert/houses/desert_temple_2.nbt | 2 +- .../desert/houses/desert_tool_smith_1.nbt | 2 +- .../desert/houses/desert_weaponsmith_1.nbt | 2 +- .../village/desert/streets/corner_01.nbt | 2 +- .../village/desert/streets/corner_02.nbt | 2 +- .../village/desert/streets/crossroad_01.nbt | 2 +- .../village/desert/streets/crossroad_02.nbt | 2 +- .../village/desert/streets/crossroad_03.nbt | 2 +- .../village/desert/streets/square_01.nbt | 2 +- .../village/desert/streets/square_02.nbt | 2 +- .../village/desert/streets/straight_01.nbt | 2 +- .../village/desert/streets/straight_02.nbt | 2 +- .../village/desert/streets/straight_03.nbt | 2 +- .../village/desert/streets/turn_01.nbt | 2 +- .../desert/terminators/terminator_01.nbt | 2 +- .../desert/terminators/terminator_02.nbt | 2 +- .../town_centers/desert_meeting_point_1.nbt | 2 +- .../town_centers/desert_meeting_point_2.nbt | 2 +- .../town_centers/desert_meeting_point_3.nbt | 2 +- .../village/desert/villagers/baby.nbt | 4 +- .../village/desert/villagers/nitwit.nbt | 4 +- .../village/desert/villagers/unemployed.nbt | 2 +- .../zombie/houses/desert_medium_house_1.nbt | 4 +- .../zombie/houses/desert_medium_house_2.nbt | 2 +- .../zombie/houses/desert_small_house_1.nbt | 2 +- .../zombie/houses/desert_small_house_2.nbt | 2 +- .../zombie/houses/desert_small_house_3.nbt | 2 +- .../zombie/houses/desert_small_house_4.nbt | 2 +- .../zombie/houses/desert_small_house_5.nbt | 2 +- .../zombie/houses/desert_small_house_6.nbt | 2 +- .../zombie/houses/desert_small_house_7.nbt | 2 +- .../zombie/houses/desert_small_house_8.nbt | 2 +- .../desert/zombie/streets/corner_01.nbt | 2 +- .../desert/zombie/streets/corner_02.nbt | 2 +- .../desert/zombie/streets/crossroad_01.nbt | 2 +- .../desert/zombie/streets/crossroad_02.nbt | 2 +- .../desert/zombie/streets/crossroad_03.nbt | 2 +- .../desert/zombie/streets/square_01.nbt | 2 +- .../desert/zombie/streets/square_02.nbt | 2 +- .../desert/zombie/streets/straight_01.nbt | 2 +- .../desert/zombie/streets/straight_02.nbt | 2 +- .../desert/zombie/streets/straight_03.nbt | 2 +- .../village/desert/zombie/streets/turn_01.nbt | 2 +- .../zombie/terminators/terminator_02.nbt | 2 +- .../town_centers/desert_meeting_point_1.nbt | 2 +- .../town_centers/desert_meeting_point_2.nbt | 2 +- .../town_centers/desert_meeting_point_3.nbt | 2 +- .../desert/zombie/villagers/nitwit.nbt | 2 +- .../desert/zombie/villagers/unemployed.nbt | 2 +- .../plains/houses/plains_accessory_1.nbt | 2 +- .../plains/houses/plains_animal_pen_1.nbt | 2 +- .../plains/houses/plains_animal_pen_2.nbt | 2 +- .../plains/houses/plains_animal_pen_3.nbt | 4 +- .../plains/houses/plains_armorer_house_1.nbt | 2 +- .../plains/houses/plains_big_house_1.nbt | 2 +- .../plains/houses/plains_butcher_shop_1.nbt | 2 +- .../plains/houses/plains_butcher_shop_2.nbt | 2 +- .../plains/houses/plains_cartographer_1.nbt | 2 +- .../plains/houses/plains_fisher_cottage_1.nbt | 2 +- .../plains/houses/plains_fletcher_house_1.nbt | 2 +- .../plains/houses/plains_large_farm_1.nbt | 2 +- .../plains/houses/plains_library_1.nbt | 2 +- .../plains/houses/plains_library_2.nbt | 2 +- .../plains/houses/plains_masons_house_1.nbt | 2 +- .../plains/houses/plains_medium_house_1.nbt | 2 +- .../plains/houses/plains_medium_house_2.nbt | 2 +- .../plains/houses/plains_meeting_point_4.nbt | 2 +- .../plains/houses/plains_meeting_point_5.nbt | 2 +- .../houses/plains_shepherds_house_1.nbt | 2 +- .../plains/houses/plains_small_farm_1.nbt | 2 +- .../plains/houses/plains_small_house_1.nbt | 2 +- .../plains/houses/plains_small_house_2.nbt | 2 +- .../plains/houses/plains_small_house_3.nbt | 2 +- .../plains/houses/plains_small_house_4.nbt | 2 +- .../plains/houses/plains_small_house_5.nbt | 2 +- .../plains/houses/plains_small_house_6.nbt | 2 +- .../plains/houses/plains_small_house_7.nbt | 2 +- .../plains/houses/plains_small_house_8.nbt | 2 +- .../village/plains/houses/plains_stable_1.nbt | 2 +- .../village/plains/houses/plains_stable_2.nbt | 2 +- .../plains/houses/plains_tannery_1.nbt | 2 +- .../village/plains/houses/plains_temple_3.nbt | 2 +- .../village/plains/houses/plains_temple_4.nbt | 2 +- .../plains/houses/plains_tool_smith_1.nbt | 2 +- .../plains/houses/plains_weaponsmith_1.nbt | 2 +- .../village/plains/plains_lamp_1.nbt | 2 +- .../village/plains/streets/corner_01.nbt | 2 +- .../village/plains/streets/corner_02.nbt | 2 +- .../village/plains/streets/corner_03.nbt | 2 +- .../village/plains/streets/crossroad_01.nbt | 2 +- .../village/plains/streets/crossroad_02.nbt | 2 +- .../village/plains/streets/crossroad_03.nbt | 2 +- .../village/plains/streets/crossroad_04.nbt | 2 +- .../village/plains/streets/crossroad_05.nbt | 2 +- .../village/plains/streets/crossroad_06.nbt | 2 +- .../village/plains/streets/straight_01.nbt | 2 +- .../village/plains/streets/straight_02.nbt | 2 +- .../village/plains/streets/straight_03.nbt | 2 +- .../village/plains/streets/straight_04.nbt | 2 +- .../village/plains/streets/straight_05.nbt | 2 +- .../village/plains/streets/straight_06.nbt | 2 +- .../village/plains/streets/turn_01.nbt | 2 +- .../plains/terminators/terminator_01.nbt | 2 +- .../plains/terminators/terminator_02.nbt | 2 +- .../plains/terminators/terminator_03.nbt | 2 +- .../plains/terminators/terminator_04.nbt | 2 +- .../town_centers/plains_fountain_01.nbt | 2 +- .../town_centers/plains_meeting_point_1.nbt | 2 +- .../town_centers/plains_meeting_point_2.nbt | 2 +- .../town_centers/plains_meeting_point_3.nbt | 4 +- .../village/plains/villagers/baby.nbt | 2 +- .../village/plains/villagers/nitwit.nbt | 4 +- .../village/plains/villagers/unemployed.nbt | 4 +- .../zombie/houses/plains_animal_pen_3.nbt | 4 +- .../zombie/houses/plains_big_house_1.nbt | 2 +- .../zombie/houses/plains_butcher_shop_2.nbt | 2 +- .../zombie/houses/plains_fletcher_house_1.nbt | 2 +- .../zombie/houses/plains_medium_house_1.nbt | 2 +- .../zombie/houses/plains_medium_house_2.nbt | 2 +- .../zombie/houses/plains_meeting_point_4.nbt | 2 +- .../zombie/houses/plains_meeting_point_5.nbt | 2 +- .../houses/plains_shepherds_house_1.nbt | 2 +- .../zombie/houses/plains_small_house_1.nbt | 2 +- .../zombie/houses/plains_small_house_2.nbt | 2 +- .../zombie/houses/plains_small_house_3.nbt | 2 +- .../zombie/houses/plains_small_house_4.nbt | 2 +- .../zombie/houses/plains_small_house_5.nbt | 2 +- .../zombie/houses/plains_small_house_6.nbt | 2 +- .../zombie/houses/plains_small_house_7.nbt | 2 +- .../zombie/houses/plains_small_house_8.nbt | 2 +- .../plains/zombie/houses/plains_stable_1.nbt | 4 +- .../plains/zombie/streets/corner_01.nbt | 2 +- .../plains/zombie/streets/corner_02.nbt | 2 +- .../plains/zombie/streets/corner_03.nbt | 2 +- .../plains/zombie/streets/crossroad_01.nbt | 2 +- .../plains/zombie/streets/crossroad_02.nbt | 2 +- .../plains/zombie/streets/crossroad_03.nbt | 2 +- .../plains/zombie/streets/crossroad_04.nbt | 2 +- .../plains/zombie/streets/crossroad_05.nbt | 2 +- .../plains/zombie/streets/crossroad_06.nbt | 2 +- .../plains/zombie/streets/straight_01.nbt | 2 +- .../plains/zombie/streets/straight_02.nbt | 2 +- .../plains/zombie/streets/straight_03.nbt | 2 +- .../plains/zombie/streets/straight_04.nbt | 2 +- .../plains/zombie/streets/straight_05.nbt | 2 +- .../plains/zombie/streets/straight_06.nbt | 2 +- .../village/plains/zombie/streets/turn_01.nbt | 2 +- .../town_centers/plains_fountain_01.nbt | 2 +- .../town_centers/plains_meeting_point_1.nbt | 2 +- .../town_centers/plains_meeting_point_2.nbt | 2 +- .../town_centers/plains_meeting_point_3.nbt | 2 +- .../plains/zombie/villagers/nitwit.nbt | 4 +- .../plains/zombie/villagers/unemployed.nbt | 4 +- .../savanna/houses/savanna_animal_pen_1.nbt | 2 +- .../savanna/houses/savanna_animal_pen_2.nbt | 4 +- .../savanna/houses/savanna_animal_pen_3.nbt | 2 +- .../savanna/houses/savanna_armorer_1.nbt | 2 +- .../houses/savanna_butchers_shop_1.nbt | 2 +- .../houses/savanna_butchers_shop_2.nbt | 2 +- .../savanna/houses/savanna_cartographer_1.nbt | 2 +- .../houses/savanna_fisher_cottage_1.nbt | 2 +- .../houses/savanna_fletcher_house_1.nbt | 2 +- .../savanna/houses/savanna_large_farm_1.nbt | 4 +- .../savanna/houses/savanna_large_farm_2.nbt | 2 +- .../savanna/houses/savanna_library_1.nbt | 2 +- .../savanna/houses/savanna_mason_1.nbt | 2 +- .../savanna/houses/savanna_medium_house_1.nbt | 2 +- .../savanna/houses/savanna_medium_house_2.nbt | 2 +- .../savanna/houses/savanna_shepherd_1.nbt | 2 +- .../savanna/houses/savanna_small_farm.nbt | 2 +- .../savanna/houses/savanna_small_house_1.nbt | 2 +- .../savanna/houses/savanna_small_house_2.nbt | 2 +- .../savanna/houses/savanna_small_house_3.nbt | 2 +- .../savanna/houses/savanna_small_house_4.nbt | 2 +- .../savanna/houses/savanna_small_house_5.nbt | 2 +- .../savanna/houses/savanna_small_house_6.nbt | 2 +- .../savanna/houses/savanna_small_house_7.nbt | 2 +- .../savanna/houses/savanna_small_house_8.nbt | 2 +- .../savanna/houses/savanna_tannery_1.nbt | 2 +- .../savanna/houses/savanna_temple_1.nbt | 2 +- .../savanna/houses/savanna_temple_2.nbt | 2 +- .../savanna/houses/savanna_tool_smith_1.nbt | 2 +- .../savanna/houses/savanna_weaponsmith_1.nbt | 2 +- .../savanna/houses/savanna_weaponsmith_2.nbt | 2 +- .../village/savanna/savanna_lamp_post_01.nbt | 2 +- .../village/savanna/streets/corner_01.nbt | 2 +- .../village/savanna/streets/corner_03.nbt | 2 +- .../village/savanna/streets/crossroad_02.nbt | 2 +- .../village/savanna/streets/crossroad_03.nbt | 2 +- .../village/savanna/streets/crossroad_04.nbt | 2 +- .../village/savanna/streets/crossroad_05.nbt | 2 +- .../village/savanna/streets/crossroad_06.nbt | 2 +- .../village/savanna/streets/crossroad_07.nbt | 2 +- .../village/savanna/streets/split_01.nbt | 2 +- .../village/savanna/streets/split_02.nbt | 2 +- .../village/savanna/streets/straight_02.nbt | 2 +- .../village/savanna/streets/straight_04.nbt | 2 +- .../village/savanna/streets/straight_05.nbt | 2 +- .../village/savanna/streets/straight_06.nbt | 2 +- .../village/savanna/streets/straight_08.nbt | 2 +- .../village/savanna/streets/straight_09.nbt | 2 +- .../village/savanna/streets/straight_10.nbt | 2 +- .../village/savanna/streets/straight_11.nbt | 2 +- .../village/savanna/streets/turn_01.nbt | 2 +- .../savanna/terminators/terminator_05.nbt | 2 +- .../town_centers/savanna_meeting_point_1.nbt | 2 +- .../town_centers/savanna_meeting_point_2.nbt | 2 +- .../town_centers/savanna_meeting_point_3.nbt | 2 +- .../town_centers/savanna_meeting_point_4.nbt | 2 +- .../village/savanna/villagers/baby.nbt | 4 +- .../village/savanna/villagers/nitwit.nbt | 4 +- .../village/savanna/villagers/unemployed.nbt | 4 +- .../zombie/houses/savanna_animal_pen_2.nbt | 4 +- .../zombie/houses/savanna_animal_pen_3.nbt | 2 +- .../zombie/houses/savanna_large_farm_2.nbt | 2 +- .../zombie/houses/savanna_medium_house_1.nbt | 2 +- .../zombie/houses/savanna_medium_house_2.nbt | 2 +- .../zombie/houses/savanna_small_house_1.nbt | 2 +- .../zombie/houses/savanna_small_house_2.nbt | 2 +- .../zombie/houses/savanna_small_house_3.nbt | 2 +- .../zombie/houses/savanna_small_house_4.nbt | 2 +- .../zombie/houses/savanna_small_house_5.nbt | 2 +- .../zombie/houses/savanna_small_house_6.nbt | 2 +- .../zombie/houses/savanna_small_house_7.nbt | 2 +- .../zombie/houses/savanna_small_house_8.nbt | 2 +- .../savanna/zombie/streets/corner_01.nbt | 2 +- .../savanna/zombie/streets/corner_03.nbt | 2 +- .../savanna/zombie/streets/crossroad_02.nbt | 2 +- .../savanna/zombie/streets/crossroad_03.nbt | 2 +- .../savanna/zombie/streets/crossroad_04.nbt | 2 +- .../savanna/zombie/streets/crossroad_05.nbt | 2 +- .../savanna/zombie/streets/crossroad_06.nbt | 2 +- .../savanna/zombie/streets/crossroad_07.nbt | 2 +- .../savanna/zombie/streets/split_01.nbt | 2 +- .../savanna/zombie/streets/split_02.nbt | 2 +- .../savanna/zombie/streets/straight_02.nbt | 2 +- .../savanna/zombie/streets/straight_04.nbt | 2 +- .../savanna/zombie/streets/straight_05.nbt | 2 +- .../savanna/zombie/streets/straight_06.nbt | 2 +- .../savanna/zombie/streets/straight_08.nbt | 2 +- .../savanna/zombie/streets/straight_09.nbt | 2 +- .../savanna/zombie/streets/straight_10.nbt | 2 +- .../savanna/zombie/streets/straight_11.nbt | 2 +- .../savanna/zombie/streets/turn_01.nbt | 2 +- .../zombie/terminators/terminator_05.nbt | 2 +- .../town_centers/savanna_meeting_point_1.nbt | 2 +- .../town_centers/savanna_meeting_point_2.nbt | 2 +- .../town_centers/savanna_meeting_point_3.nbt | 2 +- .../town_centers/savanna_meeting_point_4.nbt | 2 +- .../savanna/zombie/villagers/nitwit.nbt | 4 +- .../savanna/zombie/villagers/unemployed.nbt | 4 +- .../snowy/houses/snowy_animal_pen_1.nbt | 2 +- .../snowy/houses/snowy_animal_pen_2.nbt | 2 +- .../snowy/houses/snowy_armorer_house_1.nbt | 2 +- .../snowy/houses/snowy_armorer_house_2.nbt | 2 +- .../snowy/houses/snowy_butchers_shop_1.nbt | 2 +- .../snowy/houses/snowy_butchers_shop_2.nbt | 2 +- .../houses/snowy_cartographer_house_1.nbt | 2 +- .../village/snowy/houses/snowy_farm_1.nbt | 4 +- .../village/snowy/houses/snowy_farm_2.nbt | 2 +- .../snowy/houses/snowy_fisher_cottage.nbt | 2 +- .../snowy/houses/snowy_fletcher_house_1.nbt | 2 +- .../village/snowy/houses/snowy_library_1.nbt | 2 +- .../snowy/houses/snowy_masons_house_1.nbt | 2 +- .../snowy/houses/snowy_masons_house_2.nbt | 2 +- .../snowy/houses/snowy_medium_house_1.nbt | 2 +- .../snowy/houses/snowy_medium_house_2.nbt | 2 +- .../snowy/houses/snowy_medium_house_3.nbt | 2 +- .../snowy/houses/snowy_shepherds_house_1.nbt | 2 +- .../snowy/houses/snowy_small_house_1.nbt | 2 +- .../snowy/houses/snowy_small_house_2.nbt | 2 +- .../snowy/houses/snowy_small_house_3.nbt | 2 +- .../snowy/houses/snowy_small_house_4.nbt | 2 +- .../snowy/houses/snowy_small_house_5.nbt | 2 +- .../snowy/houses/snowy_small_house_6.nbt | 2 +- .../snowy/houses/snowy_small_house_7.nbt | 2 +- .../snowy/houses/snowy_small_house_8.nbt | 2 +- .../village/snowy/houses/snowy_tannery_1.nbt | 2 +- .../village/snowy/houses/snowy_temple_1.nbt | 2 +- .../snowy/houses/snowy_tool_smith_1.nbt | 2 +- .../snowy/houses/snowy_weapon_smith_1.nbt | 2 +- .../village/snowy/snowy_lamp_post_01.nbt | 2 +- .../village/snowy/snowy_lamp_post_02.nbt | 2 +- .../village/snowy/snowy_lamp_post_03.nbt | 2 +- .../village/snowy/streets/corner_01.nbt | 2 +- .../village/snowy/streets/corner_02.nbt | 2 +- .../village/snowy/streets/corner_03.nbt | 2 +- .../village/snowy/streets/crossroad_01.nbt | 2 +- .../village/snowy/streets/crossroad_02.nbt | 2 +- .../village/snowy/streets/crossroad_03.nbt | 2 +- .../village/snowy/streets/crossroad_04.nbt | 2 +- .../village/snowy/streets/crossroad_05.nbt | 2 +- .../village/snowy/streets/crossroad_06.nbt | 2 +- .../village/snowy/streets/square_01.nbt | 2 +- .../village/snowy/streets/straight_01.nbt | 2 +- .../village/snowy/streets/straight_02.nbt | 2 +- .../village/snowy/streets/straight_03.nbt | 2 +- .../village/snowy/streets/straight_04.nbt | 2 +- .../village/snowy/streets/straight_06.nbt | 2 +- .../village/snowy/streets/straight_08.nbt | 2 +- .../village/snowy/streets/turn_01.nbt | 2 +- .../town_centers/snowy_meeting_point_1.nbt | 2 +- .../town_centers/snowy_meeting_point_2.nbt | 2 +- .../town_centers/snowy_meeting_point_3.nbt | 2 +- .../village/snowy/villagers/baby.nbt | 2 +- .../village/snowy/villagers/nitwit.nbt | 4 +- .../village/snowy/villagers/unemployed.nbt | 4 +- .../zombie/houses/snowy_medium_house_1.nbt | 2 +- .../zombie/houses/snowy_medium_house_2.nbt | 2 +- .../zombie/houses/snowy_medium_house_3.nbt | 2 +- .../zombie/houses/snowy_small_house_1.nbt | 2 +- .../zombie/houses/snowy_small_house_2.nbt | 2 +- .../zombie/houses/snowy_small_house_3.nbt | 2 +- .../zombie/houses/snowy_small_house_4.nbt | 2 +- .../zombie/houses/snowy_small_house_5.nbt | 2 +- .../zombie/houses/snowy_small_house_6.nbt | 2 +- .../zombie/houses/snowy_small_house_7.nbt | 2 +- .../zombie/houses/snowy_small_house_8.nbt | 2 +- .../snowy/zombie/streets/corner_01.nbt | 2 +- .../snowy/zombie/streets/corner_02.nbt | 2 +- .../snowy/zombie/streets/corner_03.nbt | 2 +- .../snowy/zombie/streets/crossroad_01.nbt | 2 +- .../snowy/zombie/streets/crossroad_02.nbt | 2 +- .../snowy/zombie/streets/crossroad_03.nbt | 2 +- .../snowy/zombie/streets/crossroad_04.nbt | 2 +- .../snowy/zombie/streets/crossroad_05.nbt | 2 +- .../snowy/zombie/streets/crossroad_06.nbt | 2 +- .../snowy/zombie/streets/square_01.nbt | 2 +- .../snowy/zombie/streets/straight_01.nbt | 2 +- .../snowy/zombie/streets/straight_02.nbt | 2 +- .../snowy/zombie/streets/straight_03.nbt | 2 +- .../snowy/zombie/streets/straight_04.nbt | 2 +- .../snowy/zombie/streets/straight_06.nbt | 2 +- .../snowy/zombie/streets/straight_08.nbt | 2 +- .../village/snowy/zombie/streets/turn_01.nbt | 2 +- .../town_centers/snowy_meeting_point_1.nbt | 2 +- .../town_centers/snowy_meeting_point_2.nbt | 2 +- .../town_centers/snowy_meeting_point_3.nbt | 2 +- .../village/snowy/zombie/villagers/nitwit.nbt | 4 +- .../snowy/zombie/villagers/unemployed.nbt | 4 +- .../taiga/houses/taiga_animal_pen_1.nbt | 2 +- .../village/taiga/houses/taiga_armorer_2.nbt | 2 +- .../taiga/houses/taiga_armorer_house_1.nbt | 2 +- .../taiga/houses/taiga_butcher_shop_1.nbt | 2 +- .../houses/taiga_cartographer_house_1.nbt | 2 +- .../taiga/houses/taiga_fisher_cottage_1.nbt | 2 +- .../taiga/houses/taiga_fletcher_house_1.nbt | 2 +- .../taiga/houses/taiga_large_farm_1.nbt | 4 +- .../taiga/houses/taiga_large_farm_2.nbt | 2 +- .../village/taiga/houses/taiga_library_1.nbt | 2 +- .../taiga/houses/taiga_masons_house_1.nbt | 2 +- .../taiga/houses/taiga_medium_house_1.nbt | 2 +- .../taiga/houses/taiga_medium_house_2.nbt | 2 +- .../taiga/houses/taiga_medium_house_3.nbt | 2 +- .../taiga/houses/taiga_medium_house_4.nbt | 2 +- .../taiga/houses/taiga_shepherds_house_1.nbt | 2 +- .../taiga/houses/taiga_small_farm_1.nbt | 2 +- .../taiga/houses/taiga_small_house_1.nbt | 2 +- .../taiga/houses/taiga_small_house_2.nbt | 2 +- .../taiga/houses/taiga_small_house_3.nbt | 2 +- .../taiga/houses/taiga_small_house_4.nbt | 2 +- .../taiga/houses/taiga_small_house_5.nbt | 2 +- .../village/taiga/houses/taiga_tannery_1.nbt | 4 +- .../village/taiga/houses/taiga_temple_1.nbt | 2 +- .../taiga/houses/taiga_tool_smith_1.nbt | 2 +- .../taiga/houses/taiga_weaponsmith_1.nbt | 2 +- .../taiga/houses/taiga_weaponsmith_2.nbt | 2 +- .../village/taiga/streets/corner_01.nbt | 2 +- .../village/taiga/streets/corner_02.nbt | 2 +- .../village/taiga/streets/corner_03.nbt | 2 +- .../village/taiga/streets/crossroad_01.nbt | 2 +- .../village/taiga/streets/crossroad_02.nbt | 2 +- .../village/taiga/streets/crossroad_03.nbt | 2 +- .../village/taiga/streets/crossroad_04.nbt | 2 +- .../village/taiga/streets/crossroad_05.nbt | 2 +- .../village/taiga/streets/crossroad_06.nbt | 2 +- .../village/taiga/streets/straight_01.nbt | 2 +- .../village/taiga/streets/straight_02.nbt | 2 +- .../village/taiga/streets/straight_03.nbt | 2 +- .../village/taiga/streets/straight_04.nbt | 2 +- .../village/taiga/streets/straight_05.nbt | 2 +- .../village/taiga/streets/straight_06.nbt | 2 +- .../village/taiga/streets/turn_01.nbt | 2 +- .../village/taiga/taiga_decoration_1.nbt | 2 +- .../village/taiga/taiga_decoration_2.nbt | 2 +- .../village/taiga/taiga_decoration_3.nbt | 2 +- .../village/taiga/taiga_decoration_4.nbt | 2 +- .../village/taiga/taiga_decoration_5.nbt | 2 +- .../village/taiga/taiga_decoration_6.nbt | 2 +- .../village/taiga/taiga_lamp_post_1.nbt | 2 +- .../town_centers/taiga_meeting_point_1.nbt | 2 +- .../town_centers/taiga_meeting_point_2.nbt | 2 +- .../village/taiga/villagers/baby.nbt | 2 +- .../village/taiga/villagers/nitwit.nbt | 2 +- .../village/taiga/villagers/unemployed.nbt | 4 +- .../houses/taiga_cartographer_house_1.nbt | 2 +- .../zombie/houses/taiga_fisher_cottage_1.nbt | 2 +- .../zombie/houses/taiga_large_farm_2.nbt | 2 +- .../taiga/zombie/houses/taiga_library_1.nbt | 2 +- .../zombie/houses/taiga_medium_house_1.nbt | 2 +- .../zombie/houses/taiga_medium_house_2.nbt | 2 +- .../zombie/houses/taiga_medium_house_3.nbt | 2 +- .../zombie/houses/taiga_medium_house_4.nbt | 2 +- .../zombie/houses/taiga_shepherds_house_1.nbt | 2 +- .../zombie/houses/taiga_small_house_1.nbt | 2 +- .../zombie/houses/taiga_small_house_2.nbt | 2 +- .../zombie/houses/taiga_small_house_3.nbt | 2 +- .../zombie/houses/taiga_small_house_4.nbt | 2 +- .../zombie/houses/taiga_small_house_5.nbt | 2 +- .../taiga/zombie/houses/taiga_temple_1.nbt | 2 +- .../zombie/houses/taiga_tool_smith_1.nbt | 2 +- .../zombie/houses/taiga_weaponsmith_2.nbt | 2 +- .../taiga/zombie/streets/corner_01.nbt | 2 +- .../taiga/zombie/streets/corner_02.nbt | 2 +- .../taiga/zombie/streets/corner_03.nbt | 2 +- .../taiga/zombie/streets/crossroad_01.nbt | 2 +- .../taiga/zombie/streets/crossroad_02.nbt | 2 +- .../taiga/zombie/streets/crossroad_03.nbt | 2 +- .../taiga/zombie/streets/crossroad_04.nbt | 2 +- .../taiga/zombie/streets/crossroad_05.nbt | 2 +- .../taiga/zombie/streets/crossroad_06.nbt | 2 +- .../taiga/zombie/streets/straight_01.nbt | 2 +- .../taiga/zombie/streets/straight_02.nbt | 2 +- .../taiga/zombie/streets/straight_03.nbt | 2 +- .../taiga/zombie/streets/straight_04.nbt | 2 +- .../taiga/zombie/streets/straight_05.nbt | 2 +- .../taiga/zombie/streets/straight_06.nbt | 2 +- .../village/taiga/zombie/streets/turn_01.nbt | 2 +- .../town_centers/taiga_meeting_point_1.nbt | 2 +- .../town_centers/taiga_meeting_point_2.nbt | 2 +- .../village/taiga/zombie/villagers/nitwit.nbt | 2 +- .../taiga/zombie/villagers/unemployed.nbt | 2 +- .../structure/woodland_mansion/1x1_a1.nbt | 2 +- .../structure/woodland_mansion/1x1_a2.nbt | 2 +- .../structure/woodland_mansion/1x1_a3.nbt | 2 +- .../structure/woodland_mansion/1x1_a4.nbt | 2 +- .../structure/woodland_mansion/1x1_a5.nbt | 2 +- .../structure/woodland_mansion/1x1_as1.nbt | 2 +- .../structure/woodland_mansion/1x1_as2.nbt | 2 +- .../structure/woodland_mansion/1x1_as3.nbt | 2 +- .../structure/woodland_mansion/1x1_as4.nbt | 2 +- .../structure/woodland_mansion/1x1_b1.nbt | 2 +- .../structure/woodland_mansion/1x1_b2.nbt | 2 +- .../structure/woodland_mansion/1x1_b3.nbt | 2 +- .../structure/woodland_mansion/1x1_b4.nbt | 2 +- .../structure/woodland_mansion/1x1_b5.nbt | 2 +- .../structure/woodland_mansion/1x2_a1.nbt | 2 +- .../structure/woodland_mansion/1x2_a2.nbt | 2 +- .../structure/woodland_mansion/1x2_a3.nbt | 2 +- .../structure/woodland_mansion/1x2_a4.nbt | 2 +- .../structure/woodland_mansion/1x2_a5.nbt | 2 +- .../structure/woodland_mansion/1x2_a6.nbt | 2 +- .../structure/woodland_mansion/1x2_a7.nbt | 2 +- .../structure/woodland_mansion/1x2_a8.nbt | 2 +- .../structure/woodland_mansion/1x2_a9.nbt | 2 +- .../structure/woodland_mansion/1x2_b1.nbt | 2 +- .../structure/woodland_mansion/1x2_b2.nbt | 2 +- .../structure/woodland_mansion/1x2_b3.nbt | 2 +- .../structure/woodland_mansion/1x2_b4.nbt | 2 +- .../structure/woodland_mansion/1x2_b5.nbt | 2 +- .../structure/woodland_mansion/1x2_c1.nbt | 2 +- .../structure/woodland_mansion/1x2_c2.nbt | 2 +- .../structure/woodland_mansion/1x2_c3.nbt | 2 +- .../structure/woodland_mansion/1x2_c4.nbt | 2 +- .../woodland_mansion/1x2_c_stairs.nbt | 2 +- .../structure/woodland_mansion/1x2_d1.nbt | 2 +- .../structure/woodland_mansion/1x2_d2.nbt | 2 +- .../structure/woodland_mansion/1x2_d3.nbt | 2 +- .../structure/woodland_mansion/1x2_d4.nbt | 2 +- .../structure/woodland_mansion/1x2_d5.nbt | 2 +- .../woodland_mansion/1x2_d_stairs.nbt | 2 +- .../structure/woodland_mansion/1x2_s1.nbt | 2 +- .../structure/woodland_mansion/1x2_s2.nbt | 2 +- .../structure/woodland_mansion/1x2_se1.nbt | 2 +- .../structure/woodland_mansion/2x2_a1.nbt | 2 +- .../structure/woodland_mansion/2x2_a2.nbt | 2 +- .../structure/woodland_mansion/2x2_a3.nbt | 2 +- .../structure/woodland_mansion/2x2_a4.nbt | 2 +- .../structure/woodland_mansion/2x2_b1.nbt | 2 +- .../structure/woodland_mansion/2x2_b2.nbt | 2 +- .../structure/woodland_mansion/2x2_b3.nbt | 2 +- .../structure/woodland_mansion/2x2_b4.nbt | 2 +- .../structure/woodland_mansion/2x2_b5.nbt | 2 +- .../structure/woodland_mansion/2x2_s1.nbt | 2 +- .../woodland_mansion/carpet_east.nbt | 2 +- .../woodland_mansion/carpet_north.nbt | 2 +- .../woodland_mansion/carpet_south_1.nbt | 2 +- .../woodland_mansion/carpet_south_2.nbt | 4 +- .../woodland_mansion/carpet_west_1.nbt | 2 +- .../woodland_mansion/carpet_west_2.nbt | 4 +- .../woodland_mansion/corridor_floor.nbt | 2 +- .../structure/woodland_mansion/entrance.nbt | 2 +- .../woodland_mansion/indoors_door_1.nbt | 2 +- .../woodland_mansion/indoors_door_2.nbt | 2 +- .../woodland_mansion/indoors_wall_1.nbt | 2 +- .../woodland_mansion/indoors_wall_2.nbt | 2 +- .../structure/woodland_mansion/roof.nbt | 2 +- .../woodland_mansion/roof_corner.nbt | 2 +- .../structure/woodland_mansion/roof_front.nbt | 2 +- .../woodland_mansion/roof_inner_corner.nbt | 2 +- .../structure/woodland_mansion/small_wall.nbt | 2 +- .../woodland_mansion/small_wall_corner.nbt | 2 +- .../woodland_mansion/wall_corner.nbt | 2 +- .../structure/woodland_mansion/wall_flat.nbt | 2 +- .../woodland_mansion/wall_window.nbt | 2 +- net/minecraft/DetectedVersion.java | 4 +- net/minecraft/Optionull.java | 4 +- net/minecraft/SharedConstants.java | 4 +- net/minecraft/TracingExecutor.java | 18 +- net/minecraft/Util.java | 74 +-- .../advancements/AdvancementRewards.java | 8 +- .../critereon/BlockPredicate.java | 12 +- .../critereon/ConsumeItemTrigger.java | 4 +- .../critereon/ContextAwarePredicate.java | 4 +- .../critereon/CriterionValidator.java | 12 +- .../critereon/EntityEquipmentPredicate.java | 6 +- .../critereon/EntityPredicate.java | 8 +- .../critereon/EntityTypePredicate.java | 6 +- .../critereon/FluidPredicate.java | 4 +- .../critereon/InputPredicate.java | 4 +- .../advancements/critereon/ItemPredicate.java | 22 +- .../critereon/ItemTrimPredicate.java | 6 +- .../critereon/KilledByArrowTrigger.java | 24 +- .../critereon/PlayerPredicate.java | 11 +- .../advancements/critereon/PlayerTrigger.java | 6 +- .../critereon/RecipeCraftedTrigger.java | 24 +- .../critereon/RecipeUnlockedTrigger.java | 4 +- .../critereon/SheepPredicate.java | 4 +- .../critereon/ShotCrossbowTrigger.java | 4 +- .../critereon/UsedTotemTrigger.java | 4 +- net/minecraft/client/ClientRecipeBook.java | 26 +- net/minecraft/client/InactivityFpsLimit.java | 8 +- net/minecraft/client/Minecraft.java | 11 +- net/minecraft/client/ScrollWheelHandler.java | 28 +- .../client/animation/KeyframeAnimations.java | 14 +- .../client/gui/BundleMouseActions.java | 32 +- net/minecraft/client/gui/Font.java | 194 +++--- net/minecraft/client/gui/Gui.java | 76 +-- net/minecraft/client/gui/GuiGraphics.java | 606 ++++++++++-------- .../client/gui/ItemSlotMouseAction.java | 2 +- .../gui/components/AbstractSelectionList.java | 6 +- .../ContainerObjectSelectionList.java | 3 +- .../gui/components/PlayerFaceRenderer.java | 24 +- .../debugchart/ProfilerPieChart.java | 24 +- .../components/toasts/AdvancementToast.java | 20 +- .../gui/components/toasts/RecipeToast.java | 16 +- .../gui/components/toasts/SystemToast.java | 34 +- .../client/gui/components/toasts/Toast.java | 4 +- .../gui/components/toasts/ToastManager.java | 36 +- .../gui/components/toasts/TutorialToast.java | 26 +- .../client/gui/font/CodepointMap.java | 12 +- .../client/gui/font/FontManager.java | 8 +- .../client/gui/font/glyphs/BakedGlyph.java | 36 +- .../client/gui/font/glyphs/EmptyGlyph.java | 2 +- .../gui/screens/BackupConfirmScreen.java | 14 +- .../gui/screens/LevelLoadingScreen.java | 42 +- .../client/gui/screens/TitleScreen.java | 22 +- .../inventory/AbstractContainerScreen.java | 12 +- .../inventory/AbstractFurnaceScreen.java | 24 +- .../inventory/AbstractRecipeBookScreen.java | 4 +- .../gui/screens/inventory/BookEditScreen.java | 12 +- .../CreativeModeInventoryScreen.java | 4 +- .../screens/inventory/EffectsInInventory.java | 82 +-- .../screens/inventory/EnchantmentScreen.java | 3 +- .../gui/screens/inventory/MerchantScreen.java | 3 +- .../tooltip/ClientActivePlayersTooltip.java | 12 +- .../tooltip/ClientBundleTooltip.java | 106 +-- .../inventory/tooltip/ClientTextTooltip.java | 4 +- .../tooltip/ClientTooltipComponent.java | 6 +- .../inventory/tooltip/TooltipRenderUtil.java | 24 +- .../CraftingRecipeBookComponent.java | 8 +- .../FurnaceRecipeBookComponent.java | 10 +- .../gui/screens/recipebook/GhostSlots.java | 20 +- .../recipebook/OverlayRecipeComponent.java | 96 ++- .../recipebook/RecipeBookComponent.java | 67 +- .../screens/recipebook/RecipeBookPage.java | 26 +- .../recipebook/RecipeBookTabButton.java | 8 +- .../gui/screens/recipebook/RecipeButton.java | 20 +- .../screens/recipebook/RecipeCollection.java | 22 +- .../recipebook/SearchRecipeBookCategory.java | 4 +- .../ReportReasonSelectionScreen.java | 10 +- .../worldselection/CreateWorldScreen.java | 141 ++-- .../worldselection/EditGameRulesScreen.java | 12 +- .../worldselection/WorldCreationContext.java | 17 +- .../client/gui/spectator/PlayerMenuItem.java | 4 +- .../client/gui/spectator/SpectatorMenu.java | 10 +- .../gui/spectator/SpectatorMenuItem.java | 2 +- .../TeleportToPlayerMenuCategory.java | 4 +- .../TeleportToTeamMenuCategory.java | 16 +- net/minecraft/client/main/GameConfig.java | 14 +- net/minecraft/client/main/Main.java | 10 +- .../client/model/AbstractBoatModel.java | 26 +- .../client/model/AbstractEquineModel.java | 70 +- .../client/model/AbstractPiglinModel.java | 18 +- .../client/model/AbstractZombieModel.java | 4 +- net/minecraft/client/model/AllayModel.java | 26 +- .../client/model/AnimationUtils.java | 54 +- .../client/model/ArmadilloModel.java | 18 +- .../client/model/ArmorStandArmorModel.java | 40 +- .../client/model/ArmorStandModel.java | 30 +- net/minecraft/client/model/ArrowModel.java | 12 +- net/minecraft/client/model/AxolotlModel.java | 134 ++-- .../client/model/BabyModelTransform.java | 8 +- net/minecraft/client/model/BatModel.java | 12 +- net/minecraft/client/model/BeeModel.java | 18 +- .../client/model/BeeStingerModel.java | 4 +- net/minecraft/client/model/BellModel.java | 36 +- net/minecraft/client/model/BlazeModel.java | 20 +- net/minecraft/client/model/BreezeModel.java | 16 +- net/minecraft/client/model/CamelModel.java | 42 +- net/minecraft/client/model/CatModel.java | 4 +- net/minecraft/client/model/ChestModel.java | 12 +- net/minecraft/client/model/ChickenModel.java | 14 +- net/minecraft/client/model/CodModel.java | 8 +- net/minecraft/client/model/CreakingModel.java | 24 +- net/minecraft/client/model/CreeperModel.java | 12 +- net/minecraft/client/model/DolphinModel.java | 16 +- net/minecraft/client/model/DonkeyModel.java | 12 +- net/minecraft/client/model/DrownedModel.java | 6 +- net/minecraft/client/model/ElytraModel.java | 12 +- .../client/model/EndCrystalModel.java | 18 +- net/minecraft/client/model/EndermanModel.java | 4 +- .../client/model/EndermiteModel.java | 8 +- net/minecraft/client/model/EntityModel.java | 10 +- .../client/model/EvokerFangsModel.java | 6 +- net/minecraft/client/model/FelineModel.java | 60 +- net/minecraft/client/model/FoxModel.java | 40 +- net/minecraft/client/model/FrogModel.java | 20 +- net/minecraft/client/model/GhastModel.java | 6 +- .../client/model/GiantZombieModel.java | 4 +- net/minecraft/client/model/GoatModel.java | 12 +- net/minecraft/client/model/GuardianModel.java | 48 +- net/minecraft/client/model/HoglinModel.java | 14 +- net/minecraft/client/model/HumanoidModel.java | 118 ++-- net/minecraft/client/model/IllagerModel.java | 32 +- .../client/model/IronGolemModel.java | 16 +- .../client/model/LavaSlimeModel.java | 6 +- net/minecraft/client/model/LlamaModel.java | 26 +- net/minecraft/client/model/Model.java | 42 +- net/minecraft/client/model/PandaModel.java | 64 +- net/minecraft/client/model/ParrotModel.java | 35 +- net/minecraft/client/model/PhantomModel.java | 6 +- net/minecraft/client/model/PiglinModel.java | 36 +- net/minecraft/client/model/PlayerModel.java | 26 +- .../client/model/PolarBearModel.java | 10 +- .../client/model/PufferfishBigModel.java | 8 +- .../client/model/PufferfishMidModel.java | 8 +- .../client/model/PufferfishSmallModel.java | 8 +- .../client/model/QuadrupedModel.java | 28 +- net/minecraft/client/model/RabbitModel.java | 22 +- net/minecraft/client/model/RavagerModel.java | 20 +- net/minecraft/client/model/SalmonModel.java | 8 +- net/minecraft/client/model/SheepFurModel.java | 8 +- net/minecraft/client/model/SheepModel.java | 8 +- .../client/model/ShulkerBulletModel.java | 8 +- net/minecraft/client/model/ShulkerModel.java | 14 +- .../client/model/SilverfishModel.java | 8 +- net/minecraft/client/model/SkeletonModel.java | 16 +- .../client/model/SkullModelBase.java | 4 +- net/minecraft/client/model/SnifferModel.java | 26 +- .../client/model/SnowGolemModel.java | 10 +- net/minecraft/client/model/SpiderModel.java | 12 +- .../client/model/SpinAttackEffectModel.java | 16 +- net/minecraft/client/model/SquidModel.java | 6 +- net/minecraft/client/model/StriderModel.java | 26 +- net/minecraft/client/model/TadpoleModel.java | 8 +- .../client/model/TropicalFishModelA.java | 8 +- .../client/model/TropicalFishModelB.java | 8 +- net/minecraft/client/model/TurtleModel.java | 16 +- net/minecraft/client/model/VexModel.java | 32 +- net/minecraft/client/model/VillagerModel.java | 16 +- net/minecraft/client/model/WardenModel.java | 40 +- .../client/model/WindChargeModel.java | 8 +- net/minecraft/client/model/WitchModel.java | 20 +- .../client/model/WitherBossModel.java | 20 +- net/minecraft/client/model/WolfModel.java | 28 +- net/minecraft/client/model/ZombieModel.java | 4 +- .../client/model/ZombieVillagerModel.java | 8 +- .../client/model/dragon/EnderDragonModel.java | 58 +- .../client/model/geom/ModelPart.java | 4 +- net/minecraft/client/model/geom/PartPose.java | 16 +- .../model/geom/builders/LayerDefinition.java | 4 +- .../model/geom/builders/MeshDefinition.java | 8 +- .../model/geom/builders/PartDefinition.java | 18 +- .../client/multiplayer/ClientChunkCache.java | 36 +- .../ClientHandshakePacketListenerImpl.java | 4 +- .../client/multiplayer/ClientLevel.java | 150 ++--- .../multiplayer/ClientPacketListener.java | 187 +++--- .../multiplayer/ClientRecipeContainer.java | 12 +- .../multiplayer/MultiPlayerGameMode.java | 4 +- .../client/multiplayer/PlayerInfo.java | 4 +- .../multiplayer/RegistryDataCollector.java | 48 +- .../multiplayer/SessionSearchTrees.java | 4 +- .../chat/report/ReportEnvironment.java | 2 +- .../client/particle/ParticleEngine.java | 64 +- .../client/particle/TrailParticle.java | 26 +- .../client/player/AbstractClientPlayer.java | 22 +- net/minecraft/client/player/ClientInput.java | 2 +- .../client/player/KeyboardInput.java | 8 +- net/minecraft/client/player/LocalPlayer.java | 16 +- .../client/renderer/CloudRenderer.java | 287 +++++---- .../renderer/CompiledShaderProgram.java | 105 +-- .../client/renderer/CoreShaders.java | 8 +- .../renderer/DimensionSpecialEffects.java | 20 +- .../client/renderer/FogRenderer.java | 251 ++++---- .../client/renderer/GameRenderer.java | 28 +- .../client/renderer/ItemBlockRenderTypes.java | 8 +- .../client/renderer/ItemInHandRenderer.java | 9 +- .../client/renderer/ItemModelShaper.java | 4 +- .../client/renderer/LevelEventHandler.java | 472 +++++++------- .../client/renderer/LevelRenderer.java | 245 +++---- .../client/renderer/LevelTargetBundle.java | 48 +- .../client/renderer/LightTexture.java | 20 +- .../client/renderer/MapRenderer.java | 85 ++- net/minecraft/client/renderer/Octree.java | 142 ++-- .../client/renderer/OutlineBufferSource.java | 7 +- net/minecraft/client/renderer/PostChain.java | 79 +-- net/minecraft/client/renderer/PostPass.java | 70 +- .../client/renderer/RenderStateShard.java | 20 +- net/minecraft/client/renderer/RenderType.java | 34 +- .../renderer/SectionOcclusionGraph.java | 144 +++-- .../client/renderer/ShaderDefines.java | 32 +- .../client/renderer/ShaderManager.java | 165 +++-- .../client/renderer/ShapeRenderer.java | 295 +++++---- .../client/renderer/SkyRenderer.java | 92 +-- net/minecraft/client/renderer/ViewArea.java | 36 +- .../renderer/WeatherEffectRenderer.java | 194 +++--- .../client/renderer/WorldBorderRenderer.java | 135 ++-- .../renderer/block/LiquidBlockRenderer.java | 24 +- .../renderer/block/model/BakedOverrides.java | 41 +- .../renderer/block/model/BakedQuad.java | 12 +- .../renderer/block/model/BlockElement.java | 18 +- .../renderer/block/model/BlockModel.java | 14 +- .../block/model/BlockModelDefinition.java | 26 +- .../renderer/block/model/FaceBakery.java | 68 +- .../renderer/block/model/MultiVariant.java | 2 +- .../block/model/UnbakedBlockStateModel.java | 2 +- .../renderer/block/model/VariantSelector.java | 24 +- .../block/model/multipart/MultiPart.java | 8 +- .../renderer/blockentity/BannerRenderer.java | 36 +- .../renderer/blockentity/BedRenderer.java | 8 +- .../renderer/blockentity/ChestRenderer.java | 6 +- .../blockentity/ShulkerBoxRenderer.java | 12 +- .../renderer/blockentity/SignRenderer.java | 10 +- .../chunk/CompileTaskDynamicQueue.java | 12 +- .../chunk/SectionRenderDispatcher.java | 72 +-- .../client/renderer/culling/Frustum.java | 16 +- .../debug/ChunkCullingDebugRenderer.java | 20 +- .../client/renderer/debug/DebugRenderer.java | 83 +-- .../renderer/debug/OctreeDebugRenderer.java | 56 +- .../renderer/debug/PathfindingRenderer.java | 63 +- .../RedstoneWireOrientationsRenderer.java | 7 +- .../renderer/entity/AbstractBoatRenderer.java | 44 +- .../entity/AbstractHoglinRenderer.java | 10 +- .../entity/AbstractMinecartRenderer.java | 162 +++-- .../entity/AbstractSkeletonRenderer.java | 22 +- .../entity/AbstractZombieRenderer.java | 20 +- .../renderer/entity/AgeableMobRenderer.java | 14 +- .../renderer/entity/ArmorStandRenderer.java | 62 +- .../client/renderer/entity/ArrowRenderer.java | 26 +- .../client/renderer/entity/BlazeRenderer.java | 2 +- .../client/renderer/entity/BoatRenderer.java | 13 +- .../renderer/entity/BreezeRenderer.java | 22 +- .../renderer/entity/CaveSpiderRenderer.java | 2 +- .../client/renderer/entity/CodRenderer.java | 12 +- .../client/renderer/entity/CowRenderer.java | 2 +- .../renderer/entity/DisplayRenderer.java | 132 ++-- .../renderer/entity/DonkeyRenderer.java | 16 +- .../entity/DragonFireballRenderer.java | 14 +- .../renderer/entity/DrownedRenderer.java | 2 +- .../entity/ElderGuardianRenderer.java | 2 +- .../renderer/entity/EndCrystalRenderer.java | 38 +- .../renderer/entity/EnderDragonRenderer.java | 155 ++--- .../renderer/entity/EndermiteRenderer.java | 2 +- .../entity/EntityRenderDispatcher.java | 123 ++-- .../renderer/entity/EntityRenderer.java | 115 ++-- .../entity/EntityRendererProvider.java | 10 +- .../entity/ExperienceOrbRenderer.java | 48 +- .../renderer/entity/FishingHookRenderer.java | 74 +-- .../renderer/entity/GiantMobRenderer.java | 8 +- .../renderer/entity/GlowSquidRenderer.java | 2 +- .../renderer/entity/GuardianRenderer.java | 147 ++--- .../client/renderer/entity/HorseRenderer.java | 14 +- .../renderer/entity/HumanoidMobRenderer.java | 70 +- .../client/renderer/entity/HuskRenderer.java | 2 +- .../renderer/entity/IllagerRenderer.java | 20 +- .../renderer/entity/ItemEntityRenderer.java | 30 +- .../renderer/entity/ItemFrameRenderer.java | 95 ++- .../client/renderer/entity/ItemRenderer.java | 132 ++-- .../renderer/entity/LeashKnotRenderer.java | 10 +- .../entity/LightningBoltRenderer.java | 130 ++-- .../renderer/entity/LivingEntityRenderer.java | 240 +++---- .../client/renderer/entity/LlamaRenderer.java | 20 +- .../renderer/entity/MagmaCubeRenderer.java | 22 +- .../client/renderer/entity/MobRenderer.java | 8 +- .../renderer/entity/MushroomCowRenderer.java | 10 +- .../renderer/entity/PaintingRenderer.java | 158 ++--- .../client/renderer/entity/PandaRenderer.java | 118 ++-- .../renderer/entity/ParrotRenderer.java | 18 +- .../renderer/entity/PiglinRenderer.java | 48 +- .../client/renderer/entity/RaftRenderer.java | 6 +- .../entity/ShulkerBulletRenderer.java | 24 +- .../renderer/entity/ShulkerRenderer.java | 30 +- .../renderer/entity/SilverfishRenderer.java | 2 +- .../renderer/entity/SnowGolemRenderer.java | 2 +- .../entity/SpectralArrowRenderer.java | 2 +- .../renderer/entity/SpiderRenderer.java | 6 +- .../client/renderer/entity/SquidRenderer.java | 28 +- .../renderer/entity/TadpoleRenderer.java | 2 +- .../renderer/entity/ThrownItemRenderer.java | 18 +- .../renderer/entity/TntMinecartRenderer.java | 12 +- .../renderer/entity/TropicalFishRenderer.java | 40 +- .../renderer/entity/UndeadHorseRenderer.java | 10 +- .../client/renderer/entity/VexRenderer.java | 10 +- .../renderer/entity/WardenRenderer.java | 22 +- .../renderer/entity/WindChargeRenderer.java | 10 +- .../renderer/entity/WitherBossRenderer.java | 24 +- .../renderer/entity/WitherSkullRenderer.java | 24 +- .../renderer/entity/ZombieRenderer.java | 24 +- .../entity/ZombifiedPiglinRenderer.java | 32 +- .../renderer/entity/layers/ArrowLayer.java | 13 +- .../entity/layers/BeeStingerLayer.java | 8 +- .../entity/layers/BreezeWindLayer.java | 8 +- .../renderer/entity/layers/CapeLayer.java | 28 +- .../entity/layers/CarriedBlockLayer.java | 8 +- .../entity/layers/CatCollarLayer.java | 10 +- .../entity/layers/CreeperPowerLayer.java | 4 +- .../entity/layers/CrossedArmsItemLayer.java | 12 +- .../entity/layers/CustomHeadLayer.java | 22 +- .../entity/layers/Deadmau5EarsLayer.java | 18 +- .../layers/DolphinCarryingItemLayer.java | 24 +- .../entity/layers/DrownedOuterLayer.java | 6 +- .../entity/layers/EnergySwirlLayer.java | 14 +- .../entity/layers/EquipmentLayerRenderer.java | 62 +- .../renderer/entity/layers/EyesLayer.java | 10 +- .../entity/layers/FoxHeldItemLayer.java | 26 +- .../entity/layers/HorseArmorLayer.java | 22 +- .../entity/layers/HorseMarkingLayer.java | 10 +- .../entity/layers/HumanoidArmorLayer.java | 75 +-- .../layers/IronGolemCrackinessLayer.java | 4 +- .../entity/layers/IronGolemFlowerLayer.java | 8 +- .../entity/layers/ItemInHandLayer.java | 48 +- .../layers/LivingEntityEmissiveLayer.java | 30 +- .../entity/layers/LlamaDecorLayer.java | 30 +- .../layers/MushroomCowMushroomLayer.java | 18 +- .../entity/layers/PandaHoldsItemLayer.java | 26 +- .../entity/layers/ParrotOnShoulderLayer.java | 33 +- .../entity/layers/PlayerItemInHandLayer.java | 39 +- .../renderer/entity/layers/RenderLayer.java | 32 +- .../renderer/entity/layers/SaddleLayer.java | 22 +- .../entity/layers/SheepWoolLayer.java | 50 +- .../entity/layers/SkeletonClothingLayer.java | 4 +- .../entity/layers/SlimeOuterLayer.java | 14 +- .../entity/layers/SnowGolemHeadLayer.java | 25 +- .../entity/layers/SpinAttackEffectLayer.java | 10 +- .../entity/layers/StuckInBodyLayer.java | 57 +- .../layers/TropicalFishPatternLayer.java | 8 +- .../layers/VillagerProfessionLayer.java | 14 +- .../renderer/entity/layers/WingsLayer.java | 26 +- .../entity/layers/WitherArmorLayer.java | 4 +- .../entity/layers/WolfArmorLayer.java | 32 +- .../entity/layers/WolfCollarLayer.java | 4 +- .../entity/player/PlayerRenderer.java | 228 +++---- .../entity/state/EnderDragonRenderState.java | 14 +- .../entity/state/WolfRenderState.java | 14 +- .../client/renderer/item/ItemProperties.java | 4 +- .../renderer/texture/TextureManager.java | 6 +- .../atlas/sources/PalettedPermutations.java | 14 +- .../client/resources/MapTextureManager.java | 28 +- .../client/resources/TextureAtlasHolder.java | 12 +- .../model/BlockStateModelLoader.java | 21 +- .../client/resources/model/BuiltInModel.java | 6 +- .../resources/model/DelegateBakedModel.java | 4 +- .../resources/model/EquipmentModelSet.java | 8 +- .../client/resources/model/ItemModel.java | 10 +- .../client/resources/model/Material.java | 8 +- .../client/resources/model/ModelBakery.java | 14 +- .../resources/model/ModelDiscovery.java | 38 +- .../resources/model/ModelGroupCollector.java | 18 +- .../client/resources/model/ModelManager.java | 54 +- .../resources/model/MultiPartBakedModel.java | 6 +- .../resources/model/SimpleBakedModel.java | 42 +- .../client/resources/model/SpecialModels.java | 8 +- .../client/resources/model/UnbakedModel.java | 2 +- .../resources/model/WeightedBakedModel.java | 6 +- .../client/searchtree/SuffixArray.java | 32 +- .../MovementTutorialStepInstance.java | 8 +- net/minecraft/client/tutorial/Tutorial.java | 4 +- .../client/tutorial/TutorialStepInstance.java | 2 +- .../arguments/ResourceKeyArgument.java | 29 +- .../arguments/ScoreHolderArgument.java | 36 +- .../arguments/selector/SelectorPattern.java | 8 +- net/minecraft/core/BlockPos.java | 6 +- .../core/DefaultedMappedRegistry.java | 15 +- net/minecraft/core/DefaultedRegistry.java | 2 +- net/minecraft/core/Direction.java | 44 +- net/minecraft/core/GlobalPos.java | 4 +- net/minecraft/core/HolderGetter.java | 18 +- net/minecraft/core/HolderLookup.java | 10 +- net/minecraft/core/MappedRegistry.java | 134 ++-- net/minecraft/core/Registry.java | 38 +- net/minecraft/core/RegistryAccess.java | 4 +- net/minecraft/core/RegistrySetBuilder.java | 55 +- .../core/RegistrySynchronization.java | 4 +- net/minecraft/core/Vec3i.java | 8 +- net/minecraft/core/WritableRegistry.java | 5 +- .../core/cauldron/CauldronInteraction.java | 110 ++-- .../core/component/DataComponentHolder.java | 4 +- .../component/DataComponentPredicate.java | 10 +- .../dispenser/BoatDispenseItemBehavior.java | 4 +- .../EquipmentDispenseItemBehavior.java | 10 +- .../MinecartDispenseItemBehavior.java | 4 +- .../dispenser/ShearsDispenseItemBehavior.java | 8 +- .../particles/DustColorTransitionOptions.java | 8 +- .../core/particles/DustParticleOptions.java | 6 +- net/minecraft/data/DataProvider.java | 16 +- .../packs/VanillaAdventureAdvancements.java | 94 +-- .../packs/VanillaHusbandryAdvancements.java | 93 +-- .../packs/WinterDropAdvancementProvider.java | 4 +- .../data/info/BiomeParametersDumpReport.java | 4 +- net/minecraft/data/info/CommandsReport.java | 13 +- .../data/info/DatapackStructureReport.java | 14 +- .../data/loot/BlockLootSubProvider.java | 29 +- .../data/loot/EntityLootSubProvider.java | 18 +- .../data/loot/packs/VanillaBlockLoot.java | 29 +- .../data/loot/packs/VanillaEquipmentLoot.java | 44 +- .../data/loot/packs/WinterDropBlockLoot.java | 4 +- .../packs/WinterDropLootTableProvider.java | 4 +- .../data/models/ItemModelGenerators.java | 44 +- net/minecraft/data/recipes/RecipeBuilder.java | 2 +- net/minecraft/data/recipes/RecipeOutput.java | 2 +- .../data/recipes/RecipeProvider.java | 540 ++++++++-------- .../data/recipes/ShapedRecipeBuilder.java | 28 +- .../data/recipes/ShapelessRecipeBuilder.java | 30 +- .../recipes/SimpleCookingRecipeBuilder.java | 10 +- .../data/recipes/SingleItemRecipeBuilder.java | 10 +- .../SmithingTransformRecipeBuilder.java | 10 +- .../recipes/SmithingTrimRecipeBuilder.java | 10 +- .../data/recipes/SpecialRecipeBuilder.java | 4 +- .../data/recipes/TransmuteRecipeBuilder.java | 32 +- .../recipes/packs/VanillaRecipeProvider.java | 4 +- .../packs/WinterDropRecipeProvider.java | 4 +- .../data/registries/WinterDropRegistries.java | 4 +- .../tags/WinterDropBiomeTagsProvider.java | 4 +- .../tags/WinterDropBlockTagsProvider.java | 4 +- .../WinterDropEntityTypeTagsProvider.java | 4 +- net/minecraft/data/worldgen/Pools.java | 4 +- .../data/worldgen/TerrainProvider.java | 186 +++--- .../data/worldgen/WinterDropBiomes.java | 16 +- .../data/worldgen/biome/OverworldBiomes.java | 16 +- .../gametest/framework/GameTestHelper.java | 40 +- .../gametest/framework/StructureUtils.java | 16 +- .../locale/DeprecatedTranslationsInfo.java | 16 +- net/minecraft/network/FriendlyByteBuf.java | 32 +- .../network/chat/ChatTypeDecoration.java | 7 +- net/minecraft/network/chat/Component.java | 8 +- net/minecraft/network/codec/StreamCodec.java | 128 ++-- .../game/ClientGamePacketListener.java | 18 +- .../ClientboundEntityPositionSyncPacket.java | 7 +- .../game/ClientboundMoveMinecartPacket.java | 7 +- .../game/ClientboundPlayerPositionPacket.java | 4 +- .../game/ClientboundRecipeBookAddPacket.java | 11 +- .../game/ClientboundSetHeldSlotPacket.java | 19 +- .../game/ClientboundTeleportEntityPacket.java | 4 +- .../network/protocol/game/DebugPackets.java | 4 +- .../game/ServerGamePacketListener.java | 4 +- .../game/ServerboundMovePlayerPacket.java | 52 +- .../ServerboundSelectBundleItemPacket.java | 17 +- .../login/ClientLoginPacketListener.java | 2 +- .../network/syncher/EntityDataSerializer.java | 4 +- .../recipebook/PlaceRecipeHelper.java | 46 +- .../recipebook/ServerPlaceRecipe.java | 130 ++-- .../resources/RegistryDataLoader.java | 50 +- net/minecraft/server/MinecraftServer.java | 7 +- .../server/ReloadableServerRegistries.java | 51 +- .../server/ReloadableServerResources.java | 45 +- .../server/ServerFunctionLibrary.java | 16 +- .../server/ServerFunctionManager.java | 8 +- .../server/SuppressedExceptionCollector.java | 8 +- .../server/commands/GameRuleCommand.java | 4 +- net/minecraft/server/commands/LookAt.java | 2 +- .../server/commands/RotateCommand.java | 16 +- .../server/commands/TeleportCommand.java | 98 +-- .../dedicated/DedicatedServerProperties.java | 15 +- .../server/dedicated/ServerWatchdog.java | 6 +- net/minecraft/server/level/ChunkHolder.java | 26 +- net/minecraft/server/level/ChunkMap.java | 40 +- .../server/level/ChunkTaskDispatcher.java | 28 +- .../server/level/ChunkTaskPriorityQueue.java | 14 +- .../server/level/GenerationChunkHolder.java | 2 +- .../server/level/ParticleStatus.java | 10 +- .../server/level/ServerChunkCache.java | 36 +- net/minecraft/server/level/ServerEntity.java | 30 +- .../server/level/ServerEntityGetter.java | 50 +- net/minecraft/server/level/ServerLevel.java | 55 +- net/minecraft/server/level/ServerPlayer.java | 242 ++++--- .../level/ThreadedLevelLightEngine.java | 6 +- .../level/ThrottlingChunkTaskDispatcher.java | 18 +- .../server/network/LegacyTextFilter.java | 110 ++-- .../PlayerSafetyServiceTextFilter.java | 92 +-- .../network/ServerGamePacketListenerImpl.java | 42 +- .../server/network/ServerTextFilter.java | 102 +-- .../resources/PreparableReloadListener.java | 2 +- .../resources/ProfiledReloadInstance.java | 6 +- .../ResourceManagerReloadListener.java | 8 +- .../SimpleJsonResourceReloadListener.java | 22 +- .../SimplePreparableReloadListener.java | 8 +- net/minecraft/stats/RecipeBookSettings.java | 18 +- net/minecraft/stats/ServerRecipeBook.java | 52 +- net/minecraft/tags/TagEntry.java | 4 +- net/minecraft/tags/TagKey.java | 4 +- net/minecraft/tags/TagLoader.java | 65 +- .../tags/TagNetworkSerialization.java | 7 +- net/minecraft/util/ARGB.java | 128 ++-- net/minecraft/util/BinaryAnimator.java | 18 +- net/minecraft/util/ExtraCodecs.java | 54 +- net/minecraft/util/Mth.java | 38 +- net/minecraft/util/RandomSource.java | 4 +- net/minecraft/util/SmoothDouble.java | 20 +- net/minecraft/util/SpawnUtil.java | 20 +- net/minecraft/util/StringRepresentable.java | 4 +- net/minecraft/util/TickThrottler.java | 6 +- net/minecraft/util/TriState.java | 4 +- net/minecraft/util/context/ContextKey.java | 8 +- net/minecraft/util/context/ContextKeySet.java | 22 +- net/minecraft/util/context/ContextMap.java | 44 +- net/minecraft/util/datafix/DataFixers.java | 3 + .../util/datafix/ExtraDataFixUtils.java | 26 +- .../datafix/fixes/AttributeIdPrefixFix.java | 18 +- .../datafix/fixes/AttributesRenameFix.java | 24 +- .../datafix/fixes/AttributesRenameLegacy.java | 20 +- .../datafix/fixes/BitStorageAlignFix.java | 10 +- .../util/datafix/fixes/BoatSplitFix.java | 24 +- .../datafix/fixes/CarvingStepRemoveFix.java | 8 +- .../fixes/ChunkPalettedStorageFix.java | 426 ++++++------ .../ContainerBlockEntityLockPredicateFix.java | 8 +- .../datafix/fixes/EntitySalmonSizeFix.java | 19 + ...esistantToDamageResistantComponentFix.java | 4 +- .../datafix/fixes/FoodToConsumableFix.java | 4 +- .../fixes/LockComponentPredicateFix.java | 16 +- .../datafix/fixes/OminousBannerRarityFix.java | 12 +- .../fixes/StructuresBecomeConfiguredFix.java | 4 +- .../TrialSpawnerConfigInRegistryFix.java | 72 +-- .../fixes/VillagerSetCanPickUpLootFix.java | 8 +- .../datafix/fixes/WorldGenSettingsFix.java | 12 +- net/minecraft/util/datafix/schemas/V4059.java | 4 +- net/minecraft/util/datafix/schemas/V4067.java | 8 +- net/minecraft/util/datafix/schemas/V4070.java | 4 +- net/minecraft/util/datafix/schemas/V4071.java | 4 +- .../util/profiling/InactiveProfiler.java | 4 +- net/minecraft/util/profiling/Profiler.java | 16 +- .../util/profiling/ProfilerFiller.java | 48 +- .../util/profiling/TracyZoneFiller.java | 26 +- net/minecraft/util/profiling/Zone.java | 20 +- .../thread/AbstractConsecutiveExecutor.java | 10 +- .../util/thread/BlockableEventLoop.java | 10 +- .../util/thread/ConsecutiveExecutor.java | 4 +- .../thread/PriorityConsecutiveExecutor.java | 8 +- net/minecraft/util/thread/StrictQueue.java | 12 +- net/minecraft/util/thread/TaskScheduler.java | 16 +- .../util/worldupdate/WorldUpgrader.java | 16 +- net/minecraft/world/InteractionResult.java | 4 +- net/minecraft/world/LockCode.java | 12 +- .../world/effect/AbsorptionMobEffect.java | 10 +- .../world/effect/BadOmenMobEffect.java | 12 +- .../world/effect/HealOrHarmMobEffect.java | 26 +- .../world/effect/HungerMobEffect.java | 6 +- .../world/effect/InfestedMobEffect.java | 26 +- net/minecraft/world/effect/MobEffect.java | 21 +- .../world/effect/MobEffectInstance.java | 8 +- .../world/effect/OozingMobEffect.java | 14 +- .../world/effect/PoisonMobEffect.java | 6 +- .../world/effect/RaidOmenMobEffect.java | 6 +- .../world/effect/RegenerationMobEffect.java | 6 +- .../world/effect/SaturationMobEffect.java | 6 +- .../world/effect/WeavingMobEffect.java | 26 +- .../world/effect/WindChargedMobEffect.java | 16 +- .../world/effect/WitherMobEffect.java | 4 +- net/minecraft/world/entity/AgeableMob.java | 22 +- .../world/entity/AnimationState.java | 10 +- .../world/entity/AreaEffectCloud.java | 64 +- .../world/entity/ConversionParams.java | 4 +- .../world/entity/ConversionType.java | 116 ++-- net/minecraft/world/entity/Display.java | 159 +++-- .../world/entity/ElytraAnimationState.java | 16 +- net/minecraft/world/entity/Entity.java | 226 ++++--- .../world/entity/EntitySpawnReason.java | 8 +- net/minecraft/world/entity/EntityType.java | 184 +++--- net/minecraft/world/entity/EquipmentSlot.java | 8 +- .../world/entity/EquipmentTable.java | 4 +- net/minecraft/world/entity/ExperienceOrb.java | 24 +- net/minecraft/world/entity/GlowSquid.java | 26 +- net/minecraft/world/entity/Interaction.java | 34 +- net/minecraft/world/entity/Leashable.java | 4 +- net/minecraft/world/entity/LightningBolt.java | 6 +- net/minecraft/world/entity/LivingEntity.java | 340 +++++----- net/minecraft/world/entity/Marker.java | 10 +- net/minecraft/world/entity/Mob.java | 239 +++---- net/minecraft/world/entity/NeutralMob.java | 16 +- .../world/entity/OminousItemSpawner.java | 32 +- net/minecraft/world/entity/PathfinderMob.java | 8 +- .../world/entity/PortalProcessor.java | 4 +- .../world/entity/PositionMoveRotation.java | 36 +- net/minecraft/world/entity/Relative.java | 16 +- net/minecraft/world/entity/Shearable.java | 2 +- .../world/entity/SpawnPlacements.java | 4 +- net/minecraft/world/entity/TamableAnimal.java | 20 +- .../world/entity/WalkAnimationState.java | 6 +- .../ai/attributes/AttributeInstance.java | 4 +- .../entity/ai/attributes/AttributeMap.java | 4 +- .../entity/ai/behavior/GiveGiftToHero.java | 4 +- .../world/entity/ai/behavior/MeleeAttack.java | 10 +- .../entity/ai/behavior/StartAttacking.java | 6 +- .../StopAttackingIfTargetInvalid.java | 18 +- .../entity/ai/behavior/WorkAtComposter.java | 4 +- .../world/entity/ai/control/Control.java | 8 +- .../target/NearestAttackableTargetGoal.java | 18 +- .../NearestAttackableWitchTargetGoal.java | 10 +- .../NearestHealableRaiderTargetGoal.java | 4 +- .../goal/target/NonTameRandomTargetGoal.java | 6 +- .../memory/NearestVisibleLivingEntities.java | 10 +- .../entity/ai/navigation/PathNavigation.java | 4 +- .../ai/sensing/AxolotlAttackablesSensor.java | 10 +- .../ai/sensing/FrogAttackablesSensor.java | 12 +- .../NearestVisibleLivingEntitySensor.java | 10 +- .../world/entity/ai/sensing/PlayerSensor.java | 4 +- .../world/entity/ai/sensing/Sensor.java | 38 +- .../ai/sensing/VillagerHostilesSensor.java | 4 +- .../ai/targeting/TargetingConditions.java | 23 +- .../entity/ai/village/poi/PoiRecord.java | 4 +- .../entity/ai/village/poi/PoiSection.java | 4 +- net/minecraft/world/entity/ambient/Bat.java | 44 +- .../world/entity/animal/AbstractFish.java | 12 +- .../entity/animal/AbstractSchoolingFish.java | 4 +- .../entity/animal/AgeableWaterCreature.java | 19 +- net/minecraft/world/entity/animal/Animal.java | 32 +- net/minecraft/world/entity/animal/Bee.java | 75 +-- net/minecraft/world/entity/animal/Cat.java | 30 +- .../world/entity/animal/Chicken.java | 22 +- .../world/entity/animal/Dolphin.java | 57 +- net/minecraft/world/entity/animal/Fox.java | 95 +-- .../world/entity/animal/IronGolem.java | 36 +- .../world/entity/animal/MushroomCow.java | 48 +- net/minecraft/world/entity/animal/Ocelot.java | 22 +- net/minecraft/world/entity/animal/Panda.java | 51 +- net/minecraft/world/entity/animal/Parrot.java | 28 +- net/minecraft/world/entity/animal/Pig.java | 18 +- .../world/entity/animal/PolarBear.java | 24 +- .../world/entity/animal/Pufferfish.java | 16 +- net/minecraft/world/entity/animal/Rabbit.java | 28 +- net/minecraft/world/entity/animal/Salmon.java | 26 +- net/minecraft/world/entity/animal/Sheep.java | 54 +- .../world/entity/animal/SnowGolem.java | 23 +- net/minecraft/world/entity/animal/Squid.java | 8 +- .../world/entity/animal/TropicalFish.java | 28 +- net/minecraft/world/entity/animal/Turtle.java | 44 +- .../world/entity/animal/WaterAnimal.java | 11 +- net/minecraft/world/entity/animal/Wolf.java | 60 +- .../world/entity/animal/allay/Allay.java | 62 +- .../entity/animal/armadillo/Armadillo.java | 40 +- .../world/entity/animal/axolotl/Axolotl.java | 54 +- .../entity/animal/axolotl/AxolotlAi.java | 2 +- .../world/entity/animal/camel/Camel.java | 30 +- .../world/entity/animal/frog/Frog.java | 30 +- .../world/entity/animal/frog/Tadpole.java | 18 +- .../world/entity/animal/goat/Goat.java | 36 +- .../animal/horse/AbstractChestedHorse.java | 22 +- .../entity/animal/horse/AbstractHorse.java | 62 +- .../world/entity/animal/horse/Horse.java | 18 +- .../world/entity/animal/horse/Llama.java | 26 +- .../entity/animal/horse/SkeletonHorse.java | 24 +- .../entity/animal/horse/TraderLlama.java | 24 +- .../entity/animal/horse/ZombieHorse.java | 8 +- .../world/entity/animal/sniffer/Sniffer.java | 6 +- .../world/entity/boss/EnderDragonPart.java | 8 +- .../boss/enderdragon/DragonFlightHistory.java | 22 +- .../entity/boss/enderdragon/EndCrystal.java | 30 +- .../entity/boss/enderdragon/EnderDragon.java | 86 +-- .../phases/AbstractDragonPhaseInstance.java | 2 +- .../phases/DragonChargePlayerPhase.java | 2 +- .../enderdragon/phases/DragonDeathPhase.java | 4 +- .../phases/DragonHoldingPatternPhase.java | 10 +- .../enderdragon/phases/DragonHoverPhase.java | 2 +- .../phases/DragonLandingApproachPhase.java | 10 +- .../phases/DragonLandingPhase.java | 4 +- .../phases/DragonPhaseInstance.java | 2 +- .../phases/DragonSittingAttackingPhase.java | 2 +- .../phases/DragonSittingFlamingPhase.java | 8 +- .../phases/DragonSittingScanningPhase.java | 6 +- .../phases/DragonStrafePlayerPhase.java | 8 +- .../phases/DragonTakeoffPhase.java | 4 +- .../world/entity/boss/wither/WitherBoss.java | 43 +- .../world/entity/decoration/ArmorStand.java | 76 +-- .../decoration/BlockAttachedEntity.java | 26 +- .../entity/decoration/HangingEntity.java | 4 +- .../world/entity/decoration/ItemFrame.java | 66 +- .../decoration/LeashFenceKnotEntity.java | 6 +- .../world/entity/decoration/Painting.java | 22 +- .../entity/decoration/PaintingVariants.java | 16 +- .../world/entity/item/FallingBlockEntity.java | 44 +- .../world/entity/item/ItemEntity.java | 50 +- .../world/entity/item/PrimedTnt.java | 22 +- .../entity/monster/AbstractSkeleton.java | 16 +- net/minecraft/world/entity/monster/Blaze.java | 7 +- .../world/entity/monster/Bogged.java | 22 +- .../world/entity/monster/CaveSpider.java | 10 +- .../world/entity/monster/Creeper.java | 30 +- .../world/entity/monster/Drowned.java | 37 +- .../world/entity/monster/ElderGuardian.java | 6 +- .../world/entity/monster/EnderMan.java | 53 +- .../world/entity/monster/Endermite.java | 20 +- .../world/entity/monster/Evoker.java | 8 +- net/minecraft/world/entity/monster/Ghast.java | 37 +- .../world/entity/monster/Guardian.java | 23 +- net/minecraft/world/entity/monster/Husk.java | 13 +- .../world/entity/monster/Illusioner.java | 4 +- .../world/entity/monster/MagmaCube.java | 4 +- .../world/entity/monster/Monster.java | 18 +- .../entity/monster/PatrollingMonster.java | 47 +- .../world/entity/monster/Phantom.java | 33 +- .../world/entity/monster/Pillager.java | 32 +- .../world/entity/monster/Ravager.java | 36 +- .../world/entity/monster/Shulker.java | 47 +- .../world/entity/monster/Silverfish.java | 17 +- .../world/entity/monster/Skeleton.java | 14 +- net/minecraft/world/entity/monster/Slime.java | 67 +- .../entity/monster/SpellcasterIllager.java | 19 +- .../world/entity/monster/Spider.java | 10 +- net/minecraft/world/entity/monster/Stray.java | 11 +- .../world/entity/monster/Strider.java | 42 +- net/minecraft/world/entity/monster/Vex.java | 39 +- .../world/entity/monster/Vindicator.java | 34 +- .../world/entity/monster/WitherSkeleton.java | 12 +- .../world/entity/monster/Zoglin.java | 44 +- .../world/entity/monster/Zombie.java | 104 ++- .../world/entity/monster/ZombieVillager.java | 50 +- .../world/entity/monster/ZombifiedPiglin.java | 30 +- .../world/entity/monster/breeze/Breeze.java | 10 +- .../entity/monster/creaking/Creaking.java | 28 +- .../monster/creaking/CreakingTransient.java | 12 +- .../world/entity/monster/hoglin/Hoglin.java | 52 +- .../world/entity/monster/hoglin/HoglinAi.java | 22 +- .../entity/monster/hoglin/HoglinBase.java | 18 +- .../entity/monster/piglin/AbstractPiglin.java | 26 +- .../world/entity/monster/piglin/Piglin.java | 74 ++- .../world/entity/monster/piglin/PiglinAi.java | 152 ++--- .../entity/monster/piglin/PiglinBrute.java | 22 +- .../entity/monster/piglin/PiglinBruteAi.java | 20 +- .../world/entity/monster/warden/Warden.java | 50 +- .../world/entity/monster/warden/WardenAi.java | 6 +- .../world/entity/npc/AbstractVillager.java | 29 +- .../world/entity/npc/InventoryCarrier.java | 6 +- net/minecraft/world/entity/npc/Villager.java | 102 +-- .../world/entity/npc/WanderingTrader.java | 36 +- .../world/entity/player/Inventory.java | 20 +- net/minecraft/world/entity/player/Player.java | 156 ++--- .../world/entity/player/StackedContents.java | 234 +++---- .../entity/player/StackedItemContents.java | 38 +- .../entity/projectile/AbstractArrow.java | 86 +-- .../projectile/AbstractHurtingProjectile.java | 16 +- .../world/entity/projectile/EvokerFangs.java | 16 +- .../world/entity/projectile/EyeOfEnder.java | 12 +- .../world/entity/projectile/Fireball.java | 14 +- .../projectile/FireworkRocketEntity.java | 40 +- .../world/entity/projectile/FishingHook.java | 26 +- .../entity/projectile/LargeFireball.java | 14 +- .../world/entity/projectile/Projectile.java | 98 ++- .../entity/projectile/ShulkerBullet.java | 40 +- .../world/entity/projectile/Snowball.java | 8 +- .../entity/projectile/SpectralArrow.java | 14 +- .../projectile/ThrowableItemProjectile.java | 26 +- .../world/entity/projectile/ThrownEgg.java | 8 +- .../entity/projectile/ThrownEnderpearl.java | 28 +- .../projectile/ThrownExperienceBottle.java | 8 +- .../world/entity/projectile/ThrownPotion.java | 20 +- .../entity/projectile/ThrownTrident.java | 12 +- .../world/entity/projectile/WitherSkull.java | 12 +- net/minecraft/world/entity/raid/Raid.java | 42 +- net/minecraft/world/entity/raid/Raider.java | 55 +- .../world/entity/vehicle/AbstractBoat.java | 60 +- .../entity/vehicle/AbstractChestBoat.java | 30 +- .../entity/vehicle/AbstractMinecart.java | 138 ++-- .../vehicle/AbstractMinecartContainer.java | 30 +- net/minecraft/world/entity/vehicle/Boat.java | 4 +- .../world/entity/vehicle/ChestBoat.java | 4 +- .../world/entity/vehicle/ChestRaft.java | 4 +- .../world/entity/vehicle/ContainerEntity.java | 12 +- .../entity/vehicle/MinecartBehavior.java | 50 +- .../entity/vehicle/MinecartCommandBlock.java | 12 +- .../world/entity/vehicle/MinecartFurnace.java | 44 +- .../world/entity/vehicle/MinecartHopper.java | 18 +- .../world/entity/vehicle/MinecartSpawner.java | 12 +- .../world/entity/vehicle/MinecartTNT.java | 28 +- .../entity/vehicle/NewMinecartBehavior.java | 255 ++++---- .../entity/vehicle/OldMinecartBehavior.java | 128 ++-- net/minecraft/world/entity/vehicle/Raft.java | 4 +- .../world/entity/vehicle/VehicleEntity.java | 20 +- net/minecraft/world/food/FoodData.java | 16 +- net/minecraft/world/food/FoodProperties.java | 17 +- .../inventory/AbstractContainerMenu.java | 38 +- .../world/inventory/AbstractCraftingMenu.java | 38 +- .../world/inventory/AbstractFurnaceMenu.java | 32 +- net/minecraft/world/inventory/AnvilMenu.java | 3 +- net/minecraft/world/inventory/ChestMenu.java | 8 +- .../world/inventory/CraftingContainer.java | 3 +- .../world/inventory/CraftingMenu.java | 37 +- .../world/inventory/DispenserMenu.java | 10 +- .../world/inventory/EnchantmentMenu.java | 6 +- .../world/inventory/ItemCombinerMenu.java | 21 +- .../world/inventory/RecipeBookMenu.java | 2 +- .../world/inventory/RecipeCraftingHolder.java | 10 +- net/minecraft/world/inventory/ResultSlot.java | 19 +- .../world/inventory/SmithingMenu.java | 12 +- .../inventory/StackedContentsCompatible.java | 2 +- .../world/inventory/StonecutterMenu.java | 12 +- net/minecraft/world/item/AnimalArmorItem.java | 16 +- net/minecraft/world/item/ArmorItem.java | 4 +- net/minecraft/world/item/AxeItem.java | 4 +- net/minecraft/world/item/BoatItem.java | 8 +- net/minecraft/world/item/BottleItem.java | 4 +- net/minecraft/world/item/BowItem.java | 24 +- net/minecraft/world/item/BrushItem.java | 2 +- net/minecraft/world/item/BucketItem.java | 4 +- net/minecraft/world/item/BundleItem.java | 58 +- net/minecraft/world/item/CrossbowItem.java | 28 +- net/minecraft/world/item/DiggerItem.java | 4 +- net/minecraft/world/item/EggItem.java | 4 +- net/minecraft/world/item/EmptyMapItem.java | 4 +- net/minecraft/world/item/EnderEyeItem.java | 6 +- net/minecraft/world/item/EnderpearlItem.java | 4 +- .../world/item/ExperienceBottleItem.java | 4 +- .../world/item/FireworkRocketItem.java | 4 +- net/minecraft/world/item/FishingRodItem.java | 6 +- .../world/item/FoodOnAStickItem.java | 12 +- net/minecraft/world/item/HoeItem.java | 4 +- net/minecraft/world/item/InstrumentItem.java | 22 +- net/minecraft/world/item/Instruments.java | 24 +- net/minecraft/world/item/Item.java | 67 +- net/minecraft/world/item/ItemCooldowns.java | 40 +- net/minecraft/world/item/ItemStack.java | 66 +- .../world/item/ItemUseAnimation.java | 6 +- net/minecraft/world/item/ItemUtils.java | 4 +- net/minecraft/world/item/Items.java | 42 +- net/minecraft/world/item/JukeboxPlayable.java | 14 +- .../world/item/KnowledgeBookItem.java | 4 +- .../world/item/LingeringPotionItem.java | 4 +- net/minecraft/world/item/MaceItem.java | 38 +- net/minecraft/world/item/MapItem.java | 33 +- net/minecraft/world/item/MinecartItem.java | 4 +- net/minecraft/world/item/PickaxeItem.java | 4 +- .../world/item/PlaceOnWaterBlockItem.java | 4 +- .../world/item/ServerItemCooldowns.java | 12 +- net/minecraft/world/item/ShieldItem.java | 6 +- net/minecraft/world/item/ShovelItem.java | 4 +- net/minecraft/world/item/SignItem.java | 4 +- .../world/item/SmithingTemplateItem.java | 24 +- net/minecraft/world/item/SnowballItem.java | 4 +- net/minecraft/world/item/SpawnEggItem.java | 4 +- .../world/item/SplashPotionItem.java | 4 +- net/minecraft/world/item/SpyglassItem.java | 10 +- .../world/item/StandingAndWallBlockItem.java | 6 +- net/minecraft/world/item/SwordItem.java | 4 +- .../world/item/ThrowablePotionItem.java | 4 +- net/minecraft/world/item/ToolMaterial.java | 29 +- net/minecraft/world/item/TridentItem.java | 48 +- net/minecraft/world/item/WindChargeItem.java | 4 +- .../world/item/WritableBookItem.java | 6 +- net/minecraft/world/item/WrittenBookItem.java | 6 +- .../world/item/alchemy/PotionContents.java | 20 +- .../world/item/component/BundleContents.java | 22 +- .../world/item/component/Consumable.java | 94 +-- .../item/component/ConsumableListener.java | 2 +- .../world/item/component/DeathProtection.java | 4 +- .../component/OminousBottleAmplifier.java | 4 +- .../item/component/SuspiciousStewEffects.java | 4 +- net/minecraft/world/item/component/Tool.java | 12 +- .../world/item/component/UseCooldown.java | 10 +- .../world/item/component/UseRemainder.java | 20 +- .../ApplyStatusEffectsConsumeEffect.java | 18 +- .../ClearAllStatusEffectsConsumeEffect.java | 4 +- .../item/consume_effects/ConsumeEffect.java | 8 +- .../PlaySoundConsumeEffect.java | 4 +- .../RemoveStatusEffectsConsumeEffect.java | 8 +- .../TeleportRandomlyConsumeEffect.java | 26 +- .../item/crafting/AbstractCookingRecipe.java | 14 +- .../world/item/crafting/ArmorDyeRecipe.java | 18 +- .../item/crafting/BannerDuplicateRecipe.java | 24 +- .../item/crafting/BookCloningRecipe.java | 24 +- .../item/crafting/CookingBookCategory.java | 6 +- .../world/item/crafting/CraftingRecipe.java | 10 +- .../item/crafting/DecoratedPotRecipe.java | 38 +- .../item/crafting/FireworkRocketRecipe.java | 18 +- .../item/crafting/FireworkStarFadeRecipe.java | 18 +- .../item/crafting/FireworkStarRecipe.java | 18 +- .../world/item/crafting/Ingredient.java | 32 +- .../world/item/crafting/MapCloningRecipe.java | 18 +- .../world/item/crafting/PlacementInfo.java | 48 +- .../world/item/crafting/RecipeAccess.java | 2 +- .../item/crafting/RecipeBookCategories.java | 4 +- .../world/item/crafting/RecipeCache.java | 14 +- .../world/item/crafting/RecipeManager.java | 91 +-- .../world/item/crafting/RecipeMap.java | 22 +- .../item/crafting/RecipePropertySet.java | 16 +- .../world/item/crafting/RepairItemRecipe.java | 8 +- .../world/item/crafting/SelectableRecipe.java | 8 +- .../item/crafting/ShapedRecipePattern.java | 28 +- .../world/item/crafting/ShapelessRecipe.java | 10 +- .../item/crafting/ShieldDecorationRecipe.java | 18 +- .../world/item/crafting/SingleItemRecipe.java | 12 +- .../crafting/SmithingTransformRecipe.java | 10 +- .../item/crafting/SmithingTrimRecipe.java | 23 +- .../item/crafting/TippedArrowRecipe.java | 18 +- .../world/item/crafting/TransmuteRecipe.java | 26 +- .../display/DisplayContentsFactory.java | 8 +- .../display/FurnaceRecipeDisplay.java | 4 +- .../item/crafting/display/RecipeDisplay.java | 4 +- .../crafting/display/RecipeDisplayEntry.java | 4 +- .../display/ShapedCraftingRecipeDisplay.java | 4 +- .../ShapelessCraftingRecipeDisplay.java | 4 +- .../item/crafting/display/SlotDisplay.java | 76 +-- .../item/enchantment/EnchantmentHelper.java | 34 +- .../world/item/enchantment/Repairable.java | 4 +- .../world/item/equipment/ArmorMaterial.java | 17 +- .../world/item/equipment/ArmorType.java | 12 +- .../world/item/equipment/EquipmentModel.java | 30 +- .../world/item/equipment/EquipmentModels.java | 34 +- .../world/item/equipment/Equippable.java | 76 +-- .../world/item/equipment/trim/ArmorTrim.java | 26 +- .../item/equipment/trim/TrimMaterial.java | 6 +- .../item/equipment/trim/TrimMaterials.java | 53 +- .../item/equipment/trim/TrimPattern.java | 4 +- .../item/equipment/trim/TrimPatterns.java | 59 +- .../world/level/BlockCollisions.java | 28 +- net/minecraft/world/level/BlockGetter.java | 62 +- .../world/level/CollisionGetter.java | 14 +- net/minecraft/world/level/EntityGetter.java | 4 +- net/minecraft/world/level/Explosion.java | 8 +- .../level/ExplosionDamageCalculator.java | 10 +- net/minecraft/world/level/GameRules.java | 66 +- net/minecraft/world/level/GameType.java | 4 +- net/minecraft/world/level/Level.java | 156 ++--- net/minecraft/world/level/LevelAccessor.java | 12 +- .../world/level/LevelHeightAccessor.java | 4 +- net/minecraft/world/level/NaturalSpawner.java | 28 +- .../world/level/ScheduledTickAccess.java | 20 +- .../world/level/ServerExplosion.java | 70 +- net/minecraft/world/level/biome/Biome.java | 34 +- .../level/biome/BiomeGenerationSettings.java | 18 +- .../MultiNoiseBiomeSourceParameterList.java | 19 +- .../MultiNoiseBiomeSourceParameterLists.java | 6 +- .../level/block/AbstractCandleBlock.java | 10 +- .../level/block/AbstractCauldronBlock.java | 6 +- .../world/level/block/AbstractSkullBlock.java | 12 +- .../level/block/AmethystClusterBlock.java | 24 +- .../world/level/block/AnvilBlock.java | 4 +- .../world/level/block/AttachedStemBlock.java | 22 +- .../world/level/block/BambooSaplingBlock.java | 18 +- .../world/level/block/BambooStalkBlock.java | 28 +- .../world/level/block/BannerBlock.java | 20 +- .../world/level/block/BarrierBlock.java | 26 +- .../level/block/BaseCoralPlantTypeBlock.java | 32 +- .../level/block/BaseCoralWallFanBlock.java | 22 +- .../level/block/BasePressurePlateBlock.java | 16 +- .../world/level/block/BaseRailBlock.java | 32 +- .../world/level/block/BaseTorchBlock.java | 16 +- net/minecraft/world/level/block/BedBlock.java | 28 +- .../world/level/block/BeehiveBlock.java | 67 +- .../world/level/block/BellBlock.java | 54 +- .../world/level/block/BigDripleafBlock.java | 34 +- .../level/block/BigDripleafStemBlock.java | 26 +- net/minecraft/world/level/block/Block.java | 23 +- net/minecraft/world/level/block/Blocks.java | 70 +- .../block/BonemealableFeaturePlacerBlock.java | 4 +- .../world/level/block/BrushableBlock.java | 20 +- .../world/level/block/BubbleColumnBlock.java | 26 +- .../world/level/block/BushBlock.java | 20 +- .../world/level/block/ButtonBlock.java | 14 +- .../world/level/block/CactusBlock.java | 22 +- .../world/level/block/CakeBlock.java | 34 +- .../block/CalibratedSculkSensorBlock.java | 4 +- .../world/level/block/CampfireBlock.java | 34 +- .../world/level/block/CandleBlock.java | 30 +- .../world/level/block/CandleCakeBlock.java | 30 +- .../world/level/block/CarpetBlock.java | 16 +- .../world/level/block/CaveVinesBlock.java | 4 +- .../level/block/CaveVinesPlantBlock.java | 4 +- .../level/block/CeilingHangingSignBlock.java | 28 +- .../world/level/block/ChainBlock.java | 22 +- .../world/level/block/ChestBlock.java | 42 +- .../level/block/ChiseledBookShelfBlock.java | 16 +- .../world/level/block/ChorusFlowerBlock.java | 22 +- .../world/level/block/ChorusPlantBlock.java | 26 +- .../world/level/block/CocoaBlock.java | 20 +- .../world/level/block/CommandBlock.java | 50 +- .../world/level/block/ComparatorBlock.java | 20 +- .../world/level/block/ComposterBlock.java | 20 +- .../level/block/ConcretePowderBlock.java | 16 +- .../world/level/block/ConduitBlock.java | 22 +- .../world/level/block/CopperBulbBlock.java | 8 +- .../world/level/block/CoralBlock.java | 18 +- .../world/level/block/CoralFanBlock.java | 22 +- .../world/level/block/CoralPlantBlock.java | 22 +- .../world/level/block/CoralWallFanBlock.java | 22 +- .../world/level/block/CrafterBlock.java | 26 +- .../world/level/block/CreakingHeartBlock.java | 48 +- .../world/level/block/CropBlock.java | 4 +- .../level/block/CrossCollisionBlock.java | 4 +- .../world/level/block/DecoratedPotBlock.java | 51 +- .../world/level/block/DetectorRailBlock.java | 4 +- .../world/level/block/DiodeBlock.java | 14 +- .../world/level/block/DirtPathBlock.java | 18 +- .../world/level/block/DispenserBlock.java | 24 +- .../world/level/block/DoorBlock.java | 55 +- .../level/block/DoubleBlockCombiner.java | 36 +- .../world/level/block/DoublePlantBlock.java | 24 +- .../world/level/block/EndGatewayBlock.java | 12 +- .../world/level/block/EndPortalBlock.java | 22 +- .../level/block/EndPortalFrameBlock.java | 4 +- .../world/level/block/EnderChestBlock.java | 22 +- ...aceAttachedHorizontalDirectionalBlock.java | 16 +- .../world/level/block/FallingBlock.java | 16 +- .../world/level/block/FarmBlock.java | 22 +- .../world/level/block/FenceBlock.java | 30 +- .../world/level/block/FenceGateBlock.java | 64 +- .../world/level/block/FireBlock.java | 26 +- .../world/level/block/FlowerPotBlock.java | 28 +- .../world/level/block/FrogspawnBlock.java | 16 +- .../world/level/block/FrostedIceBlock.java | 12 +- .../world/level/block/GlowLichenBlock.java | 26 +- .../world/level/block/GrindstoneBlock.java | 4 +- .../world/level/block/GrowingPlantBlock.java | 2 +- .../level/block/GrowingPlantBodyBlock.java | 24 +- .../level/block/GrowingPlantHeadBlock.java | 32 +- .../world/level/block/HangingMossBlock.java | 42 +- .../world/level/block/HangingRootsBlock.java | 24 +- .../world/level/block/HeavyCoreBlock.java | 22 +- .../world/level/block/HoneyBlock.java | 8 +- .../world/level/block/HopperBlock.java | 8 +- .../world/level/block/HugeMushroomBlock.java | 22 +- .../block/InfestedRotatedPillarBlock.java | 8 +- .../world/level/block/IronBarsBlock.java | 26 +- .../world/level/block/JigsawBlock.java | 18 +- .../world/level/block/JukeboxBlock.java | 12 +- .../world/level/block/LadderBlock.java | 24 +- .../world/level/block/LanternBlock.java | 24 +- .../level/block/LayeredCauldronBlock.java | 4 +- .../world/level/block/LeavesBlock.java | 30 +- .../world/level/block/LecternBlock.java | 18 +- .../world/level/block/LeverBlock.java | 12 +- .../world/level/block/LightBlock.java | 26 +- .../world/level/block/LightningRodBlock.java | 22 +- .../world/level/block/LiquidBlock.java | 30 +- .../world/level/block/MagmaBlock.java | 18 +- .../level/block/MangrovePropaguleBlock.java | 24 +- .../world/level/block/MangroveRootsBlock.java | 22 +- .../world/level/block/MossyCarpetBlock.java | 96 +-- .../world/level/block/MultifaceBlock.java | 21 +- .../world/level/block/NetherPortalBlock.java | 101 ++- .../world/level/block/NetherWartBlock.java | 4 +- .../world/level/block/NoteBlock.java | 48 +- .../world/level/block/ObserverBlock.java | 28 +- .../world/level/block/PinkPetalsBlock.java | 4 +- .../world/level/block/PipeBlock.java | 2 +- .../world/level/block/PitcherCropBlock.java | 22 +- .../level/block/PointedDripstoneBlock.java | 44 +- net/minecraft/world/level/block/Portal.java | 2 +- .../world/level/block/PoweredRailBlock.java | 4 +- .../world/level/block/PressurePlateBlock.java | 4 +- .../world/level/block/PumpkinBlock.java | 22 +- .../world/level/block/RailBlock.java | 4 +- .../world/level/block/RedStoneOreBlock.java | 12 +- .../world/level/block/RedStoneWireBlock.java | 71 +- .../world/level/block/RedstoneLampBlock.java | 16 +- .../world/level/block/RedstoneTorchBlock.java | 18 +- .../level/block/RedstoneWallTorchBlock.java | 22 +- .../world/level/block/RepeaterBlock.java | 24 +- .../world/level/block/RespawnAnchorBlock.java | 19 +- .../world/level/block/RotatedPillarBlock.java | 4 +- .../world/level/block/SaplingBlock.java | 4 +- .../world/level/block/ScaffoldingBlock.java | 26 +- .../world/level/block/SculkSensorBlock.java | 22 +- .../world/level/block/SculkShriekerBlock.java | 24 +- .../world/level/block/SculkSpreader.java | 4 +- .../world/level/block/SculkVeinBlock.java | 22 +- .../world/level/block/SeaPickleBlock.java | 24 +- .../world/level/block/SeagrassBlock.java | 20 +- .../world/level/block/ShulkerBoxBlock.java | 6 +- .../world/level/block/SignBlock.java | 30 +- .../world/level/block/SkullBlock.java | 6 +- .../world/level/block/SlabBlock.java | 22 +- .../world/level/block/SlimeBlock.java | 4 +- .../world/level/block/SmallDripleafBlock.java | 22 +- .../world/level/block/SnifferEggBlock.java | 4 +- .../world/level/block/SnowLayerBlock.java | 20 +- .../world/level/block/SnowyDirtBlock.java | 20 +- .../world/level/block/SoulFireBlock.java | 14 +- .../world/level/block/SoulSandBlock.java | 18 +- .../world/level/block/SpongeBlock.java | 6 +- .../world/level/block/SporeBlossomBlock.java | 16 +- .../world/level/block/StainedGlassBlock.java | 4 +- .../world/level/block/StairBlock.java | 24 +- .../world/level/block/StandingSignBlock.java | 20 +- .../world/level/block/StemBlock.java | 4 +- .../world/level/block/StonecutterBlock.java | 4 +- .../world/level/block/StructureBlock.java | 16 +- .../world/level/block/SugarCaneBlock.java | 22 +- .../level/block/SweetBerryBushBlock.java | 12 +- .../world/level/block/TallGrassBlock.java | 4 +- .../world/level/block/TargetBlock.java | 4 +- .../world/level/block/TintedGlassBlock.java | 4 +- net/minecraft/world/level/block/TntBlock.java | 38 +- .../world/level/block/TransparentBlock.java | 2 +- .../world/level/block/TrapDoorBlock.java | 50 +- .../world/level/block/TripWireBlock.java | 38 +- .../world/level/block/TripWireHookBlock.java | 20 +- .../world/level/block/TurtleEggBlock.java | 8 +- .../world/level/block/VaultBlock.java | 14 +- .../world/level/block/VineBlock.java | 24 +- .../world/level/block/WallBannerBlock.java | 20 +- .../world/level/block/WallBlock.java | 29 +- .../level/block/WallHangingSignBlock.java | 28 +- .../world/level/block/WallSignBlock.java | 20 +- .../world/level/block/WallSkullBlock.java | 4 +- .../world/level/block/WallTorchBlock.java | 18 +- .../block/WaterloggedTransparentBlock.java | 22 +- .../block/WeightedPressurePlateBlock.java | 4 +- .../entity/AbstractFurnaceBlockEntity.java | 114 ++-- .../block/entity/BlastFurnaceBlockEntity.java | 4 +- .../world/level/block/entity/BlockEntity.java | 10 +- .../level/block/entity/BlockEntityType.java | 24 +- .../block/entity/BrushableBlockEntity.java | 52 +- .../block/entity/CampfireBlockEntity.java | 44 +- .../entity/CreakingHeartBlockEntity.java | 108 ++-- .../world/level/block/entity/FuelValues.java | 164 ++--- .../block/entity/LecternBlockEntity.java | 4 +- .../level/block/entity/SmokerBlockEntity.java | 4 +- .../entity/trialspawner/TrialSpawner.java | 24 +- .../trialspawner/TrialSpawnerConfig.java | 36 +- .../trialspawner/TrialSpawnerConfigs.java | 61 +- .../block/entity/vault/VaultBlockEntity.java | 10 +- .../level/block/piston/PistonBaseBlock.java | 8 +- .../level/block/piston/PistonHeadBlock.java | 30 +- .../level/block/state/BlockBehaviour.java | 113 ++-- .../world/level/block/state/StateHolder.java | 18 +- .../state/properties/BooleanProperty.java | 4 +- .../block/state/properties/EnumProperty.java | 28 +- .../state/properties/IntegerProperty.java | 4 +- .../block/state/properties/Property.java | 2 +- .../world/level/border/WorldBorder.java | 4 +- .../world/level/chunk/ChunkAccess.java | 10 +- .../world/level/chunk/ChunkGenerator.java | 2 +- .../world/level/chunk/ChunkSource.java | 4 +- .../world/level/chunk/GlobalPalette.java | 2 +- .../world/level/chunk/HashMapPalette.java | 4 +- .../world/level/chunk/ImposterProtoChunk.java | 8 +- .../world/level/chunk/LevelChunk.java | 12 +- .../world/level/chunk/LevelChunkSection.java | 16 +- .../world/level/chunk/LinearPalette.java | 4 +- net/minecraft/world/level/chunk/Palette.java | 2 +- .../world/level/chunk/PalettedContainer.java | 36 +- .../world/level/chunk/ProtoChunk.java | 8 +- .../world/level/chunk/SingleValuePalette.java | 2 +- .../world/level/chunk/UpgradeData.java | 14 +- .../level/chunk/storage/ChunkStorage.java | 6 +- .../world/level/chunk/storage/IOWorker.java | 8 +- .../chunk/storage/RecreatingChunkStorage.java | 6 +- .../level/chunk/storage/SectionStorage.java | 68 +- .../chunk/storage/SerializableChunkData.java | 247 ++++--- .../level/levelgen/DebugLevelSource.java | 8 +- .../world/level/levelgen/FlatLevelSource.java | 4 +- .../levelgen/NoiseBasedChunkGenerator.java | 51 +- .../world/level/levelgen/NoiseRouterData.java | 186 +++--- .../world/level/levelgen/SurfaceRules.java | 2 +- .../world/level/levelgen/WorldDimensions.java | 33 +- .../feature/AbstractHugeMushroomFeature.java | 2 +- .../feature/HugeBrownMushroomFeature.java | 2 +- .../feature/HugeRedMushroomFeature.java | 10 +- .../CreakingHeartDecorator.java | 4 +- .../treedecorators/PaleMossDecorator.java | 18 +- .../feature/treedecorators/TreeDecorator.java | 4 +- .../level/levelgen/presets/WorldPresets.java | 21 +- .../structure/pools/JigsawPlacement.java | 4 +- .../structures/MineshaftStructure.java | 3 +- .../structures/RuinedPortalStructure.java | 4 +- .../templatesystem/StructureTemplate.java | 20 +- .../level/lighting/ChunkSkyLightSources.java | 8 +- .../lighting/LayerLightSectionStorage.java | 4 +- .../level/lighting/LevelLightEngine.java | 5 +- .../world/level/lighting/LightEngine.java | 40 +- .../world/level/material/FlowingFluid.java | 218 +++---- net/minecraft/world/level/material/Fluid.java | 15 +- .../world/level/material/FluidState.java | 8 +- .../world/level/material/LavaFluid.java | 34 +- .../world/level/material/WaterFluid.java | 8 +- .../world/level/pathfinder/PathFinder.java | 41 +- .../world/level/portal/PortalShape.java | 100 +-- .../level/portal/TeleportTransition.java | 40 +- .../redstone/CollectingNeighborUpdater.java | 22 +- .../DefaultRedstoneWireEvaluator.java | 28 +- .../redstone/ExperimentalRedstoneUtils.java | 10 +- .../ExperimentalRedstoneWireEvaluator.java | 126 ++-- .../redstone/InstantNeighborUpdater.java | 10 +- .../world/level/redstone/NeighborUpdater.java | 38 +- .../world/level/redstone/Orientation.java | 100 +-- .../level/redstone/RedstoneWireEvaluator.java | 36 +- .../world/level/saveddata/SavedData.java | 4 +- .../saveddata/maps/MapItemSavedData.java | 48 +- .../level/storage/DimensionDataStorage.java | 16 +- .../level/storage/LevelStorageSource.java | 22 +- .../level/storage/loot/BuiltInLootTables.java | 4 +- .../world/level/storage/loot/LootContext.java | 18 +- .../world/level/storage/loot/LootParams.java | 26 +- .../world/level/storage/loot/LootTable.java | 16 +- .../level/storage/loot/ValidationContext.java | 20 +- .../loot/functions/CopyNameFunction.java | 6 +- .../loot/parameters/LootContextParamSets.java | 6 +- net/minecraft/world/phys/AABB.java | 97 +-- net/minecraft/world/phys/BlockHitResult.java | 18 +- net/minecraft/world/phys/Vec3.java | 16 +- .../world/phys/shapes/CollisionContext.java | 6 +- .../phys/shapes/EntityCollisionContext.java | 8 +- .../phys/shapes/MinecartCollisionContext.java | 18 +- .../world/phys/shapes/VoxelShape.java | 9 +- .../world/ticks/LevelChunkTicks.java | 8 +- net/minecraft/world/ticks/LevelTicks.java | 4 +- .../world/ticks/ProtoChunkTicks.java | 6 +- net/minecraft/world/ticks/SavedTick.java | 10 +- net/minecraft/world/ticks/ScheduledTick.java | 4 +- .../ticks/SerializableTickContainer.java | 2 +- version.json | 8 +- 2469 files changed, 19573 insertions(+), 19292 deletions(-) create mode 100644 net/minecraft/util/datafix/fixes/EntitySalmonSizeFix.java diff --git a/com/mojang/blaze3d/ProjectionType.java b/com/mojang/blaze3d/ProjectionType.java index 0c537c51..529b1eef 100644 --- a/com/mojang/blaze3d/ProjectionType.java +++ b/com/mojang/blaze3d/ProjectionType.java @@ -22,8 +22,8 @@ public enum ProjectionType { return this.vertexSorting; } - public void applyLayeringTransform(Matrix4f matrix4f, float f) { - this.layeringTransform.apply(matrix4f, f); + public void applyLayeringTransform(Matrix4f modelViewMatrix, float distance) { + this.layeringTransform.apply(modelViewMatrix, distance); } @FunctionalInterface diff --git a/com/mojang/blaze3d/TracyFrameCapture.java b/com/mojang/blaze3d/TracyFrameCapture.java index 930dbd2d..979b0c2a 100644 --- a/com/mojang/blaze3d/TracyFrameCapture.java +++ b/com/mojang/blaze3d/TracyFrameCapture.java @@ -28,25 +28,25 @@ public class TracyFrameCapture implements AutoCloseable { private int lastCaptureDelay; private boolean capturedThisFrame; - private void resize(int i, int j) { - float f = (float)i / j; - if (i > 320) { - i = 320; - j = (int)(320.0F / f); + private void resize(int width, int height) { + float f = (float)width / height; + if (width > 320) { + width = 320; + height = (int)(320.0F / f); } - if (j > 180) { - i = (int)(180.0F * f); - j = 180; + if (height > 180) { + width = (int)(180.0F * f); + height = 180; } - i = i / 4 * 4; - j = j / 4 * 4; - if (this.width != i || this.height != j) { - this.width = i; - this.height = j; - this.frameBuffer.resize(i, j); - this.pixelbuffer.resize(i * j * 4); + width = width / 4 * 4; + height = height / 4 * 4; + if (this.width != width || this.height != height) { + this.width = width; + this.height = height; + this.frameBuffer.resize(width, height); + this.pixelbuffer.resize(width * height * 4); if (this.fence != null) { this.fence.close(); this.fence = null; diff --git a/com/mojang/blaze3d/buffers/BufferType.java b/com/mojang/blaze3d/buffers/BufferType.java index 76943794..0c60f932 100644 --- a/com/mojang/blaze3d/buffers/BufferType.java +++ b/com/mojang/blaze3d/buffers/BufferType.java @@ -15,7 +15,7 @@ public enum BufferType { final int id; - private BufferType(final int j) { - this.id = j; + private BufferType(final int id) { + this.id = id; } } diff --git a/com/mojang/blaze3d/buffers/BufferUsage.java b/com/mojang/blaze3d/buffers/BufferUsage.java index a3d7c23b..a140bd0a 100644 --- a/com/mojang/blaze3d/buffers/BufferUsage.java +++ b/com/mojang/blaze3d/buffers/BufferUsage.java @@ -19,9 +19,9 @@ public enum BufferUsage { final boolean readable; final boolean writable; - private BufferUsage(final int j, final boolean bl, final boolean bl2) { - this.id = j; - this.readable = bl; - this.writable = bl2; + private BufferUsage(final int id, final boolean readable, final boolean writable) { + this.id = id; + this.readable = readable; + this.writable = writable; } } diff --git a/com/mojang/blaze3d/buffers/GpuBuffer.java b/com/mojang/blaze3d/buffers/GpuBuffer.java index e9f897c0..6ee096a5 100644 --- a/com/mojang/blaze3d/buffers/GpuBuffer.java +++ b/com/mojang/blaze3d/buffers/GpuBuffer.java @@ -18,19 +18,19 @@ public class GpuBuffer implements AutoCloseable { public final int handle; public int size; - public GpuBuffer(BufferType bufferType, BufferUsage bufferUsage, int i) { - this.type = bufferType; - this.size = i; - this.usage = bufferUsage; + public GpuBuffer(BufferType type, BufferUsage usage, int size) { + this.type = type; + this.size = size; + this.usage = usage; this.handle = GlStateManager._glGenBuffers(); } - public GpuBuffer(BufferType bufferType, BufferUsage bufferUsage, ByteBuffer byteBuffer) { - this(bufferType, bufferUsage, byteBuffer.remaining()); - this.write(byteBuffer, 0); + public GpuBuffer(BufferType type, BufferUsage usage, ByteBuffer buffer) { + this(type, usage, buffer.remaining()); + this.write(buffer, 0); } - public void resize(int i) { + public void resize(int size) { if (this.closed) { throw new IllegalStateException("Buffer already closed"); } else { @@ -38,40 +38,40 @@ public class GpuBuffer implements AutoCloseable { MEMORY_POOl.free(this.handle); } - this.size = i; + this.size = size; if (this.usage.writable) { this.initialized = false; } else { this.bind(); - GlStateManager._glBufferData(this.type.id, i, this.usage.id); - MEMORY_POOl.malloc(this.handle, i); + GlStateManager._glBufferData(this.type.id, size, this.usage.id); + MEMORY_POOl.malloc(this.handle, size); this.initialized = true; } } } - public void write(ByteBuffer byteBuffer, int i) { + public void write(ByteBuffer buffer, int offset) { if (this.closed) { throw new IllegalStateException("Buffer already closed"); } else if (!this.usage.writable) { throw new IllegalStateException("Buffer is not writable"); } else { - int j = byteBuffer.remaining(); - if (j + i > this.size) { + int i = buffer.remaining(); + if (i + offset > this.size) { throw new IllegalArgumentException( - "Cannot write more data than this buffer can hold (attempting to write " + j + " bytes at offset " + i + " to " + this.size + " size buffer)" + "Cannot write more data than this buffer can hold (attempting to write " + i + " bytes at offset " + offset + " to " + this.size + " size buffer)" ); } else { this.bind(); if (this.initialized) { - GlStateManager._glBufferSubData(this.type.id, i, byteBuffer); - } else if (i == 0 && j == this.size) { - GlStateManager._glBufferData(this.type.id, byteBuffer, this.usage.id); + GlStateManager._glBufferSubData(this.type.id, offset, buffer); + } else if (offset == 0 && i == this.size) { + GlStateManager._glBufferData(this.type.id, buffer, this.usage.id); MEMORY_POOl.malloc(this.handle, this.size); this.initialized = true; } else { GlStateManager._glBufferData(this.type.id, this.size, this.usage.id); - GlStateManager._glBufferSubData(this.type.id, i, byteBuffer); + GlStateManager._glBufferSubData(this.type.id, offset, buffer); MEMORY_POOl.malloc(this.handle, this.size); this.initialized = true; } @@ -85,18 +85,18 @@ public class GpuBuffer implements AutoCloseable { } @Nullable - public GpuBuffer.ReadView read(int i, int j) { + public GpuBuffer.ReadView read(int offset, int length) { if (this.closed) { throw new IllegalStateException("Buffer already closed"); } else if (!this.usage.readable) { throw new IllegalStateException("Buffer is not readable"); - } else if (i + j > this.size) { + } else if (offset + length > this.size) { throw new IllegalArgumentException( - "Cannot read more data than this buffer can hold (attempting to read " + j + " bytes at offset " + i + " from " + this.size + " size buffer)" + "Cannot read more data than this buffer can hold (attempting to read " + length + " bytes at offset " + offset + " from " + this.size + " size buffer)" ); } else { this.bind(); - ByteBuffer byteBuffer = GlStateManager._glMapBufferRange(this.type.id, i, j, 1); + ByteBuffer byteBuffer = GlStateManager._glMapBufferRange(this.type.id, offset, length, 1); return byteBuffer == null ? null : new GpuBuffer.ReadView(this.type.id, byteBuffer); } } @@ -120,9 +120,9 @@ public class GpuBuffer implements AutoCloseable { private final int target; private final ByteBuffer data; - protected ReadView(int i, ByteBuffer byteBuffer) { - this.target = i; - this.data = byteBuffer; + protected ReadView(int target, ByteBuffer data) { + this.target = target; + this.data = data; } public ByteBuffer data() { diff --git a/com/mojang/blaze3d/buffers/GpuFence.java b/com/mojang/blaze3d/buffers/GpuFence.java index 26e2066c..55fdbd20 100644 --- a/com/mojang/blaze3d/buffers/GpuFence.java +++ b/com/mojang/blaze3d/buffers/GpuFence.java @@ -15,11 +15,11 @@ public class GpuFence implements AutoCloseable { } } - public boolean awaitCompletion(long l) { + public boolean awaitCompletion(long timeout) { if (this.handle == 0L) { return true; } else { - int i = GlStateManager._glClientWaitSync(this.handle, 0, l); + int i = GlStateManager._glClientWaitSync(this.handle, 0, timeout); if (i == 37147) { return false; } else if (i == 37149) { diff --git a/com/mojang/blaze3d/font/TrueTypeGlyphProvider.java b/com/mojang/blaze3d/font/TrueTypeGlyphProvider.java index e702edde..1d42c730 100644 --- a/com/mojang/blaze3d/font/TrueTypeGlyphProvider.java +++ b/com/mojang/blaze3d/font/TrueTypeGlyphProvider.java @@ -71,14 +71,14 @@ public class TrueTypeGlyphProvider implements GlyphProvider { return glyphEntry != null ? this.getOrLoadGlyphInfo(character, glyphEntry) : null; } - private GlyphInfo getOrLoadGlyphInfo(int i, TrueTypeGlyphProvider.GlyphEntry glyphEntry) { + private GlyphInfo getOrLoadGlyphInfo(int character, TrueTypeGlyphProvider.GlyphEntry glyphEntry) { GlyphInfo glyphInfo = glyphEntry.glyph; if (glyphInfo == null) { FT_Face fT_Face = this.validateFontOpen(); synchronized (fT_Face) { glyphInfo = glyphEntry.glyph; if (glyphInfo == null) { - glyphInfo = this.loadGlyph(i, fT_Face, glyphEntry.index); + glyphInfo = this.loadGlyph(character, fT_Face, glyphEntry.index); glyphEntry.glyph = glyphInfo; } } @@ -87,23 +87,23 @@ public class TrueTypeGlyphProvider implements GlyphProvider { return glyphInfo; } - private GlyphInfo loadGlyph(int i, FT_Face fT_Face, int j) { - int k = FreeType.FT_Load_Glyph(fT_Face, j, 4194312); - if (k != 0) { - FreeTypeUtil.assertError(k, String.format(Locale.ROOT, "Loading glyph U+%06X", i)); + private GlyphInfo loadGlyph(int character, FT_Face face, int index) { + int i = FreeType.FT_Load_Glyph(face, index, 4194312); + if (i != 0) { + FreeTypeUtil.assertError(i, String.format(Locale.ROOT, "Loading glyph U+%06X", character)); } - FT_GlyphSlot fT_GlyphSlot = fT_Face.glyph(); + FT_GlyphSlot fT_GlyphSlot = face.glyph(); if (fT_GlyphSlot == null) { - throw new NullPointerException(String.format(Locale.ROOT, "Glyph U+%06X not initialized", i)); + throw new NullPointerException(String.format(Locale.ROOT, "Glyph U+%06X not initialized", character)); } else { float f = FreeTypeUtil.x(fT_GlyphSlot.advance()); FT_Bitmap fT_Bitmap = fT_GlyphSlot.bitmap(); - int l = fT_GlyphSlot.bitmap_left(); - int m = fT_GlyphSlot.bitmap_top(); - int n = fT_Bitmap.width(); - int o = fT_Bitmap.rows(); - return (GlyphInfo)(n > 0 && o > 0 ? new TrueTypeGlyphProvider.Glyph(l, m, n, o, f, j) : () -> f / this.oversample); + int j = fT_GlyphSlot.bitmap_left(); + int k = fT_GlyphSlot.bitmap_top(); + int l = fT_Bitmap.width(); + int m = fT_Bitmap.rows(); + return (GlyphInfo)(l > 0 && m > 0 ? new TrueTypeGlyphProvider.Glyph(j, k, l, m, f, index) : () -> f / this.oversample); } } @@ -169,8 +169,8 @@ public class TrueTypeGlyphProvider implements GlyphProvider { @Nullable volatile GlyphInfo glyph; - GlyphEntry(int i) { - this.index = i; + GlyphEntry(int index) { + this.index = index; } } } diff --git a/com/mojang/blaze3d/framegraph/FrameGraphBuilder.java b/com/mojang/blaze3d/framegraph/FrameGraphBuilder.java index d71d1573..f2ef17f0 100644 --- a/com/mojang/blaze3d/framegraph/FrameGraphBuilder.java +++ b/com/mojang/blaze3d/framegraph/FrameGraphBuilder.java @@ -22,36 +22,36 @@ public class FrameGraphBuilder { private final List> externalResources = new ArrayList(); private final List passes = new ArrayList(); - public FramePass addPass(String string) { - FrameGraphBuilder.Pass pass = new FrameGraphBuilder.Pass(this.passes.size(), string); + public FramePass addPass(String name) { + FrameGraphBuilder.Pass pass = new FrameGraphBuilder.Pass(this.passes.size(), name); this.passes.add(pass); return pass; } - public ResourceHandle importExternal(String string, T object) { - FrameGraphBuilder.ExternalResource externalResource = new FrameGraphBuilder.ExternalResource<>(string, null, object); + public ResourceHandle importExternal(String name, T resource) { + FrameGraphBuilder.ExternalResource externalResource = new FrameGraphBuilder.ExternalResource<>(name, null, resource); this.externalResources.add(externalResource); return externalResource.handle; } - public ResourceHandle createInternal(String string, ResourceDescriptor resourceDescriptor) { - return this.createInternalResource(string, resourceDescriptor, null).handle; + public ResourceHandle createInternal(String name, ResourceDescriptor descriptor) { + return this.createInternalResource(name, descriptor, null).handle; } FrameGraphBuilder.InternalVirtualResource createInternalResource( - String string, ResourceDescriptor resourceDescriptor, @Nullable FrameGraphBuilder.Pass pass + String name, ResourceDescriptor descriptor, @Nullable FrameGraphBuilder.Pass createdBy ) { int i = this.internalResources.size(); - FrameGraphBuilder.InternalVirtualResource internalVirtualResource = new FrameGraphBuilder.InternalVirtualResource<>(i, string, pass, resourceDescriptor); + FrameGraphBuilder.InternalVirtualResource internalVirtualResource = new FrameGraphBuilder.InternalVirtualResource<>(i, name, createdBy, descriptor); this.internalResources.add(internalVirtualResource); return internalVirtualResource; } - public void execute(GraphicsResourceAllocator graphicsResourceAllocator) { - this.execute(graphicsResourceAllocator, FrameGraphBuilder.Inspector.NONE); + public void execute(GraphicsResourceAllocator allocator) { + this.execute(allocator, FrameGraphBuilder.Inspector.NONE); } - public void execute(GraphicsResourceAllocator graphicsResourceAllocator, FrameGraphBuilder.Inspector inspector) { + public void execute(GraphicsResourceAllocator allocator, FrameGraphBuilder.Inspector inspector) { BitSet bitSet = this.identifyPassesToKeep(); List list = new ArrayList(bitSet.cardinality()); BitSet bitSet2 = new BitSet(this.passes.size()); @@ -65,7 +65,7 @@ public class FrameGraphBuilder { for (FrameGraphBuilder.Pass pass : list) { for (FrameGraphBuilder.InternalVirtualResource internalVirtualResource : pass.resourcesToAcquire) { inspector.acquireResource(internalVirtualResource.name); - internalVirtualResource.acquire(graphicsResourceAllocator); + internalVirtualResource.acquire(allocator); } inspector.beforeExecutePass(pass.name); @@ -75,7 +75,7 @@ public class FrameGraphBuilder { for (int i = pass.resourcesToRelease.nextSetBit(0); i >= 0; i = pass.resourcesToRelease.nextSetBit(i + 1)) { FrameGraphBuilder.InternalVirtualResource internalVirtualResource = (FrameGraphBuilder.InternalVirtualResource)this.internalResources.get(i); inspector.releaseResource(internalVirtualResource.name); - internalVirtualResource.release(graphicsResourceAllocator); + internalVirtualResource.release(allocator); } } } @@ -100,50 +100,50 @@ public class FrameGraphBuilder { return bitSet; } - private void discoverAllRequiredPasses(FrameGraphBuilder.Pass pass, BitSet bitSet, Deque deque) { - deque.add(pass); + private void discoverAllRequiredPasses(FrameGraphBuilder.Pass pass, BitSet passesToKeep, Deque output) { + output.add(pass); - while (!deque.isEmpty()) { - FrameGraphBuilder.Pass pass2 = (FrameGraphBuilder.Pass)deque.poll(); - if (!bitSet.get(pass2.id)) { - bitSet.set(pass2.id); + while (!output.isEmpty()) { + FrameGraphBuilder.Pass pass2 = (FrameGraphBuilder.Pass)output.poll(); + if (!passesToKeep.get(pass2.id)) { + passesToKeep.set(pass2.id); for (int i = pass2.requiredPassIds.nextSetBit(0); i >= 0; i = pass2.requiredPassIds.nextSetBit(i + 1)) { - deque.add((FrameGraphBuilder.Pass)this.passes.get(i)); + output.add((FrameGraphBuilder.Pass)this.passes.get(i)); } } } } - private void resolvePassOrder(FrameGraphBuilder.Pass pass, BitSet bitSet, BitSet bitSet2, List list) { - if (bitSet2.get(pass.id)) { - String string = (String)bitSet2.stream().mapToObj(ix -> ((FrameGraphBuilder.Pass)this.passes.get(ix)).name).collect(Collectors.joining(", ")); + private void resolvePassOrder(FrameGraphBuilder.Pass pass, BitSet passesToKeep, BitSet output, List orderedPasses) { + if (output.get(pass.id)) { + String string = (String)output.stream().mapToObj(ix -> ((FrameGraphBuilder.Pass)this.passes.get(ix)).name).collect(Collectors.joining(", ")); throw new IllegalStateException("Frame graph cycle detected between " + string); - } else if (bitSet.get(pass.id)) { - bitSet2.set(pass.id); - bitSet.clear(pass.id); + } else if (passesToKeep.get(pass.id)) { + output.set(pass.id); + passesToKeep.clear(pass.id); for (int i = pass.requiredPassIds.nextSetBit(0); i >= 0; i = pass.requiredPassIds.nextSetBit(i + 1)) { - this.resolvePassOrder((FrameGraphBuilder.Pass)this.passes.get(i), bitSet, bitSet2, list); + this.resolvePassOrder((FrameGraphBuilder.Pass)this.passes.get(i), passesToKeep, output, orderedPasses); } for (FrameGraphBuilder.Handle handle : pass.writesFrom) { for (int j = handle.readBy.nextSetBit(0); j >= 0; j = handle.readBy.nextSetBit(j + 1)) { if (j != pass.id) { - this.resolvePassOrder((FrameGraphBuilder.Pass)this.passes.get(j), bitSet, bitSet2, list); + this.resolvePassOrder((FrameGraphBuilder.Pass)this.passes.get(j), passesToKeep, output, orderedPasses); } } } - list.add(pass); - bitSet2.clear(pass.id); + orderedPasses.add(pass); + output.clear(pass.id); } } - private void assignResourceLifetimes(Collection collection) { + private void assignResourceLifetimes(Collection passes) { FrameGraphBuilder.Pass[] passs = new FrameGraphBuilder.Pass[this.internalResources.size()]; - for (FrameGraphBuilder.Pass pass : collection) { + for (FrameGraphBuilder.Pass pass : passes) { for (int i = pass.requiredResourceIds.nextSetBit(0); i >= 0; i = pass.requiredResourceIds.nextSetBit(i + 1)) { FrameGraphBuilder.InternalVirtualResource internalVirtualResource = (FrameGraphBuilder.InternalVirtualResource)this.internalResources.get(i); FrameGraphBuilder.Pass pass2 = passs[i]; @@ -163,9 +163,9 @@ public class FrameGraphBuilder { static class ExternalResource extends FrameGraphBuilder.VirtualResource { private final T resource; - public ExternalResource(String string, @Nullable FrameGraphBuilder.Pass pass, T object) { - super(string, pass); - this.resource = object; + public ExternalResource(String name, @Nullable FrameGraphBuilder.Pass createdBy, T resource) { + super(name, createdBy); + this.resource = resource; } @Override @@ -184,10 +184,10 @@ public class FrameGraphBuilder { @Nullable private FrameGraphBuilder.Handle aliasedBy; - Handle(FrameGraphBuilder.VirtualResource virtualResource, int i, @Nullable FrameGraphBuilder.Pass pass) { - this.holder = virtualResource; - this.version = i; - this.createdBy = pass; + Handle(FrameGraphBuilder.VirtualResource holder, int version, @Nullable FrameGraphBuilder.Pass createdBy) { + this.holder = holder; + this.version = version; + this.createdBy = createdBy; } @Override @@ -195,11 +195,11 @@ public class FrameGraphBuilder { return this.holder.get(); } - FrameGraphBuilder.Handle writeAndAlias(FrameGraphBuilder.Pass pass) { + FrameGraphBuilder.Handle writeAndAlias(FrameGraphBuilder.Pass alias) { if (this.holder.handle != this) { throw new IllegalStateException("Handle " + this + " is no longer valid, as its contents were moved into " + this.aliasedBy); } else { - FrameGraphBuilder.Handle handle = new FrameGraphBuilder.Handle<>(this.holder, this.version + 1, pass); + FrameGraphBuilder.Handle handle = new FrameGraphBuilder.Handle<>(this.holder, this.version + 1, alias); this.holder.handle = handle; this.aliasedBy = handle; return handle; @@ -215,16 +215,16 @@ public class FrameGraphBuilder { public interface Inspector { FrameGraphBuilder.Inspector NONE = new 1(); - default void acquireResource(String string) { + default void acquireResource(String name) { } - default void releaseResource(String string) { + default void releaseResource(String name) { } - default void beforeExecutePass(String string) { + default void beforeExecutePass(String name) { } - default void afterExecutePass(String string) { + default void afterExecutePass(String name) { } } @@ -235,10 +235,10 @@ public class FrameGraphBuilder { @Nullable private T physicalResource; - public InternalVirtualResource(int i, String string, @Nullable FrameGraphBuilder.Pass pass, ResourceDescriptor resourceDescriptor) { - super(string, pass); - this.id = i; - this.descriptor = resourceDescriptor; + public InternalVirtualResource(int id, String name, @Nullable FrameGraphBuilder.Pass createdBy, ResourceDescriptor descriptor) { + super(name, createdBy); + this.id = id; + this.descriptor = descriptor; } @Override @@ -246,19 +246,19 @@ public class FrameGraphBuilder { return (T)Objects.requireNonNull(this.physicalResource, "Resource is not currently available"); } - public void acquire(GraphicsResourceAllocator graphicsResourceAllocator) { + public void acquire(GraphicsResourceAllocator allocator) { if (this.physicalResource != null) { throw new IllegalStateException("Tried to acquire physical resource, but it was already assigned"); } else { - this.physicalResource = graphicsResourceAllocator.acquire(this.descriptor); + this.physicalResource = allocator.acquire(this.descriptor); } } - public void release(GraphicsResourceAllocator graphicsResourceAllocator) { + public void release(GraphicsResourceAllocator allocator) { if (this.physicalResource == null) { throw new IllegalStateException("Tried to release physical resource that was not allocated"); } else { - graphicsResourceAllocator.release(this.descriptor, this.physicalResource); + allocator.release(this.descriptor, this.physicalResource); this.physicalResource = null; } } @@ -276,9 +276,9 @@ public class FrameGraphBuilder { final BitSet resourcesToRelease = new BitSet(); boolean disableCulling; - public Pass(final int i, final String string) { - this.id = i; - this.name = string; + public Pass(final int id, final String name) { + this.id = id; + this.name = name; } private void markResourceRequired(FrameGraphBuilder.Handle handle) { @@ -292,15 +292,15 @@ public class FrameGraphBuilder { } @Override - public ResourceHandle createsInternal(String string, ResourceDescriptor resourceDescriptor) { - FrameGraphBuilder.InternalVirtualResource internalVirtualResource = FrameGraphBuilder.this.createInternalResource(string, resourceDescriptor, this); + public ResourceHandle createsInternal(String name, ResourceDescriptor descriptor) { + FrameGraphBuilder.InternalVirtualResource internalVirtualResource = FrameGraphBuilder.this.createInternalResource(name, descriptor, this); this.requiredResourceIds.set(internalVirtualResource.id); return internalVirtualResource.handle; } @Override - public void reads(ResourceHandle resourceHandle) { - this._reads((FrameGraphBuilder.Handle)resourceHandle); + public void reads(ResourceHandle handle) { + this._reads((FrameGraphBuilder.Handle)handle); } private void _reads(FrameGraphBuilder.Handle handle) { @@ -313,13 +313,13 @@ public class FrameGraphBuilder { } @Override - public ResourceHandle readsAndWrites(ResourceHandle resourceHandle) { - return this._readsAndWrites((FrameGraphBuilder.Handle)resourceHandle); + public ResourceHandle readsAndWrites(ResourceHandle handle) { + return this._readsAndWrites((FrameGraphBuilder.Handle)handle); } @Override - public void requires(FramePass framePass) { - this.requiredPassIds.set(((FrameGraphBuilder.Pass)framePass).id); + public void requires(FramePass pass) { + this.requiredPassIds.set(((FrameGraphBuilder.Pass)pass).id); } @Override @@ -334,8 +334,8 @@ public class FrameGraphBuilder { } @Override - public void executes(Runnable runnable) { - this.task = runnable; + public void executes(Runnable task) { + this.task = task; } public String toString() { @@ -348,9 +348,9 @@ public class FrameGraphBuilder { public final String name; public FrameGraphBuilder.Handle handle; - public VirtualResource(String string, @Nullable FrameGraphBuilder.Pass pass) { - this.name = string; - this.handle = new FrameGraphBuilder.Handle<>(this, 0, pass); + public VirtualResource(String name, @Nullable FrameGraphBuilder.Pass createdBy) { + this.name = name; + this.handle = new FrameGraphBuilder.Handle<>(this, 0, createdBy); } public abstract T get(); diff --git a/com/mojang/blaze3d/framegraph/FramePass.java b/com/mojang/blaze3d/framegraph/FramePass.java index 3010e3d0..d73d64f0 100644 --- a/com/mojang/blaze3d/framegraph/FramePass.java +++ b/com/mojang/blaze3d/framegraph/FramePass.java @@ -7,15 +7,15 @@ import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) public interface FramePass { - ResourceHandle createsInternal(String string, ResourceDescriptor resourceDescriptor); + ResourceHandle createsInternal(String name, ResourceDescriptor descriptor); - void reads(ResourceHandle resourceHandle); + void reads(ResourceHandle handle); - ResourceHandle readsAndWrites(ResourceHandle resourceHandle); + ResourceHandle readsAndWrites(ResourceHandle handle); - void requires(FramePass framePass); + void requires(FramePass pass); void disableCulling(); - void executes(Runnable runnable); + void executes(Runnable task); } diff --git a/com/mojang/blaze3d/pipeline/RenderTarget.java b/com/mojang/blaze3d/pipeline/RenderTarget.java index 2fdb06b5..d5c183f9 100644 --- a/com/mojang/blaze3d/pipeline/RenderTarget.java +++ b/com/mojang/blaze3d/pipeline/RenderTarget.java @@ -38,14 +38,14 @@ public abstract class RenderTarget { this.depthBufferId = -1; } - public void resize(int i, int j) { + public void resize(int width, int height) { RenderSystem.assertOnRenderThreadOrInit(); GlStateManager._enableDepthTest(); if (this.frameBufferId >= 0) { this.destroyBuffers(); } - this.createBuffers(i, j); + this.createBuffers(width, height); GlStateManager._glBindFramebuffer(36160, 0); } @@ -78,14 +78,14 @@ public abstract class RenderTarget { GlStateManager._glBindFramebuffer(36160, 0); } - public void createBuffers(int i, int j) { + public void createBuffers(int width, int height) { RenderSystem.assertOnRenderThreadOrInit(); - int k = RenderSystem.maxSupportedTextureSize(); - if (i > 0 && i <= k && j > 0 && j <= k) { - this.viewWidth = i; - this.viewHeight = j; - this.width = i; - this.height = j; + int i = RenderSystem.maxSupportedTextureSize(); + if (width > 0 && width <= i && height > 0 && height <= i) { + this.viewWidth = width; + this.viewHeight = height; + this.width = width; + this.height = height; this.frameBufferId = GlStateManager.glGenFramebuffers(); this.colorTextureId = TextureUtil.generateTextureId(); if (this.useDepth) { @@ -114,7 +114,7 @@ public abstract class RenderTarget { this.clear(); this.unbindRead(); } else { - throw new IllegalArgumentException("Window " + i + "x" + j + " size out of bounds (max. size: " + k + ")"); + throw new IllegalArgumentException("Window " + width + "x" + height + " size out of bounds (max. size: " + i + ")"); } } @@ -191,12 +191,12 @@ public abstract class RenderTarget { GlStateManager._glBindFramebuffer(36008, 0); } - public void blitAndBlendToScreen(int i, int j) { + public void blitAndBlendToScreen(int width, int height) { RenderSystem.assertOnRenderThread(); GlStateManager._colorMask(true, true, true, false); GlStateManager._disableDepthTest(); GlStateManager._depthMask(false); - GlStateManager._viewport(0, 0, i, j); + GlStateManager._viewport(0, 0, width, height); CompiledShaderProgram compiledShaderProgram = (CompiledShaderProgram)Objects.requireNonNull( RenderSystem.setShader(CoreShaders.BLIT_SCREEN), "Blit shader not loaded" ); diff --git a/com/mojang/blaze3d/pipeline/TextureTarget.java b/com/mojang/blaze3d/pipeline/TextureTarget.java index c5d45e33..fbd5c34a 100644 --- a/com/mojang/blaze3d/pipeline/TextureTarget.java +++ b/com/mojang/blaze3d/pipeline/TextureTarget.java @@ -6,9 +6,9 @@ import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) public class TextureTarget extends RenderTarget { - public TextureTarget(int i, int j, boolean bl) { - super(bl); + public TextureTarget(int width, int height, boolean useDepth) { + super(useDepth); RenderSystem.assertOnRenderThreadOrInit(); - this.resize(i, j); + this.resize(width, height); } } diff --git a/com/mojang/blaze3d/platform/ClientShutdownWatchdog.java b/com/mojang/blaze3d/platform/ClientShutdownWatchdog.java index 69e491e7..2a8a2b2e 100644 --- a/com/mojang/blaze3d/platform/ClientShutdownWatchdog.java +++ b/com/mojang/blaze3d/platform/ClientShutdownWatchdog.java @@ -12,7 +12,7 @@ import net.minecraft.server.dedicated.ServerWatchdog; public class ClientShutdownWatchdog { private static final Duration CRASH_REPORT_PRELOAD_LOAD = Duration.ofSeconds(15L); - public static void startShutdownWatchdog(File file, long l) { + public static void startShutdownWatchdog(File file, long threadId) { Thread thread = new Thread(() -> { try { Thread.sleep(CRASH_REPORT_PRELOAD_LOAD); @@ -20,7 +20,7 @@ public class ClientShutdownWatchdog { return; } - CrashReport crashReport = ServerWatchdog.createWatchdogCrashReport("Client shutdown", l); + CrashReport crashReport = ServerWatchdog.createWatchdogCrashReport("Client shutdown", threadId); Minecraft.saveReport(file, crashReport); }); thread.setDaemon(true); diff --git a/com/mojang/blaze3d/platform/FramerateLimitTracker.java b/com/mojang/blaze3d/platform/FramerateLimitTracker.java index 5404bf17..acbc459d 100644 --- a/com/mojang/blaze3d/platform/FramerateLimitTracker.java +++ b/com/mojang/blaze3d/platform/FramerateLimitTracker.java @@ -46,8 +46,8 @@ public class FramerateLimitTracker { } } - public void setFramerateLimit(int i) { - this.framerateLimit = i; + public void setFramerateLimit(int framerateLimit) { + this.framerateLimit = framerateLimit; } public void onInputReceived() { diff --git a/com/mojang/blaze3d/platform/GlStateManager.java b/com/mojang/blaze3d/platform/GlStateManager.java index c1e6a127..37d05692 100644 --- a/com/mojang/blaze3d/platform/GlStateManager.java +++ b/com/mojang/blaze3d/platform/GlStateManager.java @@ -864,9 +864,9 @@ public class GlStateManager { static class FramebufferState { public int binding; - public boolean update(int i) { - if (i != this.binding) { - this.binding = i; + public boolean update(int binding) { + if (binding != this.binding) { + this.binding = binding; return true; } else { return false; diff --git a/com/mojang/blaze3d/platform/NativeImage.java b/com/mojang/blaze3d/platform/NativeImage.java index b9d03f50..eea76fde 100644 --- a/com/mojang/blaze3d/platform/NativeImage.java +++ b/com/mojang/blaze3d/platform/NativeImage.java @@ -204,36 +204,36 @@ public final class NativeImage implements AutoCloseable { return this.format; } - private int getPixelABGR(int i, int j) { + private int getPixelABGR(int x, int y) { if (this.format != NativeImage.Format.RGBA) { throw new IllegalArgumentException(String.format(Locale.ROOT, "getPixelRGBA only works on RGBA images; have %s", this.format)); - } else if (this.isOutsideBounds(i, j)) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "(%s, %s) outside of image bounds (%s, %s)", i, j, this.width, this.height)); + } else if (this.isOutsideBounds(x, y)) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "(%s, %s) outside of image bounds (%s, %s)", x, y, this.width, this.height)); } else { this.checkAllocated(); - long l = (i + (long)j * this.width) * 4L; + long l = (x + (long)y * this.width) * 4L; return MemoryUtil.memGetInt(this.pixels + l); } } - public int getPixel(int i, int j) { - return ARGB.fromABGR(this.getPixelABGR(i, j)); + public int getPixel(int x, int y) { + return ARGB.fromABGR(this.getPixelABGR(x, y)); } - private void setPixelABGR(int i, int j, int k) { + private void setPixelABGR(int x, int y, int color) { if (this.format != NativeImage.Format.RGBA) { throw new IllegalArgumentException(String.format(Locale.ROOT, "setPixelRGBA only works on RGBA images; have %s", this.format)); - } else if (this.isOutsideBounds(i, j)) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "(%s, %s) outside of image bounds (%s, %s)", i, j, this.width, this.height)); + } else if (this.isOutsideBounds(x, y)) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "(%s, %s) outside of image bounds (%s, %s)", x, y, this.width, this.height)); } else { this.checkAllocated(); - long l = (i + (long)j * this.width) * 4L; - MemoryUtil.memPutInt(this.pixels + l, k); + long l = (x + (long)y * this.width) * 4L; + MemoryUtil.memPutInt(this.pixels + l, color); } } - public void setPixel(int i, int j, int k) { - this.setPixelABGR(i, j, ARGB.toABGR(k)); + public void setPixel(int x, int y, int color) { + this.setPixelABGR(x, y, ARGB.toABGR(color)); } public NativeImage mappedCopy(IntUnaryOperator function) { diff --git a/com/mojang/blaze3d/platform/Window.java b/com/mojang/blaze3d/platform/Window.java index 60e399ec..ea58729a 100644 --- a/com/mojang/blaze3d/platform/Window.java +++ b/com/mojang/blaze3d/platform/Window.java @@ -290,8 +290,8 @@ public final class Window implements AutoCloseable { } } - private void onIconify(long l, boolean bl) { - this.iconified = bl; + private void onIconify(long window, boolean iconified) { + this.iconified = iconified; } public void updateDisplay(@Nullable TracyFrameCapture tracyFrameCapture) { @@ -371,13 +371,13 @@ public final class Window implements AutoCloseable { this.setMode(); } - private void updateFullscreen(boolean bl, @Nullable TracyFrameCapture tracyFrameCapture) { + private void updateFullscreen(boolean vsyncEnabled, @Nullable TracyFrameCapture tracyFrameCapture) { RenderSystem.assertOnRenderThread(); try { this.setMode(); this.eventHandler.resizeDisplay(); - this.updateVsync(bl); + this.updateVsync(vsyncEnabled); this.updateDisplay(tracyFrameCapture); } catch (Exception var4) { LOGGER.error("Couldn't toggle fullscreen", (Throwable)var4); @@ -484,8 +484,8 @@ public final class Window implements AutoCloseable { InputConstants.updateRawMouseInput(this.window, enableRawMouseMotion); } - public void setWindowCloseCallback(Runnable runnable) { - GLFWWindowCloseCallback gLFWWindowCloseCallback = GLFW.glfwSetWindowCloseCallback(this.window, l -> runnable.run()); + public void setWindowCloseCallback(Runnable windowCloseCallback) { + GLFWWindowCloseCallback gLFWWindowCloseCallback = GLFW.glfwSetWindowCloseCallback(this.window, l -> windowCloseCallback.run()); if (gLFWWindowCloseCallback != null) { gLFWWindowCloseCallback.free(); } diff --git a/com/mojang/blaze3d/preprocessor/GlslPreprocessor.java b/com/mojang/blaze3d/preprocessor/GlslPreprocessor.java index fbd28cac..db19e142 100644 --- a/com/mojang/blaze3d/preprocessor/GlslPreprocessor.java +++ b/com/mojang/blaze3d/preprocessor/GlslPreprocessor.java @@ -126,13 +126,13 @@ public abstract class GlslPreprocessor { @Nullable public abstract String applyImport(boolean useFullPath, String directory); - public static String injectDefines(String string, ShaderDefines shaderDefines) { - if (shaderDefines.isEmpty()) { - return string; + public static String injectDefines(String shaderSource, ShaderDefines defines) { + if (defines.isEmpty()) { + return shaderSource; } else { - int i = string.indexOf(10); + int i = shaderSource.indexOf(10); int j = i + 1; - return string.substring(0, j) + shaderDefines.asSourceDirectives() + "#line 1 0\n" + string.substring(j); + return shaderSource.substring(0, j) + defines.asSourceDirectives() + "#line 1 0\n" + shaderSource.substring(j); } } diff --git a/com/mojang/blaze3d/resource/CrossFrameResourcePool.java b/com/mojang/blaze3d/resource/CrossFrameResourcePool.java index e2bfc9fd..1025b040 100644 --- a/com/mojang/blaze3d/resource/CrossFrameResourcePool.java +++ b/com/mojang/blaze3d/resource/CrossFrameResourcePool.java @@ -13,8 +13,8 @@ public class CrossFrameResourcePool implements GraphicsResourceAllocator, AutoCl private final int framesToKeepResource; private final Deque> pool = new ArrayDeque(); - public CrossFrameResourcePool(int i) { - this.framesToKeepResource = i; + public CrossFrameResourcePool(int framesToKeepResource) { + this.framesToKeepResource = framesToKeepResource; } public void endFrame() { @@ -30,23 +30,23 @@ public class CrossFrameResourcePool implements GraphicsResourceAllocator, AutoCl } @Override - public T acquire(ResourceDescriptor resourceDescriptor) { + public T acquire(ResourceDescriptor descriptor) { Iterator> iterator = this.pool.iterator(); while (iterator.hasNext()) { CrossFrameResourcePool.ResourceEntry resourceEntry = (CrossFrameResourcePool.ResourceEntry)iterator.next(); - if (resourceEntry.descriptor.equals(resourceDescriptor)) { + if (resourceEntry.descriptor.equals(descriptor)) { iterator.remove(); return (T)resourceEntry.value; } } - return resourceDescriptor.allocate(); + return descriptor.allocate(); } @Override - public void release(ResourceDescriptor resourceDescriptor, T object) { - this.pool.addFirst(new CrossFrameResourcePool.ResourceEntry<>(resourceDescriptor, object, this.framesToKeepResource)); + public void release(ResourceDescriptor descriptor, T value) { + this.pool.addFirst(new CrossFrameResourcePool.ResourceEntry<>(descriptor, value, this.framesToKeepResource)); } public void clear() { @@ -70,10 +70,10 @@ public class CrossFrameResourcePool implements GraphicsResourceAllocator, AutoCl final T value; int framesToLive; - ResourceEntry(ResourceDescriptor resourceDescriptor, T object, int i) { - this.descriptor = resourceDescriptor; - this.value = object; - this.framesToLive = i; + ResourceEntry(ResourceDescriptor descriptor, T value, int framesToLive) { + this.descriptor = descriptor; + this.value = value; + this.framesToLive = framesToLive; } public void close() { diff --git a/com/mojang/blaze3d/resource/GraphicsResourceAllocator.java b/com/mojang/blaze3d/resource/GraphicsResourceAllocator.java index 32e931a9..6aa18907 100644 --- a/com/mojang/blaze3d/resource/GraphicsResourceAllocator.java +++ b/com/mojang/blaze3d/resource/GraphicsResourceAllocator.java @@ -7,17 +7,17 @@ import net.fabricmc.api.Environment; public interface GraphicsResourceAllocator { GraphicsResourceAllocator UNPOOLED = new GraphicsResourceAllocator() { @Override - public T acquire(ResourceDescriptor resourceDescriptor) { - return resourceDescriptor.allocate(); + public T acquire(ResourceDescriptor descriptor) { + return descriptor.allocate(); } @Override - public void release(ResourceDescriptor resourceDescriptor, T object) { - resourceDescriptor.free(object); + public void release(ResourceDescriptor descriptor, T value) { + descriptor.free(value); } }; - T acquire(ResourceDescriptor resourceDescriptor); + T acquire(ResourceDescriptor descriptor); - void release(ResourceDescriptor resourceDescriptor, T object); + void release(ResourceDescriptor descriptor, T value); } diff --git a/com/mojang/blaze3d/resource/ResourceDescriptor.java b/com/mojang/blaze3d/resource/ResourceDescriptor.java index 247684a4..87d00c4d 100644 --- a/com/mojang/blaze3d/resource/ResourceDescriptor.java +++ b/com/mojang/blaze3d/resource/ResourceDescriptor.java @@ -7,5 +7,5 @@ import net.fabricmc.api.Environment; public interface ResourceDescriptor { T allocate(); - void free(T object); + void free(T target); } diff --git a/com/mojang/blaze3d/shaders/CompiledShader.java b/com/mojang/blaze3d/shaders/CompiledShader.java index 2b7efbae..d63c6cfe 100644 --- a/com/mojang/blaze3d/shaders/CompiledShader.java +++ b/com/mojang/blaze3d/shaders/CompiledShader.java @@ -16,21 +16,21 @@ public class CompiledShader implements AutoCloseable { private final ResourceLocation id; private int shaderId; - private CompiledShader(int i, ResourceLocation resourceLocation) { - this.id = resourceLocation; - this.shaderId = i; + private CompiledShader(int shaderId, ResourceLocation id) { + this.id = id; + this.shaderId = shaderId; } - public static CompiledShader compile(ResourceLocation resourceLocation, CompiledShader.Type type, String string) throws ShaderManager.CompilationException { + public static CompiledShader compile(ResourceLocation shaderId, CompiledShader.Type type, String source) throws ShaderManager.CompilationException { RenderSystem.assertOnRenderThread(); int i = GlStateManager.glCreateShader(type.glType()); - GlStateManager.glShaderSource(i, string); + GlStateManager.glShaderSource(i, source); GlStateManager.glCompileShader(i); if (GlStateManager.glGetShaderi(i, 35713) == 0) { - String string2 = StringUtils.trim(GlStateManager.glGetShaderInfoLog(i, 32768)); - throw new ShaderManager.CompilationException("Couldn't compile " + type.getName() + " shader (" + resourceLocation + ") : " + string2); + String string = StringUtils.trim(GlStateManager.glGetShaderInfoLog(i, 32768)); + throw new ShaderManager.CompilationException("Couldn't compile " + type.getName() + " shader (" + shaderId + ") : " + string); } else { - return new CompiledShader(i, resourceLocation); + return new CompiledShader(i, shaderId); } } @@ -62,16 +62,16 @@ public class CompiledShader implements AutoCloseable { private final String extension; private final int glType; - private Type(final String string2, final String string3, final int j) { - this.name = string2; - this.extension = string3; - this.glType = j; + private Type(final String name, final String extension, final int glType) { + this.name = name; + this.extension = extension; + this.glType = glType; } @Nullable - public static CompiledShader.Type byLocation(ResourceLocation resourceLocation) { + public static CompiledShader.Type byLocation(ResourceLocation location) { for (CompiledShader.Type type : TYPES) { - if (resourceLocation.getPath().endsWith(type.extension)) { + if (location.getPath().endsWith(type.extension)) { return type; } } diff --git a/com/mojang/blaze3d/shaders/Uniform.java b/com/mojang/blaze3d/shaders/Uniform.java index ec403ea6..4e856075 100644 --- a/com/mojang/blaze3d/shaders/Uniform.java +++ b/com/mojang/blaze3d/shaders/Uniform.java @@ -9,7 +9,6 @@ import java.util.Arrays; import java.util.List; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.renderer.ShaderProgramConfig; import org.joml.Matrix3f; import org.joml.Matrix4f; import org.joml.Vector3f; @@ -39,16 +38,16 @@ public class Uniform extends AbstractUniform implements AutoCloseable { private final FloatBuffer floatValues; private final String name; - public Uniform(String string, int i, int j) { - this.name = string; - this.count = j; - this.type = i; - if (i <= 3) { - this.intValues = MemoryUtil.memAllocInt(j); + public Uniform(String name, int type, int count) { + this.name = name; + this.count = count; + this.type = type; + if (type <= 3) { + this.intValues = MemoryUtil.memAllocInt(count); this.floatValues = null; } else { this.intValues = null; - this.floatValues = MemoryUtil.memAllocFloat(j); + this.floatValues = MemoryUtil.memAllocFloat(count); } this.location = -1; @@ -63,17 +62,17 @@ public class Uniform extends AbstractUniform implements AutoCloseable { RenderSystem.glUniform1i(location, value); } - public void setFromConfig(ShaderProgramConfig.Uniform uniform) { + public void setFromConfig(net.minecraft.client.renderer.ShaderProgramConfig.Uniform uniform) { this.setFromConfig(uniform.values(), uniform.count()); } - public void setFromConfig(List list, int i) { - float[] fs = new float[Math.max(i, 16)]; - if (list.size() == 1) { - Arrays.fill(fs, (Float)list.getFirst()); + public void setFromConfig(List values, int count) { + float[] fs = new float[Math.max(count, 16)]; + if (values.size() == 1) { + Arrays.fill(fs, (Float)values.getFirst()); } else { - for (int j = 0; j < list.size(); j++) { - fs[j] = (Float)list.get(j); + for (int i = 0; i < values.size(); i++) { + fs[i] = (Float)values.get(i); } } @@ -82,7 +81,7 @@ public class Uniform extends AbstractUniform implements AutoCloseable { } else if (this.type <= 7) { this.setSafe(fs[0], fs[1], fs[2], fs[3]); } else { - this.set(Arrays.copyOfRange(fs, 0, i)); + this.set(Arrays.copyOfRange(fs, 0, count)); } } diff --git a/com/mojang/blaze3d/vertex/BufferBuilder.java b/com/mojang/blaze3d/vertex/BufferBuilder.java index 5d65dc35..805dbf09 100644 --- a/com/mojang/blaze3d/vertex/BufferBuilder.java +++ b/com/mojang/blaze3d/vertex/BufferBuilder.java @@ -1,5 +1,6 @@ package com.mojang.blaze3d.vertex; +import com.mojang.blaze3d.vertex.ByteBufferBuilder.Result; import com.mojang.blaze3d.vertex.MeshData.DrawState; import java.nio.ByteOrder; import java.util.stream.Collectors; @@ -75,7 +76,7 @@ public class BufferBuilder implements VertexConsumer { if (this.vertices == 0) { return null; } else { - ByteBufferBuilder.Result result = this.buffer.build(); + Result result = this.buffer.build(); if (result == null) { return null; } else { diff --git a/com/mojang/blaze3d/vertex/PoseStack.java b/com/mojang/blaze3d/vertex/PoseStack.java index 23427f97..0a5ce50e 100644 --- a/com/mojang/blaze3d/vertex/PoseStack.java +++ b/com/mojang/blaze3d/vertex/PoseStack.java @@ -29,8 +29,8 @@ public class PoseStack { pose.pose.translate(x, y, z); } - public void translate(Vec3 vec3) { - this.translate(vec3.x, vec3.y, vec3.z); + public void translate(Vec3 vector) { + this.translate(vector.x, vector.y, vector.z); } public void scale(float x, float y, float z) { diff --git a/com/mojang/blaze3d/vertex/VertexBuffer.java b/com/mojang/blaze3d/vertex/VertexBuffer.java index c4736fdb..b305a3f7 100644 --- a/com/mojang/blaze3d/vertex/VertexBuffer.java +++ b/com/mojang/blaze3d/vertex/VertexBuffer.java @@ -5,6 +5,8 @@ import com.mojang.blaze3d.buffers.BufferUsage; import com.mojang.blaze3d.buffers.GpuBuffer; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.systems.RenderSystem.AutoStorageIndexBuffer; +import com.mojang.blaze3d.vertex.ByteBufferBuilder.Result; import com.mojang.blaze3d.vertex.MeshData.DrawState; import java.nio.ByteBuffer; import net.fabricmc.api.EnvType; @@ -24,15 +26,15 @@ public class VertexBuffer implements AutoCloseable { @Nullable private VertexFormat format; @Nullable - private RenderSystem.AutoStorageIndexBuffer sequentialIndices; + private AutoStorageIndexBuffer sequentialIndices; private VertexFormat.IndexType indexType; private int indexCount; private VertexFormat.Mode mode; - public VertexBuffer(BufferUsage bufferUsage) { - this.usage = bufferUsage; + public VertexBuffer(BufferUsage usage) { + this.usage = usage; RenderSystem.assertOnRenderThread(); - this.vertexBuffer = new GpuBuffer(BufferType.VERTICES, bufferUsage, 0); + this.vertexBuffer = new GpuBuffer(BufferType.VERTICES, usage, 0); this.arrayObjectId = GlStateManager._glGenVertexArrays(); } @@ -76,8 +78,8 @@ public class VertexBuffer implements AutoCloseable { } } - public void uploadIndexBuffer(ByteBufferBuilder.Result result) { - ByteBufferBuilder.Result var2 = result; + public void uploadIndexBuffer(Result result) { + Result var2 = result; label46: { try { @@ -141,7 +143,7 @@ public class VertexBuffer implements AutoCloseable { } @Nullable - private RenderSystem.AutoStorageIndexBuffer uploadIndexBuffer(DrawState drawState, @Nullable ByteBuffer buffer) { + private AutoStorageIndexBuffer uploadIndexBuffer(DrawState drawState, @Nullable ByteBuffer buffer) { if (buffer != null) { if (this.indexBuffer != null) { this.indexBuffer.close(); @@ -150,7 +152,7 @@ public class VertexBuffer implements AutoCloseable { this.indexBuffer = new GpuBuffer(BufferType.INDICES, this.usage, buffer); return null; } else { - RenderSystem.AutoStorageIndexBuffer autoStorageIndexBuffer = RenderSystem.getSequentialBuffer(drawState.mode()); + AutoStorageIndexBuffer autoStorageIndexBuffer = RenderSystem.getSequentialBuffer(drawState.mode()); if (autoStorageIndexBuffer != this.sequentialIndices || !autoStorageIndexBuffer.hasStorage(drawState.indexCount())) { autoStorageIndexBuffer.bind(drawState.indexCount()); } @@ -174,17 +176,17 @@ public class VertexBuffer implements AutoCloseable { } private VertexFormat.IndexType getIndexType() { - RenderSystem.AutoStorageIndexBuffer autoStorageIndexBuffer = this.sequentialIndices; + AutoStorageIndexBuffer autoStorageIndexBuffer = this.sequentialIndices; return autoStorageIndexBuffer != null ? autoStorageIndexBuffer.type() : this.indexType; } - public void drawWithShader(Matrix4f matrix4f, Matrix4f matrix4f2, @Nullable CompiledShaderProgram compiledShaderProgram) { - if (compiledShaderProgram != null) { + public void drawWithShader(Matrix4f frustumMatrix, Matrix4f projectionMatrix, @Nullable CompiledShaderProgram shader) { + if (shader != null) { RenderSystem.assertOnRenderThread(); - compiledShaderProgram.setDefaultUniforms(this.mode, matrix4f, matrix4f2, Minecraft.getInstance().getWindow()); - compiledShaderProgram.apply(); + shader.setDefaultUniforms(this.mode, frustumMatrix, projectionMatrix, Minecraft.getInstance().getWindow()); + shader.apply(); this.draw(); - compiledShaderProgram.clear(); + shader.clear(); } } diff --git a/com/mojang/blaze3d/vertex/VertexConsumer.java b/com/mojang/blaze3d/vertex/VertexConsumer.java index 428b2688..e2d47d5d 100644 --- a/com/mojang/blaze3d/vertex/VertexConsumer.java +++ b/com/mojang/blaze3d/vertex/VertexConsumer.java @@ -149,7 +149,7 @@ public interface VertexConsumer { return this.setNormal(vector3f.x(), vector3f.y(), vector3f.z()); } - default VertexConsumer setNormal(PoseStack.Pose pose, Vector3f vector3f) { - return this.setNormal(pose, vector3f.x(), vector3f.y(), vector3f.z()); + default VertexConsumer setNormal(PoseStack.Pose pose, Vector3f normalVector) { + return this.setNormal(pose, normalVector.x(), normalVector.y(), normalVector.z()); } } diff --git a/com/mojang/blaze3d/vertex/VertexFormat.java b/com/mojang/blaze3d/vertex/VertexFormat.java index 6edaaa6b..cac51237 100644 --- a/com/mojang/blaze3d/vertex/VertexFormat.java +++ b/com/mojang/blaze3d/vertex/VertexFormat.java @@ -41,12 +41,12 @@ public class VertexFormat { return new VertexFormat.Builder(); } - public void bindAttributes(int i) { - int j = 0; + public void bindAttributes(int program) { + int i = 0; for (String string : this.getElementAttributeNames()) { - GlStateManager._glBindAttribLocation(i, j, string); - j++; + GlStateManager._glBindAttribLocation(program, i, string); + i++; } } diff --git a/com/mojang/math/MatrixUtil.java b/com/mojang/math/MatrixUtil.java index 58b41263..0264a71c 100644 --- a/com/mojang/math/MatrixUtil.java +++ b/com/mojang/math/MatrixUtil.java @@ -35,9 +35,9 @@ public class MatrixUtil { ); } - private static GivensParameters approxGivensQuat(float f, float g, float h) { - float i = 2.0F * (f - h); - return G * g * g < i * i ? GivensParameters.fromUnnormalized(g, i) : PI_4; + private static GivensParameters approxGivensQuat(float topCorner, float oppositeDiagonalAverage, float bottomCorner) { + float f = 2.0F * (topCorner - bottomCorner); + return G * oppositeDiagonalAverage * oppositeDiagonalAverage < f * f ? GivensParameters.fromUnnormalized(oppositeDiagonalAverage, f) : PI_4; } private static GivensParameters qrGivensQuat(float input1, float input2) { diff --git a/com/mojang/realmsclient/RealmsMainScreen.java b/com/mojang/realmsclient/RealmsMainScreen.java index e6d7e435..49dcb57c 100644 --- a/com/mojang/realmsclient/RealmsMainScreen.java +++ b/com/mojang/realmsclient/RealmsMainScreen.java @@ -5,6 +5,7 @@ import com.google.common.util.concurrent.RateLimiter; import com.mojang.authlib.yggdrasil.ProfileResult; import com.mojang.logging.LogUtils; import com.mojang.math.Axis; +import com.mojang.realmsclient.RealmsAvailability.Result; import com.mojang.realmsclient.client.Ping; import com.mojang.realmsclient.client.RealmsClient; import com.mojang.realmsclient.dto.PingResult; @@ -59,10 +60,12 @@ import net.minecraft.client.gui.components.MultiLineTextWidget; import net.minecraft.client.gui.components.ObjectSelectionList; import net.minecraft.client.gui.components.PlayerFaceRenderer; import net.minecraft.client.gui.components.PopupScreen; -import net.minecraft.client.gui.components.SpriteIconButton; import net.minecraft.client.gui.components.Tooltip; import net.minecraft.client.gui.components.WidgetSprites; import net.minecraft.client.gui.components.WidgetTooltipHolder; +import net.minecraft.client.gui.components.Button.OnPress; +import net.minecraft.client.gui.components.PopupScreen.Builder; +import net.minecraft.client.gui.components.SpriteIconButton.CenteredIcon; import net.minecraft.client.gui.layouts.FrameLayout; import net.minecraft.client.gui.layouts.GridLayout; import net.minecraft.client.gui.layouts.HeaderAndFooterLayout; @@ -141,7 +144,7 @@ public class RealmsMainScreen extends RealmsScreen { private static final int ITEM_HEIGHT = 36; private static final boolean SNAPSHOT = !SharedConstants.getCurrentVersion().isStable(); private static boolean snapshotToggle = SNAPSHOT; - private final CompletableFuture availability = RealmsAvailability.get(); + private final CompletableFuture availability = RealmsAvailability.get(); @Nullable private Subscription dataSubscription; private final Set handledSeenNotifications = new HashSet(); @@ -627,7 +630,7 @@ public class RealmsMainScreen extends RealmsScreen { case INCOMPATIBLE: Minecraft.getInstance() .setScreen( - new PopupScreen.Builder(lastScreen, INCOMPATIBLE_POPUP_TITLE) + new Builder(lastScreen, INCOMPATIBLE_POPUP_TITLE) .setMessage( Component.translatable( "mco.compatibility.incompatible.series.popup.message", @@ -642,7 +645,7 @@ public class RealmsMainScreen extends RealmsScreen { case RELEASE_TYPE_INCOMPATIBLE: Minecraft.getInstance() .setScreen( - new PopupScreen.Builder(lastScreen, INCOMPATIBLE_POPUP_TITLE) + new Builder(lastScreen, INCOMPATIBLE_POPUP_TITLE) .setMessage(INCOMPATIBLE_RELEASE_TYPE_POPUP_MESSAGE) .addButton(CommonComponents.GUI_BACK, PopupScreen::onClose) .build() @@ -652,7 +655,7 @@ public class RealmsMainScreen extends RealmsScreen { } private static void confirmToPlay(RealmsServer realmsServer, Screen lastScreen, Component title, Component message, Component confirmButton) { - Minecraft.getInstance().setScreen(new PopupScreen.Builder(lastScreen, title).setMessage(message).addButton(confirmButton, popupScreen -> { + Minecraft.getInstance().setScreen(new Builder(lastScreen, title).setMessage(message).addButton(confirmButton, popupScreen -> { Minecraft.getInstance().setScreen(new RealmsLongRunningMcoTaskScreen(lastScreen, new GetServerDetailsTask(lastScreen, realmsServer))); refreshServerList(); }).addButton(CommonComponents.GUI_CANCEL, PopupScreen::onClose).build()); @@ -677,8 +680,8 @@ public class RealmsMainScreen extends RealmsScreen { return (Component)(StringUtils.isBlank(version) ? CommonComponents.EMPTY : Component.literal(version).withColor(color)); } - public static Component getGameModeComponent(int i, boolean bl) { - return (Component)(bl ? Component.translatable("gameMode.hardcore").withColor(-65536) : GameType.byId(i).getLongDisplayName()); + public static Component getGameModeComponent(int gamemode, boolean hardcore) { + return (Component)(hardcore ? Component.translatable("gameMode.hardcore").withColor(-65536) : GameType.byId(gamemode).getLongDisplayName()); } static boolean isSelfOwnedServer(RealmsServer server) { @@ -745,7 +748,7 @@ public class RealmsMainScreen extends RealmsScreen { RealmsMainScreen.this.minecraft.getSoundManager().play(SimpleSoundInstance.forUI(SoundEvents.UI_BUTTON_CLICK, 1.0F)); RealmsMainScreen.this.minecraft .setScreen( - new PopupScreen.Builder(RealmsMainScreen.this, Component.translatable("mco.snapshot.createSnapshotPopup.title")) + new Builder(RealmsMainScreen.this, Component.translatable("mco.snapshot.createSnapshotPopup.title")) .setMessage(Component.translatable("mco.snapshot.createSnapshotPopup.text")) .addButton( Component.translatable("mco.selectServer.create"), @@ -810,7 +813,7 @@ public class RealmsMainScreen extends RealmsScreen { ResourceLocation.withDefaultNamespace("widget/cross_button"), ResourceLocation.withDefaultNamespace("widget/cross_button_highlighted") ); - protected CrossButton(Button.OnPress onPress, Component message) { + protected CrossButton(OnPress onPress, Component message) { super(0, 0, 14, 14, SPRITES, onPress); this.setTooltip(Tooltip.create(message)); } @@ -902,26 +905,26 @@ public class RealmsMainScreen extends RealmsScreen { return left + width - RealmsMainScreen.this.font.width(versionComponent) - 20; } - protected int gameModeTextX(int i, int j, Component component) { - return i + j - RealmsMainScreen.this.font.width(component) - 20; + protected int gameModeTextX(int left, int width, Component component) { + return left + width - RealmsMainScreen.this.font.width(component) - 20; } - protected int renderGameMode(RealmsServer realmsServer, GuiGraphics guiGraphics, int i, int j, int k) { - boolean bl = realmsServer.isHardcore; - int l = realmsServer.gameMode; - int m = i; - if (GameType.isValidId(l)) { - Component component = RealmsMainScreen.getGameModeComponent(l, bl); - m = this.gameModeTextX(i, j, component); - guiGraphics.drawString(RealmsMainScreen.this.font, component, m, this.secondLineY(k), -8355712, false); + protected int renderGameMode(RealmsServer server, GuiGraphics guiGraphics, int left, int width, int firstLineY) { + boolean bl = server.isHardcore; + int i = server.gameMode; + int j = left; + if (GameType.isValidId(i)) { + Component component = RealmsMainScreen.getGameModeComponent(i, bl); + j = this.gameModeTextX(left, width, component); + guiGraphics.drawString(RealmsMainScreen.this.font, component, j, this.secondLineY(firstLineY), -8355712, false); } if (bl) { - m -= 10; - guiGraphics.blitSprite(RenderType::guiTextured, RealmsMainScreen.HARDCORE_MODE_SPRITE, m, this.secondLineY(k), 8, 8); + j -= 10; + guiGraphics.blitSprite(RenderType::guiTextured, RealmsMainScreen.HARDCORE_MODE_SPRITE, j, this.secondLineY(firstLineY), 8, 8); } - return m; + return j; } protected int firstLineY(int top) { @@ -953,7 +956,7 @@ public class RealmsMainScreen extends RealmsScreen { } @Environment(EnvType.CLIENT) - static class NotificationButton extends SpriteIconButton.CenteredIcon { + static class NotificationButton extends CenteredIcon { private static final ResourceLocation[] NOTIFICATION_ICONS = new ResourceLocation[]{ ResourceLocation.withDefaultNamespace("notification/1"), ResourceLocation.withDefaultNamespace("notification/2"), @@ -967,7 +970,7 @@ public class RealmsMainScreen extends RealmsScreen { private static final int SPRITE_SIZE = 14; private int notificationCount; - public NotificationButton(Component message, ResourceLocation sprite, Button.OnPress onPress) { + public NotificationButton(Component message, ResourceLocation sprite, OnPress onPress) { super(20, 20, message, 14, 14, sprite, onPress, null); } @@ -1135,8 +1138,8 @@ public class RealmsMainScreen extends RealmsScreen { super(Minecraft.getInstance(), RealmsMainScreen.this.width, RealmsMainScreen.this.height, 0, 36); } - public void setSelected(@Nullable RealmsMainScreen.Entry entry) { - super.setSelected(entry); + public void setSelected(@Nullable RealmsMainScreen.Entry selected) { + super.setSelected(selected); RealmsMainScreen.this.updateButtonStates(); } @@ -1145,55 +1148,55 @@ public class RealmsMainScreen extends RealmsScreen { return 300; } - void refreshEntries(RealmsMainScreen realmsMainScreen, @Nullable RealmsServer realmsServer) { + void refreshEntries(RealmsMainScreen screen, @Nullable RealmsServer server) { this.clearEntries(); for (RealmsNotification realmsNotification : RealmsMainScreen.this.notifications) { if (realmsNotification instanceof VisitUrl visitUrl) { - this.addEntriesForNotification(visitUrl, realmsMainScreen); + this.addEntriesForNotification(visitUrl, screen); RealmsMainScreen.this.markNotificationsAsSeen(List.of(realmsNotification)); break; } } - this.refreshServerEntries(realmsServer); + this.refreshServerEntries(server); } - private void refreshServerEntries(@Nullable RealmsServer realmsServer) { - for (RealmsServer realmsServer2 : RealmsMainScreen.this.availableSnapshotServers) { - this.addEntry(RealmsMainScreen.this.new AvailableSnapshotEntry(realmsServer2)); + private void refreshServerEntries(@Nullable RealmsServer server) { + for (RealmsServer realmsServer : RealmsMainScreen.this.availableSnapshotServers) { + this.addEntry(RealmsMainScreen.this.new AvailableSnapshotEntry(realmsServer)); } - for (RealmsServer realmsServer2 : RealmsMainScreen.this.serverList) { + for (RealmsServer realmsServer : RealmsMainScreen.this.serverList) { RealmsMainScreen.Entry entry; - if (RealmsMainScreen.isSnapshot() && !realmsServer2.isSnapshotRealm()) { - if (realmsServer2.state == RealmsServer.State.UNINITIALIZED) { + if (RealmsMainScreen.isSnapshot() && !realmsServer.isSnapshotRealm()) { + if (realmsServer.state == RealmsServer.State.UNINITIALIZED) { continue; } - entry = RealmsMainScreen.this.new ParentEntry(realmsServer2); + entry = RealmsMainScreen.this.new ParentEntry(realmsServer); } else { - entry = RealmsMainScreen.this.new ServerEntry(realmsServer2); + entry = RealmsMainScreen.this.new ServerEntry(realmsServer); } this.addEntry(entry); - if (realmsServer != null && realmsServer.id == realmsServer2.id) { + if (server != null && server.id == realmsServer.id) { this.setSelected(entry); } } } - private void addEntriesForNotification(VisitUrl visitUrl, RealmsMainScreen realmsMainScreen) { - Component component = visitUrl.getMessage(); + private void addEntriesForNotification(VisitUrl url, RealmsMainScreen mainScreen) { + Component component = url.getMessage(); int i = RealmsMainScreen.this.font.wordWrapHeight(component, 216); int j = Mth.positiveCeilDiv(i + 7, 36) - 1; - this.addEntry(RealmsMainScreen.this.new NotificationMessageEntry(component, j + 2, visitUrl)); + this.addEntry(RealmsMainScreen.this.new NotificationMessageEntry(component, j + 2, url)); for (int k = 0; k < j; k++) { this.addEntry(RealmsMainScreen.this.new EmptyEntry()); } - this.addEntry(RealmsMainScreen.this.new ButtonEntry(visitUrl.buildOpenLinkButton(realmsMainScreen))); + this.addEntry(RealmsMainScreen.this.new ButtonEntry(url.buildOpenLinkButton(mainScreen))); } } @@ -1251,18 +1254,18 @@ public class RealmsMainScreen extends RealmsScreen { } } - private void renderSecondLine(GuiGraphics guiGraphics, int i, int j, int k) { - int l = this.textX(j); - int m = this.firstLineY(i); - int n = this.secondLineY(m); + private void renderSecondLine(GuiGraphics guiGraphics, int top, int left, int width) { + int i = this.textX(left); + int j = this.firstLineY(top); + int k = this.secondLineY(j); String string = this.serverData.getMinigameName(); boolean bl = this.serverData.isMinigameActive(); if (bl && string != null) { Component component = Component.literal(string).withStyle(ChatFormatting.GRAY); - guiGraphics.drawString(RealmsMainScreen.this.font, Component.translatable("mco.selectServer.minigameName", component).withColor(-171), l, n, -1, false); + guiGraphics.drawString(RealmsMainScreen.this.font, Component.translatable("mco.selectServer.minigameName", component).withColor(-171), i, k, -1, false); } else { - int o = this.renderGameMode(this.serverData, guiGraphics, j, k, m); - this.renderClampedString(guiGraphics, this.serverData.getDescription(), l, this.secondLineY(m), o, -8355712); + int l = this.renderGameMode(this.serverData, guiGraphics, left, width, j); + this.renderClampedString(guiGraphics, this.serverData.getDescription(), i, this.secondLineY(j), l, -8355712); } } diff --git a/com/mojang/realmsclient/client/FileUpload.java b/com/mojang/realmsclient/client/FileUpload.java index 2a54d6e5..bec4fada 100644 --- a/com/mojang/realmsclient/client/FileUpload.java +++ b/com/mojang/realmsclient/client/FileUpload.java @@ -6,6 +6,7 @@ import com.mojang.logging.LogUtils; import com.mojang.realmsclient.client.worldupload.RealmsUploadCanceledException; import com.mojang.realmsclient.dto.UploadInfo; import com.mojang.realmsclient.gui.screens.UploadResult; +import com.mojang.realmsclient.gui.screens.UploadResult.Builder; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -69,12 +70,12 @@ public class FileUpload { public UploadResult upload() { if (this.uploadTask != null) { - return new UploadResult.Builder().build(); + return new Builder().build(); } else { this.uploadTask = CompletableFuture.supplyAsync(() -> this.requestUpload(0), Util.backgroundExecutor()); if (this.cancelled.get()) { this.cancel(); - return new UploadResult.Builder().build(); + return new Builder().build(); } else { return (UploadResult)this.uploadTask.join(); } @@ -89,7 +90,7 @@ public class FileUpload { * @param retries The number of times this upload has already been attempted */ private UploadResult requestUpload(int retries) { - UploadResult.Builder builder = new UploadResult.Builder(); + Builder builder = new Builder(); if (this.cancelled.get()) { return builder.build(); } else { @@ -155,7 +156,7 @@ public class FileUpload { post.setEntity(customInputStreamEntity); } - private void handleResponse(HttpResponse response, UploadResult.Builder uploadResult) throws IOException { + private void handleResponse(HttpResponse response, Builder uploadResult) throws IOException { int i = response.getStatusLine().getStatusCode(); if (i == 401) { LOGGER.debug("Realms server returned 401: {}", response.getFirstHeader("WWW-Authenticate")); @@ -199,10 +200,10 @@ public class FileUpload { private final InputStream content; private final UploadStatus uploadStatus; - public CustomInputStreamEntity(final InputStream inputStream, final long l, final UploadStatus uploadStatus) { - super(inputStream); - this.content = inputStream; - this.length = l; + public CustomInputStreamEntity(final InputStream content, final long length, final UploadStatus uploadStatus) { + super(content); + this.content = content; + this.length = length; this.uploadStatus = uploadStatus; } diff --git a/com/mojang/realmsclient/client/RealmsClient.java b/com/mojang/realmsclient/client/RealmsClient.java index 43ee5455..9c524a0f 100644 --- a/com/mojang/realmsclient/client/RealmsClient.java +++ b/com/mojang/realmsclient/client/RealmsClient.java @@ -345,12 +345,12 @@ public class RealmsClient { } @Nullable - public UploadInfo requestUploadInfo(long l) throws RealmsServiceException { - String string = this.url("worlds" + "/$WORLD_ID/backups/upload".replace("$WORLD_ID", String.valueOf(l))); - String string2 = UploadTokenCache.get(l); + public UploadInfo requestUploadInfo(long worldId) throws RealmsServiceException { + String string = this.url("worlds" + "/$WORLD_ID/backups/upload".replace("$WORLD_ID", String.valueOf(worldId))); + String string2 = UploadTokenCache.get(worldId); UploadInfo uploadInfo = UploadInfo.parse(this.execute(Request.put(string, UploadInfo.createRequest(string2)))); if (uploadInfo != null) { - UploadTokenCache.put(l, uploadInfo.getToken()); + UploadTokenCache.put(worldId, uploadInfo.getToken()); } return uploadInfo; diff --git a/com/mojang/realmsclient/client/UploadStatus.java b/com/mojang/realmsclient/client/UploadStatus.java index a4e4fcdc..7e2aa47c 100644 --- a/com/mojang/realmsclient/client/UploadStatus.java +++ b/com/mojang/realmsclient/client/UploadStatus.java @@ -12,8 +12,8 @@ public class UploadStatus { private long previousBytesWritten; private long bytesPerSecond; - public void setTotalBytes(long l) { - this.totalBytes = l; + public void setTotalBytes(long totalBytes) { + this.totalBytes = totalBytes; } public long getTotalBytes() { @@ -24,8 +24,8 @@ public class UploadStatus { return this.bytesWritten; } - public void onWrite(long l) { - this.bytesWritten += l; + public void onWrite(long bytes) { + this.bytesWritten += bytes; } public boolean uploadStarted() { diff --git a/com/mojang/realmsclient/client/worldupload/RealmsCreateWorldFlow.java b/com/mojang/realmsclient/client/worldupload/RealmsCreateWorldFlow.java index cefede14..c834a42b 100644 --- a/com/mojang/realmsclient/client/worldupload/RealmsCreateWorldFlow.java +++ b/com/mojang/realmsclient/client/worldupload/RealmsCreateWorldFlow.java @@ -33,18 +33,18 @@ public class RealmsCreateWorldFlow { private static final Logger LOGGER = LogUtils.getLogger(); public static void createWorld( - Minecraft minecraft, Screen screen, Screen screen2, int i, RealmsServer realmsServer, @Nullable RealmCreationTask realmCreationTask + Minecraft minecraft, Screen lastScreen, Screen resetWorldScreen, int slot, RealmsServer server, @Nullable RealmCreationTask realmCreationTask ) { CreateWorldScreen.openFresh( minecraft, - screen, + lastScreen, (createWorldScreen, layeredRegistryAccess, primaryLevelData, path) -> { Path path2; try { path2 = createTemporaryWorldFolder(layeredRegistryAccess, primaryLevelData, path); } catch (IOException var13) { LOGGER.warn("Failed to create temporary world folder."); - minecraft.setScreen(new RealmsGenericErrorScreen(Component.translatable("mco.create.world.failed"), screen2)); + minecraft.setScreen(new RealmsGenericErrorScreen(Component.translatable("mco.create.world.failed"), resetWorldScreen)); return true; } @@ -52,7 +52,7 @@ public class RealmsCreateWorldFlow { primaryLevelData.getLevelSettings(), SharedConstants.getCurrentVersion().getName() ); RealmsWorldUpload realmsWorldUpload = new RealmsWorldUpload( - path2, realmsWorldOptions, minecraft.getUser(), realmsServer.id, i, RealmsWorldUploadStatusTracker.noOp() + path2, realmsWorldOptions, minecraft.getUser(), server.id, slot, RealmsWorldUploadStatusTracker.noOp() ); minecraft.forceSetScreen( new AlertScreen(realmsWorldUpload::cancel, Component.translatable("mco.create.world.reset.title"), Component.empty(), CommonComponents.GUI_CANCEL, false) @@ -68,7 +68,7 @@ public class RealmsCreateWorldFlow { } if (throwable instanceof RealmsUploadCanceledException) { - minecraft.forceSetScreen(screen2); + minecraft.forceSetScreen(resetWorldScreen); } else { if (throwable instanceof RealmsUploadFailedException realmsUploadFailedException) { LOGGER.warn("Failed to create realms world {}", realmsUploadFailedException.getStatusMessage()); @@ -76,17 +76,17 @@ public class RealmsCreateWorldFlow { LOGGER.warn("Failed to create realms world {}", throwable.getMessage()); } - minecraft.forceSetScreen(new RealmsGenericErrorScreen(Component.translatable("mco.create.world.failed"), screen2)); + minecraft.forceSetScreen(new RealmsGenericErrorScreen(Component.translatable("mco.create.world.failed"), resetWorldScreen)); } } else { - if (screen instanceof RealmsConfigureWorldScreen realmsConfigureWorldScreen) { - realmsConfigureWorldScreen.fetchServerData(realmsServer.id); + if (lastScreen instanceof RealmsConfigureWorldScreen realmsConfigureWorldScreen) { + realmsConfigureWorldScreen.fetchServerData(server.id); } if (realmCreationTask != null) { - RealmsMainScreen.play(realmsServer, screen, true); + RealmsMainScreen.play(server, lastScreen, true); } else { - minecraft.forceSetScreen(screen); + minecraft.forceSetScreen(lastScreen); } RealmsMainScreen.refreshServerList(); @@ -99,19 +99,17 @@ public class RealmsCreateWorldFlow { ); } - private static Path createTemporaryWorldFolder( - LayeredRegistryAccess layeredRegistryAccess, PrimaryLevelData primaryLevelData, @Nullable Path path - ) throws IOException { - Path path2 = Files.createTempDirectory("minecraft_realms_world_upload"); - if (path != null) { - Files.move(path, path2.resolve("datapacks")); + private static Path createTemporaryWorldFolder(LayeredRegistryAccess registryAccess, PrimaryLevelData levelData, @Nullable Path tempDatapackDir) throws IOException { + Path path = Files.createTempDirectory("minecraft_realms_world_upload"); + if (tempDatapackDir != null) { + Files.move(tempDatapackDir, path.resolve("datapacks")); } - CompoundTag compoundTag = primaryLevelData.createTag(layeredRegistryAccess.compositeAccess(), null); + CompoundTag compoundTag = levelData.createTag(registryAccess.compositeAccess(), null); CompoundTag compoundTag2 = new CompoundTag(); compoundTag2.put("Data", compoundTag); - Path path3 = Files.createFile(path2.resolve("level.dat")); - NbtIo.writeCompressed(compoundTag2, path3); - return path2; + Path path2 = Files.createFile(path.resolve("level.dat")); + NbtIo.writeCompressed(compoundTag2, path2); + return path; } } diff --git a/com/mojang/realmsclient/client/worldupload/RealmsUploadFailedException.java b/com/mojang/realmsclient/client/worldupload/RealmsUploadFailedException.java index c19bb614..308f2ca5 100644 --- a/com/mojang/realmsclient/client/worldupload/RealmsUploadFailedException.java +++ b/com/mojang/realmsclient/client/worldupload/RealmsUploadFailedException.java @@ -8,12 +8,12 @@ import net.minecraft.network.chat.Component; public class RealmsUploadFailedException extends RealmsUploadException { private final Component errorMessage; - public RealmsUploadFailedException(Component component) { - this.errorMessage = component; + public RealmsUploadFailedException(Component errorMessage) { + this.errorMessage = errorMessage; } - public RealmsUploadFailedException(String string) { - this(Component.literal(string)); + public RealmsUploadFailedException(String errorMessage) { + this(Component.literal(errorMessage)); } @Override diff --git a/com/mojang/realmsclient/client/worldupload/RealmsUploadTooLargeException.java b/com/mojang/realmsclient/client/worldupload/RealmsUploadTooLargeException.java index bf0b102f..0aa0a741 100644 --- a/com/mojang/realmsclient/client/worldupload/RealmsUploadTooLargeException.java +++ b/com/mojang/realmsclient/client/worldupload/RealmsUploadTooLargeException.java @@ -9,8 +9,8 @@ import net.minecraft.network.chat.Component; public class RealmsUploadTooLargeException extends RealmsUploadException { final long sizeLimit; - public RealmsUploadTooLargeException(long l) { - this.sizeLimit = l; + public RealmsUploadTooLargeException(long sizeLimit) { + this.sizeLimit = sizeLimit; } @Override diff --git a/com/mojang/realmsclient/client/worldupload/RealmsUploadWorldPacker.java b/com/mojang/realmsclient/client/worldupload/RealmsUploadWorldPacker.java index f787ad0d..09f2993a 100644 --- a/com/mojang/realmsclient/client/worldupload/RealmsUploadWorldPacker.java +++ b/com/mojang/realmsclient/client/worldupload/RealmsUploadWorldPacker.java @@ -20,13 +20,13 @@ public class RealmsUploadWorldPacker { private final BooleanSupplier isCanceled; private final Path directoryToPack; - public static File pack(Path path, BooleanSupplier booleanSupplier) throws IOException { - return new RealmsUploadWorldPacker(path, booleanSupplier).tarGzipArchive(); + public static File pack(Path directoryToPack, BooleanSupplier isCanceled) throws IOException { + return new RealmsUploadWorldPacker(directoryToPack, isCanceled).tarGzipArchive(); } - private RealmsUploadWorldPacker(Path path, BooleanSupplier booleanSupplier) { - this.isCanceled = booleanSupplier; - this.directoryToPack = path; + private RealmsUploadWorldPacker(Path directoryToPack, BooleanSupplier isCanceled) { + this.isCanceled = isCanceled; + this.directoryToPack = directoryToPack; } private File tarGzipArchive() throws IOException { @@ -54,20 +54,20 @@ public class RealmsUploadWorldPacker { return var3; } - private void addFileToTarGz(TarArchiveOutputStream tarArchiveOutputStream, Path path, String string, boolean bl) throws IOException { + private void addFileToTarGz(TarArchiveOutputStream stream, Path directory, String prefix, boolean isRootDirectory) throws IOException { if (this.isCanceled.getAsBoolean()) { throw new RealmsUploadCanceledException(); } else { - this.verifyBelowSizeLimit(tarArchiveOutputStream.getBytesWritten()); - File file = path.toFile(); - String string2 = bl ? string : string + file.getName(); - TarArchiveEntry tarArchiveEntry = new TarArchiveEntry(file, string2); - tarArchiveOutputStream.putArchiveEntry(tarArchiveEntry); + this.verifyBelowSizeLimit(stream.getBytesWritten()); + File file = directory.toFile(); + String string = isRootDirectory ? prefix : prefix + file.getName(); + TarArchiveEntry tarArchiveEntry = new TarArchiveEntry(file, string); + stream.putArchiveEntry(tarArchiveEntry); if (file.isFile()) { InputStream inputStream = new FileInputStream(file); try { - inputStream.transferTo(tarArchiveOutputStream); + inputStream.transferTo(stream); } catch (Throwable var14) { try { inputStream.close(); @@ -79,21 +79,21 @@ public class RealmsUploadWorldPacker { } inputStream.close(); - tarArchiveOutputStream.closeArchiveEntry(); + stream.closeArchiveEntry(); } else { - tarArchiveOutputStream.closeArchiveEntry(); + stream.closeArchiveEntry(); File[] files = file.listFiles(); if (files != null) { for (File file2 : files) { - this.addFileToTarGz(tarArchiveOutputStream, file2.toPath(), string2 + "/", false); + this.addFileToTarGz(stream, file2.toPath(), string + "/", false); } } } } } - private void verifyBelowSizeLimit(long l) { - if (l > 5368709120L) { + private void verifyBelowSizeLimit(long size) { + if (size > 5368709120L) { throw new RealmsUploadTooLargeException(5368709120L); } } diff --git a/com/mojang/realmsclient/client/worldupload/RealmsWorldUpload.java b/com/mojang/realmsclient/client/worldupload/RealmsWorldUpload.java index 14619aa1..0d52d6a5 100644 --- a/com/mojang/realmsclient/client/worldupload/RealmsWorldUpload.java +++ b/com/mojang/realmsclient/client/worldupload/RealmsWorldUpload.java @@ -37,15 +37,13 @@ public class RealmsWorldUpload { @Nullable private FileUpload uploadTask; - public RealmsWorldUpload( - Path path, RealmsWorldOptions realmsWorldOptions, User user, long l, int i, RealmsWorldUploadStatusTracker realmsWorldUploadStatusTracker - ) { - this.worldFolder = path; - this.worldOptions = realmsWorldOptions; + public RealmsWorldUpload(Path worldFolder, RealmsWorldOptions worldOptions, User user, long realmId, int slotId, RealmsWorldUploadStatusTracker statusCallback) { + this.worldFolder = worldFolder; + this.worldOptions = worldOptions; this.user = user; - this.realmId = l; - this.slotId = i; - this.statusCallback = realmsWorldUploadStatusTracker; + this.realmId = realmId; + this.slotId = slotId; + this.statusCallback = statusCallback; } public CompletableFuture packAndUpload() { diff --git a/com/mojang/realmsclient/dto/RealmsServer.java b/com/mojang/realmsclient/dto/RealmsServer.java index 0c2de1e8..36dc3706 100644 --- a/com/mojang/realmsclient/dto/RealmsServer.java +++ b/com/mojang/realmsclient/dto/RealmsServer.java @@ -20,6 +20,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.Util; import net.minecraft.client.multiplayer.ServerData; +import net.minecraft.client.multiplayer.ServerData.Type; import org.apache.commons.lang3.builder.EqualsBuilder; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; @@ -185,11 +186,11 @@ public class RealmsServer extends ValueObject { return map; } - private static RealmsSettings parseSettings(JsonElement jsonElement) { + private static RealmsSettings parseSettings(JsonElement json) { boolean bl = false; - if (jsonElement.isJsonArray()) { - for (JsonElement jsonElement2 : jsonElement.getAsJsonArray()) { - JsonObject jsonObject = jsonElement2.getAsJsonObject(); + if (json.isJsonArray()) { + for (JsonElement jsonElement : json.getAsJsonArray()) { + JsonObject jsonObject = jsonElement.getAsJsonObject(); bl = readBoolean(jsonObject, "hardcore", bl); } } @@ -197,9 +198,9 @@ public class RealmsServer extends ValueObject { return new RealmsSettings(bl); } - private static boolean readBoolean(JsonObject jsonObject, String string, boolean bl) { - String string2 = JsonUtils.getStringOr("name", jsonObject, null); - return string2 != null && string2.equals(string) ? JsonUtils.getBooleanOr("value", jsonObject, bl) : bl; + private static boolean readBoolean(JsonObject json, String memberName, boolean defaultValue) { + String string = JsonUtils.getStringOr("name", json, null); + return string != null && string.equals(memberName) ? JsonUtils.getBooleanOr("value", json, defaultValue) : defaultValue; } private static Map createEmptySlots() { @@ -333,7 +334,7 @@ public class RealmsServer extends ValueObject { } public ServerData toServerData(String ip) { - return new ServerData((String)Objects.requireNonNullElse(this.name, "unknown server"), ip, ServerData.Type.REALM); + return new ServerData((String)Objects.requireNonNullElse(this.name, "unknown server"), ip, Type.REALM); } @Environment(EnvType.CLIENT) diff --git a/com/mojang/realmsclient/dto/RealmsWorldOptions.java b/com/mojang/realmsclient/dto/RealmsWorldOptions.java index 7da362e7..949987e9 100644 --- a/com/mojang/realmsclient/dto/RealmsWorldOptions.java +++ b/com/mojang/realmsclient/dto/RealmsWorldOptions.java @@ -44,18 +44,28 @@ public class RealmsWorldOptions extends ValueObject { private static final String DEFAULT_TEMPLATE_IMAGE = null; public RealmsWorldOptions( - boolean bl, boolean bl2, int i, boolean bl3, int j, int k, boolean bl4, boolean bl5, String string, String string2, RealmsServer.Compatibility compatibility + boolean pvp, + boolean spawnMonsters, + int spawnProtection, + boolean commandBlocks, + int difficulty, + int gameMode, + boolean hardcore, + boolean forceGameMode, + String slotName, + String version, + RealmsServer.Compatibility compatibility ) { - this.pvp = bl; - this.spawnMonsters = bl2; - this.spawnProtection = i; - this.commandBlocks = bl3; - this.difficulty = j; - this.gameMode = k; - this.hardcore = bl4; - this.forceGameMode = bl5; - this.slotName = string; - this.version = string2; + this.pvp = pvp; + this.spawnMonsters = spawnMonsters; + this.spawnProtection = spawnProtection; + this.commandBlocks = commandBlocks; + this.difficulty = difficulty; + this.gameMode = gameMode; + this.hardcore = hardcore; + this.forceGameMode = forceGameMode; + this.slotName = slotName; + this.version = version; this.compatibility = compatibility; } @@ -63,12 +73,12 @@ public class RealmsWorldOptions extends ValueObject { return new RealmsWorldOptions(true, true, 0, false, 2, 0, false, false, "", "", DEFAULT_COMPATIBILITY); } - public static RealmsWorldOptions createDefaultsWith(GameType gameType, Difficulty difficulty, boolean bl, String string, String string2) { - return new RealmsWorldOptions(true, true, 0, false, difficulty.getId(), gameType.getId(), bl, false, string2, string, DEFAULT_COMPATIBILITY); + public static RealmsWorldOptions createDefaultsWith(GameType gameMode, Difficulty difficulty, boolean hardcore, String version, String slotName) { + return new RealmsWorldOptions(true, true, 0, false, difficulty.getId(), gameMode.getId(), hardcore, false, slotName, version, DEFAULT_COMPATIBILITY); } - public static RealmsWorldOptions createFromSettings(LevelSettings levelSettings, String string) { - return createDefaultsWith(levelSettings.gameType(), levelSettings.difficulty(), levelSettings.hardcore(), string, levelSettings.levelName()); + public static RealmsWorldOptions createFromSettings(LevelSettings settings, String version) { + return createDefaultsWith(settings.gameType(), settings.difficulty(), settings.hardcore(), version, settings.levelName()); } public static RealmsWorldOptions createEmptyDefaults() { @@ -81,22 +91,22 @@ public class RealmsWorldOptions extends ValueObject { this.empty = empty; } - public static RealmsWorldOptions parse(JsonObject jsonObject, RealmsSettings realmsSettings) { + public static RealmsWorldOptions parse(JsonObject json, RealmsSettings realmsSettings) { RealmsWorldOptions realmsWorldOptions = new RealmsWorldOptions( - JsonUtils.getBooleanOr("pvp", jsonObject, true), - JsonUtils.getBooleanOr("spawnMonsters", jsonObject, true), - JsonUtils.getIntOr("spawnProtection", jsonObject, 0), - JsonUtils.getBooleanOr("commandBlocks", jsonObject, false), - JsonUtils.getIntOr("difficulty", jsonObject, 2), - JsonUtils.getIntOr("gameMode", jsonObject, 0), + JsonUtils.getBooleanOr("pvp", json, true), + JsonUtils.getBooleanOr("spawnMonsters", json, true), + JsonUtils.getIntOr("spawnProtection", json, 0), + JsonUtils.getBooleanOr("commandBlocks", json, false), + JsonUtils.getIntOr("difficulty", json, 2), + JsonUtils.getIntOr("gameMode", json, 0), realmsSettings.hardcore(), - JsonUtils.getBooleanOr("forceGameMode", jsonObject, false), - JsonUtils.getRequiredStringOr("slotName", jsonObject, ""), - JsonUtils.getRequiredStringOr("version", jsonObject, ""), - RealmsServer.getCompatibility(JsonUtils.getRequiredStringOr("compatibility", jsonObject, RealmsServer.Compatibility.UNVERIFIABLE.name())) + JsonUtils.getBooleanOr("forceGameMode", json, false), + JsonUtils.getRequiredStringOr("slotName", json, ""), + JsonUtils.getRequiredStringOr("version", json, ""), + RealmsServer.getCompatibility(JsonUtils.getRequiredStringOr("compatibility", json, RealmsServer.Compatibility.UNVERIFIABLE.name())) ); - realmsWorldOptions.templateId = JsonUtils.getLongOr("worldTemplateId", jsonObject, -1L); - realmsWorldOptions.templateImage = JsonUtils.getStringOr("worldTemplateImage", jsonObject, DEFAULT_TEMPLATE_IMAGE); + realmsWorldOptions.templateId = JsonUtils.getLongOr("worldTemplateId", json, -1L); + realmsWorldOptions.templateImage = JsonUtils.getStringOr("worldTemplateImage", json, DEFAULT_TEMPLATE_IMAGE); return realmsWorldOptions; } diff --git a/com/mojang/realmsclient/gui/RowButton.java b/com/mojang/realmsclient/gui/RowButton.java index a3bb9bf7..733b0901 100644 --- a/com/mojang/realmsclient/gui/RowButton.java +++ b/com/mojang/realmsclient/gui/RowButton.java @@ -40,28 +40,30 @@ public abstract class RowButton { public abstract void onClick(int index); - public static void drawButtonsInRow(GuiGraphics guiGraphics, List list, AbstractSelectionList abstractSelectionList, int i, int j, int k, int l) { - for (RowButton rowButton : list) { - if (abstractSelectionList.getRowWidth() > rowButton.getRight()) { - rowButton.drawForRowAt(guiGraphics, i, j, k, l); + public static void drawButtonsInRow( + GuiGraphics guiGraphics, List rowButtons, AbstractSelectionList pendingInvitations, int x, int y, int mouseX, int mouseY + ) { + for (RowButton rowButton : rowButtons) { + if (pendingInvitations.getRowWidth() > rowButton.getRight()) { + rowButton.drawForRowAt(guiGraphics, x, y, mouseX, mouseY); } } } public static void rowButtonMouseClicked( - AbstractSelectionList abstractSelectionList, ObjectSelectionList.Entry entry, List list, int i, double d, double e + AbstractSelectionList pendingInvitations, ObjectSelectionList.Entry entry, List rowButtons, int button, double mouseX, double mouseY ) { - int j = abstractSelectionList.children().indexOf(entry); - if (j > -1) { - abstractSelectionList.setSelectedIndex(j); - int k = abstractSelectionList.getRowLeft(); - int l = abstractSelectionList.getRowTop(j); - int m = (int)(d - k); - int n = (int)(e - l); + int i = pendingInvitations.children().indexOf(entry); + if (i > -1) { + pendingInvitations.setSelectedIndex(i); + int j = pendingInvitations.getRowLeft(); + int k = pendingInvitations.getRowTop(i); + int l = (int)(mouseX - j); + int m = (int)(mouseY - k); - for (RowButton rowButton : list) { - if (m >= rowButton.xOffset && m <= rowButton.getRight() && n >= rowButton.yOffset && n <= rowButton.getBottom()) { - rowButton.onClick(j); + for (RowButton rowButton : rowButtons) { + if (l >= rowButton.xOffset && l <= rowButton.getRight() && m >= rowButton.yOffset && m <= rowButton.getBottom()) { + rowButton.onClick(i); } } } diff --git a/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java b/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java index 12f81820..c50217f4 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java @@ -35,10 +35,10 @@ public class RealmsCreateRealmScreen extends RealmsScreen { private EditBox descriptionBox; private final Runnable createWorldRunnable; - public RealmsCreateRealmScreen(RealmsMainScreen realmsMainScreen, RealmsServer realmsServer, boolean bl) { + public RealmsCreateRealmScreen(RealmsMainScreen lastScreen, RealmsServer server, boolean isSnapshor) { super(CREATE_REALM_TEXT); - this.lastScreen = realmsMainScreen; - this.createWorldRunnable = () -> this.createWorld(realmsServer, bl); + this.lastScreen = lastScreen; + this.createWorldRunnable = () -> this.createWorld(server, isSnapshor); } @Override @@ -71,17 +71,17 @@ public class RealmsCreateRealmScreen extends RealmsScreen { this.layout.arrangeElements(); } - private void createWorld(RealmsServer realmsServer, boolean bl) { - if (!realmsServer.isSnapshotRealm() && bl) { + private void createWorld(RealmsServer server, boolean isSnapshot) { + if (!server.isSnapshotRealm() && isSnapshot) { AtomicBoolean atomicBoolean = new AtomicBoolean(); this.minecraft.setScreen(new AlertScreen(() -> { atomicBoolean.set(true); this.lastScreen.resetScreen(); this.minecraft.setScreen(this.lastScreen); }, Component.translatable("mco.upload.preparing"), Component.empty())); - CompletableFuture.supplyAsync(() -> createSnapshotRealm(realmsServer), Util.backgroundExecutor()).thenAcceptAsync(realmsServerx -> { + CompletableFuture.supplyAsync(() -> createSnapshotRealm(server), Util.backgroundExecutor()).thenAcceptAsync(realmsServer -> { if (!atomicBoolean.get()) { - this.showResetWorldScreen(realmsServerx); + this.showResetWorldScreen(realmsServer); } }, this.minecraft).exceptionallyAsync(throwable -> { this.lastScreen.resetScreen(); @@ -96,28 +96,26 @@ public class RealmsCreateRealmScreen extends RealmsScreen { return null; }, this.minecraft); } else { - this.showResetWorldScreen(realmsServer); + this.showResetWorldScreen(server); } } - private static RealmsServer createSnapshotRealm(RealmsServer realmsServer) { + private static RealmsServer createSnapshotRealm(RealmsServer server) { RealmsClient realmsClient = RealmsClient.create(); try { - return realmsClient.createSnapshotRealm(realmsServer.id); + return realmsClient.createSnapshotRealm(server.id); } catch (RealmsServiceException var3) { throw new RuntimeException(var3); } } - private void showResetWorldScreen(RealmsServer realmsServer) { - RealmCreationTask realmCreationTask = new RealmCreationTask(realmsServer.id, this.nameBox.getValue(), this.descriptionBox.getValue()); - RealmsResetWorldScreen realmsResetWorldScreen = RealmsResetWorldScreen.forNewRealm( - this, realmsServer, realmCreationTask, () -> this.minecraft.execute(() -> { - RealmsMainScreen.refreshServerList(); - this.minecraft.setScreen(this.lastScreen); - }) - ); + private void showResetWorldScreen(RealmsServer server) { + RealmCreationTask realmCreationTask = new RealmCreationTask(server.id, this.nameBox.getValue(), this.descriptionBox.getValue()); + RealmsResetWorldScreen realmsResetWorldScreen = RealmsResetWorldScreen.forNewRealm(this, server, realmCreationTask, () -> this.minecraft.execute(() -> { + RealmsMainScreen.refreshServerList(); + this.minecraft.setScreen(this.lastScreen); + })); this.minecraft.setScreen(realmsResetWorldScreen); } diff --git a/com/mojang/realmsclient/gui/screens/RealmsPendingInvitesScreen.java b/com/mojang/realmsclient/gui/screens/RealmsPendingInvitesScreen.java index c2a1eccd..ef2d5259 100644 --- a/com/mojang/realmsclient/gui/screens/RealmsPendingInvitesScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsPendingInvitesScreen.java @@ -85,13 +85,13 @@ public class RealmsPendingInvitesScreen extends RealmsScreen { this.minecraft.setScreen(this.lastScreen); } - void handleInvitation(boolean bl) { + void handleInvitation(boolean accept) { if (this.pendingInvitationSelectionList.getSelected() instanceof RealmsPendingInvitesScreen.Entry entry) { String string = entry.pendingInvite.invitationId; CompletableFuture.supplyAsync(() -> { try { RealmsClient realmsClient = RealmsClient.create(); - if (bl) { + if (accept) { realmsClient.acceptInvitation(string); } else { realmsClient.rejectInvitation(string); @@ -107,7 +107,7 @@ public class RealmsPendingInvitesScreen extends RealmsScreen { this.pendingInvitationSelectionList.removeInvitation(entry); this.updateButtonStates(); RealmsDataFetcher realmsDataFetcher = this.minecraft.realmsDataFetcher(); - if (bl) { + if (accept) { realmsDataFetcher.serverListUpdateTask.reset(); } @@ -192,8 +192,8 @@ public class RealmsPendingInvitesScreen extends RealmsScreen { } @Override - public void setSelectedIndex(int i) { - super.setSelectedIndex(i); + public void setSelectedIndex(int selected) { + super.setSelectedIndex(selected); RealmsPendingInvitesScreen.this.updateButtonStates(); } diff --git a/com/mojang/realmsclient/util/task/GetServerDetailsTask.java b/com/mojang/realmsclient/util/task/GetServerDetailsTask.java index d438711c..a0c179f6 100644 --- a/com/mojang/realmsclient/util/task/GetServerDetailsTask.java +++ b/com/mojang/realmsclient/util/task/GetServerDetailsTask.java @@ -140,9 +140,9 @@ public class GetServerDetailsTask extends LongRunningTask { private CompletableFuture scheduleResourcePackDownload(RealmsServerAddress serverAddress, UUID id) { try { - if (serverAddress.resourcePackUrl != null) { + if (serverAddress.resourcePackUrl == null) { return CompletableFuture.failedFuture(new IllegalStateException("resourcePackUrl was null")); - } else if (serverAddress.resourcePackHash != null) { + } else if (serverAddress.resourcePackHash == null) { return CompletableFuture.failedFuture(new IllegalStateException("resourcePackHash was null")); } else { DownloadedPackSource downloadedPackSource = Minecraft.getInstance().getDownloadedPackSource(); diff --git a/data/minecraft/structure/ancient_city/city/entrance/entrance_connector.nbt b/data/minecraft/structure/ancient_city/city/entrance/entrance_connector.nbt index 2502f2d2..3dac2d12 100644 --- a/data/minecraft/structure/ancient_city/city/entrance/entrance_connector.nbt +++ b/data/minecraft/structure/ancient_city/city/entrance/entrance_connector.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a8dc7d2ae760a953cd8a30c67e79a4b9aeb7d5bf3d16e04f021f81402a86a6a +oid sha256:7e638cf22311deb71e7c20b8f52edb654b0d99631c63719f44a3255db89b9489 size 9417 diff --git a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_1.nbt b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_1.nbt index 586aadfe..4e3d5883 100644 --- a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_1.nbt +++ b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:212589fe67f54a249fcbeaab1fba2916ac399f2e57fa8975db17955822da5dca +oid sha256:29ccadb7bc10dfa202a6ac2b65ff77b0f1370e84d1b44c2f546c3ffce113a780 size 9752 diff --git a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_2.nbt b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_2.nbt index c2f1149a..ad8af760 100644 --- a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_2.nbt +++ b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d133b97be9b950ae96db7187f9b74ca33354d017d6fa8f4687293a6830d08761 +oid sha256:203a84e64b97965eaef7b2278721fce7c6b5a81025156e1a2d60af34fc19d084 size 13778 diff --git a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_3.nbt b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_3.nbt index 7c51382b..bae37106 100644 --- a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_3.nbt +++ b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d024160bbea6f2a11d57f3b84c00051869275472134fc8f6a37addcd27322e9 +oid sha256:4dfdb99f3b533b53f6e236a7e9823e659a9a585b9624ba82bbc7d5c3619fba8d size 12154 diff --git a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_4.nbt b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_4.nbt index a8b5c533..cb552991 100644 --- a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_4.nbt +++ b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c6daab3606fb82a241c6ab704ce4e2c46d716e10b5dca4cee4aa10ead2725591 +oid sha256:4143cfa097c741b2b0a8a576f02c3bf10fe0073bb1c73d3691738ac612067afc size 11789 diff --git a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_5.nbt b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_5.nbt index 45830bdb..9e32876b 100644 --- a/data/minecraft/structure/ancient_city/city/entrance/entrance_path_5.nbt +++ b/data/minecraft/structure/ancient_city/city/entrance/entrance_path_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc5920a054f2bd5076224984115dd574486769cff6219c044bffa911cda38fa9 +oid sha256:4197f0f5cc59ba4812894830f5fbc392a54e3175a2e8c670498494825f0bd5dd size 9069 diff --git a/data/minecraft/structure/ancient_city/city_center/city_center_1.nbt b/data/minecraft/structure/ancient_city/city_center/city_center_1.nbt index 73736cea..f341471f 100644 --- a/data/minecraft/structure/ancient_city/city_center/city_center_1.nbt +++ b/data/minecraft/structure/ancient_city/city_center/city_center_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a26019bf220aec44430ca94df8e1c378b132b25aa60b0df75630ecf44db9bb8e +oid sha256:9856162a2a13d89986d6da6c882dc3606925d1dc4db072220d75f89f7b813b62 size 26261 diff --git a/data/minecraft/structure/ancient_city/city_center/city_center_2.nbt b/data/minecraft/structure/ancient_city/city_center/city_center_2.nbt index d4fa16de..7e4bad95 100644 --- a/data/minecraft/structure/ancient_city/city_center/city_center_2.nbt +++ b/data/minecraft/structure/ancient_city/city_center/city_center_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f39c9896ed2ce61d72abf397741aa5f1f6c3d96dfed63125017046b846ef801c +oid sha256:1d7347b14ca33ece2486fa09ba46a8f6848d59390f75fc97eef4ad256ef8a68b size 26656 diff --git a/data/minecraft/structure/ancient_city/city_center/city_center_3.nbt b/data/minecraft/structure/ancient_city/city_center/city_center_3.nbt index 2fdcc801..4bee8769 100644 --- a/data/minecraft/structure/ancient_city/city_center/city_center_3.nbt +++ b/data/minecraft/structure/ancient_city/city_center/city_center_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5298327fe66c0c11b302bb1075373c66a15270122050ce04a0229d9cec844b36 +oid sha256:248b4c16a9a84d08604ec8673aa355847f72dc23896ea8d18c24208a51af1097 size 26124 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/bottom_1.nbt b/data/minecraft/structure/ancient_city/city_center/walls/bottom_1.nbt index a42116f9..2cd69aec 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/bottom_1.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/bottom_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0615b616738ecb279338e23a1b6a59633e7892ec8d4420699077f24573ddc7c0 +oid sha256:744e20c89838ab02f583e1c2b403a76cac4787ab845e6cf6f12cb6b61adeeb84 size 7473 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/bottom_2.nbt b/data/minecraft/structure/ancient_city/city_center/walls/bottom_2.nbt index 8da0c701..f10894ca 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/bottom_2.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/bottom_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c705fd6347bb71a50f5b76a5a413503f393049ea9c4ae2c94e53553833b436fc +oid sha256:4042bc3a8722a5b271ad129d5d3b9833e66d10ed22b923148dadac0e42c5913f size 7002 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/bottom_left_corner.nbt b/data/minecraft/structure/ancient_city/city_center/walls/bottom_left_corner.nbt index 1c5667b0..66b997f0 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/bottom_left_corner.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/bottom_left_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64fcb02fd4b1fe0ac087d53e68f910b4726e18e06371bc514824529141346e38 +oid sha256:499db8be5698cc63dc09edee3158b41761c3712665d02845bf9e36e570a66f89 size 2612 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner.nbt b/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner.nbt index d7bb095b..31c0e0e9 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61a6b3de519f234fd78cd0309922979c95c989279a0ce6979fdafabf3afb32b0 +oid sha256:6af9b62de66bf3762c55212fd484528236e4e2889250933c7329f551a1673b7e size 3048 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_1.nbt b/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_1.nbt index a71098bb..14333864 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_1.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f6cb4bf2743d71bcc65f4fb2faddcf144f57243696d9666ed68f9bf8a2f16481 +oid sha256:f2aa0c0ef8d568d93b371f8e5077ed7a73ce04ae9a5b0d61f714a39b4021db62 size 2597 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_2.nbt b/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_2.nbt index bd790581..7389c83b 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_2.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/bottom_right_corner_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d5bbbb6420c5aea54ff81029ab4c3ca737269098df1bb3f4490400c87e09fc2 +oid sha256:2cb3bb42d9b528bdaf63129c0df3eec3f37bf1a6d63476e91d928fd4ac652a05 size 2668 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/left.nbt b/data/minecraft/structure/ancient_city/city_center/walls/left.nbt index b6e8e8d2..65967c3e 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/left.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/left.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e14c7f5142707fcfdceceb3b32c659bd78d5ed6d88edb23e6181f9307f1804b1 +oid sha256:aab15972e90b5d76df82c53788435cb3afdc7a0788780687e2f25069d72ff151 size 3183 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/right.nbt b/data/minecraft/structure/ancient_city/city_center/walls/right.nbt index b8708c73..8978863e 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/right.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/right.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:103468df5068cf6ea91dbe2a239c6f723feb245605fcadd9b66b7cdd2c0f48b7 +oid sha256:546d30cbe95313e161cc1dea005d76a916806d91d11a50a45f189959c0a35c64 size 3178 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/top.nbt b/data/minecraft/structure/ancient_city/city_center/walls/top.nbt index 179e1525..e450bcde 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/top.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3f3d8632638d2cefffd5638367be21ffda5ca0cdeab183145a8403cda913eec9 +oid sha256:3423246080175e7691d28f03215fcd0d6bd2bf1c3e5085261eb7d382f96968ff size 7119 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/top_left_corner.nbt b/data/minecraft/structure/ancient_city/city_center/walls/top_left_corner.nbt index 46af2ffb..eebd80d9 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/top_left_corner.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/top_left_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:729a5a5ba8563947fcc8f27148597662d848f6121d5225a4f24741e0388917b4 +oid sha256:cdd54e6a43934f627cff470ce5c6573ec01b648b71a4b932b3fe36bd63a8b1ea size 2598 diff --git a/data/minecraft/structure/ancient_city/city_center/walls/top_right_corner.nbt b/data/minecraft/structure/ancient_city/city_center/walls/top_right_corner.nbt index cfce6b3c..b4bcb424 100644 --- a/data/minecraft/structure/ancient_city/city_center/walls/top_right_corner.nbt +++ b/data/minecraft/structure/ancient_city/city_center/walls/top_right_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:23d883dae1dc8a3ec222c6cf86283c2b2043a9e29399459b3dbda9c3a3a79a4d +oid sha256:bb1d32714cf7c7462a96d9b96987f6a5e7f40e32ed07532b41e52c46862f1acf size 2644 diff --git a/data/minecraft/structure/ancient_city/structures/barracks.nbt b/data/minecraft/structure/ancient_city/structures/barracks.nbt index ffe1778d..00c7d6f1 100644 --- a/data/minecraft/structure/ancient_city/structures/barracks.nbt +++ b/data/minecraft/structure/ancient_city/structures/barracks.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:538c882144edc446b9714131f2e70729e912faa98160dce95e09390ae5417ebe +oid sha256:62fa0806b5e9dc19943cbab4e2ebbc3755f59bd9d7da89a2e2fd92424ec9d961 size 5634 diff --git a/data/minecraft/structure/ancient_city/structures/camp_1.nbt b/data/minecraft/structure/ancient_city/structures/camp_1.nbt index 65983352..109a92e1 100644 --- a/data/minecraft/structure/ancient_city/structures/camp_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/camp_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18d92cc2111559cab840f63e224ad6d747fb2a302c23752b2e9171a95cd186a3 +oid sha256:8e72a65f29fd68e3b62296118c8a3d5189289f82c44ffa106d6cc13cfdf69b10 size 1164 diff --git a/data/minecraft/structure/ancient_city/structures/camp_2.nbt b/data/minecraft/structure/ancient_city/structures/camp_2.nbt index 66b69329..f7adc896 100644 --- a/data/minecraft/structure/ancient_city/structures/camp_2.nbt +++ b/data/minecraft/structure/ancient_city/structures/camp_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:08db6bfad499ccb7116e76b69c96b398879731892ce746d0aa80f5047d10b3e5 +oid sha256:69c82cda533ba53cf07ffe136c468220123697f4fc55e1c105e39ecdc1f4ec2d size 1274 diff --git a/data/minecraft/structure/ancient_city/structures/camp_3.nbt b/data/minecraft/structure/ancient_city/structures/camp_3.nbt index be8e5e82..1bdce851 100644 --- a/data/minecraft/structure/ancient_city/structures/camp_3.nbt +++ b/data/minecraft/structure/ancient_city/structures/camp_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a6c6defffdec1ab26f5d07035b129ea459659d425b9c9029170403710f98c7f +oid sha256:f1b07f4f92d675924672025da1b07c3fb4553c138f7e6010bcbd2afded1f2ae1 size 1017 diff --git a/data/minecraft/structure/ancient_city/structures/chamber_1.nbt b/data/minecraft/structure/ancient_city/structures/chamber_1.nbt index 5c3eeb60..d7b7dd8e 100644 --- a/data/minecraft/structure/ancient_city/structures/chamber_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/chamber_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d22560aa348d1abea8647443a9ebfa2e3e0a9bf15799ec0d3e6e2e0141e19b7 +oid sha256:e0214e897ab7b4fbbda53ad8789d44d9010241b7ab9d31200b0b5fd0c11962b8 size 2536 diff --git a/data/minecraft/structure/ancient_city/structures/chamber_2.nbt b/data/minecraft/structure/ancient_city/structures/chamber_2.nbt index aee4a8ab..8630f1a2 100644 --- a/data/minecraft/structure/ancient_city/structures/chamber_2.nbt +++ b/data/minecraft/structure/ancient_city/structures/chamber_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:533090f11703e44574da05d0c9bcfe2f03edc2938e418d53210d287ca40be331 +oid sha256:9113c3974f9c10eaee56a8d4c0140d4b34e9dec8776ddd32cb68f350a0f94fb2 size 1312 diff --git a/data/minecraft/structure/ancient_city/structures/chamber_3.nbt b/data/minecraft/structure/ancient_city/structures/chamber_3.nbt index 86576460..c31b91a1 100644 --- a/data/minecraft/structure/ancient_city/structures/chamber_3.nbt +++ b/data/minecraft/structure/ancient_city/structures/chamber_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d8a203549665f7aeda4bc1ce0c74b10dfee643e7be074437ff235102f61cee21 +oid sha256:85aabc1c7bb5ace0c25e1c569cf78d36afe480624c828987616c31a1d0324892 size 1101 diff --git a/data/minecraft/structure/ancient_city/structures/ice_box_1.nbt b/data/minecraft/structure/ancient_city/structures/ice_box_1.nbt index bf2d95e0..a39a3eda 100644 --- a/data/minecraft/structure/ancient_city/structures/ice_box_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/ice_box_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f5797e22cb822cc01e0f62477cfe74a507ae77e912d6b886999d671cc14a360 +oid sha256:44e2357b56af088c39fafa2322da3bc56e21058cb0df5b8e8ed3e5cd944a7b12 size 3908 diff --git a/data/minecraft/structure/ancient_city/structures/large_pillar_1.nbt b/data/minecraft/structure/ancient_city/structures/large_pillar_1.nbt index 3421f6e4..ccfaa8c7 100644 --- a/data/minecraft/structure/ancient_city/structures/large_pillar_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/large_pillar_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ccf193403b7e5a55e43045068758acd8dcff67dd05c3e5a996ac4f047434f814 +oid sha256:e50e99f13608aa03c5ff3c500a48b386d08a4085b47be77959d231045ea6e136 size 1477 diff --git a/data/minecraft/structure/ancient_city/structures/large_ruin_1.nbt b/data/minecraft/structure/ancient_city/structures/large_ruin_1.nbt index 7709a6c6..fe4e96d3 100644 --- a/data/minecraft/structure/ancient_city/structures/large_ruin_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/large_ruin_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db384e446acf117589e1d8ff9cefc7507cc8ca8077af05013e4280341bcfa8d0 +oid sha256:4ad812dc1949f9fcb4efc54ac955ba784c41c1b3279812fa0df29b6b03c2f188 size 398 diff --git a/data/minecraft/structure/ancient_city/structures/medium_pillar_1.nbt b/data/minecraft/structure/ancient_city/structures/medium_pillar_1.nbt index b9fec710..cb45bbde 100644 --- a/data/minecraft/structure/ancient_city/structures/medium_pillar_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/medium_pillar_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59dd3b75ca061f24017f5f6256b7fce8f61f30546ec3e0d2383aefa41d50ea92 +oid sha256:5bd3a7d4765cc6df560ffdd62d6d697477f65c03c1f119176dd24500a32975bc size 960 diff --git a/data/minecraft/structure/ancient_city/structures/medium_ruin_1.nbt b/data/minecraft/structure/ancient_city/structures/medium_ruin_1.nbt index 0712acc9..fabf3979 100644 --- a/data/minecraft/structure/ancient_city/structures/medium_ruin_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/medium_ruin_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef3b08752e6de7321dfd27453933053ec0e7ad8624373685fead4479ee732cc1 +oid sha256:55debdf8f340506814156c6941f65ac2bd9e7b3deb677186fa02a0056507c593 size 327 diff --git a/data/minecraft/structure/ancient_city/structures/medium_ruin_2.nbt b/data/minecraft/structure/ancient_city/structures/medium_ruin_2.nbt index cff9b0ad..fc0b6833 100644 --- a/data/minecraft/structure/ancient_city/structures/medium_ruin_2.nbt +++ b/data/minecraft/structure/ancient_city/structures/medium_ruin_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e17787440c7a453b96a416ab4ad209af4f1e453233e61545478b4431aba94443 +oid sha256:5770e65f8a5d04d241554944b5d42dc894a6ff9a8ab499f49cd19adc8dcd7014 size 353 diff --git a/data/minecraft/structure/ancient_city/structures/sauna_1.nbt b/data/minecraft/structure/ancient_city/structures/sauna_1.nbt index 841d9181..f9ceb02d 100644 --- a/data/minecraft/structure/ancient_city/structures/sauna_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/sauna_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d59cdc72d05d33ea6e1899f00495521dce7427c6c92be0a026ae8005d5699a50 +oid sha256:4a646f51f5f9e6ffafb83a688b257c11d9d1f50790c43670463dba07b0efbc58 size 6958 diff --git a/data/minecraft/structure/ancient_city/structures/small_ruin_1.nbt b/data/minecraft/structure/ancient_city/structures/small_ruin_1.nbt index d9b89bd1..9ca94c2d 100644 --- a/data/minecraft/structure/ancient_city/structures/small_ruin_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/small_ruin_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:691d8032a3fc1f297c41377402cec123cc27ef110a30b5ef9a8cfb9497392448 +oid sha256:ba015b1949f4310cdb700ad68a73836ecaec84809f3c8d13561e13f113a57fb3 size 315 diff --git a/data/minecraft/structure/ancient_city/structures/small_ruin_2.nbt b/data/minecraft/structure/ancient_city/structures/small_ruin_2.nbt index 8e362e71..2bf532dd 100644 --- a/data/minecraft/structure/ancient_city/structures/small_ruin_2.nbt +++ b/data/minecraft/structure/ancient_city/structures/small_ruin_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:89e0b66cac952002ed0df1566d3b7db25878ce702f68c34000a5cc8306da7bbb +oid sha256:c936e67ee32b00e08ce69ad291c0faaa8ed00f3d9d550e4cdfc808f46f5127d1 size 310 diff --git a/data/minecraft/structure/ancient_city/structures/small_statue.nbt b/data/minecraft/structure/ancient_city/structures/small_statue.nbt index 810e6079..758b2062 100644 --- a/data/minecraft/structure/ancient_city/structures/small_statue.nbt +++ b/data/minecraft/structure/ancient_city/structures/small_statue.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9dd6bb02db736e9539c866377e86e3cee0d72a46cf8ec57cc9e8469ab79e68b +oid sha256:6e75471a5186695d7c2474a2abfdb395cdf1aac358adfb5eb0b388ac6a7d6bfe size 893 diff --git a/data/minecraft/structure/ancient_city/structures/tall_ruin_1.nbt b/data/minecraft/structure/ancient_city/structures/tall_ruin_1.nbt index 7844e702..7b836991 100644 --- a/data/minecraft/structure/ancient_city/structures/tall_ruin_1.nbt +++ b/data/minecraft/structure/ancient_city/structures/tall_ruin_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:610e82982eb72c0a523e331d009ff7cf939866176aaaac1a5c26cf427f8d68bb +oid sha256:2d7371a367c2ce633cca39b2f18541a41db28cd1ebdc2c49baf524db63d076da size 2794 diff --git a/data/minecraft/structure/ancient_city/structures/tall_ruin_2.nbt b/data/minecraft/structure/ancient_city/structures/tall_ruin_2.nbt index 7ceb7a6a..a390daf5 100644 --- a/data/minecraft/structure/ancient_city/structures/tall_ruin_2.nbt +++ b/data/minecraft/structure/ancient_city/structures/tall_ruin_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8fd7fcab134a3f573023b91cb206235cd068efc3a9d17f16e32b2261deb82eef +oid sha256:493a80c071a65a6cd16ea4df5f72ffb76cf930e2dc07e327a49e3c59ddd9f52a size 3487 diff --git a/data/minecraft/structure/ancient_city/structures/tall_ruin_3.nbt b/data/minecraft/structure/ancient_city/structures/tall_ruin_3.nbt index 6dbc71bc..9718b9ea 100644 --- a/data/minecraft/structure/ancient_city/structures/tall_ruin_3.nbt +++ b/data/minecraft/structure/ancient_city/structures/tall_ruin_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7638bcb62df47ad050b7025dd056b8694be77b769529086ce557f887adc89670 +oid sha256:86438a3f54d4784904dc0b75225e86da19e47f60a26a65079bb898109a6c2f1c size 1522 diff --git a/data/minecraft/structure/ancient_city/structures/tall_ruin_4.nbt b/data/minecraft/structure/ancient_city/structures/tall_ruin_4.nbt index c6bfcfc1..71a42b81 100644 --- a/data/minecraft/structure/ancient_city/structures/tall_ruin_4.nbt +++ b/data/minecraft/structure/ancient_city/structures/tall_ruin_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b151e9f7f356811578eca7a3a496061383008ffc34cd60238dac7a0dc269ab2c +oid sha256:3e17836a790a5f1768322b3e2e5064460781b66eb93ca690e15c3c93d8f16975 size 2297 diff --git a/data/minecraft/structure/ancient_city/walls/intact_corner_wall_1.nbt b/data/minecraft/structure/ancient_city/walls/intact_corner_wall_1.nbt index 2fd6f659..350e2f38 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_corner_wall_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_corner_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1673359af62b6e022db108cd638aa19174d89acade6f9619d23c093e862a31c9 +oid sha256:ffcf7aa9adfd7c0d47075e6bb6a7b3e2996c3ed751ce581d2583ea0b253316c9 size 3838 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_1.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_1.nbt index 699199dc..82e913c3 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:841b590a3dd2ca6ea9b9ef706dfe443c3e409f20791d623df9c8e3b6264a0159 +oid sha256:7e385c96d3f83ce1e172da287958b32546ff0c89edaf195abb8588fb82244df3 size 2027 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_2.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_2.nbt index 9e9e01db..2a330f85 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_2.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:07c405ad7be3156d5bcab4f564427cbf5f9dda6270fc65f77804480b54bd4151 +oid sha256:392682eb9751eed63762b0d720323d6c344944d1951a778feb07af9bcec5ee75 size 2006 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_bridge.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_bridge.nbt index 83a8bb2a..336b50e8 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_bridge.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_bridge.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb8c7714770976cf2dac81b8bab0777198d43a52801dfa634bd9a75131f0e2df +oid sha256:5665b9e8bd684dec10209fd88203b248820307fd27ea4f70626758ae8916e343 size 2721 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_passage_1.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_passage_1.nbt index acdf100d..dc56721f 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_passage_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_passage_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:49ae7a45313edf3daf5a5a1292d348d98091ba42a03551b52250be7f0c4ffdb7 +oid sha256:8b30fbb5a90ba7614018eb69775856ae6aa259acf18514dee93eb9683cfc5e85 size 1662 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_1.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_1.nbt index 0dc5ddd9..31302bb5 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc951430505705617358df9e3431a51bb5d179ebabfba28f45f092429c26b6b0 +oid sha256:93c2f13c06eadd2b016c8d6537af63be16a09e53934c1418a2190196ff6e8060 size 2119 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_2.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_2.nbt index 1f080f6a..0c8fd654 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_2.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:63b387223d829b4d9134333b965a1b65cd8a702ce4a605e392cf2ff062a81e8b +oid sha256:ec29840cb40d8f307e3c62dc5fedf24fd445c30489dca886ed7e958987e82f56 size 2170 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_3.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_3.nbt index d30b6615..cbffae5f 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_3.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30535dcae9136523835d56c80ddba1c9fd274b446f598b2f70eaf2574cbd2309 +oid sha256:8996ef715f5174a9dad54c8d465b320fee28cfa92625c74a008522a56b41d9a5 size 2157 diff --git a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_4.nbt b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_4.nbt index f277990d..d6f2e88a 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_4.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_horizontal_wall_stairs_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c8c379f4868ea677c7374893a678cdeb584ed9826af232f140a74dbe52170d75 +oid sha256:5bead5d7b14be11496255cabb91989f0de0bec0b22c1299ae0a0d656b1b33e47 size 2055 diff --git a/data/minecraft/structure/ancient_city/walls/intact_intersection_wall_1.nbt b/data/minecraft/structure/ancient_city/walls/intact_intersection_wall_1.nbt index 75f20619..47ad1c1c 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_intersection_wall_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_intersection_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:92b5dbcd0a2342e0b1d519bf8cedeada73dbf30fc1bf762e9af74a1bf1667c15 +oid sha256:6f0315133fb2e7d60a170438755e16dead31c6a317ad0fc14d17cb1f27e06947 size 3126 diff --git a/data/minecraft/structure/ancient_city/walls/intact_lshape_wall_1.nbt b/data/minecraft/structure/ancient_city/walls/intact_lshape_wall_1.nbt index ca793fee..c5039b6b 100644 --- a/data/minecraft/structure/ancient_city/walls/intact_lshape_wall_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/intact_lshape_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f52d66185b20bcb50052d25cd190b496cb60e3b40c9003be9fc421a17c9a76c2 +oid sha256:1dea167b1b6d21581751296bfebb93576a98edfa603d5adb135ad5ef6f0366ef size 2385 diff --git a/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_1.nbt b/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_1.nbt index 713d3ef1..ec5dffde 100644 --- a/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c35f6cd9c7ef484d5aa90e3c678b83372b1403bca8793d5fcb6568a48d975c00 +oid sha256:ab8ad88a6c137d7b5a64595bb5b25e7d0fa47f7c1401156f901c236a7ccd89fc size 4171 diff --git a/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_2.nbt b/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_2.nbt index 65833e29..112585b0 100644 --- a/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_2.nbt +++ b/data/minecraft/structure/ancient_city/walls/ruined_corner_wall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84df0e62da6018e8ccd65ba7e28cddd5b726408668b7de963ec2c456043aa35f +oid sha256:9c6d3e85d799757c96f1dd0fc8a52690de32729974591cd7ebde9b2bf4b657a9 size 3305 diff --git a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_1.nbt b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_1.nbt index 22f64e58..9156e6c8 100644 --- a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_1.nbt +++ b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:45abd5154777de99296df9af58eb46381da8a82d89735712980c53ac8b68b679 +oid sha256:684041640be149dfa47dfb263ec2d78194d91c9cb91920c088b2f05cd66cbce3 size 1491 diff --git a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_2.nbt b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_2.nbt index 1b3b60be..8586c183 100644 --- a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_2.nbt +++ b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b321db3740964570125145db8e808717560814a9b9a4c1c391705cf5ffffd2a +oid sha256:db791cbd289de8a7ba2c69f4d55d660232473946364d1743a8a74b6f208887b2 size 1976 diff --git a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_3.nbt b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_3.nbt index 932c558c..b6d17131 100644 --- a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_3.nbt +++ b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c93cbf0d5b9173ef5d52875bc3b01d21f0144da1fa558ab8064fed68b90aeee6 +oid sha256:a5f6ea26b17d1d59ae6a8a7c4338543ecf907337f96dfab3fdbd2855a705062d size 1386 diff --git a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_4.nbt b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_4.nbt index 3acfeb89..41792cc2 100644 --- a/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_4.nbt +++ b/data/minecraft/structure/ancient_city/walls/ruined_horizontal_wall_stairs_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:822bafb0bda1e34de196bb327380d6ff1df4465eec53eb238ab0327b8e34b8f0 +oid sha256:698b51c8453ee76e301e565e70746f0dd3adf396026b99db16ff393e43022179 size 1341 diff --git a/data/minecraft/structure/bastion/blocks/air.nbt b/data/minecraft/structure/bastion/blocks/air.nbt index 6973ed4e..eef44af9 100644 --- a/data/minecraft/structure/bastion/blocks/air.nbt +++ b/data/minecraft/structure/bastion/blocks/air.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b05f3935e9f480ba3c89f013dfb635b73eccab9439438555e3c612afe24f028 +oid sha256:c5db307259699cde3303592c71c34cc3db088f70ab48fac79c71963c148f53ab size 228 diff --git a/data/minecraft/structure/bastion/blocks/gold.nbt b/data/minecraft/structure/bastion/blocks/gold.nbt index 0e1bd5df..f231b794 100644 --- a/data/minecraft/structure/bastion/blocks/gold.nbt +++ b/data/minecraft/structure/bastion/blocks/gold.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:09be59c40f4a031f97c1998ee1e3559e93c72873a97df209869fb05963573297 +oid sha256:597edb35d265c68b149118bc1e8e3f839d7dce4855b489616f66719fde539039 size 233 diff --git a/data/minecraft/structure/bastion/bridge/bridge_pieces/bridge.nbt b/data/minecraft/structure/bastion/bridge/bridge_pieces/bridge.nbt index 5b70f546..778ca7d5 100644 --- a/data/minecraft/structure/bastion/bridge/bridge_pieces/bridge.nbt +++ b/data/minecraft/structure/bastion/bridge/bridge_pieces/bridge.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f78d052c573805a0f9752e657abdc6ba5391a72cdb071d1240fc6fe4baa2bdd +oid sha256:fd47001bd3db005fe0372c93b7cff4a54a8587b39335ea4ba9dfedf00071821d size 15687 diff --git a/data/minecraft/structure/bastion/bridge/connectors/back_bridge_bottom.nbt b/data/minecraft/structure/bastion/bridge/connectors/back_bridge_bottom.nbt index fbcf6c35..ac01cce7 100644 --- a/data/minecraft/structure/bastion/bridge/connectors/back_bridge_bottom.nbt +++ b/data/minecraft/structure/bastion/bridge/connectors/back_bridge_bottom.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edf1e4a057710d5a05796231d412ffccb7a7b9f0c1d72d82c3fdaccf560ead18 +oid sha256:6784f0ff6d3ca7b5cc02ad14793823564eb7d158b192ca141e3b108269bacf44 size 1428 diff --git a/data/minecraft/structure/bastion/bridge/connectors/back_bridge_top.nbt b/data/minecraft/structure/bastion/bridge/connectors/back_bridge_top.nbt index 4e414bf4..22c67320 100644 --- a/data/minecraft/structure/bastion/bridge/connectors/back_bridge_top.nbt +++ b/data/minecraft/structure/bastion/bridge/connectors/back_bridge_top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44bcda96d03c4b2b5a4719993876610a207eff62cd962ca12ebf81716b6a69ef +oid sha256:67bab3b30e5615fa7d53e1a94f1a00a5a99c71fa1b2d3a781604f82dfe5993af size 1375 diff --git a/data/minecraft/structure/bastion/bridge/legs/leg_0.nbt b/data/minecraft/structure/bastion/bridge/legs/leg_0.nbt index 773b050f..d1004ede 100644 --- a/data/minecraft/structure/bastion/bridge/legs/leg_0.nbt +++ b/data/minecraft/structure/bastion/bridge/legs/leg_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82b2e7744ad0647d62bfc46c2b562794726c3b06d788b54437cf84142dc0160e +oid sha256:e6438252e1b84fe993325c75cb4759b2c1d5e945e6c13130947de36892b76c78 size 708 diff --git a/data/minecraft/structure/bastion/bridge/legs/leg_1.nbt b/data/minecraft/structure/bastion/bridge/legs/leg_1.nbt index 5dac4d3c..2ea0a9c0 100644 --- a/data/minecraft/structure/bastion/bridge/legs/leg_1.nbt +++ b/data/minecraft/structure/bastion/bridge/legs/leg_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cfcafded8afeded2039b3e8a4452df463a59e40ab58792b98bdae9c5093a2f7d +oid sha256:e703a8aff164f7c3d798059403b7c7d77bc0907f7b43ea7e4d48866938ccbf39 size 739 diff --git a/data/minecraft/structure/bastion/bridge/rampart_plates/plate_0.nbt b/data/minecraft/structure/bastion/bridge/rampart_plates/plate_0.nbt index df355974..0507b316 100644 --- a/data/minecraft/structure/bastion/bridge/rampart_plates/plate_0.nbt +++ b/data/minecraft/structure/bastion/bridge/rampart_plates/plate_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb4692cb5bff03d922d95f913296286db4e497f202b47c3c3c657f2d5a1dd09a +oid sha256:71de3454ef0268dd809ed62b3077a8b2c23783b672bd073967459001cd932876 size 2055 diff --git a/data/minecraft/structure/bastion/bridge/ramparts/rampart_0.nbt b/data/minecraft/structure/bastion/bridge/ramparts/rampart_0.nbt index 9f20df81..5790bf79 100644 --- a/data/minecraft/structure/bastion/bridge/ramparts/rampart_0.nbt +++ b/data/minecraft/structure/bastion/bridge/ramparts/rampart_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:adc70786165af13c35ddcf59dc2f605b556f6067fa86eea794a13e58722bee1d +oid sha256:a04266083f7d9aa1d9cdf5f62a2cc0489c29ef01d07bc81e3ca4b31d9c6330b2 size 12579 diff --git a/data/minecraft/structure/bastion/bridge/ramparts/rampart_1.nbt b/data/minecraft/structure/bastion/bridge/ramparts/rampart_1.nbt index b8711a8b..2ade3f6a 100644 --- a/data/minecraft/structure/bastion/bridge/ramparts/rampart_1.nbt +++ b/data/minecraft/structure/bastion/bridge/ramparts/rampart_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7b72d40571179a940c7e51a065fdec37b85797feee6bb69e3d2a87810d2cec15 +oid sha256:450c598e840f31be8d122376a31eeb1c3a1b556307bb07bd40b4995cbf3826ed size 19410 diff --git a/data/minecraft/structure/bastion/bridge/starting_pieces/entrance.nbt b/data/minecraft/structure/bastion/bridge/starting_pieces/entrance.nbt index f0afcdb5..055e5600 100644 --- a/data/minecraft/structure/bastion/bridge/starting_pieces/entrance.nbt +++ b/data/minecraft/structure/bastion/bridge/starting_pieces/entrance.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b50261a5469ecc46709f82d19cbc6adee6d8f88650e8cbb02c57ea559db4c46b +oid sha256:f45bfa4fc48b79a6b56c0f7a4dab11f1e095570a87c6f805fdb9688c5408bbae size 41138 diff --git a/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_base.nbt b/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_base.nbt index 8f96a5d6..83c074ab 100644 --- a/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_base.nbt +++ b/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b86f53bf39dd9c986edc189c58ceaa5273b042734810ecd61e5ec9fbe034fa7 +oid sha256:bc6fe3b9a1f0f3ca2963934f4c221aad8b7f923b92a8e525e272c5c3a4c16c00 size 45585 diff --git a/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_face.nbt b/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_face.nbt index 32adaea0..5043df2f 100644 --- a/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_face.nbt +++ b/data/minecraft/structure/bastion/bridge/starting_pieces/entrance_face.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8996947d054729ab4ec35f00157216e066d237430a617aa5ebe3180adc8524d5 +oid sha256:614f41d12c4f61d3b8765c23fe26fcdad7feba4df28696efa83b224459a7d2e8 size 2739 diff --git a/data/minecraft/structure/bastion/bridge/walls/wall_base_0.nbt b/data/minecraft/structure/bastion/bridge/walls/wall_base_0.nbt index 58fcbab4..8d8b4962 100644 --- a/data/minecraft/structure/bastion/bridge/walls/wall_base_0.nbt +++ b/data/minecraft/structure/bastion/bridge/walls/wall_base_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7e09633271176cb1a292fe2f73a5a6eabfbbe691be4d11e39569578fc4a1d22 +oid sha256:6e0c62adfb239d13f52b658b90c5f35f8f9057d84da01a6813457948546b18ca size 17433 diff --git a/data/minecraft/structure/bastion/bridge/walls/wall_base_1.nbt b/data/minecraft/structure/bastion/bridge/walls/wall_base_1.nbt index 0e92c121..f402ad77 100644 --- a/data/minecraft/structure/bastion/bridge/walls/wall_base_1.nbt +++ b/data/minecraft/structure/bastion/bridge/walls/wall_base_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d50b1b188442cd6d94097736ffb2ed40c8673489add2ab21efdc597770a92292 +oid sha256:fbdf7bb5a79ba9ec841460c69d62a94aafdf08f228822c3661246751168113ea size 17260 diff --git a/data/minecraft/structure/bastion/hoglin_stable/air_base.nbt b/data/minecraft/structure/bastion/hoglin_stable/air_base.nbt index 46729992..2b37b349 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/air_base.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/air_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d1e79fae16de00ed11555449053504c2809b0de854590f2ae7f425381f63079d +oid sha256:1cd1c7dedfa2416b100dd3cf72dd1bfb63df67758d7a7f3470b35e737c68fbf3 size 80384 diff --git a/data/minecraft/structure/bastion/hoglin_stable/connectors/end_post_connector.nbt b/data/minecraft/structure/bastion/hoglin_stable/connectors/end_post_connector.nbt index 40272814..54d5c6d8 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/connectors/end_post_connector.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/connectors/end_post_connector.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7265e6ad8056e1cf960c468031066e7354e53269fa10e639de767b59d7081d14 +oid sha256:1843a624c40411e4ad2777e358c855c1dbb4ecb0e1683cfd919fb336afb4f4ee size 288 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_0.nbt index 895a1f16..11cd1d48 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aeff3e7cc4b8a6db18dd91048d5d053582fc3b9f07c3b036a137c301636801b5 +oid sha256:b67d8357b7a8ea611621ec0dac5a4cc102b29c4ee7f695b1e9b01cce1e9d505b size 1880 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_1.nbt index d3d3a5c7..ded44e9b 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a96b010f118b4da7bff6627c3271e850ca3615d92fb8560e5e5b5e5e378c7a73 +oid sha256:64647f60fce8a00e8a316a1a566ccc749f22dc11c75c5cbf2927da0a37dd2f94 size 2076 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_2.nbt index 5ef69bc6..0c254267 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1813829832fd5c1a913bedc42d3bdaffc9cb43ed1e630c9d6206623aa0a91561 +oid sha256:64bb3387070c096dfd52c0318e7c5322614d2718b1bec2f08ebfea415b814bab size 2353 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_3.nbt index 39802ec2..0464073d 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa8cb9f4e9b154f07ffe1b7a57ce97e45698ae594bb6edd6dee4dcc51680ef71 +oid sha256:6f2ea5b80d54d140071a00cf185793fbb81ec3a6a48839f284b2a8009b51b5de size 2399 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_4.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_4.nbt index c23fcfb4..01564432 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_4.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/inner_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:13fe683e9074a3294a32faf94276b6d42c84c0efa1a0a4bb2bbefa28c640e082 +oid sha256:bb09febb57d33e35b017903b8bb89589112063c95ab13f55b78fd8c1efcc71aa size 2147 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_0.nbt index 5455d144..9d11c676 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ba37acd5a9f2c8287a9982c824ebb9ff4c70317b96d0dbec094c73f53aa8e162 +oid sha256:ba223906650aeb270f4052ed7f5af7c5e3ed3914e6b8df213bbbe82cdd07235f size 1965 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_1.nbt index 60b8df4f..522dc997 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3cb059ffd5a17639230efd878697e344b8ba63a5e668b2700a7f585517015156 +oid sha256:86c6ed5590f559e43f0875e5b0a87c368950d7316d464dbded28bce41e23cfb4 size 2319 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_2.nbt index 9d1939e9..3a9be30d 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c7565b970aa9108f101fa05df1539b5c0c9ddfbbd9801798bb84deb3f280c4d2 +oid sha256:01c7448dc5d66796818d95786e7bb69834ca8f3daa5f01cf6fdc94fae5c1cc1b size 2555 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_3.nbt index 20d09fd7..d26e4997 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53a7f7c9c00efc645559f57bbaf2b70aced6e3f813a5883e76dcd7e3cd7883dc +oid sha256:b6f308a65411e2c53e0ffe2f8f130e3fb13d1aeba2fb34acd10779332e5ff5d9 size 2454 diff --git a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_4.nbt b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_4.nbt index 6b50dd17..db71f6a2 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_4.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/large_stables/outer_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d83cf2e57c53f9b0622eca6794dd26495b0f3a5d4186a7d45abb7202a8ab55e +oid sha256:e5d2b1c92df2e3a0269f4df8dc3768e6fb48121b1f7ed0607cdc74ec59b5a279 size 2398 diff --git a/data/minecraft/structure/bastion/hoglin_stable/posts/end_post.nbt b/data/minecraft/structure/bastion/hoglin_stable/posts/end_post.nbt index 66c4e97b..a64ce127 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/posts/end_post.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/posts/end_post.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:03cc3895c82bc709a5b63c1e14e5c6b35f33c468e2cb26438660dc831a2a5dc4 +oid sha256:13506749abc475274b397ea4518268d32cfa05b7e1861018d70905c59d30b80f size 530 diff --git a/data/minecraft/structure/bastion/hoglin_stable/posts/stair_post.nbt b/data/minecraft/structure/bastion/hoglin_stable/posts/stair_post.nbt index 0176bd01..c09464d9 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/posts/stair_post.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/posts/stair_post.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0caf2f0fbf7729fa77db0b18ccd09b8e3f44d5bc31b0375945cc6c91dda63955 +oid sha256:4d6428a73b2d392f30def84d4222d7b3f60c8e28c24d30de5c37b6f6e1432398 size 1168 diff --git a/data/minecraft/structure/bastion/hoglin_stable/rampart_plates/rampart_plate_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/rampart_plates/rampart_plate_1.nbt index 0346dc5b..8b05ac9e 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/rampart_plates/rampart_plate_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/rampart_plates/rampart_plate_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:50f5009854c323adedbb59c482357d8923ba598acea76cc6d93f18061ed4c105 +oid sha256:7ab9ed04ff71e70fd696c54815f125509480cfb3bf47ba9418af278e96cf3fdf size 2179 diff --git a/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_1.nbt index 4d517020..f472ac82 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a8b3bb6dc9c75cdf282c72283fa6309d4b0e447901fbc62c44b5ff25b396dfc6 -size 19110 +oid sha256:68edc398a5e611a884afa1ec424f43a507cf72408b21bb5c369b1ada0acb8e91 +size 19109 diff --git a/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_2.nbt index 5fb01b98..3633ab07 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4609ea588fde147d5e1135d75aba663570522299b17711e5a18775ae7b2f6d98 +oid sha256:33c379fdcc4b08663610b84cdbebfe2873b4c64b739cdddefa1e3dab8d7666d2 size 12207 diff --git a/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_3.nbt index 1352f6b8..bee373a3 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/ramparts/ramparts_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4984fe2c4f064062514e7a49bbf9d9320c1c8a8f3ee9cf0ea8a2d3606047036e -size 6390 +oid sha256:e39e5167ae7f1a0b403c8c5deb1161ea64fc27f37f153a0b58bcdce6973c5dcf +size 6389 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_0.nbt index df1e33af..fc2e9536 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4787f0ed568d9fa2acf59226c0d31bedaa6fb34b9c3c06930fd59b9ab05862ff +oid sha256:fb1b7b6af702b0fdd71769360b2ea6843bfed8256ff121d3781eb82a8b3d5729 size 1898 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_1.nbt index e9e0e628..6b7f9bfb 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9652b90a721db558c43b332b56276e0753e3f9bd6772a45d489f0b71bb922fba +oid sha256:e6ff5602de297d3122bab4fe63c202eaef3fea2234239c8625d6d30b2da733af size 1980 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_2.nbt index 92c4ba98..0d66827a 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c173100e6a8fa26413a1ffb4c9f9b32f89439df4caf881fa8f923eb53563cb35 +oid sha256:684c27243ad2818ea3a7b73ea7c889da561550ed5eb15ea955f2cf4603cf876c size 2211 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_3.nbt index dc25b681..ef59562f 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/inner_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c123cd7a8c54b9b049ac5b85d76678c03529d55395a3dc76e7b35ac5038098eb +oid sha256:8bdbf12a78ecfb3b347541edb718b3bc8f2448b1d5801adb04051dba850928d8 size 1681 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_0.nbt index a1cf74d4..0fbb4eb3 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:886db72c0e6ee85e40ef16c9f233167875523e53dd3f80b9cc56525e832e1467 +oid sha256:8ffb843222488ffd105f02e635f7111e24fab7cf41497ed3ee3b8509163839b0 size 2138 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_1.nbt index c41e85ad..ea6c10a5 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aaf58989a9323ffcc4f880eed522d97ee5257f86f2ef48d7afc1c1ce867ffe9d +oid sha256:003f5ae13731336dfcf188b8f2bef05341cde65d02ce2d666034203fe3374b9c size 2065 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_2.nbt index 1fdfa35d..ac6d0fd3 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:17f406705642921c11bb9a1711848ba617d80ec57664b5e194ffc63cb8d6d517 -size 2149 +oid sha256:f15c985127436664e31bb3bc475f03aa5f8ca003ed475fb93adfbb6adb09092a +size 2150 diff --git a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_3.nbt index 3b15971b..5bb3c3ea 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/small_stables/outer_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64364fe40ff64943c8f9f6b6a5c503f61141e96823d144601bb6a3ac4a00e526 +oid sha256:8f4bcb30581f55b471ea027c9df50828ddc662ef037f6b1b631ce3ba8fdbca9f size 1850 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_0.nbt index 157d0949..d1b7dc91 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a98b82616d5c011db943d2b3fb74315b6ee6b74d3815d485c11b4fb94365873 +oid sha256:e13ee2fb668e22e032274702212ac6408a0fe887e93a212d1506b73db3972280 size 4466 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_1.nbt index c0facb57..8373ac74 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a8c9b1303c49c6ea1d9e56d1fb88282bd2bf6880c6ae10009901c1c0c0246848 +oid sha256:e05e7ca4d8f50b5e881799b0b41b3d092c1698cfac56ba2ce3846502324c9884 size 4275 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_2.nbt index 04d56fe1..7e5078c7 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1766a908b58da341bb91adbdf6734a1b14c0aec1a3e0f5d80a3ef5470facd724 +oid sha256:7b6d4a2e0a325ae7df5e07e5f28a11b0339ee13d606fe511e32ba8dc3edf5a78 size 4338 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_3.nbt index 8e5b7b95..8b5079d1 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c090705f69e8d32ab8805e9c2d7dca4e2a7efc41f4cf04b217f8b52711fbe48 +oid sha256:b231daf7f7c32b8f22390df3f6bbbb8cf3f2ee3070acf25b1ee582cbe5aee305 size 4498 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_4.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_4.nbt index d0a7b789..fa4a10de 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_4.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_1_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8567906b01bf44e67376c29be3687bf110ee9ee2e5159d0884195d51bc15786a +oid sha256:a7b32cfa7406547d2036df1fd89b231747a684cc51b8c025f5a2bfa173c0b93e size 4439 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_0.nbt index f8720dce..ce8a29d9 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4111280792d05ae7d694d7f4923e7b7dae19ccc6f6ffb53116a26708854cfd7 +oid sha256:ed27cefda80d483ea2268ed2fcf07925f045ec35f1b81aef97ef65c2f1e7ba83 size 4412 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_1.nbt index c61d5286..ec773d58 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d980374ae884d414c90aa786efac0588a7b015af3fb79c63b3660c0d7cf8fc1c +oid sha256:2e32e7c3f4124c436842d9cd47d270dd4aae05ab6d8f09ae3a73f6e42afb2065 size 4334 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_2.nbt index e480a002..f6db6fa6 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2cc1f38ba017ba1e58df688314a1492c29bf6b0bcf6028f50e46ec6a7300652e +oid sha256:ce8fbb7f73e03d9944d0a409c1c0b18ca1c726925a3a4b8005dbe7e73ac7e7e3 size 4119 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_3.nbt index a0eb9eb4..83e04c7e 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ac32aff9f5498587d861aacdfcc87fc39351a4c78f716be8439b5977a538e0f +oid sha256:83a4f8a7af1f92e532922e7d98bf465a45b307123bf5bab26c3181bcda534529 size 3303 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_4.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_4.nbt index 6aa3d892..89e01495 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_4.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_2_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32ccb18742b5fa0199697d178d021b9630c59c441b9f57689b6a2bf6eefff9db +oid sha256:4d2b193d2814178ef930c92b3e1d667bdc5d5b40a03c064469e6affcf1c571ec size 4378 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_0.nbt index b677b62c..5a32ab07 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:273ea124c22b1079f84de1eb6a58180147069964a236fdaf337d0286458ed3bd +oid sha256:b311af5ab3ffcb3e27d5d16471d9bb5118b9a200fcd87babb52b887f3f76557d size 4021 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_1.nbt index c471a5ca..74855800 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c093866d7dd956dc80f8457cf9b317312c932d918850633be92f29647380f969 +oid sha256:64a5edf4d4643fa151c4d4d566e8ca095c33adf5ec1392ee916b23dc64a09841 size 4005 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_2.nbt index 99581a89..6eb433ff 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e51adc245f34cbab85f33c19a85f4f05483ce2738e9c709522af1a06f71370d +oid sha256:1c8ceeedf4c8b4233a0d9a88f2a9bfc5e59bd4a17f49b1338618feb6acdacaed size 4210 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_3.nbt index c0dc41a0..0abdca66 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f4f5eb3397d95a6addb0ea49bd0bd0107d3e9972810ef6d3584507862b45511 +oid sha256:54c9dcfd6645196a56a797f310ab470e448889196e4b3e01b635566d17a507f9 size 4322 diff --git a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_4.nbt b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_4.nbt index 4655aa9a..a547b116 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_4.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/stairs/stairs_3_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:176dde7abab63e15d49fa9b1229fea65252e190e3a11471f185f839ce5d0ec44 +oid sha256:39056748bc35af7a17353ee20e42a64d9145bb662d1c6b0216fe84b67a2e4049 size 2779 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_0_mirrored.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_0_mirrored.nbt index 5725d1cb..376bf5ed 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_0_mirrored.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_0_mirrored.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f536334277ded594392845d179a0077862e486a52b7233c9bc1b1bc570883c7 +oid sha256:59e2cca691bf5b23083497764bb3e8781e3c08e2a78bd8f71291505c796eca12 size 4612 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_1_mirrored.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_1_mirrored.nbt index 3a2b376c..9227297d 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_1_mirrored.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_1_mirrored.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d03448ac05bacbb9bba0bea6b6ff551ee1bd3aae7c5340bf5a68e1f89df39b1 +oid sha256:cd50deaa3c3f10e2e10a0ebfd2e3804cf2aaf899f575bb5ec826b49870a4c825 size 4626 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_2_mirrored.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_2_mirrored.nbt index c7339b1b..3cf1a341 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_2_mirrored.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_2_mirrored.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ab4d04649084e9cf2a1df0acf3bf8a0b13ebf31923b673bda49fad611f0cbf3 +oid sha256:1713137cdbbfd9c04bdb89f8e9fd30af9b5c32c3b4115d1987056d9ee4192074 size 4543 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_3_mirrored.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_3_mirrored.nbt index 394a53e9..379ec120 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_3_mirrored.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_3_mirrored.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8663e1a3c573a2719844fbe0015b2ccba3f329222c90cd3af149f22e2b5c9811 +oid sha256:09c774e6bcfec0610ee0e0e1392ab47256dd9ec4a82e6a8ffe93d03f13de2d39 size 4742 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_4_mirrored.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_4_mirrored.nbt index fdc1504e..f1836372 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_4_mirrored.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/stairs_4_mirrored.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6b350c661fcb9a9a8a6a54faea0f3533dd0d3afa3f2eb03a846f37d5dbdeb371 +oid sha256:4ff2e07bdce2057dd83ca483569fa901b9a77a77c2ec849b71ea97d6d9871a74 size 4591 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_0.nbt index 7753ff4b..73ac4aa2 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c83ae0a6a3eddb437d576946859dfcba5390b73bc17d6799410378d41e591a1 +oid sha256:5c5d0512ea67bcd4ca906f816ac2eab048fbfdfa384eab0789c39b5769e20ae0 size 4627 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_1.nbt index 9ea5810a..bd6fe30b 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb9ebcc43874cf61d15c44ac5e7c577b7e05ea818f3db5376b3c23f864ed4008 +oid sha256:203f862908897536739b0c19413f428702f984ddae9965f8764b35cf7e4d6f4a size 4911 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_2.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_2.nbt index cfdd292e..b9f188ad 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_2.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9f8509fc0b9f17fbe0abaf31cf0b737db43ad00e896e9053fbcfc571d434b5e +oid sha256:7825a0a7e32e68bdfe75f3a85fca39332da3882d0cdd8a97b7bc1d660d9cd13c size 4910 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_3.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_3.nbt index 1caa2620..fdf90bb8 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_3.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9dcf01aece7eea38ff2ee4dbbedc797359293e8f819c6b30aa93786bd96d863 +oid sha256:0e25d0c5927442d2460a66fad852ccb918200f67895d6c17f6eb5548f01b3b70 size 4917 diff --git a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_4.nbt b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_4.nbt index 47620fa4..b9802c0b 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_4.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/starting_pieces/starting_stairs_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6025cbb952cba9c338b33be4f5a4775b43cecbe1bb1a01adc43b7c985c70c00 +oid sha256:abd9cd8ac95f84cf3564f956573d5b2d3eeace8d59d4f3bebb2696275f93fd31 size 4585 diff --git a/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_0.nbt b/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_0.nbt index e2fa1995..81d0bac9 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_0.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fe6f5d25d97aa90a9024bb30fbc4306bbc2e7f0bb13ef1a93fdbdd7cea069401 +oid sha256:408a7892404736e954066eee64b014cbc3f720fd10a131462c149cd04724bc0b size 16617 diff --git a/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_1.nbt b/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_1.nbt index a1256722..9460e537 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_1.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/walls/side_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c8bd47bfa730f384bfb2a7dd14f3b86bc9d50bed6c5db47c71a2eb9ef609ca29 +oid sha256:9690296879c2bc2ddd6d4acf52ba9d02bd247c0a60daa0e9a79d65bdbf44d158 size 17027 diff --git a/data/minecraft/structure/bastion/hoglin_stable/walls/wall_base.nbt b/data/minecraft/structure/bastion/hoglin_stable/walls/wall_base.nbt index 35a52afb..18180896 100644 --- a/data/minecraft/structure/bastion/hoglin_stable/walls/wall_base.nbt +++ b/data/minecraft/structure/bastion/hoglin_stable/walls/wall_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:72a1289e00fd2c63b51154670ec1e9cc5ce2c75a980bb17e310ebad6edb995c0 +oid sha256:38f0e3a697d697e3ac31a9a9d37ea00b044537301fb362622a3d62b10abb0a1f size 16415 diff --git a/data/minecraft/structure/bastion/mobs/crossbow_piglin.nbt b/data/minecraft/structure/bastion/mobs/crossbow_piglin.nbt index d941ca9d..6d0cd40f 100644 --- a/data/minecraft/structure/bastion/mobs/crossbow_piglin.nbt +++ b/data/minecraft/structure/bastion/mobs/crossbow_piglin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59e310a91611d63e7d413a54dccacf4ebf3469da57283537cd801ab2e3c6138a +oid sha256:a41104cd881a232036947a5f4faa5618ecb3176ec4de56f2ad72dae4d20e717c size 695 diff --git a/data/minecraft/structure/bastion/mobs/empty.nbt b/data/minecraft/structure/bastion/mobs/empty.nbt index 3d055807..d101e44a 100644 --- a/data/minecraft/structure/bastion/mobs/empty.nbt +++ b/data/minecraft/structure/bastion/mobs/empty.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1ac46d90d13a3b39f34ab8629e40844a496775a44bde7d02006cca777117fb2 +oid sha256:0282222fef99b148ed2e652a202b210f7b85df04598d2c86327c6d779d4973f5 size 229 diff --git a/data/minecraft/structure/bastion/mobs/hoglin.nbt b/data/minecraft/structure/bastion/mobs/hoglin.nbt index 8c8307ae..0fb013c8 100644 --- a/data/minecraft/structure/bastion/mobs/hoglin.nbt +++ b/data/minecraft/structure/bastion/mobs/hoglin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7207a3e993e5d06c625bc5dc9cea94a92db0680c3529eec5d0243ceba551584a -size 738 +oid sha256:9ccb6e25604e869bac89f8d00d256f411c1125570902f3cf3eae86e9fbbe2f59 +size 737 diff --git a/data/minecraft/structure/bastion/mobs/melee_piglin.nbt b/data/minecraft/structure/bastion/mobs/melee_piglin.nbt index 1aabba1c..ba83843c 100644 --- a/data/minecraft/structure/bastion/mobs/melee_piglin.nbt +++ b/data/minecraft/structure/bastion/mobs/melee_piglin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b868f0965813d904a90bf199053b9d5d4dda83a423efa23fad1b7ab331f76a57 +oid sha256:37008ad95c9d692e013598e7b44897a2358dcca6e881e556507df68105099ee2 size 682 diff --git a/data/minecraft/structure/bastion/mobs/melee_piglin_always.nbt b/data/minecraft/structure/bastion/mobs/melee_piglin_always.nbt index 430b3b3a..deadff7b 100644 --- a/data/minecraft/structure/bastion/mobs/melee_piglin_always.nbt +++ b/data/minecraft/structure/bastion/mobs/melee_piglin_always.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d7fcb9686b8fd0d9a13749d29acaed288535ae41518ea0c71b95ea372b75760 +oid sha256:146c9f79c2444f04796253d47ced40a8fb7d081d0d48d4d74c4f05d45e960625 size 674 diff --git a/data/minecraft/structure/bastion/mobs/sword_piglin.nbt b/data/minecraft/structure/bastion/mobs/sword_piglin.nbt index 60ed4711..d8d3194e 100644 --- a/data/minecraft/structure/bastion/mobs/sword_piglin.nbt +++ b/data/minecraft/structure/bastion/mobs/sword_piglin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:269f93517cf1907b1ba8e7cd4b3182ef9125658538feeabcaf451d5490746d04 +oid sha256:abcd4ab643c6220d20592c2f80c7895e5f07489d8f13bee6dd7e339941c9b128 size 701 diff --git a/data/minecraft/structure/bastion/treasure/bases/centers/center_0.nbt b/data/minecraft/structure/bastion/treasure/bases/centers/center_0.nbt index 623fbd3b..ab8e66b2 100644 --- a/data/minecraft/structure/bastion/treasure/bases/centers/center_0.nbt +++ b/data/minecraft/structure/bastion/treasure/bases/centers/center_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:572919fe5e0a5844c30c01729e228acc443b72b4e5091caf22f0e2f3a128a21f +oid sha256:ce81c28374c15afa28704ba75249a731e2b2724211f40b274e5f90dd1bccbcae size 1025 diff --git a/data/minecraft/structure/bastion/treasure/bases/centers/center_1.nbt b/data/minecraft/structure/bastion/treasure/bases/centers/center_1.nbt index 7eb27ab7..fdc634a2 100644 --- a/data/minecraft/structure/bastion/treasure/bases/centers/center_1.nbt +++ b/data/minecraft/structure/bastion/treasure/bases/centers/center_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3cea215e23b27664c5339412ccee6a75bfe390c541c546d1f6541df04646f05 +oid sha256:f8858e966df0c20a1c54998feea6fbce5b584172bb8d4e415b696e9a6322694a size 960 diff --git a/data/minecraft/structure/bastion/treasure/bases/centers/center_2.nbt b/data/minecraft/structure/bastion/treasure/bases/centers/center_2.nbt index a0f7f186..9322d1a5 100644 --- a/data/minecraft/structure/bastion/treasure/bases/centers/center_2.nbt +++ b/data/minecraft/structure/bastion/treasure/bases/centers/center_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:245ce7b574f5ed5191c8a76c35584872c28ac404d43861074bbff4c4413d5af8 +oid sha256:176a66e9941dc01f545e8ad028a1436c438927875e235f950e44dbcba810fba3 size 1076 diff --git a/data/minecraft/structure/bastion/treasure/bases/centers/center_3.nbt b/data/minecraft/structure/bastion/treasure/bases/centers/center_3.nbt index 6db4fb1f..b3d54d87 100644 --- a/data/minecraft/structure/bastion/treasure/bases/centers/center_3.nbt +++ b/data/minecraft/structure/bastion/treasure/bases/centers/center_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:628d578e18b03f16dbf1e693b38708fac7fd21a730f43921ae2d56c730ca453c +oid sha256:b9d031dc1184965046fa0ca040e6bef6e5280bbce7dc3dffe01abbbc6cf387c2 size 736 diff --git a/data/minecraft/structure/bastion/treasure/bases/lava_basin.nbt b/data/minecraft/structure/bastion/treasure/bases/lava_basin.nbt index 5afcd1a0..643ef023 100644 --- a/data/minecraft/structure/bastion/treasure/bases/lava_basin.nbt +++ b/data/minecraft/structure/bastion/treasure/bases/lava_basin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:25aeda0fd17e6b9432165ee82be9451b328de877c56aa38971ff4461bd96c918 +oid sha256:e6c93950391f4e73defb71db1e94e3175dc0d87ace3251e57936af25b10c4b79 size 6585 diff --git a/data/minecraft/structure/bastion/treasure/big_air_full.nbt b/data/minecraft/structure/bastion/treasure/big_air_full.nbt index c873cb7f..8f6a67b7 100644 --- a/data/minecraft/structure/bastion/treasure/big_air_full.nbt +++ b/data/minecraft/structure/bastion/treasure/big_air_full.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7dafc0538777311bf7eb427ef9660761db49ebea4647c81ce230626e5dde94f1 +oid sha256:737057f23e3014692d769cad9a6649e04dc0c5189c092bb7612fd7d11b6299c0 size 69674 diff --git a/data/minecraft/structure/bastion/treasure/brains/center_brain.nbt b/data/minecraft/structure/bastion/treasure/brains/center_brain.nbt index 1d2cda8d..15b339f5 100644 --- a/data/minecraft/structure/bastion/treasure/brains/center_brain.nbt +++ b/data/minecraft/structure/bastion/treasure/brains/center_brain.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9abf8bca57c21cbfb53b871f98717c9d40c82989997afe94c679a0866b22f62 +oid sha256:67eee448da798a7303248e6df579325c20f8c3c332fb693f2234e20edd6d4943 size 416 diff --git a/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_middle.nbt b/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_middle.nbt index 57228754..2fb2a1e6 100644 --- a/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_middle.nbt +++ b/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_middle.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b33363830a30ba03eb9881d96fc221b947a4f609feeceee3e5ad685df3a2ddcb +oid sha256:df297f5a6c9d1ce31d893617f622453140b69cd55eb11b0a9af8ee5123d98da4 size 288 diff --git a/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top.nbt b/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top.nbt index bd5316a3..5316c38f 100644 --- a/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top.nbt +++ b/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e3a7b53d8a76805cf27d6d261fd3964527c646fc532dd60971c558e1309f158c +oid sha256:fac6d6f2e60671edbf5de7cf2a4271fb5d4a6aef7e346a3ad3a5b32cb4d5fd98 size 287 diff --git a/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top_entrance.nbt b/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top_entrance.nbt index 6f00a1c4..bda316ee 100644 --- a/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top_entrance.nbt +++ b/data/minecraft/structure/bastion/treasure/connectors/center_to_wall_top_entrance.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68734164025f609e28e081df84b7b32ccda828ff0bcbdb3d1a662838c553e501 +oid sha256:1ca883d168c910d5e45e8a5ccf07d6a3c53011b409bf59e62cf170232a0e2cf0 size 292 diff --git a/data/minecraft/structure/bastion/treasure/corners/bottom/corner_0.nbt b/data/minecraft/structure/bastion/treasure/corners/bottom/corner_0.nbt index 3467b1fd..daaa489f 100644 --- a/data/minecraft/structure/bastion/treasure/corners/bottom/corner_0.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/bottom/corner_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ca6bd98db274f9c3ed83bb391eaab03bbf1f5fc6f4e4a61d5e170fd5672448bb +oid sha256:c8b66a5962d2da891f0e3770d4832a4716cfcd9d4e5fdef24c16c2a9ff72a5a3 size 1685 diff --git a/data/minecraft/structure/bastion/treasure/corners/bottom/corner_1.nbt b/data/minecraft/structure/bastion/treasure/corners/bottom/corner_1.nbt index 731029c3..28e58099 100644 --- a/data/minecraft/structure/bastion/treasure/corners/bottom/corner_1.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/bottom/corner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9690a1c0b68cdc27efd081f57576d07faad1995d5c4bfdf06dc7eb774794930f +oid sha256:94d0d797081d81e05c79fa87622895b9ecc13dd0400aa422796f6b763a2dbfc6 size 1680 diff --git a/data/minecraft/structure/bastion/treasure/corners/edges/bottom.nbt b/data/minecraft/structure/bastion/treasure/corners/edges/bottom.nbt index 010cc20b..d12d86c9 100644 --- a/data/minecraft/structure/bastion/treasure/corners/edges/bottom.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/edges/bottom.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:962ed6b2628fb4df254f8de780157a9ab803bb5b9098d8cf663c5fc9245e77bf +oid sha256:e5f8e4268e4b0222d0d22fe14963012dac69d7cfa26f3d2adb2413eca230578b size 451 diff --git a/data/minecraft/structure/bastion/treasure/corners/edges/middle.nbt b/data/minecraft/structure/bastion/treasure/corners/edges/middle.nbt index 436458f8..11eb968d 100644 --- a/data/minecraft/structure/bastion/treasure/corners/edges/middle.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/edges/middle.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec951a995851e20f8182ff620c3e2c56d79b1b73ddc2d0c5a41e7702885836d1 +oid sha256:1cc9fe3e89c1f3cad9a67a42189b8f2e4ed4682c38bdc0e7f72b6f832d015144 size 440 diff --git a/data/minecraft/structure/bastion/treasure/corners/edges/top.nbt b/data/minecraft/structure/bastion/treasure/corners/edges/top.nbt index 4dc3fcfd..169dadb4 100644 --- a/data/minecraft/structure/bastion/treasure/corners/edges/top.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/edges/top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cbd65ef6b698a5093e31ae695758d2eb685a023b896dd657c286f0d0a584e490 +oid sha256:45ac9684b9c05470bddfa71414c20060c7184d4a5a7087aa7bceaa5f4db68d6f size 457 diff --git a/data/minecraft/structure/bastion/treasure/corners/middle/corner_0.nbt b/data/minecraft/structure/bastion/treasure/corners/middle/corner_0.nbt index 63a3a15b..a7de0d8e 100644 --- a/data/minecraft/structure/bastion/treasure/corners/middle/corner_0.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/middle/corner_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3c63ac591d6bbdbea51f75179ac92b2945099d28ed08abc83382c2bbad6bebd4 +oid sha256:9d8f0c3c7e301cd3ceb4e4364715e1dd698f51f059801193d92e043bfed497b8 size 1586 diff --git a/data/minecraft/structure/bastion/treasure/corners/middle/corner_1.nbt b/data/minecraft/structure/bastion/treasure/corners/middle/corner_1.nbt index 40cb75d0..caafce22 100644 --- a/data/minecraft/structure/bastion/treasure/corners/middle/corner_1.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/middle/corner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c243ef2e525c2b8e4111c3615c8b2f82e02b348b77c8ccc60a62407788aa616d +oid sha256:a4227e5c59b5e9b89c15c9bd7ef13f10d33d2bfa6473d130d592af94733dcf96 size 1539 diff --git a/data/minecraft/structure/bastion/treasure/corners/top/corner_0.nbt b/data/minecraft/structure/bastion/treasure/corners/top/corner_0.nbt index ad3c248d..1421a69d 100644 --- a/data/minecraft/structure/bastion/treasure/corners/top/corner_0.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/top/corner_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea14ff4c67e866e8ff9da3923232aaad6d9162b5d85df6f8d2d2bd01cd3a4784 +oid sha256:00a779d02ac8cb0c0a931d6b7c90660f3c74ce618de6ea4b38b577fb94af1a5d size 1553 diff --git a/data/minecraft/structure/bastion/treasure/corners/top/corner_1.nbt b/data/minecraft/structure/bastion/treasure/corners/top/corner_1.nbt index 8e256278..e75300dc 100644 --- a/data/minecraft/structure/bastion/treasure/corners/top/corner_1.nbt +++ b/data/minecraft/structure/bastion/treasure/corners/top/corner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6218c9a73b238aeca40c2923fce95ea457ca08848477c0c910f76924c12bc103 +oid sha256:683637ef82d077f99950a2ca57bf07f4074975051e8e227d36b081eb719db491 size 1573 diff --git a/data/minecraft/structure/bastion/treasure/entrances/entrance_0.nbt b/data/minecraft/structure/bastion/treasure/entrances/entrance_0.nbt index 321ed943..e0d93059 100644 --- a/data/minecraft/structure/bastion/treasure/entrances/entrance_0.nbt +++ b/data/minecraft/structure/bastion/treasure/entrances/entrance_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26e06e99dd87f881ec3ac7004d755358821d47107b55331d956d004923992d12 +oid sha256:8249598c1f0a3e35e0ef328939042e3293ce46a415165ddd227c5b7ae47f780b size 11197 diff --git a/data/minecraft/structure/bastion/treasure/extensions/empty.nbt b/data/minecraft/structure/bastion/treasure/extensions/empty.nbt index ad005599..5288594f 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/empty.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/empty.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af02479287b00608e23524e9b3ba5898cbde71a5eaf0da0a7864fe1a274f8b72 +oid sha256:58bbc981ada3f2011f9f7d92aad411dff56728c24f6809cbeae10df9d7098a69 size 233 diff --git a/data/minecraft/structure/bastion/treasure/extensions/fire_room.nbt b/data/minecraft/structure/bastion/treasure/extensions/fire_room.nbt index bd3fda8c..89080adf 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/fire_room.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/fire_room.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d497659a9a4d02b4b23afffbb349f31e7ced7f0d557871462e28e140f97288d2 +oid sha256:24faa8ba8e284a0b86e85860bc6ad5f0d5b85d0e33856e4b2248c00c52c8aaaf size 1867 diff --git a/data/minecraft/structure/bastion/treasure/extensions/house_0.nbt b/data/minecraft/structure/bastion/treasure/extensions/house_0.nbt index 4bf9d089..471bed7b 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/house_0.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/house_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1889bae944963ccc69c2f07d2db5601a0e9e173c745963f31085819ebe898b12 +oid sha256:2ec438478830aac080cccb60ee303416cc9392a59ff6d29075137e42b8c82cd0 size 2078 diff --git a/data/minecraft/structure/bastion/treasure/extensions/house_1.nbt b/data/minecraft/structure/bastion/treasure/extensions/house_1.nbt index 7be8f8ef..35fd1ec5 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/house_1.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dde687ec4291d15630ff93d38863e7fc9f96e21deadb4ac2610f3c527f60a2ec +oid sha256:10eadf6049584fda4f2209d2cce9e487924ebcf60c76cd68bf2e01e5d8984e43 size 2160 diff --git a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_0.nbt b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_0.nbt index 67e6d711..707a6086 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_0.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d2c1255eb07e94f9759587d3230e9ce133dc1ee79060e1f90bd154e426ba5b9 +oid sha256:11d780d15e0550e6d507f3905e48c79511b503c684acba7784e55ead6030b5dc size 455 diff --git a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_1.nbt b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_1.nbt index 8f771436..81f73bef 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_1.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f25e301cb70eab5f2af5b552d1efe3b0db36ce34a49717e31a73f7e6cd7bbc3 +oid sha256:6aeefc7b70261dcc1c9e20ee43ad9f98916e8acf7273fbe4bb3d938490dc5d05 size 418 diff --git a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_2.nbt b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_2.nbt index d56936d1..9ab3358f 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_2.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:20f79344e6f73165aea7edb45d1b0a7a6d36d47774cd41632081b55e8e0014fd +oid sha256:61e4eac9fbfe753cfc32d6a0c661697f2195f09fd004a9c0b2331a7035cfa5a1 size 539 diff --git a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_3.nbt b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_3.nbt index 7eb09dff..c3f7727f 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/large_bridge_3.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/large_bridge_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94a2f1457426794af2c40e14e9fb2c773bc23035f6f41f851d0d4a8527727e8f +oid sha256:7579cc00122db91f605307d825e291c69a8f8afcd05a66272acd9222f0858f4c size 616 diff --git a/data/minecraft/structure/bastion/treasure/extensions/roofed_bridge.nbt b/data/minecraft/structure/bastion/treasure/extensions/roofed_bridge.nbt index 03719e0b..bdb92334 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/roofed_bridge.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/roofed_bridge.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:514d067c7b03d70e985e3885fe089d59e0ebc53fed92bd55db79478c79cceaaa +oid sha256:244f9720d26a4db6a6a435fde117187ba8bf4b78591b9f459dde949b931cbda8 size 642 diff --git a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_0.nbt b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_0.nbt index e607f1ea..9cdad8a9 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_0.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:024d32fccdffdef6650ed3df422ce6ee85746e9d49431c27e91a6a7972ec7fdb +oid sha256:8ebb29a1b767083b10d820d763706a439c2178137f7205129a3fb11e4d2e0f08 size 320 diff --git a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_1.nbt b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_1.nbt index 69932928..5f3e36c0 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_1.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bbc6739794eb240c53220e7cb694ed603f619a5512d45a22174d682ac99ab988 +oid sha256:74d77166537c90196f4520d35048ced8cdec9607172cd8bb6e6bce2682dfba02 size 390 diff --git a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_2.nbt b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_2.nbt index ae432625..e2154466 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_2.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f75876cdb14d342e8d743e9036fdb9c5fc46eec52c2961867e56b56f5b10dcf +oid sha256:8a7c645c2480c76f97610101cc979074ba3cee64a37ab26ec21c26c5d41ac4c7 size 349 diff --git a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_3.nbt b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_3.nbt index 1980a4fe..39036e76 100644 --- a/data/minecraft/structure/bastion/treasure/extensions/small_bridge_3.nbt +++ b/data/minecraft/structure/bastion/treasure/extensions/small_bridge_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d10d301f5bcb6cbbd79ee90fe591fe97c7b1ac087c38e210a5de1fb46bc545ff +oid sha256:a70d3fe9007fb110b4bf0b8dd29fa34c70d45819a229eeefa0eabb5509e5da57 size 480 diff --git a/data/minecraft/structure/bastion/treasure/ramparts/bottom_wall_0.nbt b/data/minecraft/structure/bastion/treasure/ramparts/bottom_wall_0.nbt index 89b97072..28e1f3de 100644 --- a/data/minecraft/structure/bastion/treasure/ramparts/bottom_wall_0.nbt +++ b/data/minecraft/structure/bastion/treasure/ramparts/bottom_wall_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:295a3c08a645a1c4a6d267b65166c8a67566ef340b0b0d4522d9d466b3bf0041 +oid sha256:68b815cb7459b01fd44135d7b4e0f78857e3e5dec7f3d1dea1767c3e4b484836 size 11780 diff --git a/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_main.nbt b/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_main.nbt index 0b2a9456..224440cc 100644 --- a/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_main.nbt +++ b/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_main.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3774d1d4037858e5a8c88a610d2ab35c2a4b88083547f6218ce6ace0b1e0559c +oid sha256:3ea628e23596667c28cb5b9ab1ca2b32da2addd6b23a257c07dfb7f5c7bae217 size 24170 diff --git a/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_side.nbt b/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_side.nbt index b6529b48..7139141f 100644 --- a/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_side.nbt +++ b/data/minecraft/structure/bastion/treasure/ramparts/lava_basin_side.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d1ead462ef615a9cc62db1a112fc5371880e80fac74d0a145356ef90e1621ad +oid sha256:54fb03572b9da7501cdbf3ca16cbb92dcadde6cdba310df5f601465a1352598b size 23969 diff --git a/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_main.nbt b/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_main.nbt index 1a0fb518..d95ed08e 100644 --- a/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_main.nbt +++ b/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_main.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:078d8777bdbe96f1702b4af150fd94a28a8b6e9c04075255e998e9e10523969c +oid sha256:f91e6aa64a591272261c5afa3ed4d594040f8f56201407a1991a686d6e92d2df size 18999 diff --git a/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_side.nbt b/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_side.nbt index 34d2beaf..aa01afa8 100644 --- a/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_side.nbt +++ b/data/minecraft/structure/bastion/treasure/ramparts/mid_wall_side.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:566a5a46c4e33219d1fc7d0ad2f7a94fc835bc4a78809196b8a9441434ae8959 +oid sha256:57c3193656cc9be115d154f8987eb335820b1b7d641e6b3d6e2fbac7717cb0a3 size 18147 diff --git a/data/minecraft/structure/bastion/treasure/ramparts/top_wall.nbt b/data/minecraft/structure/bastion/treasure/ramparts/top_wall.nbt index 5fc931bc..00c3dcfa 100644 --- a/data/minecraft/structure/bastion/treasure/ramparts/top_wall.nbt +++ b/data/minecraft/structure/bastion/treasure/ramparts/top_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b079025959deec452180f74b0695bd4bb52a48250da6c1d037169fd1ca77f79b +oid sha256:ee9099d83904efde3c1ff0208f61adec3e807e454fbf0cf312a53b04ef9a8375 size 9861 diff --git a/data/minecraft/structure/bastion/treasure/roofs/center_roof.nbt b/data/minecraft/structure/bastion/treasure/roofs/center_roof.nbt index 5a585a86..a2219030 100644 --- a/data/minecraft/structure/bastion/treasure/roofs/center_roof.nbt +++ b/data/minecraft/structure/bastion/treasure/roofs/center_roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b11473629a7bb4decf429dbea4ddb9810f916932b64cff41e8a8203e4fa0e93b +oid sha256:6d64bc756fd9e798270837f729299cf1de0f6a1dc7a450da61d993cd52a4ef9a size 3448 diff --git a/data/minecraft/structure/bastion/treasure/roofs/corner_roof.nbt b/data/minecraft/structure/bastion/treasure/roofs/corner_roof.nbt index 68c50de5..14dd291f 100644 --- a/data/minecraft/structure/bastion/treasure/roofs/corner_roof.nbt +++ b/data/minecraft/structure/bastion/treasure/roofs/corner_roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e95aa2d1f78ecace9005014d17ab336a359b6adbbe1576053e0de519b3e0bcfc +oid sha256:3d9f73b69404d6ca55562da9bb64af3d145d0f78eb4fb665629cd81b0e2804de size 425 diff --git a/data/minecraft/structure/bastion/treasure/roofs/wall_roof.nbt b/data/minecraft/structure/bastion/treasure/roofs/wall_roof.nbt index f7e13444..b5dab95d 100644 --- a/data/minecraft/structure/bastion/treasure/roofs/wall_roof.nbt +++ b/data/minecraft/structure/bastion/treasure/roofs/wall_roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55e9745a31ebebd5dc4e260488c8b180698683c570a2fff1dc9e900128446249 -size 990 +oid sha256:900b46cd5d639f03a91906301788e9ea0c75967338b9fedc6b45bf61850c835a +size 991 diff --git a/data/minecraft/structure/bastion/treasure/stairs/lower_stairs.nbt b/data/minecraft/structure/bastion/treasure/stairs/lower_stairs.nbt index dd0686c5..59442f8d 100644 --- a/data/minecraft/structure/bastion/treasure/stairs/lower_stairs.nbt +++ b/data/minecraft/structure/bastion/treasure/stairs/lower_stairs.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d44fe057c935dfeb54d679920f5e8047ef1e50fd80f53d4d2d1322bfccd46415 +oid sha256:c618813add54ef52c1e12966e813a78b6725f37f1e618ddbb210718a6457562a size 447 diff --git a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_0.nbt b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_0.nbt index cce4cf5b..257d7fbd 100644 --- a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_0.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3c64bc5aac601d929e9a8b18a3ce16c68383e3b594d729b4675b741e7145de1b +oid sha256:9f4c787832a0503206bfa41ada4d240d6545b3940d69f64f332e1020b409bf0a size 6613 diff --git a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_1.nbt b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_1.nbt index fe4f6f50..2bfdfd4a 100644 --- a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_1.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6bf2a9e539e077a0a9dcac379775c9f5f9ce139643b7ee185d4ace5f0750e621 +oid sha256:bf71c2125a56826fbf8fe3317fa8a020ad65be6657d4e072dd182d03bdb6d795 size 6500 diff --git a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_2.nbt b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_2.nbt index fb13da2a..d2261887 100644 --- a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_2.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd1b9401b55dafd2c15b607359020ca805084583b7e4eff4f9739080ccc88d2a +oid sha256:fde0f9f9e281c15ce1e7b1dd2783f7c0454ef9504a142f5e503665d300ffe580 size 6443 diff --git a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_3.nbt b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_3.nbt index 7a952500..07b8327c 100644 --- a/data/minecraft/structure/bastion/treasure/walls/bottom/wall_3.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/bottom/wall_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e02c7e1f0b2dc5dab1a715ebba2c432425fc5e4a3c355ce96acb3d9cc33b32b +oid sha256:fd29734f3571496a6f399460eec7b95c521b887cab413c0379ac0d748fa0899e size 6491 diff --git a/data/minecraft/structure/bastion/treasure/walls/entrance_wall.nbt b/data/minecraft/structure/bastion/treasure/walls/entrance_wall.nbt index f56b468a..953e0667 100644 --- a/data/minecraft/structure/bastion/treasure/walls/entrance_wall.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/entrance_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:37c36a65b8bf9d9a709df73ba46fd0d570464f65cc25dc3daaa103ade2027175 +oid sha256:b0c299ee1518049adcf134cbb15375af5d5649bdf4f553b0dbc223fb4be5cf02 size 2679 diff --git a/data/minecraft/structure/bastion/treasure/walls/lava_wall.nbt b/data/minecraft/structure/bastion/treasure/walls/lava_wall.nbt index c2a34f5c..99c36345 100644 --- a/data/minecraft/structure/bastion/treasure/walls/lava_wall.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/lava_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:69a860e4a1b29541959c449391485b3d04ee5c8dfee4073be7e4c9d51794bd80 -size 2797 +oid sha256:c95d2d78d53c516aa4a03fc0c4f861b491259c92747f67d5bc52be2e4e5a0f87 +size 2798 diff --git a/data/minecraft/structure/bastion/treasure/walls/mid/wall_0.nbt b/data/minecraft/structure/bastion/treasure/walls/mid/wall_0.nbt index 12875960..24860086 100644 --- a/data/minecraft/structure/bastion/treasure/walls/mid/wall_0.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/mid/wall_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:850664d56ff311dca04374125a789dcb40bb8af065f571d3cead3f53b21cafff +oid sha256:7d6f416c7696a3aa161150e713d91a7e0ecc5eb09975469c00803ef2121da6cd size 6297 diff --git a/data/minecraft/structure/bastion/treasure/walls/mid/wall_1.nbt b/data/minecraft/structure/bastion/treasure/walls/mid/wall_1.nbt index 7921a752..69da20c9 100644 --- a/data/minecraft/structure/bastion/treasure/walls/mid/wall_1.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/mid/wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ec4533d9866699b57efd69ae0a2541110092d814a4490c23109784f4192166e +oid sha256:323266de1206feee0caae492b9e3aa1271d7a0640103bb9b40fb57d73f74a78f size 6153 diff --git a/data/minecraft/structure/bastion/treasure/walls/mid/wall_2.nbt b/data/minecraft/structure/bastion/treasure/walls/mid/wall_2.nbt index a675d30d..1dd37cc8 100644 --- a/data/minecraft/structure/bastion/treasure/walls/mid/wall_2.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/mid/wall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a039ae72b7b7879c688e58b592fdeabc2a5db6e14b2f032a49bee0a9a06e15b +oid sha256:b77cd66f9a3e26497be9d8dd443147185bf9817486364268c964241967373395 size 6175 diff --git a/data/minecraft/structure/bastion/treasure/walls/outer/bottom_corner.nbt b/data/minecraft/structure/bastion/treasure/walls/outer/bottom_corner.nbt index 01a6ad49..8f56f3f3 100644 --- a/data/minecraft/structure/bastion/treasure/walls/outer/bottom_corner.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/outer/bottom_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94f3e6d212cb8829448c3d3917c988a29ee3be01230dce207c34e08b0c8e321e +oid sha256:679323d55486fd0865eb78d9a038077c5aad90ced304a49c90f5f0af51bf5cf8 size 782 diff --git a/data/minecraft/structure/bastion/treasure/walls/outer/medium_outer_wall.nbt b/data/minecraft/structure/bastion/treasure/walls/outer/medium_outer_wall.nbt index 06d57b6d..0a55522b 100644 --- a/data/minecraft/structure/bastion/treasure/walls/outer/medium_outer_wall.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/outer/medium_outer_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac7fad35a17bd62fdb38e702be2bc9f05de9f9eb53f64edb19f5ac9a890e3166 +oid sha256:644d3a1790912f81334f6781982f647a590c6e716f7cf4995aeb02c927ccca67 size 2333 diff --git a/data/minecraft/structure/bastion/treasure/walls/outer/mid_corner.nbt b/data/minecraft/structure/bastion/treasure/walls/outer/mid_corner.nbt index df6160b4..94381904 100644 --- a/data/minecraft/structure/bastion/treasure/walls/outer/mid_corner.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/outer/mid_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:992abcc36bf082e7f851c229dae915b4b3e2f9b22ad17b985675f1ba0c9e20a1 +oid sha256:4871422347c2c90fbb9e799c154f1c9918b4f53aa57fc401767ab51539d43b82 size 714 diff --git a/data/minecraft/structure/bastion/treasure/walls/outer/outer_wall.nbt b/data/minecraft/structure/bastion/treasure/walls/outer/outer_wall.nbt index eba73edc..2d9081b8 100644 --- a/data/minecraft/structure/bastion/treasure/walls/outer/outer_wall.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/outer/outer_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0214c68ce80ee0edb82c5bac120417444ed641d03640e328eed49e76dfac57d1 +oid sha256:6e376bb26d9fb48c0199eed441fe6a5429841c30c4103b47a6629fa75267e0b7 size 2206 diff --git a/data/minecraft/structure/bastion/treasure/walls/outer/tall_outer_wall.nbt b/data/minecraft/structure/bastion/treasure/walls/outer/tall_outer_wall.nbt index 08369fae..fb52262f 100644 --- a/data/minecraft/structure/bastion/treasure/walls/outer/tall_outer_wall.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/outer/tall_outer_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f53da9e73b30b7428b0fc776f359eb47429d876ccd594683546ba457dae4013 +oid sha256:db06831846f378049e9fd3f754ef575dd8d8a3318da2643942ef3235534088e9 size 2449 diff --git a/data/minecraft/structure/bastion/treasure/walls/outer/top_corner.nbt b/data/minecraft/structure/bastion/treasure/walls/outer/top_corner.nbt index bdaa62bd..0c3de42d 100644 --- a/data/minecraft/structure/bastion/treasure/walls/outer/top_corner.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/outer/top_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:09dc80f38b78a76bb817ccdcb9b744d2156eca5c1e454e582f537b01657391e7 +oid sha256:19979840c653e0b040b85632eec0a3853d246ffcc718f3cb7e7326ad101755d2 size 806 diff --git a/data/minecraft/structure/bastion/treasure/walls/top/main_entrance.nbt b/data/minecraft/structure/bastion/treasure/walls/top/main_entrance.nbt index b43fb428..bc4a97ef 100644 --- a/data/minecraft/structure/bastion/treasure/walls/top/main_entrance.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/top/main_entrance.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6dc875ebbee6df0611627b3bf1d6b76d84f3f39abaad2d75ddb254014cda6f6a +oid sha256:db4e8000b68a71e54e9f45a94f5480a6d63a2010cacd4e8bc81bc3afc6fe98a5 size 6220 diff --git a/data/minecraft/structure/bastion/treasure/walls/top/wall_0.nbt b/data/minecraft/structure/bastion/treasure/walls/top/wall_0.nbt index a7b3fced..57b1d40c 100644 --- a/data/minecraft/structure/bastion/treasure/walls/top/wall_0.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/top/wall_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:855ddd7be7cc57b4b0e98d1c89d6156e78a02f3b9a734d67ccfe2381a0cd4bc3 +oid sha256:e01bbe2b4954aa7aa6dae1cfe7e86636d26bcc6979eeb63d6890827bd25b2534 size 6226 diff --git a/data/minecraft/structure/bastion/treasure/walls/top/wall_1.nbt b/data/minecraft/structure/bastion/treasure/walls/top/wall_1.nbt index 17cbb62d..b8c5af4f 100644 --- a/data/minecraft/structure/bastion/treasure/walls/top/wall_1.nbt +++ b/data/minecraft/structure/bastion/treasure/walls/top/wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d90dc447db143512d3f0f56fa2e5d8a198c22007b8d73df125a1e0139840b97 +oid sha256:61aa3cd68381bc20b98353d2aaf514e6f292b126c9f8d48a8257326a06380423 size 6219 diff --git a/data/minecraft/structure/bastion/units/air_base.nbt b/data/minecraft/structure/bastion/units/air_base.nbt index f74cea70..0b2202d1 100644 --- a/data/minecraft/structure/bastion/units/air_base.nbt +++ b/data/minecraft/structure/bastion/units/air_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d52b352a937fe010a1b4867ccaaaa0ad98a3acff347ef738d021cf23c741f8e +oid sha256:633652ca0b28fe45df8a9eeec57cd5a6717d04c29384d5c136d08d41bfab3a12 size 63633 diff --git a/data/minecraft/structure/bastion/units/center_pieces/center_0.nbt b/data/minecraft/structure/bastion/units/center_pieces/center_0.nbt index c363154c..b6acfb92 100644 --- a/data/minecraft/structure/bastion/units/center_pieces/center_0.nbt +++ b/data/minecraft/structure/bastion/units/center_pieces/center_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:453c7ed1f19728c95afb7f759b5c5ebac374ab02a10c1a1a47ac1399c496a0bd +oid sha256:a18677c89a3915c3c07e8606dac2160304594941c34c41f254405b0435242621 size 3083 diff --git a/data/minecraft/structure/bastion/units/center_pieces/center_1.nbt b/data/minecraft/structure/bastion/units/center_pieces/center_1.nbt index 6fb4768f..e444e230 100644 --- a/data/minecraft/structure/bastion/units/center_pieces/center_1.nbt +++ b/data/minecraft/structure/bastion/units/center_pieces/center_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c25f7cb8f18dfbd6a055d9862f3c45b52af8d835f4eab55ca412015057cbb446 +oid sha256:44da2256b1fa270f37f6e1d71f0ffe11a4eb874f5f2d8198ee5eb220f66b132f size 3293 diff --git a/data/minecraft/structure/bastion/units/center_pieces/center_2.nbt b/data/minecraft/structure/bastion/units/center_pieces/center_2.nbt index 02cda297..cc18fcae 100644 --- a/data/minecraft/structure/bastion/units/center_pieces/center_2.nbt +++ b/data/minecraft/structure/bastion/units/center_pieces/center_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c7d79cdca8c4726f883a621e36ede1e4b54243780a8417bbcf54788320ad5db +oid sha256:4aa162487badc8855bdca3366ec67304381239ee5325be9de6d5b929ee6ba9b4 size 3359 diff --git a/data/minecraft/structure/bastion/units/edges/edge_0.nbt b/data/minecraft/structure/bastion/units/edges/edge_0.nbt index 67caee93..d1e31271 100644 --- a/data/minecraft/structure/bastion/units/edges/edge_0.nbt +++ b/data/minecraft/structure/bastion/units/edges/edge_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:786c017fae4a2680d6cbc8ac98f2918ad1507adc012dac10fe3e49fb87908a12 +oid sha256:a92a8a16ba728c9bcceb4cee40142310cd98a65a79d6e83f6df5cf45c87dc4f5 size 2382 diff --git a/data/minecraft/structure/bastion/units/fillers/stage_0.nbt b/data/minecraft/structure/bastion/units/fillers/stage_0.nbt index 3ff87cf0..3b115511 100644 --- a/data/minecraft/structure/bastion/units/fillers/stage_0.nbt +++ b/data/minecraft/structure/bastion/units/fillers/stage_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:43ac9b2da1a2e6a528df2e24007d87e72e8dc22a5536c571d5ea129c755e29b0 +oid sha256:cc4852ee910c0779609cdd2827853ed7b47f5119c9e5443afa8402d68b6f2202 size 2454 diff --git a/data/minecraft/structure/bastion/units/pathways/pathway_0.nbt b/data/minecraft/structure/bastion/units/pathways/pathway_0.nbt index 13b2c07b..1610e5e8 100644 --- a/data/minecraft/structure/bastion/units/pathways/pathway_0.nbt +++ b/data/minecraft/structure/bastion/units/pathways/pathway_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c9446ec238661b37990fe2827ff98baee4690689d850f138d5d685afea36cd6 +oid sha256:f5b1ef64683018dde51c4f05deffb0781db846b3804319b737573ccc9e1125f2 size 355 diff --git a/data/minecraft/structure/bastion/units/pathways/pathway_wall_0.nbt b/data/minecraft/structure/bastion/units/pathways/pathway_wall_0.nbt index d4c6addf..5a550f83 100644 --- a/data/minecraft/structure/bastion/units/pathways/pathway_wall_0.nbt +++ b/data/minecraft/structure/bastion/units/pathways/pathway_wall_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:40077c471ff44b8b24a55be0e317cf3ac01892a8cf1e736b0545ca7768cddfd2 +oid sha256:f924199bb32fb5ad0a8aaec8ee889860fab2bba28c6330b9b43a4ff17367650b size 355 diff --git a/data/minecraft/structure/bastion/units/rampart_plates/plate_0.nbt b/data/minecraft/structure/bastion/units/rampart_plates/plate_0.nbt index abac55a5..30720650 100644 --- a/data/minecraft/structure/bastion/units/rampart_plates/plate_0.nbt +++ b/data/minecraft/structure/bastion/units/rampart_plates/plate_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94420d04a87eec15293beee1be11286ebf9fcc2b316b0181d598237016932e82 +oid sha256:8d6acf44775086d9335a097da6a4080bc6cb0722e70c63fc362ef0d8da2eed3d size 3657 diff --git a/data/minecraft/structure/bastion/units/ramparts/ramparts_0.nbt b/data/minecraft/structure/bastion/units/ramparts/ramparts_0.nbt index 53dd5d66..a77c34aa 100644 --- a/data/minecraft/structure/bastion/units/ramparts/ramparts_0.nbt +++ b/data/minecraft/structure/bastion/units/ramparts/ramparts_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be054d5eab347979d3f12914e8b4835f9711af528352986b4b83211061314aea +oid sha256:e2f7a22e8b805988d6af6fb5d1de05fe69531a6631e022f9662a339552c3045e size 23660 diff --git a/data/minecraft/structure/bastion/units/ramparts/ramparts_1.nbt b/data/minecraft/structure/bastion/units/ramparts/ramparts_1.nbt index fa8975e3..55b9f6fe 100644 --- a/data/minecraft/structure/bastion/units/ramparts/ramparts_1.nbt +++ b/data/minecraft/structure/bastion/units/ramparts/ramparts_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33ab5f505d4dee8d7ea89822ea296acee98b89ab61cde0f3de3548b06eea0fff +oid sha256:858ddf44d9305ef50873f9a3a5d117da2a2799c1a7a46dd9db6729ada3255157 size 11771 diff --git a/data/minecraft/structure/bastion/units/ramparts/ramparts_2.nbt b/data/minecraft/structure/bastion/units/ramparts/ramparts_2.nbt index 370ad11b..64ca3846 100644 --- a/data/minecraft/structure/bastion/units/ramparts/ramparts_2.nbt +++ b/data/minecraft/structure/bastion/units/ramparts/ramparts_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52884b0f4f3e7f512ba8effa90a219f0e20a92112e5fb1ec527403f9cde4e414 +oid sha256:a79bc2457a5d81e4e1611cd81aabd3d3fd605bfb87b6d1017c88108adfd2189e size 6942 diff --git a/data/minecraft/structure/bastion/units/stages/rot/stage_1_0.nbt b/data/minecraft/structure/bastion/units/stages/rot/stage_1_0.nbt index 4916fe61..a10e7118 100644 --- a/data/minecraft/structure/bastion/units/stages/rot/stage_1_0.nbt +++ b/data/minecraft/structure/bastion/units/stages/rot/stage_1_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd9281ecdc9b9142f87d44158b855b97212a009cf65119e003a57807edbf025e +oid sha256:00045499792e2c29c1ba4cb903c38ea3c063f7daed14b5f2cfe510ca92f9e6a3 size 2401 diff --git a/data/minecraft/structure/bastion/units/stages/stage_0_0.nbt b/data/minecraft/structure/bastion/units/stages/stage_0_0.nbt index 3f165a26..73509c56 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_0_0.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_0_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3b49b88e2d1377a781ab15f5155efe5ff1142b638a0847fc11f78f79585c3d9e +oid sha256:7dd63869031ccd8d9689445882d8b5e979dc567dede365cb7710529ee9a356b9 size 2549 diff --git a/data/minecraft/structure/bastion/units/stages/stage_0_1.nbt b/data/minecraft/structure/bastion/units/stages/stage_0_1.nbt index 47e95094..b7bcffbc 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_0_1.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_0_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a1bd5bb6edab8a52ca4f7f07a27701a12463af1aa06585948a0a6dce1a5fd03 +oid sha256:55e1da3c9e3217970a33ee08bb9f8eb7891e785ae22ce5e3fa9221299d4834d8 size 2613 diff --git a/data/minecraft/structure/bastion/units/stages/stage_0_2.nbt b/data/minecraft/structure/bastion/units/stages/stage_0_2.nbt index c9695186..d636ec04 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_0_2.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_0_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:373f0346f0e46b666347067b943138718d7ec14cc62e811ecf3626d174ecaa8c +oid sha256:64fceff096932695e3a6183800ab9dd602eeb13c902de82da4903fac91b5774c size 2705 diff --git a/data/minecraft/structure/bastion/units/stages/stage_0_3.nbt b/data/minecraft/structure/bastion/units/stages/stage_0_3.nbt index e82ef61d..2e1bccd1 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_0_3.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_0_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1290c10d97ea115b568b46704929d236b9f4a689268ff0d4de9c49e2f02c41dd +oid sha256:f7b419d50a77b8e50bf0a2e279a4599f6ce0f2a1d42abeed0e873eb5f03afb5f size 2507 diff --git a/data/minecraft/structure/bastion/units/stages/stage_1_0.nbt b/data/minecraft/structure/bastion/units/stages/stage_1_0.nbt index b918f494..6665cb74 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_1_0.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_1_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:39e9324614338341e9564e2f5a0d134c032923b7c02ae93ed1450da937c9233a +oid sha256:b0a69168cfb16df2cd83a65f5221f631420dbe8e310b067f1947c05c4126827d size 2442 diff --git a/data/minecraft/structure/bastion/units/stages/stage_1_1.nbt b/data/minecraft/structure/bastion/units/stages/stage_1_1.nbt index 6cd151f3..b1c489c5 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_1_1.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_1_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fefdf7c2c4856052de2086b218378cfef62ccd07fab253fe2283b3645f7b236c +oid sha256:3be464f734063e79d54b3ce1d4e263caaca84938effb295542da1806f083f687 size 2422 diff --git a/data/minecraft/structure/bastion/units/stages/stage_1_2.nbt b/data/minecraft/structure/bastion/units/stages/stage_1_2.nbt index 5f43cabc..0ef8384a 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_1_2.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_1_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ebce140cf69b762ed132409b79dd8991275e2c3e6c52f3e912a183e78b464b85 +oid sha256:3d93160de32ef64c6fa1916b73212cadd4785170d2945c3c6e20eb6abd7fb97e size 2510 diff --git a/data/minecraft/structure/bastion/units/stages/stage_1_3.nbt b/data/minecraft/structure/bastion/units/stages/stage_1_3.nbt index d11763c2..dfb2f039 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_1_3.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_1_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a4baf957da5830ab023d560308bc5223ee8bb3d08a35d869fabf2ebfee65dbb +oid sha256:7ab1e07b29beba55c7556c8eb565c5747f1ffddb2ca6506c045d488de6ebcada size 2486 diff --git a/data/minecraft/structure/bastion/units/stages/stage_2_0.nbt b/data/minecraft/structure/bastion/units/stages/stage_2_0.nbt index 63fe27d5..58b88ffc 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_2_0.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_2_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e0282e5c86f6672375f0c8e799e571f5e0de84f9c18a7e179a7d0408e4dda0b2 +oid sha256:2a772c1c2d881302fa92e2fd49f310235cd1534ce2d5959fb7a3a7f55cef34ae size 2423 diff --git a/data/minecraft/structure/bastion/units/stages/stage_2_1.nbt b/data/minecraft/structure/bastion/units/stages/stage_2_1.nbt index 977e9e0d..eb140c8c 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_2_1.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_2_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:032fbd84e2eb264524bdbb528798643209c9be6452a76a6551a20581bd7b211b +oid sha256:b1156b93a87655fc14ad60817c159347992b6e9f393f68847df662652f1ca177 size 2461 diff --git a/data/minecraft/structure/bastion/units/stages/stage_3_0.nbt b/data/minecraft/structure/bastion/units/stages/stage_3_0.nbt index a000c2b7..958d16c7 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_3_0.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_3_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a3ba0c9f9ea4f58d00e64caa37a71d61b5e074fbe3bff952f27cec0a6e23594 +oid sha256:221a683f5a8aa9cc18b743ec3b471bcf7f374a1923b760d148cdb7acca6b9343 size 633 diff --git a/data/minecraft/structure/bastion/units/stages/stage_3_1.nbt b/data/minecraft/structure/bastion/units/stages/stage_3_1.nbt index 45639f72..5548795b 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_3_1.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_3_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1c066fc2c7915e4b7bc0890d442c3a5467637be3fe1d60a54e5b351a9f7f4618 +oid sha256:18b2ca8cd1e06d94b5bb32fbb5f1878aaa959c806cc1af86cbadd337476bb73b size 690 diff --git a/data/minecraft/structure/bastion/units/stages/stage_3_2.nbt b/data/minecraft/structure/bastion/units/stages/stage_3_2.nbt index b3b8dfeb..5dd24aa6 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_3_2.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_3_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3be666d479c1b728506fcdc649db31f0f2bd2f4d5dd2d2429203409e26df815 +oid sha256:fdc2948b152a5d3ea7dd1db159eaa422999a108c40772068f5515f105cdb3371 size 629 diff --git a/data/minecraft/structure/bastion/units/stages/stage_3_3.nbt b/data/minecraft/structure/bastion/units/stages/stage_3_3.nbt index 2bb41318..32f7e725 100644 --- a/data/minecraft/structure/bastion/units/stages/stage_3_3.nbt +++ b/data/minecraft/structure/bastion/units/stages/stage_3_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef8853229f229bd6c9e0f6b30e3d437891c6a2c4e0b8ae911a2d7f9b70a9d82b +oid sha256:1db05117f0120272414d0e0104ae09685b377a1146b4c0d1d31242e9c7e467e8 size 656 diff --git a/data/minecraft/structure/bastion/units/wall_units/edge_0_large.nbt b/data/minecraft/structure/bastion/units/wall_units/edge_0_large.nbt index 36225a3b..08f3c86b 100644 --- a/data/minecraft/structure/bastion/units/wall_units/edge_0_large.nbt +++ b/data/minecraft/structure/bastion/units/wall_units/edge_0_large.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:627e9fc5c9e678b39174071b6994ce74f75a9547a6c33fd8f96b140c3c106936 +oid sha256:2d02fa400bf401c9b898d9d4d0ef6c8313c434a083759c118065ae86c88fe240 size 2821 diff --git a/data/minecraft/structure/bastion/units/wall_units/unit_0.nbt b/data/minecraft/structure/bastion/units/wall_units/unit_0.nbt index 78fdfd44..465aaf9e 100644 --- a/data/minecraft/structure/bastion/units/wall_units/unit_0.nbt +++ b/data/minecraft/structure/bastion/units/wall_units/unit_0.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0657d71ee6a551f55384e7f5cc118510e299a46415f3647d61c29fb3964b3d2 +oid sha256:b9ed68f8045169e935dea6a25086065b43a541ec018ec7385ce1e1ff26f6b6f7 size 2500 diff --git a/data/minecraft/structure/bastion/units/walls/connected_wall.nbt b/data/minecraft/structure/bastion/units/walls/connected_wall.nbt index b94b3696..5259ff52 100644 --- a/data/minecraft/structure/bastion/units/walls/connected_wall.nbt +++ b/data/minecraft/structure/bastion/units/walls/connected_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:86351901fd9a1545631d568343254d3fdf85e1ac288a7354681663915fdefd04 +oid sha256:1006f25a4113449ef99ce200cdc1600158ff053778e15c5f0e553aad7435a5a5 size 15616 diff --git a/data/minecraft/structure/bastion/units/walls/wall_base.nbt b/data/minecraft/structure/bastion/units/walls/wall_base.nbt index 71fd4de6..9258b9e5 100644 --- a/data/minecraft/structure/bastion/units/walls/wall_base.nbt +++ b/data/minecraft/structure/bastion/units/walls/wall_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b358d44fdd4f7caae900a6bea9d7a4e7e3ce0eba3f6d4c0c2bdb0fe002dbe172 +oid sha256:b5e17565ce8493388fcf145b6cb12036ff70a40a44934a04beeab87a046b4be6 size 16904 diff --git a/data/minecraft/structure/end_city/base_floor.nbt b/data/minecraft/structure/end_city/base_floor.nbt index 29ae5b2f..09d5ff9b 100644 --- a/data/minecraft/structure/end_city/base_floor.nbt +++ b/data/minecraft/structure/end_city/base_floor.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f73f14beb56a6e547b5f77a0ac2f8b4ecba308af1c89b50b0fc1d66509d761ff +oid sha256:38317c4411beabb660c9148388b857cc2fcd365da5b48d7e88af023de2a81624 size 1686 diff --git a/data/minecraft/structure/end_city/base_roof.nbt b/data/minecraft/structure/end_city/base_roof.nbt index e32cf519..c0dac588 100644 --- a/data/minecraft/structure/end_city/base_roof.nbt +++ b/data/minecraft/structure/end_city/base_roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:114249f428665f22339775eac92ef47eb4ef5203a71062db9fc652f78d6545c1 +oid sha256:a533f8b2809a084e6b5b7ee4a9cb263c722ddd7c498041a05217df7d16e5fc95 size 1180 diff --git a/data/minecraft/structure/end_city/bridge_end.nbt b/data/minecraft/structure/end_city/bridge_end.nbt index d4d4ace7..665880c1 100644 --- a/data/minecraft/structure/end_city/bridge_end.nbt +++ b/data/minecraft/structure/end_city/bridge_end.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:05e0e71d7860375b6a9620e1b2b178fdf770cafd57b43daa61cb33302f0b2b88 +oid sha256:4714bdff07a0ec8e9a18ec2870c8d5451ad78741495ddc940b3ff95f2b95bee5 size 475 diff --git a/data/minecraft/structure/end_city/bridge_gentle_stairs.nbt b/data/minecraft/structure/end_city/bridge_gentle_stairs.nbt index 9b7d7424..281917ac 100644 --- a/data/minecraft/structure/end_city/bridge_gentle_stairs.nbt +++ b/data/minecraft/structure/end_city/bridge_gentle_stairs.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ca99c4fb7a87ffc397e3bebcce7633d38503054b6c44e5807f1c5d8d686f0da +oid sha256:74ee7121b2fcdc4d3006026b265a355960526aae14bc06c7230c797a4ab5e36b size 1142 diff --git a/data/minecraft/structure/end_city/bridge_piece.nbt b/data/minecraft/structure/end_city/bridge_piece.nbt index 06f63093..bea24e05 100644 --- a/data/minecraft/structure/end_city/bridge_piece.nbt +++ b/data/minecraft/structure/end_city/bridge_piece.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac92987005fc3f4db328692d050b012796ada361af2df85a045769fa9850089e +oid sha256:6d36bf17a981e53c16d8e011dfe1893e7af5866c5f8d83a6cc388a21fef11c30 size 599 diff --git a/data/minecraft/structure/end_city/bridge_steep_stairs.nbt b/data/minecraft/structure/end_city/bridge_steep_stairs.nbt index 8e44acbd..30066040 100644 --- a/data/minecraft/structure/end_city/bridge_steep_stairs.nbt +++ b/data/minecraft/structure/end_city/bridge_steep_stairs.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c262c8a1c9156d1636b7b88c4a2f2fa71dd1bad44a3a5b98fc079e9a036f2ac3 +oid sha256:124f3a0f8d981b50b7dd7a583cbc0e65bf6a4894a6f30e326e4d53407e11122a size 714 diff --git a/data/minecraft/structure/end_city/fat_tower_base.nbt b/data/minecraft/structure/end_city/fat_tower_base.nbt index c4eab369..5de021ec 100644 --- a/data/minecraft/structure/end_city/fat_tower_base.nbt +++ b/data/minecraft/structure/end_city/fat_tower_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:277190e1112861d4de008c6fdfa50b3262cbef03116104af40f5115af35f5abe +oid sha256:73e420c6113aa0cb4779b7916247eac7879ec8ea5fa6148afaeb27f51fa0cefc size 2338 diff --git a/data/minecraft/structure/end_city/fat_tower_middle.nbt b/data/minecraft/structure/end_city/fat_tower_middle.nbt index 16ef60b5..e94cb014 100644 --- a/data/minecraft/structure/end_city/fat_tower_middle.nbt +++ b/data/minecraft/structure/end_city/fat_tower_middle.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d38e4f20b54cd09770993234554f4b6a8c519eb00a82508a67b516aeada35a24 +oid sha256:fb5edd25975a892a71fc1d0bf6dcc79350b89f258960f0d6dbb78eb2f8caca81 size 4468 diff --git a/data/minecraft/structure/end_city/fat_tower_top.nbt b/data/minecraft/structure/end_city/fat_tower_top.nbt index c12c25e0..c8b6c7f5 100644 --- a/data/minecraft/structure/end_city/fat_tower_top.nbt +++ b/data/minecraft/structure/end_city/fat_tower_top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd3863e0cd4b9880d97a923616b5535d2b662404501f14e93cf7d6824e21c235 +oid sha256:8829622de14e4de10181c6b37eb6e8891114b8450f986080319918d151608fce size 5959 diff --git a/data/minecraft/structure/end_city/second_floor_1.nbt b/data/minecraft/structure/end_city/second_floor_1.nbt index 6d6c1b56..da5819fa 100644 --- a/data/minecraft/structure/end_city/second_floor_1.nbt +++ b/data/minecraft/structure/end_city/second_floor_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:49162dc106c7daa10ee941ea2bee1961cc265f2d6d7a5a94e64ed167abf61eb1 +oid sha256:a6df6562d733c2b7c53edd2e13e683a60c9487d6ea5db418f8b4845f80e1a124 size 3716 diff --git a/data/minecraft/structure/end_city/second_floor_2.nbt b/data/minecraft/structure/end_city/second_floor_2.nbt index 433ef919..65fbb548 100644 --- a/data/minecraft/structure/end_city/second_floor_2.nbt +++ b/data/minecraft/structure/end_city/second_floor_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7763c508c3cac924b56b034f8d7d83ebc7a19de8ca2697d1ea6a27a775738cf3 +oid sha256:9b2ed03aa52dff8a48d4416a2e288275f27e55b4611ca57b23efbd0873cafbfa size 3970 diff --git a/data/minecraft/structure/end_city/second_roof.nbt b/data/minecraft/structure/end_city/second_roof.nbt index 5faf84b2..13c83a93 100644 --- a/data/minecraft/structure/end_city/second_roof.nbt +++ b/data/minecraft/structure/end_city/second_roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d1b55c6b93b0272d2c7ddbebdd9769d684507cea22fd6de9162b2c7e570517a +oid sha256:adb01c24873fd50b831cabc75d349d7834988e2007046d20d105036553a8eef4 size 1426 diff --git a/data/minecraft/structure/end_city/ship.nbt b/data/minecraft/structure/end_city/ship.nbt index 666ba3b4..4d6f2bce 100644 --- a/data/minecraft/structure/end_city/ship.nbt +++ b/data/minecraft/structure/end_city/ship.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a10cd74d81a6c78c028efabe783cf733f24607256a98b495a960657716a2fbd +oid sha256:5de128a547cdac71d45e65aed186dfd463eb380612841cdc71e2d7ee90dc3ed3 size 26445 diff --git a/data/minecraft/structure/end_city/third_floor_1.nbt b/data/minecraft/structure/end_city/third_floor_1.nbt index 1be6c846..f5a65f73 100644 --- a/data/minecraft/structure/end_city/third_floor_1.nbt +++ b/data/minecraft/structure/end_city/third_floor_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d85e1023a0af383345755f2e690f33fa1eeb8a88ee9915fb4fa98d989890813c +oid sha256:6e29a3b1f7304f093b8961f979dfcd6c6314f673fa9771f6c8c8cbd385238f0d size 4787 diff --git a/data/minecraft/structure/end_city/third_floor_2.nbt b/data/minecraft/structure/end_city/third_floor_2.nbt index dbbc0010..b990ee82 100644 --- a/data/minecraft/structure/end_city/third_floor_2.nbt +++ b/data/minecraft/structure/end_city/third_floor_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:041362b9408406912e823120389c7de998fd47f36fee67aa2d51e4095939acbd +oid sha256:5ba4997b74c3f187064eb97e17e10b52ac264198ac4dc1e2af9cb21133705d77 size 5159 diff --git a/data/minecraft/structure/end_city/third_roof.nbt b/data/minecraft/structure/end_city/third_roof.nbt index 56a51d32..810e1c63 100644 --- a/data/minecraft/structure/end_city/third_roof.nbt +++ b/data/minecraft/structure/end_city/third_roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c78151fb7e1102ed45ee4c8b0d7103e7d31a56031d78de2f4d16ad14f5354d81 +oid sha256:a43bffa7c26f8bfe9af7b013bfc1400b0f5f23f8393c3358595bcd0216071a36 size 1831 diff --git a/data/minecraft/structure/end_city/tower_base.nbt b/data/minecraft/structure/end_city/tower_base.nbt index c77157a2..a572f9d9 100644 --- a/data/minecraft/structure/end_city/tower_base.nbt +++ b/data/minecraft/structure/end_city/tower_base.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ce5bec94eaf36e8cb938a4401a9d1357e2b2885c3a2c46d5caeaa1a363b35cf +oid sha256:b9bebe45cb98ece6ab5e0960b929d35553d5ccb4b105dd30d78b890c4e63b3b6 size 934 diff --git a/data/minecraft/structure/end_city/tower_floor.nbt b/data/minecraft/structure/end_city/tower_floor.nbt index 613de52a..3aed7dda 100644 --- a/data/minecraft/structure/end_city/tower_floor.nbt +++ b/data/minecraft/structure/end_city/tower_floor.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb7818af19334c7f9abc4977ee913b74379587c0c25489549eb0e0a28a0b6d21 +oid sha256:43d4ba07124cacaeea6c963bab37cc69025b236e71cde810ac0b97f9dd9ccf7a size 980 diff --git a/data/minecraft/structure/end_city/tower_piece.nbt b/data/minecraft/structure/end_city/tower_piece.nbt index 45eeb142..456fcd72 100644 --- a/data/minecraft/structure/end_city/tower_piece.nbt +++ b/data/minecraft/structure/end_city/tower_piece.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a48880980182ea7961a89aaf5e861ff374b0738966e80eba06368b03d3e81997 +oid sha256:111d9d2acb926631536b95b176b6703338eeaa773aebf297270e0e9e9c245cbb size 898 diff --git a/data/minecraft/structure/end_city/tower_top.nbt b/data/minecraft/structure/end_city/tower_top.nbt index 173b1cc7..6835703e 100644 --- a/data/minecraft/structure/end_city/tower_top.nbt +++ b/data/minecraft/structure/end_city/tower_top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1805a17a265d4bb3a192cd483bfc172ee92f524cc56ebba112f9b343ef4063c6 +oid sha256:0ffcecb5ec2f27894f9d99142289463377bc1e4b18174bc3f8f7e116eaacbacb size 2036 diff --git a/data/minecraft/structure/fossil/skull_1.nbt b/data/minecraft/structure/fossil/skull_1.nbt index 33c96b19..f89f5e3a 100644 --- a/data/minecraft/structure/fossil/skull_1.nbt +++ b/data/minecraft/structure/fossil/skull_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e45e8819923b7f13518ec19fdfd6c27e4febf4ea2e1d8076525a18d0f4107711 +oid sha256:8fb4a28610867ff570a3152cbabd15107a027460b4b803a303b89e2c7b522504 size 442 diff --git a/data/minecraft/structure/fossil/skull_1_coal.nbt b/data/minecraft/structure/fossil/skull_1_coal.nbt index b12c4b7d..e2317343 100644 --- a/data/minecraft/structure/fossil/skull_1_coal.nbt +++ b/data/minecraft/structure/fossil/skull_1_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c30316d9a9ed59ff913e316961dbffd049c44fa6c1028fc76ea9b11bd1b6baca +oid sha256:a40466271c2c49386acb08b65025d15edbc4f8764a495dde62d0beef33f61002 size 397 diff --git a/data/minecraft/structure/fossil/skull_2.nbt b/data/minecraft/structure/fossil/skull_2.nbt index 65baf570..7438d756 100644 --- a/data/minecraft/structure/fossil/skull_2.nbt +++ b/data/minecraft/structure/fossil/skull_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d780f145b5758d32b9445bada31d4fb68b94c9b34849e56c71df8f59927f514 +oid sha256:bc5ff98f9ab592652cd9522e3d69044c0068658fb6665842263ca39ccd746171 size 398 diff --git a/data/minecraft/structure/fossil/skull_2_coal.nbt b/data/minecraft/structure/fossil/skull_2_coal.nbt index 756348dd..714f36e3 100644 --- a/data/minecraft/structure/fossil/skull_2_coal.nbt +++ b/data/minecraft/structure/fossil/skull_2_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fb8c4f64e70f878c39cb037be6114e8d1582f531e30c153eb9b1a97e25828c86 +oid sha256:d8538dc084dee5f794d7756959d15075d5859b6f55301db50501aa2d0d10964a size 346 diff --git a/data/minecraft/structure/fossil/skull_3.nbt b/data/minecraft/structure/fossil/skull_3.nbt index 1e8901fb..14aeb1c0 100644 --- a/data/minecraft/structure/fossil/skull_3.nbt +++ b/data/minecraft/structure/fossil/skull_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edcf23bb1204af42c739452df2ec0434adb2fd5e393c05902b2bd6853130a766 +oid sha256:3321f683bb3b0054365927b71af7bdbba0d43c9b734ad85eb5d44506530429e3 size 348 diff --git a/data/minecraft/structure/fossil/skull_3_coal.nbt b/data/minecraft/structure/fossil/skull_3_coal.nbt index 6e6e0d9a..a39e16be 100644 --- a/data/minecraft/structure/fossil/skull_3_coal.nbt +++ b/data/minecraft/structure/fossil/skull_3_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53b722d72a42e8b604512b55f3e14cbfeed3dd8339f53194664ba765ff9ccfc8 +oid sha256:bebcfca8508e844a1cfe13474a24cf835987da64c27f0e6bf5cf9035778e3041 size 318 diff --git a/data/minecraft/structure/fossil/skull_4.nbt b/data/minecraft/structure/fossil/skull_4.nbt index fa8b71f3..79631e56 100644 --- a/data/minecraft/structure/fossil/skull_4.nbt +++ b/data/minecraft/structure/fossil/skull_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:15d7121bdcc368c203a98a91521f3e30b0307405227794de488ad055fdac4bc4 +oid sha256:9f3b638c0a3dc01b07486e4ec9f1828949eeec48e8ac9385292dd42bc0c8a3a8 size 270 diff --git a/data/minecraft/structure/fossil/skull_4_coal.nbt b/data/minecraft/structure/fossil/skull_4_coal.nbt index 545cfbf4..e3ac88d9 100644 --- a/data/minecraft/structure/fossil/skull_4_coal.nbt +++ b/data/minecraft/structure/fossil/skull_4_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:83e99cc11abe3cd079f3adc645cff4c524fe6e0c5e5ab804e2697a75a8d2f06c +oid sha256:0ff1f3e896b3fea4c2e17cdf96ac11191c8395da36d885ce52927d2d64121ffe size 236 diff --git a/data/minecraft/structure/fossil/spine_1.nbt b/data/minecraft/structure/fossil/spine_1.nbt index a844b8c0..a84a805b 100644 --- a/data/minecraft/structure/fossil/spine_1.nbt +++ b/data/minecraft/structure/fossil/spine_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d7fc20618d688ebdc753c60aeae011ebe4eba480aead161c99bd6b5512c7e38 +oid sha256:8d2899ca64f8b7dd1ed5f672ffb128f8a74f18ed6c821a363a9f6f618fa5c3c5 size 272 diff --git a/data/minecraft/structure/fossil/spine_1_coal.nbt b/data/minecraft/structure/fossil/spine_1_coal.nbt index f985fdd7..2a59bc3c 100644 --- a/data/minecraft/structure/fossil/spine_1_coal.nbt +++ b/data/minecraft/structure/fossil/spine_1_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf320d380148dc42f05f29359ef8de68e89ec67d31e506ef4077e5016d4fd5d8 +oid sha256:b8e9c31bc4b397880df4646ca6993ea364182bc437e0fe76dc82bf71e7ab70e1 size 252 diff --git a/data/minecraft/structure/fossil/spine_2.nbt b/data/minecraft/structure/fossil/spine_2.nbt index ad12c3e7..b5dc4b4e 100644 --- a/data/minecraft/structure/fossil/spine_2.nbt +++ b/data/minecraft/structure/fossil/spine_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:932c29607194dfcf1209ecf8a921e379bbb2f0546b2461278b7fcf2554e6f195 +oid sha256:c0757f65ef5d55a3b50f25fff5a4ce93377c4c2118a8a2b5faef6453bec53d09 size 361 diff --git a/data/minecraft/structure/fossil/spine_2_coal.nbt b/data/minecraft/structure/fossil/spine_2_coal.nbt index 962d9a2c..52f6a8ae 100644 --- a/data/minecraft/structure/fossil/spine_2_coal.nbt +++ b/data/minecraft/structure/fossil/spine_2_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e9241eb4a07580ea4d4d8e653fb1937c0a7125ec8ea50dbc9c345d86d8cf1cb +oid sha256:8e1393d71a57777bf69ce1f2c1954b8387cb10b229aeefef995e2c484d3edbef size 325 diff --git a/data/minecraft/structure/fossil/spine_3.nbt b/data/minecraft/structure/fossil/spine_3.nbt index 4db1b9ee..e38120aa 100644 --- a/data/minecraft/structure/fossil/spine_3.nbt +++ b/data/minecraft/structure/fossil/spine_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:69d4c4a009c977a440e8869f58e326e37cef1cffff5d865b0b98e4a77b6954a6 +oid sha256:4178ee0578ea8d45dacbc97aeed9a38e97f98eaeeae0121cd3b30373d3857fb6 size 457 diff --git a/data/minecraft/structure/fossil/spine_3_coal.nbt b/data/minecraft/structure/fossil/spine_3_coal.nbt index 8407d37d..c5e6cb28 100644 --- a/data/minecraft/structure/fossil/spine_3_coal.nbt +++ b/data/minecraft/structure/fossil/spine_3_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df04841de7c3fce88bd401735bf06a607a90f78edfd3bdf3a6e7b0456a8b74a4 +oid sha256:66d2c7f713cafb40ad18ecefc7bb00e51f2fad42686ff4bae64399351ed89da1 size 437 diff --git a/data/minecraft/structure/fossil/spine_4.nbt b/data/minecraft/structure/fossil/spine_4.nbt index 49ed0606..7077d241 100644 --- a/data/minecraft/structure/fossil/spine_4.nbt +++ b/data/minecraft/structure/fossil/spine_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cfa80c34058c03ac3c7d68072c98ad06ebf617e0d645dd1856f107954d4d8ecd +oid sha256:b11b6e1894477ca4589e0cd251d38533cbccf1340a23e5f86e34df622ec67017 size 529 diff --git a/data/minecraft/structure/fossil/spine_4_coal.nbt b/data/minecraft/structure/fossil/spine_4_coal.nbt index cb3e6598..1eda52b3 100644 --- a/data/minecraft/structure/fossil/spine_4_coal.nbt +++ b/data/minecraft/structure/fossil/spine_4_coal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d4b201b8e7c22ac4e51e84805cf86ddb3e44025c47add361e7f2520e1fffc605 +oid sha256:e14bfa04dc8d0a4f50f618059d32a69aaa25fa57b425a01ffd1c68c7c684031d size 482 diff --git a/data/minecraft/structure/igloo/bottom.nbt b/data/minecraft/structure/igloo/bottom.nbt index 21c1bca0..d8fb11d9 100644 --- a/data/minecraft/structure/igloo/bottom.nbt +++ b/data/minecraft/structure/igloo/bottom.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0553c38640e4a323ebe05adb56d8785eb3865d170ac4b642ddbaf7ca06a34c8c +oid sha256:80bd9f4b9eb4f4727c0018db9cfb5430ef1358fc02fbd05753bf75fdccd3922a size 2772 diff --git a/data/minecraft/structure/igloo/middle.nbt b/data/minecraft/structure/igloo/middle.nbt index 95e2b05c..19bb0ac0 100644 --- a/data/minecraft/structure/igloo/middle.nbt +++ b/data/minecraft/structure/igloo/middle.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7b140192bc7718cd4b522dc41a868ad2c3c36ba9703f894b76b620be7cdd72b +oid sha256:6b5e53846bf2c777fb8b7350cada24212bd1508399b997667be2dc4c9b058bad size 237 diff --git a/data/minecraft/structure/igloo/top.nbt b/data/minecraft/structure/igloo/top.nbt index dc88c5e3..c7e35957 100644 --- a/data/minecraft/structure/igloo/top.nbt +++ b/data/minecraft/structure/igloo/top.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd7f5cf13ded12f99e50a8473aa96c0dcce74c65ec902910f78fa24be660a650 +oid sha256:7738f9a9560607463bc750c327977cde4c3ce24c634e9ffe0cb0f06c9253ca59 size 910 diff --git a/data/minecraft/structure/nether_fossils/fossil_1.nbt b/data/minecraft/structure/nether_fossils/fossil_1.nbt index eac0e128..1a89b26e 100644 --- a/data/minecraft/structure/nether_fossils/fossil_1.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:885a4c20cf9b8cce25fc8e23a93102c38eea7ac8e14630e0779dcc21f40c027d +oid sha256:f5b1ecc103d2a7c54e27fb74865891e98d85465bab1dcd9ecf5fdd96d53c61a3 size 398 diff --git a/data/minecraft/structure/nether_fossils/fossil_10.nbt b/data/minecraft/structure/nether_fossils/fossil_10.nbt index 377536bf..0e8cbf53 100644 --- a/data/minecraft/structure/nether_fossils/fossil_10.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_10.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:776de632ae2c92821da9ed99c86870b6b9c36befb94b3dace94a754d9ecff821 +oid sha256:2264c6165bc9eb8c568dfcf66e3ef581dc1cc1d7d324a77fbe28379820479362 size 238 diff --git a/data/minecraft/structure/nether_fossils/fossil_11.nbt b/data/minecraft/structure/nether_fossils/fossil_11.nbt index 2211814f..413e28ce 100644 --- a/data/minecraft/structure/nether_fossils/fossil_11.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_11.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9dd1caf1f1d422080f25942cc3384f00edd2dac18724229460ff10bcfb95ab3 +oid sha256:8438c348b1a9abfff6a3c25efeae315e1a867ca733b51359a20595292d6f9670 size 675 diff --git a/data/minecraft/structure/nether_fossils/fossil_12.nbt b/data/minecraft/structure/nether_fossils/fossil_12.nbt index 7ade2895..ef801e99 100644 --- a/data/minecraft/structure/nether_fossils/fossil_12.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_12.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac034a97f757949982aab1b94feb6e578be87055f00f970473b04b83c1cb6b04 +oid sha256:65a8cd48d59797e5d4b72819737a7792c4d6518fe0b02b74d35dc2c2cd776b03 size 317 diff --git a/data/minecraft/structure/nether_fossils/fossil_13.nbt b/data/minecraft/structure/nether_fossils/fossil_13.nbt index c74e6036..7cb3d6ed 100644 --- a/data/minecraft/structure/nether_fossils/fossil_13.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_13.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab5084703dc40d8d5c38735b6bdc3d2e14f9b9812228baf36389fa2b509bb99b +oid sha256:880eb13fa9d81ee65422fc9622cca740501178a9653e8af34915781bb245064d size 525 diff --git a/data/minecraft/structure/nether_fossils/fossil_14.nbt b/data/minecraft/structure/nether_fossils/fossil_14.nbt index 9401d05d..e8aa0730 100644 --- a/data/minecraft/structure/nether_fossils/fossil_14.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_14.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ecb7b50c8ac9ad2657ff5c9f5d712bdc6fdf896d7b022c716204a7b8dd57697 +oid sha256:d38a3b4fdc66f092b41bf61609033afb3e28d7a55c758262d51812a4f22babd2 size 938 diff --git a/data/minecraft/structure/nether_fossils/fossil_2.nbt b/data/minecraft/structure/nether_fossils/fossil_2.nbt index 2cf985a0..e640bd1e 100644 --- a/data/minecraft/structure/nether_fossils/fossil_2.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:993781e7acd89b2dc1c0ca8495cdb7161e2cd604e02ddad5e7abefcf8fb5ade0 +oid sha256:cfd8a862c491be461c13bcb8eea7e6396e649ce71ad175dd9528f9ec405d9241 size 259 diff --git a/data/minecraft/structure/nether_fossils/fossil_3.nbt b/data/minecraft/structure/nether_fossils/fossil_3.nbt index ade5edfa..098463f8 100644 --- a/data/minecraft/structure/nether_fossils/fossil_3.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78c8a34c0af74b4db78b62e601206ba7084c948126de66ce4793c0571eebc527 +oid sha256:c20621eb7d31c05d57b28c084d9f4c7945cd102404e7559099aaaa5b14d11548 size 249 diff --git a/data/minecraft/structure/nether_fossils/fossil_4.nbt b/data/minecraft/structure/nether_fossils/fossil_4.nbt index ecb611e6..b17310fb 100644 --- a/data/minecraft/structure/nether_fossils/fossil_4.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:220cd5a5bddc97e2d2b263d117deec210f981fff9531880a6a64cbb76bc0b6d9 +oid sha256:9adecb6a6ed846b74de9a062fedc6b78f4ed93a44095a05a3dca3edbb11ab72e size 212 diff --git a/data/minecraft/structure/nether_fossils/fossil_5.nbt b/data/minecraft/structure/nether_fossils/fossil_5.nbt index 84a0310d..132decca 100644 --- a/data/minecraft/structure/nether_fossils/fossil_5.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cad31cc1b3a0c3e5c074ac5d7639e2a337df915da104fc92ec12bb9896445d7c +oid sha256:aa8ee153cd529a45697f60f94cb4be3c83a1ee9fab6da41381ae4d64d7ce232b size 206 diff --git a/data/minecraft/structure/nether_fossils/fossil_6.nbt b/data/minecraft/structure/nether_fossils/fossil_6.nbt index 6fd6d3f9..e4aa9386 100644 --- a/data/minecraft/structure/nether_fossils/fossil_6.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cdc4021b10937c8671cfdd1942b39dc1ae164397dff812072af73c095ecd8380 +oid sha256:eaf582316ae3154d532aefe659ec651633bd35384d5dd47ba8413b88adf114e8 size 631 diff --git a/data/minecraft/structure/nether_fossils/fossil_7.nbt b/data/minecraft/structure/nether_fossils/fossil_7.nbt index c4c77e74..2ab319cb 100644 --- a/data/minecraft/structure/nether_fossils/fossil_7.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf85f1cfd170bb4f152d849739d2ec8a8bf402983010610ec5048795a798d6be +oid sha256:041285cdc089848f943c64f84345812f02169c55fef3b3a7b2ceac23f9d8c31d size 510 diff --git a/data/minecraft/structure/nether_fossils/fossil_8.nbt b/data/minecraft/structure/nether_fossils/fossil_8.nbt index de952158..fe9d98a5 100644 --- a/data/minecraft/structure/nether_fossils/fossil_8.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ecdbd74f846c00f11a5fbdef57939ddbda643a6bfe7e2db7c4e0ed0177da7cbb +oid sha256:2621e8eac6c5f64e07d09a20cd4069fcd204a080ae578f18f510ebbd371281d8 size 221 diff --git a/data/minecraft/structure/nether_fossils/fossil_9.nbt b/data/minecraft/structure/nether_fossils/fossil_9.nbt index 6e70d1c9..d993ead5 100644 --- a/data/minecraft/structure/nether_fossils/fossil_9.nbt +++ b/data/minecraft/structure/nether_fossils/fossil_9.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:06ddb89e9e305d6d98e2f429fbfe2640a2c2cd0b4613c36b1dbeb115fb0eb3e7 +oid sha256:dc48c3da24634da34447b0907130d3d7700fd1ab735e856e15591bc1d0388b64 size 395 diff --git a/data/minecraft/structure/pillager_outpost/base_plate.nbt b/data/minecraft/structure/pillager_outpost/base_plate.nbt index 31caf654..caf70ac2 100644 --- a/data/minecraft/structure/pillager_outpost/base_plate.nbt +++ b/data/minecraft/structure/pillager_outpost/base_plate.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:87e5ec2601bdb6ad40bffb02e1ad0189c5f8699546ad71c36d9b7045a31c8155 +oid sha256:73fe3cd4c75755179b5d87144f6c067d5684a6dcd410b29b3442954f9ce1ca1f size 19282 diff --git a/data/minecraft/structure/pillager_outpost/feature_cage1.nbt b/data/minecraft/structure/pillager_outpost/feature_cage1.nbt index eddddc4c..c134ce72 100644 --- a/data/minecraft/structure/pillager_outpost/feature_cage1.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_cage1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5677da0753b82e02497960d3d41f95b1cbd11d8421b3a1670705f2cfb67a5a17 +oid sha256:2bdf1ed8ac7ac394270f2f5580ed78f729528e88e1ac00db96ff64c5004c7b77 size 1666 diff --git a/data/minecraft/structure/pillager_outpost/feature_cage2.nbt b/data/minecraft/structure/pillager_outpost/feature_cage2.nbt index e437c8b6..4b2c95df 100644 --- a/data/minecraft/structure/pillager_outpost/feature_cage2.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_cage2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:204e2c021427d2872d29bb75840e4729ad36a5ad51575db0750f9c62b9b885cc +oid sha256:b0cf5230b47cc6af7f598fed6409bbd903ee6a47458ec41ad916d2b104761b73 size 1032 diff --git a/data/minecraft/structure/pillager_outpost/feature_cage_with_allays.nbt b/data/minecraft/structure/pillager_outpost/feature_cage_with_allays.nbt index a4e00855..578602ff 100644 --- a/data/minecraft/structure/pillager_outpost/feature_cage_with_allays.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_cage_with_allays.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2917a5ec67e9a8af746e40e81d933b6a7eb80919129d3259a0efe7f1d95aed06 +oid sha256:9a69bdb2ea13127e513115e0cfd820171c8d2ca1ac9278f430988e6437a51732 size 1791 diff --git a/data/minecraft/structure/pillager_outpost/feature_logs.nbt b/data/minecraft/structure/pillager_outpost/feature_logs.nbt index c1540d27..5ea241d2 100644 --- a/data/minecraft/structure/pillager_outpost/feature_logs.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_logs.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7fc3a2746ea19a737a0506b8f1d750a10f6a4c3f9fc46a3df9d8afd736b686af +oid sha256:a637707517e7d60e5b31b20cc678d086b19db90cc1568df2a5527277e5b9a8ea size 659 diff --git a/data/minecraft/structure/pillager_outpost/feature_plate.nbt b/data/minecraft/structure/pillager_outpost/feature_plate.nbt index 1e89b4a1..e5c3e012 100644 --- a/data/minecraft/structure/pillager_outpost/feature_plate.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_plate.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16f769a977f8cae5ab50e37ea487a9e4dc267ae8f08458692db0af53520038d8 +oid sha256:51bdade770803100ea275091ce9c2598bb853711d47aef97554577c1dff70460 size 6039 diff --git a/data/minecraft/structure/pillager_outpost/feature_targets.nbt b/data/minecraft/structure/pillager_outpost/feature_targets.nbt index 7681b9ce..8df53cbf 100644 --- a/data/minecraft/structure/pillager_outpost/feature_targets.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_targets.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:110d83625e62674990558c0beca0a9ecdba545b4e0843644871f50e5a5af1640 +oid sha256:fd096052b3bd1a62502c974dad1517dbb9eb5bf6b6a2c683e81ae04df3a3553a size 579 diff --git a/data/minecraft/structure/pillager_outpost/feature_tent1.nbt b/data/minecraft/structure/pillager_outpost/feature_tent1.nbt index 0f14e8e0..b33f6418 100644 --- a/data/minecraft/structure/pillager_outpost/feature_tent1.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_tent1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:89a56119aa0d491c8b8146248e81547a4c1ff39c7435a7a2bf14f1b1aebae65d +oid sha256:3954d87f8d4aeff5aa977aa7906162c5fe937a9c801259880fdcb13acfe6043f size 858 diff --git a/data/minecraft/structure/pillager_outpost/feature_tent2.nbt b/data/minecraft/structure/pillager_outpost/feature_tent2.nbt index 6873eff6..5390d4ce 100644 --- a/data/minecraft/structure/pillager_outpost/feature_tent2.nbt +++ b/data/minecraft/structure/pillager_outpost/feature_tent2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a48fe62baf5a0e2a168c7c5892b3f08466f457d98ea7c7a8fb601d19902d4eb +oid sha256:0671e5dd3ee5571507d22b4b414e0f3c01651b9ae6f54f6bbc087b85cc3a664c size 869 diff --git a/data/minecraft/structure/pillager_outpost/watchtower.nbt b/data/minecraft/structure/pillager_outpost/watchtower.nbt index 3c848e88..2e57c3a9 100644 --- a/data/minecraft/structure/pillager_outpost/watchtower.nbt +++ b/data/minecraft/structure/pillager_outpost/watchtower.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b4e2620c18527936ba2e2c6cec9368d8e3155c1b330ce7e0b4c156caff6bd5da +oid sha256:525814cd903dd3c5688621410caca1c46661e4c37419be9aeb4e1026fbce6855 size 14626 diff --git a/data/minecraft/structure/pillager_outpost/watchtower_overgrown.nbt b/data/minecraft/structure/pillager_outpost/watchtower_overgrown.nbt index 77bccaa0..293477a2 100644 --- a/data/minecraft/structure/pillager_outpost/watchtower_overgrown.nbt +++ b/data/minecraft/structure/pillager_outpost/watchtower_overgrown.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:80e18cf7f882ccba80ebfc7bfc6e0133ea8e8151054036d0ea4c3525f12f225a +oid sha256:9cc3f2073f758fd7ddbfa4ae8bf01d2615a0e9f3d1663e4b91b54b007137008d size 16066 diff --git a/data/minecraft/structure/ruined_portal/giant_portal_1.nbt b/data/minecraft/structure/ruined_portal/giant_portal_1.nbt index b0183310..b8e262d3 100644 --- a/data/minecraft/structure/ruined_portal/giant_portal_1.nbt +++ b/data/minecraft/structure/ruined_portal/giant_portal_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5aec7645e05d67657f6bb88a22c4546af54b4f9b9339501efa2218dc96969199 +oid sha256:3c1e439f309384071d82fc80bf8fc0962823ad0805d8438c26dd6aa7617685fb size 7200 diff --git a/data/minecraft/structure/ruined_portal/giant_portal_2.nbt b/data/minecraft/structure/ruined_portal/giant_portal_2.nbt index 937ae692..215afbd5 100644 --- a/data/minecraft/structure/ruined_portal/giant_portal_2.nbt +++ b/data/minecraft/structure/ruined_portal/giant_portal_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aa1c69163523762d422ddadeb4a5b814a81f7c0e2ba6f62ce83d0c8a4d03a0d9 +oid sha256:0f4813802d8df26f14a871fa7d516b7fb7c4b76d755adba3d0636f3ee30ca2cb size 6839 diff --git a/data/minecraft/structure/ruined_portal/giant_portal_3.nbt b/data/minecraft/structure/ruined_portal/giant_portal_3.nbt index 45af5ea5..133b0bda 100644 --- a/data/minecraft/structure/ruined_portal/giant_portal_3.nbt +++ b/data/minecraft/structure/ruined_portal/giant_portal_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0d9c8665f70f51a76ff99bcaaffbdd5c9ff131ffb5a7c9dc4f17c234f3bfc00 +oid sha256:92ed1de4f5f1ef91e1a9955bfeaa91776f68cba3d671e09a3eccf9fce43b2bca size 9899 diff --git a/data/minecraft/structure/ruined_portal/portal_1.nbt b/data/minecraft/structure/ruined_portal/portal_1.nbt index 143a1a78..987b003c 100644 --- a/data/minecraft/structure/ruined_portal/portal_1.nbt +++ b/data/minecraft/structure/ruined_portal/portal_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:66359653058b61ded78b6a2cb795fed0106d5e31ba430137adf6f2ec16184d95 +oid sha256:0b6e1eaee2d793e6c52fd18cfecdd0bd18d4ecc392f5bb37d287e5628b9a457d size 1431 diff --git a/data/minecraft/structure/ruined_portal/portal_10.nbt b/data/minecraft/structure/ruined_portal/portal_10.nbt index 3f406e2f..9cf42b4d 100644 --- a/data/minecraft/structure/ruined_portal/portal_10.nbt +++ b/data/minecraft/structure/ruined_portal/portal_10.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8473c776d52707a1c25dbaf2a49f19f4beed16ca5536a375f3fbcb880de5337a +oid sha256:eb983710dcfa8f9cb3e5ad8adbe560cddde6f05973f31b9dc9da23ad1a009e4a size 2879 diff --git a/data/minecraft/structure/ruined_portal/portal_2.nbt b/data/minecraft/structure/ruined_portal/portal_2.nbt index 661a6892..733ab6fd 100644 --- a/data/minecraft/structure/ruined_portal/portal_2.nbt +++ b/data/minecraft/structure/ruined_portal/portal_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:29fcae023d173c2241f3eee0d6953af2f7679c483574a96943d1cab43905cd99 -size 2762 +oid sha256:534f29840053bc7d97994c0b8b45c713a93a07068a7d35da7ae0a26b0c46b049 +size 2763 diff --git a/data/minecraft/structure/ruined_portal/portal_3.nbt b/data/minecraft/structure/ruined_portal/portal_3.nbt index d80e87f1..ead4f2b5 100644 --- a/data/minecraft/structure/ruined_portal/portal_3.nbt +++ b/data/minecraft/structure/ruined_portal/portal_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3eed0bd38681390c5018d4a47fd30813cb30ad83ec56d6b945a8d8297755f6f3 +oid sha256:b5758573c1e7e1773efaadcda78f65855ec26a5b699c4f978e78e77f6ca8fc5e size 1994 diff --git a/data/minecraft/structure/ruined_portal/portal_4.nbt b/data/minecraft/structure/ruined_portal/portal_4.nbt index 2808ee59..f7c8d925 100644 --- a/data/minecraft/structure/ruined_portal/portal_4.nbt +++ b/data/minecraft/structure/ruined_portal/portal_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4242a7ba8beb240579f42955753f87a10b2e1e1b8bcc3d7f2a1c353934b67a18 +oid sha256:520f3a12f4ba6b3cab48a589534a97db2703603dc2c55b5d308fda9cc9f13d9f size 1885 diff --git a/data/minecraft/structure/ruined_portal/portal_5.nbt b/data/minecraft/structure/ruined_portal/portal_5.nbt index 2e08707d..f3476375 100644 --- a/data/minecraft/structure/ruined_portal/portal_5.nbt +++ b/data/minecraft/structure/ruined_portal/portal_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:279b8efa013905bfc4782f34c40fb7d349ffdfa8056bb64ecd17a68c7102313c +oid sha256:68660d39f6826c7a03e8f9033eb5a70ceef8af01b25ea46a0edac4ea986b1450 size 2217 diff --git a/data/minecraft/structure/ruined_portal/portal_6.nbt b/data/minecraft/structure/ruined_portal/portal_6.nbt index 0f325db2..efbaacc4 100644 --- a/data/minecraft/structure/ruined_portal/portal_6.nbt +++ b/data/minecraft/structure/ruined_portal/portal_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:70776096dd098a0b4c1a9a7c7b0f410256f77d079e3ca0d967580afe9b95bfd5 +oid sha256:488bdb46537e0dcd674dcc8b53890f58504d66d94c08e93f789da3635ab83012 size 984 diff --git a/data/minecraft/structure/ruined_portal/portal_7.nbt b/data/minecraft/structure/ruined_portal/portal_7.nbt index 490dfb7a..b9309ffa 100644 --- a/data/minecraft/structure/ruined_portal/portal_7.nbt +++ b/data/minecraft/structure/ruined_portal/portal_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ae1f49cd84e692d9f0120fa1f32c563f1212acedfce4c887fb44427126b745e +oid sha256:8b6f4144858c7382f79cb5cfc744747a2c807dee60d652cd8a78e6416ca8a792 size 1831 diff --git a/data/minecraft/structure/ruined_portal/portal_8.nbt b/data/minecraft/structure/ruined_portal/portal_8.nbt index c723d07f..6abe097d 100644 --- a/data/minecraft/structure/ruined_portal/portal_8.nbt +++ b/data/minecraft/structure/ruined_portal/portal_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:454312234476a36a69fa3bd46f1107b3bd639ee8ea39f87682aa4decb15f2c4d +oid sha256:2995d8acf74015167a1ecc48a8fd6b125bf134329c4a7270847d017b4286aa20 size 3408 diff --git a/data/minecraft/structure/ruined_portal/portal_9.nbt b/data/minecraft/structure/ruined_portal/portal_9.nbt index 9bb2363e..9355a13f 100644 --- a/data/minecraft/structure/ruined_portal/portal_9.nbt +++ b/data/minecraft/structure/ruined_portal/portal_9.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33636d20c75fb1ca0d04ced5d345c9247839cb7a31b2a479b7a8e44e4cc8823c +oid sha256:d116587c84abf8ae846b4dfb5c080d4042ed8e6ad4e67342845d88e7a1b3a22b size 2169 diff --git a/data/minecraft/structure/shipwreck/rightsideup_backhalf.nbt b/data/minecraft/structure/shipwreck/rightsideup_backhalf.nbt index dc353774..1f684a84 100644 --- a/data/minecraft/structure/shipwreck/rightsideup_backhalf.nbt +++ b/data/minecraft/structure/shipwreck/rightsideup_backhalf.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:88ac75c02db5a341dd65a233a7e47e12d5c5296d103e87328e34fc8377dfafad +oid sha256:bdcabd3a23946617c8246cf73ed792b703e092d5b2a12d5f2f4dc2a55177d868 size 2712 diff --git a/data/minecraft/structure/shipwreck/rightsideup_backhalf_degraded.nbt b/data/minecraft/structure/shipwreck/rightsideup_backhalf_degraded.nbt index 6a1476f3..a83fdec7 100644 --- a/data/minecraft/structure/shipwreck/rightsideup_backhalf_degraded.nbt +++ b/data/minecraft/structure/shipwreck/rightsideup_backhalf_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee0c3127f499ff07041bdd3b12e51eeeb2e46f248bb34542a34b56c070c6c40d +oid sha256:3eae4d2c468203798d5469c0cb26d5f58208a8f37f52c5aa6100e8ac9e9b6b59 size 2570 diff --git a/data/minecraft/structure/shipwreck/rightsideup_fronthalf.nbt b/data/minecraft/structure/shipwreck/rightsideup_fronthalf.nbt index e1862594..17a8dcd7 100644 --- a/data/minecraft/structure/shipwreck/rightsideup_fronthalf.nbt +++ b/data/minecraft/structure/shipwreck/rightsideup_fronthalf.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:539b49257e1a140d99f8e77193c6c3ab9c25e2c47d0502277e1b3bd2a6abfbc6 +oid sha256:6a8bb4d87f4e323e1a016b6799300b6077d3b74bd65d4f3927beece7f4c5518c size 2476 diff --git a/data/minecraft/structure/shipwreck/rightsideup_fronthalf_degraded.nbt b/data/minecraft/structure/shipwreck/rightsideup_fronthalf_degraded.nbt index 098e3ad4..881d92d9 100644 --- a/data/minecraft/structure/shipwreck/rightsideup_fronthalf_degraded.nbt +++ b/data/minecraft/structure/shipwreck/rightsideup_fronthalf_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:74f419cd0690ac8fadc4f79dded031f1171e248530a18b02bfdd6d486fc4fc2f +oid sha256:f1a943adf5e79d3929a05c383b56d9d887bbe75c07f81b06eccbc7794bdfd06e size 2253 diff --git a/data/minecraft/structure/shipwreck/rightsideup_full.nbt b/data/minecraft/structure/shipwreck/rightsideup_full.nbt index db47574e..9ab73933 100644 --- a/data/minecraft/structure/shipwreck/rightsideup_full.nbt +++ b/data/minecraft/structure/shipwreck/rightsideup_full.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7873a21c71f6cc441134c443d989f4fd8be8f24ff76f1d1f1c8d89c729ce9a4a +oid sha256:ab6df19c50995663f54ade140ad1e953e783301ec1b4b8b2f64833794fd63c6b size 3755 diff --git a/data/minecraft/structure/shipwreck/rightsideup_full_degraded.nbt b/data/minecraft/structure/shipwreck/rightsideup_full_degraded.nbt index 1ffbdd26..2a61ed28 100644 --- a/data/minecraft/structure/shipwreck/rightsideup_full_degraded.nbt +++ b/data/minecraft/structure/shipwreck/rightsideup_full_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ae69adfc712e81a136c05257a7aa7982616b89ab844e1e20b33e7fbb30c36fbd +oid sha256:3677c2da418ac72666f8140f85a00a5433690f97f989fee2cb7b1bb7e7f04033 size 3528 diff --git a/data/minecraft/structure/shipwreck/sideways_backhalf.nbt b/data/minecraft/structure/shipwreck/sideways_backhalf.nbt index 162274ea..5ed2e833 100644 --- a/data/minecraft/structure/shipwreck/sideways_backhalf.nbt +++ b/data/minecraft/structure/shipwreck/sideways_backhalf.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:245eca5ad3787717caf98fccdda617608cdd6db4583be4941a62985259a773c0 +oid sha256:3269b1b09d1f0d16f1dc8366c7115a3b233768e2a262ce2932b1c0421cd09640 size 2436 diff --git a/data/minecraft/structure/shipwreck/sideways_backhalf_degraded.nbt b/data/minecraft/structure/shipwreck/sideways_backhalf_degraded.nbt index 09583499..f3cec973 100644 --- a/data/minecraft/structure/shipwreck/sideways_backhalf_degraded.nbt +++ b/data/minecraft/structure/shipwreck/sideways_backhalf_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0b110521e4868bea2008d0385f7c7c91bd4c8275c1eac056cc2411510347bd0 +oid sha256:fc60197ce2341efd43e108c2600297512714d2f52e647fe04a9e2605f6a186e7 size 2259 diff --git a/data/minecraft/structure/shipwreck/sideways_fronthalf.nbt b/data/minecraft/structure/shipwreck/sideways_fronthalf.nbt index c9a73324..bb51486a 100644 --- a/data/minecraft/structure/shipwreck/sideways_fronthalf.nbt +++ b/data/minecraft/structure/shipwreck/sideways_fronthalf.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:320a906908bd0ceeeb27fa63be8abaa679c278bdda95fb94c2eeb2705f782625 +oid sha256:d66a4ebd571a3179159e61a223b75b5c2200a4d36fc3255a9143128a5f5fb3a0 size 2204 diff --git a/data/minecraft/structure/shipwreck/sideways_fronthalf_degraded.nbt b/data/minecraft/structure/shipwreck/sideways_fronthalf_degraded.nbt index 6b043990..7a516a9f 100644 --- a/data/minecraft/structure/shipwreck/sideways_fronthalf_degraded.nbt +++ b/data/minecraft/structure/shipwreck/sideways_fronthalf_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e1071bd76e0453ec0304bbb9263a27e97364b104827553308be657a0db7e7057 +oid sha256:d2f1abbab50a2154ccafbe50e1dbcbdb8a5903dca6e4498c4d0c62eaf8d80187 size 1913 diff --git a/data/minecraft/structure/shipwreck/sideways_full.nbt b/data/minecraft/structure/shipwreck/sideways_full.nbt index 2fe4ef48..48d32436 100644 --- a/data/minecraft/structure/shipwreck/sideways_full.nbt +++ b/data/minecraft/structure/shipwreck/sideways_full.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0efee48ff10ef300700ba824d48dbcdce85cfcfb2c54ea9f14a9aaae3472bc52 +oid sha256:7fe8d54b223d5b1f744a16d220c7c35167f7030dda61ee58fcc7b8e5efe9a7cc size 3512 diff --git a/data/minecraft/structure/shipwreck/sideways_full_degraded.nbt b/data/minecraft/structure/shipwreck/sideways_full_degraded.nbt index f4f7bd51..7c0e57d8 100644 --- a/data/minecraft/structure/shipwreck/sideways_full_degraded.nbt +++ b/data/minecraft/structure/shipwreck/sideways_full_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:abf88ff5d1619de3615d3db0823c0fcb5ec336fe9c7e2bd153970dd891ddf6b1 +oid sha256:8f80d75a8498c203b4e7182524969d316965ff542ca68e36fd15ef1a2de6d177 size 3309 diff --git a/data/minecraft/structure/shipwreck/upsidedown_backhalf.nbt b/data/minecraft/structure/shipwreck/upsidedown_backhalf.nbt index d72c3f19..f4959230 100644 --- a/data/minecraft/structure/shipwreck/upsidedown_backhalf.nbt +++ b/data/minecraft/structure/shipwreck/upsidedown_backhalf.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:14f4d1ef0b7903be093c2ef8208a182955c0806b419dd486ff3aaf2f68bb1de7 +oid sha256:f871cb72356def7cb2d36c02990d0843b1bda214202d9084d40ba0c713bf6e7b size 2518 diff --git a/data/minecraft/structure/shipwreck/upsidedown_backhalf_degraded.nbt b/data/minecraft/structure/shipwreck/upsidedown_backhalf_degraded.nbt index 5cce7760..f1a69417 100644 --- a/data/minecraft/structure/shipwreck/upsidedown_backhalf_degraded.nbt +++ b/data/minecraft/structure/shipwreck/upsidedown_backhalf_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d2be47ff0a4ffa094a347e22c2366cd48e4bf830c418361da02bb9fc607580e +oid sha256:ede09098e8857f2493ab88832deda00d32dfbd86e4d9b7fbc58da71a34e805bc size 2388 diff --git a/data/minecraft/structure/shipwreck/upsidedown_fronthalf.nbt b/data/minecraft/structure/shipwreck/upsidedown_fronthalf.nbt index 6a52c50a..55b5896b 100644 --- a/data/minecraft/structure/shipwreck/upsidedown_fronthalf.nbt +++ b/data/minecraft/structure/shipwreck/upsidedown_fronthalf.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:012872e09bfffd5c5ecd05c1eacb04e9933087e76eb391f359debbbb567fb866 +oid sha256:6130ad9f0afbd08b4936072307835e0be4407c3e9d6f1f6989fb760b350f4387 size 2325 diff --git a/data/minecraft/structure/shipwreck/upsidedown_fronthalf_degraded.nbt b/data/minecraft/structure/shipwreck/upsidedown_fronthalf_degraded.nbt index 522fdcce..9b7315ae 100644 --- a/data/minecraft/structure/shipwreck/upsidedown_fronthalf_degraded.nbt +++ b/data/minecraft/structure/shipwreck/upsidedown_fronthalf_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c72716f64d6d9be3a4d9654373a4935de470149ed1a27c890d7049ca2611c75 +oid sha256:95abef7c696943d62656ad2a5bfe2148dbe80f930a2392ac98cb7c43aba52bfd size 2210 diff --git a/data/minecraft/structure/shipwreck/upsidedown_full.nbt b/data/minecraft/structure/shipwreck/upsidedown_full.nbt index d698fa45..974ba59b 100644 --- a/data/minecraft/structure/shipwreck/upsidedown_full.nbt +++ b/data/minecraft/structure/shipwreck/upsidedown_full.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a2d2b84dd5d5be4d2ae8a1856061c15c29be67e7b61b0e0847be9f785cbb460 +oid sha256:08e6b1ad8fa77edd711bd136cf47ef7cb27a961831f001c7ad2325a6123283a3 size 3470 diff --git a/data/minecraft/structure/shipwreck/upsidedown_full_degraded.nbt b/data/minecraft/structure/shipwreck/upsidedown_full_degraded.nbt index ad8bedd8..8bac3d17 100644 --- a/data/minecraft/structure/shipwreck/upsidedown_full_degraded.nbt +++ b/data/minecraft/structure/shipwreck/upsidedown_full_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0228e0006dbf04684f7a694eaef7d1154992e064de52c9fb668c07492f1a5fb3 +oid sha256:1fd830385764abd78199224be0f1b0dec6ecedeb60125f9c631b1844d03710b1 size 3299 diff --git a/data/minecraft/structure/shipwreck/with_mast.nbt b/data/minecraft/structure/shipwreck/with_mast.nbt index 7dc37d88..3b738eb7 100644 --- a/data/minecraft/structure/shipwreck/with_mast.nbt +++ b/data/minecraft/structure/shipwreck/with_mast.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:11d225fbdf2a1e809eb34642de546ad9189f011ecf821f7600d1979bccea7e7b +oid sha256:7a04b74150a6718f3618dbb392e7799d2db587debb03479ba3a9e0bcb2c9033a size 3960 diff --git a/data/minecraft/structure/shipwreck/with_mast_degraded.nbt b/data/minecraft/structure/shipwreck/with_mast_degraded.nbt index 2bb3b272..505cb65b 100644 --- a/data/minecraft/structure/shipwreck/with_mast_degraded.nbt +++ b/data/minecraft/structure/shipwreck/with_mast_degraded.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b8b9afe9a2e87a269bd10c0f054ce14719e084053120707d09532c58dfedadea +oid sha256:8383629d9f4e4551e76470c880b844c0e3e32f23af1f4c86dcadb7cbd0d02bda size 3686 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_full_1.nbt b/data/minecraft/structure/trail_ruins/buildings/group_full_1.nbt index 28e71fde..be5a0264 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_full_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_full_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3edabd8ead989d7c3629133f00db13f7d3d0acfa2540e867afa64249679eab2 +oid sha256:b64814f6c950f72b6106655bb4f722a9c89432c6b57e40d5185bdc37e18b9eae size 1339 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_full_2.nbt b/data/minecraft/structure/trail_ruins/buildings/group_full_2.nbt index aef238aa..acf0eae3 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_full_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_full_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c003c228001b636753fdb4156e6964033835caebf4ad70e08f13cc4e4533e93 +oid sha256:31a2349f4e5aa35555a67da1a4e8615899d02b9f88c133bf7f28a424757f9777 size 1281 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_full_3.nbt b/data/minecraft/structure/trail_ruins/buildings/group_full_3.nbt index 905ed84e..a38bd7aa 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_full_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_full_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:438615c7934b0d68e5ed9cbb95867f3deb7846d3d548280f2296ccca4563503f +oid sha256:985f6e852fab9c0ee0d05c1b730c72d6b28b997e7c7f1279d3b07e03f11c115e size 1299 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_full_4.nbt b/data/minecraft/structure/trail_ruins/buildings/group_full_4.nbt index 6ede56f3..0c3e0897 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_full_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_full_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a6f69e09c60138eac1f0be174ba2cb55267b51303e9be4b3bca266e8be0c8258 +oid sha256:1558eee5da1748c9d840d1cd27ec16571677e053dcf212bf4d4a1dc3ae51118f size 1263 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_full_5.nbt b/data/minecraft/structure/trail_ruins/buildings/group_full_5.nbt index f074a890..d37ed7cb 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_full_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_full_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3691f0371bacb18fe24d33e0dea328ac77f491a3beca964c1162e10f0476c2b4 +oid sha256:ccf70fbc3fbb609b43b67b74bad8dabc13d6e7bc4c1be8f9abb63241e67dca22 size 1261 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_hall_1.nbt b/data/minecraft/structure/trail_ruins/buildings/group_hall_1.nbt index 2954532b..70d3c955 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_hall_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_hall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36475fcebdbe45514f016d93bcf6d6a4a2e2d5ef5ac9abd6db0a602392f24069 +oid sha256:9c2afd27bbec8c23d11eea607bf5c67c22e1d0fffa7cbe4488fd6d06a775da94 size 1517 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_hall_2.nbt b/data/minecraft/structure/trail_ruins/buildings/group_hall_2.nbt index 64b0a779..f7d421b7 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_hall_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_hall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad82c6edf89dc42c5a3f184c03de1ac789e6bc1d9483b706320ef6e3c72ce58c +oid sha256:52b1aa0e725c0eef76e624fb9bc2ce0a80294458fe59ab7a4109affabe55591a size 1616 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_hall_3.nbt b/data/minecraft/structure/trail_ruins/buildings/group_hall_3.nbt index e32baca8..d2147cd4 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_hall_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_hall_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8541c43e4a230ef0c31f7e874f762c2b51aaed55f20a85d23edbadf004efbcd7 +oid sha256:56d8b0d3270cbb05b4b3f1dd66d2f65949962edc0c5f5b984806571abed35f52 size 1716 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_hall_4.nbt b/data/minecraft/structure/trail_ruins/buildings/group_hall_4.nbt index 1fd53eca..751bbd02 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_hall_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_hall_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a056698d9ec7de4eece376d5b5a1e2d490cf5d048f9d08a6d363c76560ff3399 +oid sha256:3d222006ed6275f4977a34d6a99cb31083abb9620b339233366b9286bfc1b3f3 size 1640 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_hall_5.nbt b/data/minecraft/structure/trail_ruins/buildings/group_hall_5.nbt index dd71bbd2..b21166e7 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_hall_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_hall_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be8af6356ce8acf414b9f10fc9b83e675d68ee862501454c36fa7358027ccd00 +oid sha256:d9fa0b3af2d112f34deab2fc1ccda0d9c5b527cc24c9c11185d58641b011199d size 1526 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_lower_1.nbt b/data/minecraft/structure/trail_ruins/buildings/group_lower_1.nbt index c28be45e..3c350f67 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_lower_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_lower_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9cc573070490282a4bc7152afad5b497d7faa4056329f1c51a0ac92505ab653 +oid sha256:e098e363bc95f0ec07a4d7e40f578371191af2a7f106b05729e8cf844ea9a799 size 1047 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_lower_2.nbt b/data/minecraft/structure/trail_ruins/buildings/group_lower_2.nbt index 56883d54..a6f78004 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_lower_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_lower_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e85bc96cffa3bbbbcecae2504bd3be4a342a85e1d44ea2288596f1861fb0d674 +oid sha256:e192a27b38a0979518749af598c828dbf96fcc3e98ad6626d26878ca17ab8fd4 size 1044 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_lower_3.nbt b/data/minecraft/structure/trail_ruins/buildings/group_lower_3.nbt index 4b35716e..5f5c30a9 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_lower_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_lower_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a0653956c74e4b9b9ed1c5003e1b27afaa22a130e85bd0b8e3ba347caf5e5427 +oid sha256:8c67a472a9209338faffbf919ab81d6b983a2947d1773ad23d879b3897e9bb01 size 1047 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_lower_4.nbt b/data/minecraft/structure/trail_ruins/buildings/group_lower_4.nbt index 8f9ed81f..fafd08e7 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_lower_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_lower_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e22de6478d1ed7f7942f85342aac24fdaf57baf0f21b143ebad96fbd2c1ba75b +oid sha256:484b1995a4bb04d66c9d0375d60a2211cdc9fd58f2b9bb9dfeed38d0899d01d7 size 975 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_lower_5.nbt b/data/minecraft/structure/trail_ruins/buildings/group_lower_5.nbt index abe38373..43781825 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_lower_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_lower_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f8c2d9955cad333f69dfb57d2edfe73a7caa0bf8d27b85d66f7effa89d4b963 +oid sha256:4ac1a4ce951deeeab5df8307373dbea2a2984dd3468f59fa6cba0f1e18d98187 size 973 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_room_1.nbt b/data/minecraft/structure/trail_ruins/buildings/group_room_1.nbt index 0b7a6c8a..748a82c1 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_room_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_room_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3165636202d2fc5fa974a7412f5177a05cddf0ecb3a268c45aad5a6e9f795dcf +oid sha256:d0597bde1135299e77b19f96a42e8d586651bdf60d87ac2a9acaeff736431adb size 781 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_room_2.nbt b/data/minecraft/structure/trail_ruins/buildings/group_room_2.nbt index 6dd10933..b462d8fc 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_room_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_room_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a0890b3d99730e53f876591c365a64aac51e9dad94e1b282fc1e5ca768e5742 +oid sha256:645abf3385915435bdfe3379e385ba46d3deac2d417dc5f4a88b030d578a0d79 size 864 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_room_3.nbt b/data/minecraft/structure/trail_ruins/buildings/group_room_3.nbt index 51a07e8e..e81aba00 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_room_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_room_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5424c2e01e59600ae617999d8853aca452ca616041d400784a0fb27d5002bcf3 +oid sha256:cdc317da04963c8a67cae4a6b6fa3f7240f82bc28cf1c445f67d18c12985d00e size 848 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_room_4.nbt b/data/minecraft/structure/trail_ruins/buildings/group_room_4.nbt index f2a30a73..9cb67b46 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_room_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_room_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62a35bcd7981d08b0038721080ff534215bb56e70eb909248e741c26cc6c2f9f +oid sha256:e8e4f5a1b8e17ce9d2135c00daaf4af8f54c92f4b5d3db16c44a9ebc97d3791b size 781 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_room_5.nbt b/data/minecraft/structure/trail_ruins/buildings/group_room_5.nbt index b0ef6047..db8f6049 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_room_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_room_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48ffa595e5c35216675d00f6a05869b26380e37ed22696f10d22605420fa899a +oid sha256:a91573710e6071220f241077cfaa9f6dae9e72c26239ac6ae8d8cd6d582d69ce size 779 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_upper_1.nbt b/data/minecraft/structure/trail_ruins/buildings/group_upper_1.nbt index 8dc2fe70..2e0a42cc 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_upper_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_upper_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ebfee836ac50c4eb0cc307c7f16a6e5aeb0f5e41bfe02ee5bb7c6c825eb5afd6 +oid sha256:b98b26b95029108cb5c557c84f6fc536f788b594449a1fdb9cf7990dca04f897 size 1270 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_upper_2.nbt b/data/minecraft/structure/trail_ruins/buildings/group_upper_2.nbt index 6f6f984d..42bfabce 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_upper_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_upper_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3fd6ece105a9be8263da1f38387117879f9b7b827f310d3aee58fa0bdcb1ca1e +oid sha256:0d12d3d014ebbac1aa27381a290f4eb083aa72d0bc373c8c2bd0c1f0b14c17d5 size 1263 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_upper_3.nbt b/data/minecraft/structure/trail_ruins/buildings/group_upper_3.nbt index 97c3d2db..5cc07d8f 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_upper_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_upper_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5784082cb0405d6d26f66d25178f4609f4a377ac54921588afc75747867b892d +oid sha256:e7d173f4b38c4cdbc3737ce2c6e049b64db22a8d353da7100a57d7e6d8147df1 size 1274 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_upper_4.nbt b/data/minecraft/structure/trail_ruins/buildings/group_upper_4.nbt index fb4a6dce..936d654a 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_upper_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_upper_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dfecef9d196b528eaecbc41aafb7cd162c39b3df35f111bd79dfc9e59c3989a0 +oid sha256:d7c6a5745dd1b73511034ee7b34499c7720a097b7ff9463c23c3e45343cba2f5 size 1182 diff --git a/data/minecraft/structure/trail_ruins/buildings/group_upper_5.nbt b/data/minecraft/structure/trail_ruins/buildings/group_upper_5.nbt index c743f68f..073b5111 100644 --- a/data/minecraft/structure/trail_ruins/buildings/group_upper_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/group_upper_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea7b6ea7a8c3f67c7845cef122053d3d463607222f030f823660ba701e9fbb90 +oid sha256:c03addecb994ecdda93cd36458ca124059b497aeb2ce3ec5f7cf3e67200d523d size 1178 diff --git a/data/minecraft/structure/trail_ruins/buildings/large_room_1.nbt b/data/minecraft/structure/trail_ruins/buildings/large_room_1.nbt index b96c27d6..105f68d6 100644 --- a/data/minecraft/structure/trail_ruins/buildings/large_room_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/large_room_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1afaf95c454362cf4de5154d9d97843e7ca63553e91cfb0fa21ba5f04d5c7c6 +oid sha256:15e423eb63fbfdc4ac4d459a76ef83cbd849b1065c910c8fa1f7e08673b244d2 size 1928 diff --git a/data/minecraft/structure/trail_ruins/buildings/large_room_2.nbt b/data/minecraft/structure/trail_ruins/buildings/large_room_2.nbt index d3de89e0..5d2201dd 100644 --- a/data/minecraft/structure/trail_ruins/buildings/large_room_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/large_room_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68efceceefc9133ef1e57087b1f45643fdf3fafeb242b0c372c54b68f3c8a74e +oid sha256:f6ce8630eb6241ab45b58a23a40c7d3076a157f387bd8c7bb4b995a3f3f60e16 size 1658 diff --git a/data/minecraft/structure/trail_ruins/buildings/large_room_3.nbt b/data/minecraft/structure/trail_ruins/buildings/large_room_3.nbt index ff920d79..a6647380 100644 --- a/data/minecraft/structure/trail_ruins/buildings/large_room_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/large_room_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:91c408cb19abe729e0c78223f01463c355090b19be9c023a44fe8ab23662dc6a +oid sha256:d0780f9063f5a904f9e402e8f5a16728a3fba8f5ea016b00d987209c1badde61 size 2707 diff --git a/data/minecraft/structure/trail_ruins/buildings/large_room_4.nbt b/data/minecraft/structure/trail_ruins/buildings/large_room_4.nbt index d3266518..4c1970d9 100644 --- a/data/minecraft/structure/trail_ruins/buildings/large_room_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/large_room_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8fffddd073b88b1807771a6ff0456f51f2f6cc29124d37c2796c6e6bda911961 +oid sha256:fa09ae4ec6237f50e6120b57646081a326dd9984be8ee3332b4c7a5b0b17e1e3 size 1564 diff --git a/data/minecraft/structure/trail_ruins/buildings/large_room_5.nbt b/data/minecraft/structure/trail_ruins/buildings/large_room_5.nbt index 8fc34aa1..ca34a6b6 100644 --- a/data/minecraft/structure/trail_ruins/buildings/large_room_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/large_room_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac39c94083e29df0fbbda812de93eb12b60d4cf23446f33571b7ddc9c7d2fa86 +oid sha256:7be71be2790bd5e6b3da584f0c64e172dd75d32b02f09665965bffcc1f11c76b size 3199 diff --git a/data/minecraft/structure/trail_ruins/buildings/one_room_1.nbt b/data/minecraft/structure/trail_ruins/buildings/one_room_1.nbt index 4855e7e3..53e515f8 100644 --- a/data/minecraft/structure/trail_ruins/buildings/one_room_1.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/one_room_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d21369a613e160ac3a27ca026ee17425a8ff24db6f0b59222376bd4a8d22980 +oid sha256:b8548fd44dd427e418bdef4a052f4e6a70ed7a9249de2bef0a11c67f78559021 size 1005 diff --git a/data/minecraft/structure/trail_ruins/buildings/one_room_2.nbt b/data/minecraft/structure/trail_ruins/buildings/one_room_2.nbt index 82bea60f..1fe6022a 100644 --- a/data/minecraft/structure/trail_ruins/buildings/one_room_2.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/one_room_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:683fe1a6e7b91d96867b8e56451f57e45f5b9173af0f24f38db386401706199a +oid sha256:9e99dcceb783c0532b0e2537f96158a4b6df91402286eba615506e8eb67e8565 size 1087 diff --git a/data/minecraft/structure/trail_ruins/buildings/one_room_3.nbt b/data/minecraft/structure/trail_ruins/buildings/one_room_3.nbt index 70d7b9e6..025b6f70 100644 --- a/data/minecraft/structure/trail_ruins/buildings/one_room_3.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/one_room_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:651193f6d36f41c46edc28e8d49ec8d5a63fcb72765a48be6f9b954c417fe275 +oid sha256:f1e2335cb29057f5d85bc9cfdb599005bb980a702b15c58d5284f702494e8445 size 1105 diff --git a/data/minecraft/structure/trail_ruins/buildings/one_room_4.nbt b/data/minecraft/structure/trail_ruins/buildings/one_room_4.nbt index ca3dccaf..dee78f77 100644 --- a/data/minecraft/structure/trail_ruins/buildings/one_room_4.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/one_room_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b22122fd210fe470d98ec477825e02a3c7151c922891e62eda19cb552e642d38 +oid sha256:5d4a99092a2f667ed22ed95dfeac52914f90825b79ddeb9e54c0c4f3c9907d90 size 1452 diff --git a/data/minecraft/structure/trail_ruins/buildings/one_room_5.nbt b/data/minecraft/structure/trail_ruins/buildings/one_room_5.nbt index 30077168..20e71bd2 100644 --- a/data/minecraft/structure/trail_ruins/buildings/one_room_5.nbt +++ b/data/minecraft/structure/trail_ruins/buildings/one_room_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:efaa6df0e7c3db1fe9c96bd54b90c6d4cde6184058f1e37efa6c725fc25033a5 +oid sha256:c201d35e2340caec1ad2d21c8d02747a3f065d1a27fccb4105a96534459e80a8 size 973 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_1.nbt b/data/minecraft/structure/trail_ruins/decor/decor_1.nbt index 72802846..ca8a7714 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_1.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b147857f6327e5c672634165709f8b14706248d09537f0847c7fcfac96c3a7c +oid sha256:dc2d518512acacc594efaef1c061e0cb71acb632645ee914ac26c172895d0e7c size 489 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_2.nbt b/data/minecraft/structure/trail_ruins/decor/decor_2.nbt index 4b2c0f8f..487c043f 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_2.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e586b4fc874c807f15c91b93cbae0b52336fa638b1a29afc3a675305d05d2516 +oid sha256:35ebe590b273a69f8f1491b1a5b47aa7510e722102f0483812500bde9b8d7605 size 471 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_3.nbt b/data/minecraft/structure/trail_ruins/decor/decor_3.nbt index 60fcc3af..443d3118 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_3.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f32bbd04e258bb633271fb072e2ed0b52b1c7aecedc4d8eb28c820204ee3ad52 +oid sha256:88d3fbe9076c7cf547d586f155aba0aa8de54e051341ea7f7b3f1ad63a93e54a size 377 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_4.nbt b/data/minecraft/structure/trail_ruins/decor/decor_4.nbt index 1077065e..8c6c4661 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_4.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36610ed70289460a5386883304a774b1959db7bedb70438022edf791ed42227a +oid sha256:64cf012fbe7950f4e9bd085b7f796e7d0b67161306ce97e517a9644a9d8640a3 size 417 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_5.nbt b/data/minecraft/structure/trail_ruins/decor/decor_5.nbt index 594e3a6a..9b3d3fca 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_5.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d0a3dd73f46ad4a3ef9e1050e05cbbecf24ab420a54d4c56b98fc3f18cf8e3e +oid sha256:b6e5861dd10ea501559faead739bd80d3604d59cacdac72c9c23bd067f1f45b9 size 492 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_6.nbt b/data/minecraft/structure/trail_ruins/decor/decor_6.nbt index 205bf275..e949adf1 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_6.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f2f0aeac0871a754c077135ae64ea9b95d9417183f73721fde72d3ee598e7422 +oid sha256:4f4f445219cac6f8054b05d683dba32a00706701a1c48ef261b530b5f7f3e38e size 506 diff --git a/data/minecraft/structure/trail_ruins/decor/decor_7.nbt b/data/minecraft/structure/trail_ruins/decor/decor_7.nbt index 72591c84..d13cc27e 100644 --- a/data/minecraft/structure/trail_ruins/decor/decor_7.nbt +++ b/data/minecraft/structure/trail_ruins/decor/decor_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:377ac91e2cff0c3172502a8b0ea9cbfc438ad36d376ef1c3c3f85f088fae15e9 +oid sha256:665f93ec30bb7ce9ea88d5436011cf4eca1aa4b194374a49c57cfb01442c1665 size 632 diff --git a/data/minecraft/structure/trail_ruins/roads/long_road_end.nbt b/data/minecraft/structure/trail_ruins/roads/long_road_end.nbt index 4eaadb1c..7a5d5e88 100644 --- a/data/minecraft/structure/trail_ruins/roads/long_road_end.nbt +++ b/data/minecraft/structure/trail_ruins/roads/long_road_end.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dca45e7d1e6535476b49886f4248a2b71344146efd952e019878d53a6f871c27 +oid sha256:4bb9af2636346dbbfe3dedaec682f89b1aa70586d3e77ee36993f522d9ab80a5 size 858 diff --git a/data/minecraft/structure/trail_ruins/roads/road_end_1.nbt b/data/minecraft/structure/trail_ruins/roads/road_end_1.nbt index 83a2c9ef..cde6e095 100644 --- a/data/minecraft/structure/trail_ruins/roads/road_end_1.nbt +++ b/data/minecraft/structure/trail_ruins/roads/road_end_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0f2b46fcc91199ad929cf471b6dcb58d4e275ed6c1b079eb35a44111559515fc +oid sha256:972cc2384a7d3f96c34c52a19143b6d2df06abe2f387270cb383dd6f59cf2356 size 468 diff --git a/data/minecraft/structure/trail_ruins/roads/road_section_1.nbt b/data/minecraft/structure/trail_ruins/roads/road_section_1.nbt index ed623d31..972bda8f 100644 --- a/data/minecraft/structure/trail_ruins/roads/road_section_1.nbt +++ b/data/minecraft/structure/trail_ruins/roads/road_section_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1492feecddaa0236730eef288a4eff0c8ecda8e44fd6362e12b80c64780ccc0d +oid sha256:8e5f4a48277e2990efb83f85342ffbb1f0022c88abd51495a7bc599bbdd45d7b size 706 diff --git a/data/minecraft/structure/trail_ruins/roads/road_section_2.nbt b/data/minecraft/structure/trail_ruins/roads/road_section_2.nbt index 4944ce25..6b77960e 100644 --- a/data/minecraft/structure/trail_ruins/roads/road_section_2.nbt +++ b/data/minecraft/structure/trail_ruins/roads/road_section_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e8a215faaa740f0e8ca7a92f8c94c6628576581ef260c169c86cd01bdeb35a1 +oid sha256:48670741d8ac2223dea347fbd4bc4b7bc3cf34315eed2a6e927aaabdafa9b821 size 719 diff --git a/data/minecraft/structure/trail_ruins/roads/road_section_3.nbt b/data/minecraft/structure/trail_ruins/roads/road_section_3.nbt index af06bf60..fd42dedd 100644 --- a/data/minecraft/structure/trail_ruins/roads/road_section_3.nbt +++ b/data/minecraft/structure/trail_ruins/roads/road_section_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36cfaca0741570d9c0eb99e3b3f276f5c865c2185d840b1ac9df4bfd4308360b +oid sha256:88ec1143d5bb2d698721ceb7b3d93a06944c88a138c25e1f6f0503e6687b7ac5 size 757 diff --git a/data/minecraft/structure/trail_ruins/roads/road_section_4.nbt b/data/minecraft/structure/trail_ruins/roads/road_section_4.nbt index f39f853e..6c6d229a 100644 --- a/data/minecraft/structure/trail_ruins/roads/road_section_4.nbt +++ b/data/minecraft/structure/trail_ruins/roads/road_section_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c64d05c3eaf10c9ee5390b427b5cb6ddfd7e05761e2b66e806ecb092a0af79c +oid sha256:b6e2b89ad9b6dc0aa5d557b00b375a7a04d37ba98405569985ff3f65d6b07731 size 772 diff --git a/data/minecraft/structure/trail_ruins/roads/road_spacer_1.nbt b/data/minecraft/structure/trail_ruins/roads/road_spacer_1.nbt index dd3dea2c..227e7601 100644 --- a/data/minecraft/structure/trail_ruins/roads/road_spacer_1.nbt +++ b/data/minecraft/structure/trail_ruins/roads/road_spacer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c1f5a573000214408c12c708f66863492cfdb9ebaaa0a16828e704848f53a0d2 +oid sha256:11162f3f8dc4f8d8b6bf20a014d589cff5ce936e7d3de71858916291b261065b size 644 diff --git a/data/minecraft/structure/trail_ruins/tower/hall_1.nbt b/data/minecraft/structure/trail_ruins/tower/hall_1.nbt index eab86fb6..7ed4db9d 100644 --- a/data/minecraft/structure/trail_ruins/tower/hall_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/hall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aace8db0442daa2d89ed43fee3379c62fda25b41e3a7991ca16aeffe06d60445 +oid sha256:b33e5d03f442e94c7648ad34a7ac73636eeff9d9a01d29696e67c2e093ed2120 size 1519 diff --git a/data/minecraft/structure/trail_ruins/tower/hall_2.nbt b/data/minecraft/structure/trail_ruins/tower/hall_2.nbt index 3b3d210b..73e54e27 100644 --- a/data/minecraft/structure/trail_ruins/tower/hall_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/hall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0d50170661cfc0b4ff856d6f475dd0164f35bb816c76b70d73a5ae82b146d4e5 +oid sha256:907a981afe6f4ea504d9c9ac1d5bd6ef3d9376c2df8b8cc6aec96a31983d8b4a size 1894 diff --git a/data/minecraft/structure/trail_ruins/tower/hall_3.nbt b/data/minecraft/structure/trail_ruins/tower/hall_3.nbt index 5567cf9b..c4d21f81 100644 --- a/data/minecraft/structure/trail_ruins/tower/hall_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/hall_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:925eb81a5777401ff36cb893a3ed13a3327021ecee64aaec181a259dee563d82 +oid sha256:ca0cf52ad445d08181c5244e0cdf50b8ce4f164d217effe4d62db93c053a842b size 2140 diff --git a/data/minecraft/structure/trail_ruins/tower/hall_4.nbt b/data/minecraft/structure/trail_ruins/tower/hall_4.nbt index ef4f1d68..a9f7896e 100644 --- a/data/minecraft/structure/trail_ruins/tower/hall_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/hall_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8b9a56ee7f0c1a773e6b420e8895c60d32b7e7400d55123027b1deff9242504 +oid sha256:5ac22aad8b3f54efea0065a80ffc5747fb9fd115a605cff5d9589a9e1d8a310c size 2031 diff --git a/data/minecraft/structure/trail_ruins/tower/hall_5.nbt b/data/minecraft/structure/trail_ruins/tower/hall_5.nbt index 97dd6c22..51ba9ba3 100644 --- a/data/minecraft/structure/trail_ruins/tower/hall_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/hall_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:352e10ed0ed5c1dcbeaaf2b55ef5a00a45cb7b672f23f99bd2570249b60fb2d6 +oid sha256:36711909c413ff5769c3b30bbfee00b05040aa71d20dc4dd336de51f444b9e9d size 1873 diff --git a/data/minecraft/structure/trail_ruins/tower/large_hall_1.nbt b/data/minecraft/structure/trail_ruins/tower/large_hall_1.nbt index a710b4b8..1563c13b 100644 --- a/data/minecraft/structure/trail_ruins/tower/large_hall_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/large_hall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c00396a61ba4eb4f64885e330b205db5e762f2b4996203c65c0d5ed8e4daf47b +oid sha256:bef7b0cdc958d261de94e6e68d6caea19bc28e5394c74dd987ebc1849726e9da size 2024 diff --git a/data/minecraft/structure/trail_ruins/tower/large_hall_2.nbt b/data/minecraft/structure/trail_ruins/tower/large_hall_2.nbt index 08e28ca6..1c4bd60d 100644 --- a/data/minecraft/structure/trail_ruins/tower/large_hall_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/large_hall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:99938bd044f2d3596435dc9d03fe5e4e33c53c5ec46cec13caec6fedd81a9198 +oid sha256:d0c410e3b1ae55cb316c67ead2501d31b425f102c45ed52479293f119180c941 size 1966 diff --git a/data/minecraft/structure/trail_ruins/tower/large_hall_3.nbt b/data/minecraft/structure/trail_ruins/tower/large_hall_3.nbt index 36a4e2f0..62435771 100644 --- a/data/minecraft/structure/trail_ruins/tower/large_hall_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/large_hall_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d34575e59737ae33fd67f0888aa63cc62eddb7ed907c907f397d85b37af63f5b +oid sha256:4d5f21108a59f3380c99110365d6fd50415a9761ad3a3e6f12e1a06c37811457 size 2023 diff --git a/data/minecraft/structure/trail_ruins/tower/large_hall_4.nbt b/data/minecraft/structure/trail_ruins/tower/large_hall_4.nbt index 74fda1d0..4635a08c 100644 --- a/data/minecraft/structure/trail_ruins/tower/large_hall_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/large_hall_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c23690f9b443fbe8fed3e84e56f91aeb49f06a7430cd28796cb9e27a546ec47 +oid sha256:369d13760b7443d968d87c3bcf66f57cffc001eb6594d9e8a3ac094b7e0f9a91 size 1807 diff --git a/data/minecraft/structure/trail_ruins/tower/large_hall_5.nbt b/data/minecraft/structure/trail_ruins/tower/large_hall_5.nbt index 5e71ff51..63c37ff0 100644 --- a/data/minecraft/structure/trail_ruins/tower/large_hall_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/large_hall_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e8e82b81f437fc18ff4740fc35ba3426453c260cb2d2ce5a6f42eb519af58b28 +oid sha256:5165a2ad7b9b634174597ce2e17022fea095ca269c2751a705a95f7e08edb9a2 size 2003 diff --git a/data/minecraft/structure/trail_ruins/tower/one_room_1.nbt b/data/minecraft/structure/trail_ruins/tower/one_room_1.nbt index d885bd90..9c5a580d 100644 --- a/data/minecraft/structure/trail_ruins/tower/one_room_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/one_room_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3f6b85c2011c20f586298f3d2064db0b5883087332c90d68a3ba716dc7f577e2 +oid sha256:45bc43c6e74b6d56e375838fa2a9d0a050059047aeac147e186282e776795937 size 649 diff --git a/data/minecraft/structure/trail_ruins/tower/one_room_2.nbt b/data/minecraft/structure/trail_ruins/tower/one_room_2.nbt index 6c28bc65..992fffb0 100644 --- a/data/minecraft/structure/trail_ruins/tower/one_room_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/one_room_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4634937ae75f450a8810f5ec929c3c8d9edb2873ae14fda0ccfab29087b6612a +oid sha256:439f29c333690ac20243aa57ecd2cea2709e2be0d205221cccabde40b6becf3d size 718 diff --git a/data/minecraft/structure/trail_ruins/tower/one_room_3.nbt b/data/minecraft/structure/trail_ruins/tower/one_room_3.nbt index 714be720..7a9aebe7 100644 --- a/data/minecraft/structure/trail_ruins/tower/one_room_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/one_room_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9f97da7e7c81e0ce2e2f72865f8cbf32bad5882622122affb02d8ba20060c918 +oid sha256:6404ebf0b345815318135a9251dd345654b7ac32932496db26b502cb8dfb350b size 624 diff --git a/data/minecraft/structure/trail_ruins/tower/one_room_4.nbt b/data/minecraft/structure/trail_ruins/tower/one_room_4.nbt index 082ed204..cab85ea3 100644 --- a/data/minecraft/structure/trail_ruins/tower/one_room_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/one_room_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:272de34f8545f76fe7e68a4c7918f957b595d4184960f582ad1df219620389b3 +oid sha256:11253c797d20236c6dfe4680e745ab7b727da202979eda3c83154c99075f85b6 size 615 diff --git a/data/minecraft/structure/trail_ruins/tower/one_room_5.nbt b/data/minecraft/structure/trail_ruins/tower/one_room_5.nbt index 05801f82..f421c12b 100644 --- a/data/minecraft/structure/trail_ruins/tower/one_room_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/one_room_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ee260eb8905f93145dfb730061eb05e2d3769d86e528cb329d2e4d4a3dc70a5 +oid sha256:4af617a379486102d76d1e4882e4c5bf427ed738946b7235eaac68338c041521 size 637 diff --git a/data/minecraft/structure/trail_ruins/tower/platform_1.nbt b/data/minecraft/structure/trail_ruins/tower/platform_1.nbt index dab628f1..8cda6f2b 100644 --- a/data/minecraft/structure/trail_ruins/tower/platform_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/platform_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d69da5aeb753f8d513d4e1c8ab3527d6807c0b29559f09ad41957b31b88aaad +oid sha256:ecb10f943b5b0af075032d4c29d8f24ba95e11a47326515c24a720faf44face2 size 1197 diff --git a/data/minecraft/structure/trail_ruins/tower/platform_2.nbt b/data/minecraft/structure/trail_ruins/tower/platform_2.nbt index f87b812d..43125113 100644 --- a/data/minecraft/structure/trail_ruins/tower/platform_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/platform_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a44f3833df783a910392e769776d0e6298b7c0a3a31dab47ca1ff66246d771f +oid sha256:37b59ff5c0cbe25a7472d98f8fa1fbf46f28ffd6352535415d96ad4dbc53738b size 1135 diff --git a/data/minecraft/structure/trail_ruins/tower/platform_3.nbt b/data/minecraft/structure/trail_ruins/tower/platform_3.nbt index cfde8ab6..df6221b8 100644 --- a/data/minecraft/structure/trail_ruins/tower/platform_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/platform_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6ba1d9240132316d3f47c3eb8dc9449208f51b017680a07dd7f15ff7bcba29ff +oid sha256:dc946105f99a98c22501470cf5c20c2d6bd3e49d41229fc1bd8b79b1b6605791 size 859 diff --git a/data/minecraft/structure/trail_ruins/tower/platform_4.nbt b/data/minecraft/structure/trail_ruins/tower/platform_4.nbt index 0e25a545..220cbfa2 100644 --- a/data/minecraft/structure/trail_ruins/tower/platform_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/platform_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d197dbc9355625237ca90712b23dc95267222a72bf79420f7db0885450d4b4c4 +oid sha256:a77695c2f7832fe1c37c3acd8b13006f3b77883855a0b6d4358009ddc03322b9 size 1205 diff --git a/data/minecraft/structure/trail_ruins/tower/platform_5.nbt b/data/minecraft/structure/trail_ruins/tower/platform_5.nbt index 74443e74..0867fe7b 100644 --- a/data/minecraft/structure/trail_ruins/tower/platform_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/platform_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:76b88e5aa700b5cabfcb5591121d08db89d697286f182ba5cef8fa5ba463c49b -size 1146 +oid sha256:4c06f47ea54702b945389b7e5a1212c931dfa36af2eed46b4f9960a33e9ea96b +size 1147 diff --git a/data/minecraft/structure/trail_ruins/tower/stable_1.nbt b/data/minecraft/structure/trail_ruins/tower/stable_1.nbt index 92a1f16a..e5fda64e 100644 --- a/data/minecraft/structure/trail_ruins/tower/stable_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/stable_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:357a59e54f2b1d613fc28fb9aba5612e4493811d555edf387811ccd5bf643175 +oid sha256:4effa878899a437816e0b71eb354d1e3c5631a39a8c87f06da7102906542da23 size 1274 diff --git a/data/minecraft/structure/trail_ruins/tower/stable_2.nbt b/data/minecraft/structure/trail_ruins/tower/stable_2.nbt index 9f137543..54ebf7a3 100644 --- a/data/minecraft/structure/trail_ruins/tower/stable_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/stable_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a67e42ed23734b3eb3b4883cda95faa35e29b08678e69043db14d5158a91931 +oid sha256:bca904686fce99ac5c0a90a3c86f077240ade3b8cad8209db2ab9016d281ccb1 size 1292 diff --git a/data/minecraft/structure/trail_ruins/tower/stable_3.nbt b/data/minecraft/structure/trail_ruins/tower/stable_3.nbt index 6ca7eac9..0f98dffa 100644 --- a/data/minecraft/structure/trail_ruins/tower/stable_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/stable_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a88920dade946166e332738f4c7c422b0885145a635edf3d54219ee7542799ae +oid sha256:c4fc823f018e12b6f8236d94cf1fef18491c85fff0a728fd4735eeb32e9d0070 size 1256 diff --git a/data/minecraft/structure/trail_ruins/tower/stable_4.nbt b/data/minecraft/structure/trail_ruins/tower/stable_4.nbt index 7b07269c..343b8235 100644 --- a/data/minecraft/structure/trail_ruins/tower/stable_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/stable_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b620e45a7078427155bf427432f324474600a05107833ff125b97e8fc909834a +oid sha256:7403939476f744d44394b5841d4f3d95f0e1da4445ee9bee5fb24c297993d954 size 1290 diff --git a/data/minecraft/structure/trail_ruins/tower/stable_5.nbt b/data/minecraft/structure/trail_ruins/tower/stable_5.nbt index 05be770c..ae7c2a50 100644 --- a/data/minecraft/structure/trail_ruins/tower/stable_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/stable_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3742859d85fd5e501d0df1e3dd38e9eed147de3ef7385a4a951704e936f34713 +oid sha256:126e8eb5460a90cfc826446e064d5a26e72be8aa881ae21726236fe0d16097f1 size 1034 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_1.nbt b/data/minecraft/structure/trail_ruins/tower/tower_1.nbt index 4cefeabb..f24d45e6 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:42263a978250b817ab6e037be24a749227a7f8404be35534e637a0c851f285a8 +oid sha256:88e5bd78dd0b869cad5cad87c0988ebc14b44f24a2e3f1439e1e682a3f421def size 1585 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_2.nbt b/data/minecraft/structure/trail_ruins/tower/tower_2.nbt index 2a88cd5f..5a655d81 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e5a8a2fcfe0efd23767590f8d3236caf7bb8418a9f38150b973297a83c035a9e +oid sha256:30b2e88a8543bbc1d7485cb5fc9a6ba0b5d5922e823b047d01c5809be13e5506 size 1619 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_3.nbt b/data/minecraft/structure/trail_ruins/tower/tower_3.nbt index 3fc9d606..c2640c5e 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbb878bbf5fd0e5d4bf0d568a22ee4cb1723ec62667a7a8d71f10f3e36bc6125 +oid sha256:171ceefa740f3af05268c0a3f4f2eb80628579028486e3218c91e6fa448683e8 size 2229 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_4.nbt b/data/minecraft/structure/trail_ruins/tower/tower_4.nbt index e2396cd2..3db4f6b5 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5bdb66ec8d6ba254463a32ab21e638b1cc0f59d8123e802a6780e2e251c307d3 +oid sha256:98de53890c0e096a66edc349b550fe86f4cb276864ba8115cf47e2ae6f52f9eb size 2091 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_5.nbt b/data/minecraft/structure/trail_ruins/tower/tower_5.nbt index d7a6d0f0..a7639ec6 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9c3311b0426f052c65885a8e9dcd7054e6a1356b416231920126610df3b5212 +oid sha256:9e1c13526457c404e02fb34487ddab4b06ea06f669f4234d3bfc671e3908c108 size 2062 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_top_1.nbt b/data/minecraft/structure/trail_ruins/tower/tower_top_1.nbt index 1e6e9681..d93f29c0 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_top_1.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_top_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:43cd70527a2dc69b41521cb1b45169eb287d1cd96a270cdd5e219192dccfb7dc +oid sha256:3187c070f15fbf9dfcb48076c7cf4045dab725247e7379a908217691b93912d7 size 505 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_top_2.nbt b/data/minecraft/structure/trail_ruins/tower/tower_top_2.nbt index 11196131..66e2f437 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_top_2.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_top_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf28cb465323d8c894289a03d7adcfaf6db09ed3948d78ab11a83dd9ed067d83 +oid sha256:8843ba8847b66e420973498cb81c761dd904dc195d17c63ac736ac8991e9fdb0 size 522 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_top_3.nbt b/data/minecraft/structure/trail_ruins/tower/tower_top_3.nbt index 0c7e757e..ed2699f5 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_top_3.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_top_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1aac2bb990b5f11706340a670ce625efc7ace5ac92c17a29eb00589268ba4188 +oid sha256:e6933a6968264b50d15ef9bd3d9d5889d0dc623b6c2e1bb9389db587e3c7b900 size 501 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_top_4.nbt b/data/minecraft/structure/trail_ruins/tower/tower_top_4.nbt index e36d08b3..58a0a7e7 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_top_4.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_top_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cad2083c9a62a6b90bcfa8446c33b5b94449db811dfd837d22ffe07a1105bc70 +oid sha256:c490ad0da0f6391388d5db6190c9a13b687c5315a1eecc162e05edda891a0a34 size 481 diff --git a/data/minecraft/structure/trail_ruins/tower/tower_top_5.nbt b/data/minecraft/structure/trail_ruins/tower/tower_top_5.nbt index 5aa37363..c6f41e93 100644 --- a/data/minecraft/structure/trail_ruins/tower/tower_top_5.nbt +++ b/data/minecraft/structure/trail_ruins/tower/tower_top_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bfe534512a0b25a6b6f5c6b94d1f604ea6f875ef58f7427349dfbd4f97ca7748 +oid sha256:805d8e147805789d3feba9913c6e4eb9f90bf417ef03ebcc335b2d8cc745d297 size 406 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/c1_breeze.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/c1_breeze.nbt index 30850f90..7006e22c 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/c1_breeze.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/c1_breeze.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b2f0956554d743f89db96537185b5c2c735502b91327a76c24359f5b0d83b406 +oid sha256:86d2e5b4ffb9a2440589a5bad508e7040b3f2e59955e8cb987351fc46a705f8c size 1695 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/full_corner_column.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/full_corner_column.nbt index 1ee47e68..58e1f37f 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/full_corner_column.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/full_corner_column.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cfe5634dd5566284cb4154d8f892ecde7f290169ee7217fb840bd460b2c5da8e -size 4157 +oid sha256:59a43bcb0c8f8eae3d19b192b0ca419216005ca24f044a301f1fe52e995d2a43 +size 4158 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway.nbt index 06646a4e..5b191527 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e0b29781cf75dcb4e27481fa69b8314089ba0bf1d9e4cd4755108d8b024da9f +oid sha256:d9dc36057fe5fb5585fed53c38673af8e8f35e4511e4ca8419f2cd8fa253eb42 size 4337 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway_2.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway_2.nbt index 15a4e8f6..511f397b 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/full_stacked_walkway_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:73f3041c520eae198d3a87c133d4c598b33313f23afda5180bfd526490d9fe11 +oid sha256:35f3fa842af3468bff5c96df1add43398700407770250c3fe2197672a48643bf size 4281 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/grate_bridge.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/grate_bridge.nbt index 55d41ef1..065630c8 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/grate_bridge.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/grate_bridge.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f87cefb2ad2ad4e122037708a67ccd3bc47ddb7c913ce6f647e13bba3f9bf6c6 +oid sha256:cfb55d8de3893e47ee3baf37ea2475a1a7a2e1630ea22ecbe94e76459acd5369 size 1754 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/hanging_platform.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/hanging_platform.nbt index f5125b74..1a2fb3da 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/hanging_platform.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/hanging_platform.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:45c8c8fb9b5d0c883ef2c89969cc4cb7a56e9c55c77c2e3cb5e8045290d49ef9 +oid sha256:79c61cb13c5e7d6d138863d1b4b87b6fe424b6d9c5681fd54ad33ab6449cb968 size 488 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/lower_staircase_down.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/lower_staircase_down.nbt index 1931d6fa..66d1f258 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/lower_staircase_down.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/lower_staircase_down.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9cf3420592c60b1c121d1c39c80644082544d9643864e6acf28bd3d50b8f26ca +oid sha256:55a5b45415df4ecbf72ffbae8582038ac1e0604b3fda50d086d36440925a869c size 429 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/short_grate_platform.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/short_grate_platform.nbt index aadc1e1f..6d6b7fbf 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/short_grate_platform.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/short_grate_platform.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4c0f9d681b317cf9d13aa41fa6634451890bc76ca513f3d8beb0afe62328aed +oid sha256:b5fac60ed244cd003232830c1a36fa0b5a09d3a96e63c7a469f03ea7c6e0cf5e size 800 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/short_platform.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/short_platform.nbt index 80035461..e9236a26 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/short_platform.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/short_platform.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56033368149e989bc32f03c453143770d94500d1a915fd32f9eed014dec73dab +oid sha256:f5bc444e64165e000e62a95b09b278b5e1815f5f3ab7ecacef81eb85ea8843d0 size 585 diff --git a/data/minecraft/structure/trial_chambers/chamber/addon/walkway_with_bridge_1.nbt b/data/minecraft/structure/trial_chambers/chamber/addon/walkway_with_bridge_1.nbt index 5b4c2833..bfd94317 100644 --- a/data/minecraft/structure/trial_chambers/chamber/addon/walkway_with_bridge_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/addon/walkway_with_bridge_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eacbcc5b3014b64b2d264f5222a372a8090005e9e829e8bbc761c455b4a9bc56 +oid sha256:78d60a8bbc9af05d4be153ad88332063d5c61b9b20c92a70ef852697c5cac9c7 size 6221 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly.nbt index 4f51d409..e92e9ef0 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d1ee1233406632af692b79334a39e249694f4460fa215061ce6b719b3229c6e +oid sha256:c4ae79e77e49cb6d086f06652a86f848b511de4d2d40532da703d35facce8dcd size 54409 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_1.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_1.nbt index 508954ca..e72b6c2d 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3810610a9224353718222a0f9d8c88573925baeeaeab02be5029984b48210660 +oid sha256:e7d9f1e539f452137b532dc044e04f9309d0e55d19dd4b2d783613c6fb8bcc54 size 957 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_2.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_2.nbt index f01a56e1..e9cd4924 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3f77cf5791f97af8b448400a7f9a8aead7aebaaae3598699d1364cf9e6d20558 +oid sha256:435110dee550f21850cfdba9cd1a6f0a7739156dea5d55f66ec7a13a5fcd23ac size 950 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_3.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_3.nbt index 80ba4f99..7ace0e23 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a3d06a2646f96a7c8e3cf41d37c7cb4ea4cac75dbde6d4219d6c81f79ebb10e +oid sha256:2aa512d3a08bcf1f68aea56299446a9ae5f8c43fb91e78a1ffab843439116ef2 size 957 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_4.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_4.nbt index 4f455f49..f756d52c 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fbbc8541aa65ca67224cfb6debf8b6a59fa14219c6177499e39e27dcf88c6c78 +oid sha256:61e739c8bc414499bf572491b02c078d10cef9e08841c4706997901698229ddb size 953 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_5.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_5.nbt index 20842998..fdc654df 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_5.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ff8ed33855a91d0661781bc5b73e047a106d8d78b398ebb962cd71a172dd1b4 +oid sha256:05bcf731fa1996230428c4fd3d6076f685e6cd0b3c04347b99a6d909e4f39243 size 1025 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_6.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_6.nbt index fda36062..e10217b5 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_6.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:98b0767de4b5641d8232071ec255a1f136a39a65c33cb47aa76b8f1e06d59d7d +oid sha256:6c049b59934b183d0f15e9c849e6dbe52d6374888e113aee73d6634b7fdbb826 size 1022 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_7.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_7.nbt index d4f5e395..9b8437bc 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/cover_7.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/cover_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:538aa063c74803efa924a14d426a75f3e697f13041ee84d24081f8b1127517ef +oid sha256:a7cbe749e8d2b0d98ee219f7be376af14f3c92e7aead062ff5f04533fffac4fc size 756 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/full_column.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/full_column.nbt index 4dc61efc..681b0fb0 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/full_column.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/full_column.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:241144093a2dcf3ad1703265d75b156f797e32df87cacc745728007edbd9dc51 +oid sha256:b7f168bf5eca60775fd128c2b8d6341dbb58181da7e06b5b6903e2c4ee855912 size 661 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_1.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_1.nbt index c05d9ea9..d2635a77 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1512506a345701a1685d2862d28dad50f135b0b452c0198122243f45a3f75932 +oid sha256:1c31800af26837dc4ee31968c2cf4003363474183ccbf7f0d4bb952d99a90919 size 587 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_2.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_2.nbt index 14d149d5..f1382bfc 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b32a947d9f82c550716d48b3751bfe55585d422cc3b328506bf2d6d365d1f56 +oid sha256:0524f0e2a382138925bbcefafdc01dfd5b9db9c5bfd4c10c294c3aabe1a58c8b size 869 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_3.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_3.nbt index 288947a0..f8d5cc59 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6fabe194f39f4b2749c6f7e151d6466b37e4001ce5cdbde063f32966862f0d18 +oid sha256:e0102c7b301e4f31ce6af7b33eff57f1546d299c0529dab5cea5ee914d49bf9b size 537 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_4.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_4.nbt index 20245879..4a546d45 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd230d3c8078ddab68087c7a9bdb7221d9d57dec779fd72314c988adcafe6a1a +oid sha256:75b9a0d143c815aa22ac3327dbeed7ac039203dda0f72c6bfa2461cc92b466fd size 639 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_5.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_5.nbt index eec768a4..1451afa6 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_5.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/hanging_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4042f8fbb059c16d3a8dc5af1612296bb3c1c5863f6c9c0f13899dce7793c25f +oid sha256:6617517ba525bdb12815ea438ec76ad939c79156af6ce4b934fe4a68dd23f9c3 size 340 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_1.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_1.nbt index c5f222f0..818f2252 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f2eace4851db415b9bf08c49f9ecde8891f59bedf3f278b3138c8a16877bdca +oid sha256:449d58f1f1f6eefcb8ac7d6d8ac47256dcb87d06e342c7d84172568c239e623e size 2462 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_2.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_2.nbt index a6de9e25..4f653f72 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0674606e7d7f8b04f1ab28dfe1989208ea0ebeaaf96c0650e30b0a7ccf099736 +oid sha256:cc89b123bbe0f5cb0c57545e8a450deabec2434e45745c1c45b692465ac5e11f size 2495 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_3.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_3.nbt index 286b12bc..93fef574 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/left_staircase_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea0bef588da86156910905fc5ce36699ed6a060c23ff0c4a7507c6456c531923 +oid sha256:cdbf2434319b6b8863fda29cdb690b28cf3da77fed1dc7cdf7c8a46f72319c59 size 2511 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/platform_1.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/platform_1.nbt index b666623d..e7c5bb45 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/platform_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/platform_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c7b84f7e55090144c2f4c185c40e1d8550d65c145672b698427b3fce6a88f6af +oid sha256:d3ddab51ac5521a295b4dfa88459d65bbf44cad2451da54cbd339813c8c0d32e size 473 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_1.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_1.nbt index 75c5b030..3df7b1fc 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0d6beda9742fd4bc6fad82af2689cad9fa684a3ae13ec11a42f8335adf02316d +oid sha256:7812ec8cc317dbf13120ab87ff3d9cd6d30d5aa2261517abdadaf0710290a496 size 2424 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_2.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_2.nbt index 0cbd771b..35c512b3 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5df577e61b422f187ae24ba6400c5dceb4c4321d6c768d131412e93a4db64cdc +oid sha256:88d8cc3f66e55ce92fbb170f0d756d3e7547a05477b891ece884dd4273f5d123 size 2551 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_3.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_3.nbt index 2423fce2..293ee999 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/right_staircase_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:22d67f95cd6c9c54ec20c30082e6fb7ce441b3672c5c17a297c40337b3d2f09d +oid sha256:51306eb74096264f33f10ef00888e12a3d9ee7e8edd309d362fc560ab3e9717f size 2558 diff --git a/data/minecraft/structure/trial_chambers/chamber/assembly/spawner_1.nbt b/data/minecraft/structure/trial_chambers/chamber/assembly/spawner_1.nbt index 820abfef..7602fe03 100644 --- a/data/minecraft/structure/trial_chambers/chamber/assembly/spawner_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/assembly/spawner_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4537d03d038bf10035e3d514a34c5767f4bde97bae2d2e2a85d2fc817828a2dc +oid sha256:6e01f184c22248cc67812c7403ac4473ef65c5fa27d057a4e0e18f516d402003 size 916 diff --git a/data/minecraft/structure/trial_chambers/chamber/chamber_1.nbt b/data/minecraft/structure/trial_chambers/chamber/chamber_1.nbt index 713bdac8..7942824b 100644 --- a/data/minecraft/structure/trial_chambers/chamber/chamber_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/chamber_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a091a01b3ac2cba4cc547896f4939ff64c35e68c7c5e314afaf4feec75c8d00 +oid sha256:19390578c674f7d1dff73a9af88383e5762a68b3546d9098cfdaa3e432a4d37a size 38589 diff --git a/data/minecraft/structure/trial_chambers/chamber/chamber_2.nbt b/data/minecraft/structure/trial_chambers/chamber/chamber_2.nbt index 364dd19a..82e2ea77 100644 --- a/data/minecraft/structure/trial_chambers/chamber/chamber_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/chamber_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be25827df5872b607a061d90bb02045407aa9d535bb1116c3d6cb11ba3c90a5b +oid sha256:31a3489153d10f81d3451df22b6f04917aa93ca82376038651f26689987bff3d size 38938 diff --git a/data/minecraft/structure/trial_chambers/chamber/chamber_4.nbt b/data/minecraft/structure/trial_chambers/chamber/chamber_4.nbt index 5fdcdc5a..a2dd6095 100644 --- a/data/minecraft/structure/trial_chambers/chamber/chamber_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/chamber_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b946fb4a4dc6f017a062931719b69c1340f0b71e25760b1aa31b52e79ed3c2f3 +oid sha256:5631b99b4a081f96719dc80ebc8fd080be79696c6cff67d5ede715cfb53bb90c size 24479 diff --git a/data/minecraft/structure/trial_chambers/chamber/chamber_8.nbt b/data/minecraft/structure/trial_chambers/chamber/chamber_8.nbt index d9cf5473..371d786b 100644 --- a/data/minecraft/structure/trial_chambers/chamber/chamber_8.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/chamber_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:066a0f15b3df058a0db7bcedb321d8a3d2a3dd38e5de1eac307a3c88fcb13014 +oid sha256:c643773b262aafba4cc7cfbaae0b5e203933a4f9831033206c5ba555cb71058c size 19203 diff --git a/data/minecraft/structure/trial_chambers/chamber/entrance_cap.nbt b/data/minecraft/structure/trial_chambers/chamber/entrance_cap.nbt index 23c23cc4..03def97f 100644 --- a/data/minecraft/structure/trial_chambers/chamber/entrance_cap.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/entrance_cap.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4eaac92ebab4121ba67a01cb2f27a99a87a191383a39154a81bc0741ff1251d0 +oid sha256:26a77d478217ecaa3bf2c528190a1eb6c3dbde8f096eb4c1510a2fb88e1c2528 size 384 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption.nbt index 34783f37..6e201462 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44397910225539d7bac7de5993d92b6851ad0ce21d7e449aeb68829deed1a95e +oid sha256:2e27f68d0179357e4cd250f16eb17ad75a92c5a67ac682c70e575927913026c0 size 31897 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/breeze_slice_1.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/breeze_slice_1.nbt index 46db16f6..a4636250 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/breeze_slice_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/breeze_slice_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c4e7ecc5832cef4fd134735a651a9504b3c2069668140ffbeab0265ce4c6bbb +oid sha256:fe1802966306d1539afde15e2366b9a366ff1ff80ea066774cb34cac15182197 size 2594 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/center_1.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/center_1.nbt index 00bdb970..ffd8bd93 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/center_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/center_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2551487353c160925ddcad7df99e219ca6a8a77067396ea341f96eb25ff42701 +oid sha256:0b35fd165972b9f8e088617aad6e9af368c81e763aec4336b042f2b0b5c72024 size 1537 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_1.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_1.nbt index d213f9c6..9a35997f 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:efccf81bba8e705b773467310bff1a3d57265e11e001f7997282384cdfa489d9 +oid sha256:e49bd110c77dedfcc0dcec3271808b961c20451efb197936232bd94d6e191a96 size 4438 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_2.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_2.nbt index 02f4bea3..54ea6d30 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f153f33d6c7e1041202addac8ec0cc425557926fde8e4c8763d1ab7b4a7ae0f8 +oid sha256:58efba93039a803713b5205c430aeaed3dc23d909ab270f96ce57d4bf79018b9 size 4602 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_3.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_3.nbt index 59e85ec0..a62e24ef 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:670ab8acab5295f46696d7d66878e149c368edd3becdb79baaa747f027ccbc2a +oid sha256:679ef16b0822e7a0e6e588e66b1469a6649eebd0d7f08d78312b4ea32620557b size 4684 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_4.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_4.nbt index f313f8e5..1932f376 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d4f8d3c8036ef82d01a2e5f610cf2869a398a4c636408b1e62606ba91297c0b +oid sha256:436c3da8227d05163622da508762fa7e8ef5a014a83d8d88acb490bc9de1731f size 4835 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_5.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_5.nbt index eb3e147e..6c4346cc 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_5.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/quadrant_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee09bf406257af5e01615daedc538580c7249ff42f965f87be66ed79f1e00089 +oid sha256:8d6496be5e7897126dfcb46be05bc6bce8499dcb3f50a217ece1e816ed56e532 size 4787 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/slice_1.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/slice_1.nbt index 5f758932..f556fc1a 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/slice_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/slice_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ded6f9964bdbc73521dcfb3288f9d2754c7260888061136f40dec2ead5de9b1 +oid sha256:ff5b487c262ce33dec4d9cb80992d3fbce5845a68056e186a4f8f7161ded3b7f size 2506 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/slice_2.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/slice_2.nbt index 6b6651aa..85972a1e 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/slice_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/slice_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af1c3fefa118954a0e4c74cd82064ffcc4086e4641a2ed942a4a981cfa40ae1c +oid sha256:bcd7139df8a8b9e7693757feb290d0760bffef0b347ce7ed39c579f2e6c5d75a size 2483 diff --git a/data/minecraft/structure/trial_chambers/chamber/eruption/slice_3.nbt b/data/minecraft/structure/trial_chambers/chamber/eruption/slice_3.nbt index 84fbe875..2d3920b0 100644 --- a/data/minecraft/structure/trial_chambers/chamber/eruption/slice_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/eruption/slice_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:198af57e07c59ea1d6250aca410eb39a5de6de255a14ab81b2286bd1689fe647 +oid sha256:b444ca8797e81435b5fb25390a3120de9b1c5ba832db446d57620c9a5ddba3b7 size 2476 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal.nbt index 647fe206..7b66a9df 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f6c90eb77d3d240ec989d253fd5bd1227bb2ece6b30dc2dfa1fc6d41eae0e4a7 +oid sha256:3fc29eb386571eb3319bb2d36a7ada5cb1843d76be717e8e0d6d6cae33e3950e size 47359 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/center_1.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/center_1.nbt index 6a97f678..aca89089 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/center_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/center_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e2307ce7a59ffea8281559e2924620b9d96d1e8111b69c5d7673e7f8a33afd2 +oid sha256:49ce5c3882010dbff2bd433d2d9782a8d0b56a73a7588442774c40e4ad9afcf3 size 3678 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/ominous_slice_1.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/ominous_slice_1.nbt index 74ebd6d9..48c161ab 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/ominous_slice_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/ominous_slice_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:10d1bbf8c6c1be13894006dee85a750aeb6f445b8637ee88ceede62d771cb703 +oid sha256:13b5c565653424d3886080e2c634bf001e91b804e7292995650394718f8a1310 size 1919 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_1.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_1.nbt index 05c8e618..19dda804 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d99f3729a5550076f7f216aa8e16dee7b44cab1e3df5c15abbe969fbe2381c37 +oid sha256:fdaf1c83d7910e3f4c0d9f6f3e87ad4613c469a2426f7392f64f9b5ded659002 size 3462 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_2.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_2.nbt index b84d382f..f154b7b4 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e389b2ccca38a6eba76ee4813be8cef8b625eb26b0bbc9e89ab30ef3e13a232f +oid sha256:4015d3b583f2d8dff9f5d7eebbde770a9a5e76f091b7c6562aaf95dade654610 size 3326 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_3.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_3.nbt index a21a9040..cf42d7ca 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/quadrant_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44e576b4f0c30a2c338ae8c9d9453cebe498c1f25485a5ca841ba749a9e51a60 +oid sha256:e689980e88eb72f544f757aa69cda631ea465c9681c8bc22465a042a5758fc81 size 3910 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_1.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_1.nbt index 0190c0cc..d2e5c431 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32d874fdd14fde834041e57b6a62999a7ad863c86b951abf9240d424a704e1dc +oid sha256:574d779e4d52274d1882b9a68972a9bb7b5509ab44b46d6a2cf02fdbe6346f41 size 1922 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_2.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_2.nbt index 37cf3d78..28cab8f7 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:659e592a32a2d946c5d28385d79761b7eb7206eeb0efee434c63343e6366fd08 +oid sha256:b7d9456c802dbb9062b95e0dcfede7587b2f3a4cb5e75fe0cefbfca5a6f26815 size 1964 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_3.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_3.nbt index eba3675a..ab467029 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:22eb83cfae554185dc33b0b766bcd98792bbdace8fc4b27b45296cf689b149d3 +oid sha256:822181289ae41a66dc394126d40b52154c529419f0f6ed88b554a6d359dcda32 size 2010 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_4.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_4.nbt index dc11c4e9..aa6004c0 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7a1084cdef63c23ade8a77d8d873ef413e5ab8861aa3a09612f261d8a23098a +oid sha256:72a06e0185f9412f21b4d9af6bfe88986ef63bbbff8be777b1c4a868f11d0240 size 2018 diff --git a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_5.nbt b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_5.nbt index 4569b8dd..45ef9c99 100644 --- a/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_5.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/pedestal/slice_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3a5b7c27176f72d3071ca67e20a0ec1fcad587ec12852bec4166643e8618d2b +oid sha256:1f6b5decb759955369e1ed8fd17492c18b168495c3ab44e6a0e9b97cb60e5ef2 size 1970 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted.nbt index 410f2bc0..46812af8 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:57ae185c36323272fdf4824a4644b40077914dd123fc8a532ad44c94a908a371 +oid sha256:f72bcc9c81c04ecaea8f0d118b3fffd2eab82d86fce9995622fa8d910e0129f6 size 34273 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/center.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/center.nbt index 24b98668..4a4069e1 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/center.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/center.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f587a442880f769edb976dda861337c9bed6796920fd4ba3869577e3fdd799a9 +oid sha256:fe89893cfa08e6a23dd0221a544f9525f2c9f8431f17341d134e9ac3ea57b8b0 size 1276 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_1.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_1.nbt index f5d16d5b..8f630fc1 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12cf1626813b71377f42156c6a32c1d49bfae456c07051565216d7afad5f42d4 +oid sha256:dc60aaeb8bb96e97d8853f820302ce92760ec47176ad39934306415b6dc86ea4 size 1008 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_2.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_2.nbt index ddd45e99..6d12072f 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c7be51e10e30388d4db19d9991badd14234fdae4a141cbe1612d941213964c7c +oid sha256:6c76ba40d73d0be4781b696f0dd700406a5cb8da1510d58a3e1cd70e2d3137d1 size 1133 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_3.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_3.nbt index 62c8e47f..8c332473 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/hallway_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5098afbecae1ffa7d25bda8aaf28e9920763f4060adeb461bc5856af66a58811 +oid sha256:0d4a946cb7d5ca1bc896ce8ce3527f9eb22b7f7132ceae2f2019d1bd71f7ab5a size 1059 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/ominous_upper_arm_1.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/ominous_upper_arm_1.nbt index b971089a..da06c5c2 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/ominous_upper_arm_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/ominous_upper_arm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a735f3e2bd42c6d38a0e4ef2d88fbe85319d00782ccd541e45f66d53db4d7aad +oid sha256:8604552a637e68b990f1b60dbb6f4381d1e8327fcab75c8b6cd25439979e721e size 1344 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_1.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_1.nbt index 4555f991..ccaf3c34 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3146631df0e4e2f47271646c64135f8a35bd275c0ba19431631fef20a77d386d -size 3429 +oid sha256:0006e977b2e384bca5c81e69e38d8249144887cbb8d490df5e28cfa6fd01e345 +size 3430 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_2.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_2.nbt index 220f81dc..a91b24e6 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59921203f532e49be7f910155a9e2f53a6d127c41bdd3861d435e6aba1d763db -size 3445 +oid sha256:3651baed2163960c94f10c5034a49a219be48b4b92f04adc8d60853e0f00d8d7 +size 3446 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_3.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_3.nbt index f6e2e7fb..f89a8a5b 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:027c76a88f0444eced0e4810b8af736064717393ddf4a20d71362d7bf5af3e75 -size 3435 +oid sha256:cc1d29891aebeaeaa56d2704184e8c0b947ac86160094b1b249d3658ebdc7d6b +size 3436 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_4.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_4.nbt index 761ed433..fc4a5239 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/quadrant_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b16d49123611df697df463ecf2f407d70ec52a2ed1f58f1b3aebeffc9eef165 +oid sha256:56f6b1a481bba8b2bd370828a299b45fc88cc96d42287498e31c0fc329279e2d size 4325 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_1.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_1.nbt index 73bd1ab6..297784ac 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_1.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e5af4d88daa129f168ae23ca7a418d1666966eccd68eb8a99570dae693d2bf6 +oid sha256:ccc58877453af69063d18d80f3af6daf7a8e9834cf91af8787ffad0949407b29 size 1324 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_2.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_2.nbt index c15047ef..47a48bdd 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_2.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30a017e6ccf2f5e78b430501598c613be84d646e4e70887cade74abc849f2141 +oid sha256:a314a75780cd6e6cbf66b77a920f1498b3b4a978198cc170722a9703d4b77c98 size 1319 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_3.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_3.nbt index c9f48154..672ae67c 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_3.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:959a04b61033cab7afa2f3fa0862728bcda29341b5b2f69a792269042e659b7b +oid sha256:36774bd896acd4a3c1d16f78465f76c58ab0ca3b794b96d91dc65b97a842a691 size 1453 diff --git a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_4.nbt b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_4.nbt index bacccc6e..1bf72832 100644 --- a/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_4.nbt +++ b/data/minecraft/structure/trial_chambers/chamber/slanted/ramp_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18185bdc4453a3b6ff681fbd86e3db7541a88b8a82f253a17e07dace94ddbb2b +oid sha256:45aecd47ba15e233549f7d0f50abbc0a7d45ff5c7ab27bec4a1909c0369fc6d8 size 1232 diff --git a/data/minecraft/structure/trial_chambers/chests/connectors/supply.nbt b/data/minecraft/structure/trial_chambers/chests/connectors/supply.nbt index 60f31d7e..a010e93a 100644 --- a/data/minecraft/structure/trial_chambers/chests/connectors/supply.nbt +++ b/data/minecraft/structure/trial_chambers/chests/connectors/supply.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad3b7c2ab4fc19417ba5be38a5e685433b0f9c3c049cdabdd6fc731262026e77 +oid sha256:5cfe6e4d268c3b06aa81910dc750b28cf0d66056ff0f0ec640693193f65bff13 size 355 diff --git a/data/minecraft/structure/trial_chambers/chests/supply.nbt b/data/minecraft/structure/trial_chambers/chests/supply.nbt index 6d111275..9f615ecc 100644 --- a/data/minecraft/structure/trial_chambers/chests/supply.nbt +++ b/data/minecraft/structure/trial_chambers/chests/supply.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0db2cc83d2f5f83f5a628abb4fd6f4bb5b8f1e93619ebc5ac4302f59e720efce +oid sha256:35b946182e5e73cb99aecc58f5f46512196d39ee95973c27029c00d411701563 size 440 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/arrow_dispenser.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/arrow_dispenser.nbt index 0b52034c..91868bcd 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/arrow_dispenser.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/arrow_dispenser.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:27965c8ae8e5c83c8d58b36e26848db52409fd11af5a57c4d969ca3e2a2d1250 +oid sha256:5e4e1e59039c44e8b00d0b452905e8593ae3af2a10f14b08edfe6861ce009681 size 835 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/bridge_lower.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/bridge_lower.nbt index 206eec26..7edffaad 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/bridge_lower.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/bridge_lower.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b62944d0c74fcc67e2a8fd8bf9c49c836ed48423f498da3a4955aba03c0b942d +oid sha256:ce89dc82e19f3454a4e8e1bda62bc2ba2f30e2dbd6574d458f3a0b47ce95af9c size 698 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/chandelier_upper.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/chandelier_upper.nbt index e8af54c3..dddd78f7 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/chandelier_upper.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/chandelier_upper.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d60d29a17c4312446bbda182669825511916c093c3b6aa12b1b4b287870f05c +oid sha256:baf91091db840b6c7c7056b75a2ccf2475a7d230ed73f0e706d02a3cd0240dc8 size 514 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/decoration_upper.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/decoration_upper.nbt index 40448bea..40a3e187 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/decoration_upper.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/decoration_upper.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a9a2bf6f59b0760685bd4965b8e4c5f7afceb7e4b3ae592b3ef2ce9b179c613 +oid sha256:956e5b9276828c5f10007c4f640b34ff195c82e86a1d9920aab3c834123e6f92 size 514 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/display_1.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/display_1.nbt index 6eb40515..28086a56 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/display_1.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/display_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:73c2c265f458b3f17f52650d6bbfef544e22d8833bc43d6921f8bb7734511425 +oid sha256:6088e35c792b8d4633da39bfd14fcb19af79e1a59879eafe5b02c137dcdb6fdb size 901 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/display_2.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/display_2.nbt index 8d64d997..0613bcc0 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/display_2.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/display_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0e3d171963dcd7075227c2b1274ab00214546f28577c7dc0f148dc1f86e8a708 +oid sha256:48ac6450b4704a4915de3180640f976603628820bf9dd5a9d3bafbb92259e25d size 1529 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/display_3.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/display_3.nbt index 294a50ab..6776f088 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/display_3.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/display_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b736f5bc1cd14eb16b2e83a6fa662c1c2a47cc95784b019e11f8e01ffb224cd5 +oid sha256:3aaefbd5838dc46a30d143e155034d18ad362b2158533d0ddca263706bfbf48f size 812 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/head_upper.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/head_upper.nbt index 17bf5c6f..a3332037 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/head_upper.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/head_upper.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef1a149452b122213324623394f3299cccc3e048a51627775605720be9964301 +oid sha256:ac2c87aaa51d77868e0321305fba76db7effb07610cedca45a77b533deeec430 size 526 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/ladder_to_middle.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/ladder_to_middle.nbt index 8cb9e2e2..70db7e86 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/ladder_to_middle.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/ladder_to_middle.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7328ac4c87d0a9019a44da1bda372fd37f14313f3a9f52ee39140836c55d6d3b +oid sha256:045b637e552cc24020218ebf65b64931440a760ccd2bab183cbcff2bed448752 size 670 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway.nbt index 57e8f01d..a2e65b9b 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c449abb6b97e4c2d123a8837bf5da38c6926adf37f7afeb43732db6c3f057f17 +oid sha256:75bea836a6878bdfb1ac7ce6795225477cfcb4449129967dca92ead9e0471766 size 1160 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway_upper.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway_upper.nbt index 5a24fbc5..97862f05 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway_upper.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/open_walkway_upper.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7eedd338ed7ad7929023741db77faad1e65731c7cbe919a49baac521841b8c1 +oid sha256:a9018e8fcff164ec09de19474f4faa011faff6cc92ef067d231779d81e338685 size 587 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/reward_upper.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/reward_upper.nbt index f952bfd9..1ff44e10 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/reward_upper.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/reward_upper.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7183ae027e2b6afba1628e55379ad872d405d69b7000a4b57386ae03266d20e +oid sha256:7a7558cc1c00763a09671fd6377f918ed2d8b65675670331529ddd18802b7a6c size 590 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/staircase.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/staircase.nbt index fba12151..515fedc5 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/staircase.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/staircase.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5955eb46c9a56ed3c228623ebe93ffd8aff7e8bb793106a08e8b0ca62a4ccfeb +oid sha256:e20f143c66ac23827878627032a83dddd32cec457cd80efdc6b8fd3a1295dabd size 457 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/wall.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/wall.nbt index 7b1e86a6..7fe910e2 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/wall.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd0433ccee2c1e52f5354007eca73f2355a3759348337886ce4404a6d12f1bc1 +oid sha256:239ca391d38a010318316075c079d1307d2dfc2f557fa1eea88509d305a82837 size 909 diff --git a/data/minecraft/structure/trial_chambers/corridor/addon/walled_walkway.nbt b/data/minecraft/structure/trial_chambers/corridor/addon/walled_walkway.nbt index 875f835c..360ab41e 100644 --- a/data/minecraft/structure/trial_chambers/corridor/addon/walled_walkway.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/addon/walled_walkway.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a9684eb51c257d5a6da2930b7615fd69d6e7448d081476838b34074c69bf2c7 +oid sha256:9ac3b338c4d6a354576d2746f956beeafa42ac1ddb078654fc05182f23401751 size 1186 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/bogged_relief.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/bogged_relief.nbt index c3e60b11..786eb9f9 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/bogged_relief.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/bogged_relief.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7748e85f7cf23c9e74a16e4311e8826fa52469714acbc6b02a85232a06e23b6c +oid sha256:d19621a433c96f34863305a45f59cb7e6d9a507f98070625af301877a4a56d97 size 3245 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/breeze_relief.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/breeze_relief.nbt index 4dd1fd48..968ccc7a 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/breeze_relief.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/breeze_relief.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:349a0c4f68c84b9dcd5626310deb7a01e2ab651ec1a89f47e15f630a307d9c41 +oid sha256:09cb1902b724305b0254755d5006d41c1c772c9a3d79d6082e4ea062093040bb size 3224 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_1.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_1.nbt index a5fb66d7..81a0c1a0 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_1.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b94015a2594bf308dec6bd87176b6a25b6d3baf5862ab8ca6166aef17d01198b +oid sha256:f1bf0d832d4808a1e98c69702d33bd1b29986333f79372cd1a6ea471c921e2f7 size 2884 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_2.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_2.nbt index dbbb4c6d..1faf6b3d 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_2.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82ac04293bef439c3b81c465716d3e4c799c58c13ada5d9c9cd27b5af89774fa +oid sha256:2ab3f46658fbd2cfe416583d667b3207ac27e5a491d99e0b500d9605d0299a11 size 2821 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_3.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_3.nbt index d2d67c5c..6860afc7 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_3.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/grand_staircase_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:460796015519f9db455de201fbf9de08a75a80c15bfec91b169f302bf697a6ea +oid sha256:9533eef3f81d34bec7184f25492c0e154afa2087abdefdf6b57aedd2aed96de1 size 2831 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/spider_relief.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/spider_relief.nbt index 9c09cb51..6e00be5e 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/spider_relief.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/spider_relief.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b400142c1f72decdf285d43313a2ccacd02728e47563d61f755abb857e97c1d7 +oid sha256:7009b43da1ae7a2c42247bd9046539c52f00122e99f44cd0a427858d4fa25928 size 3849 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium/spiral_relief.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium/spiral_relief.nbt index 4ffc7f44..a826de5c 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium/spiral_relief.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium/spiral_relief.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:57b7d6a7e5ab9cb9517fc7142347ead6ce548596be1b9c45e26acfdab6d75616 +oid sha256:85f5d958812395e1bc4d91bc67641c3ca5bf5b7f07268e84e616917e74511915 size 3317 diff --git a/data/minecraft/structure/trial_chambers/corridor/atrium_1.nbt b/data/minecraft/structure/trial_chambers/corridor/atrium_1.nbt index b74ae7fe..fbbeb976 100644 --- a/data/minecraft/structure/trial_chambers/corridor/atrium_1.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/atrium_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e3f42ade7a43a78e3f92e4f6a94ed483ae759e7daea124cb7627d591d1aac531 +oid sha256:3ab0a1b6d5f5eab3c54b4d8a4cb809b3e0ae1c360f92c1992765d038478f8606 size 23427 diff --git a/data/minecraft/structure/trial_chambers/corridor/end_1.nbt b/data/minecraft/structure/trial_chambers/corridor/end_1.nbt index ff0c0b77..5465e814 100644 --- a/data/minecraft/structure/trial_chambers/corridor/end_1.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/end_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:266fcd75f4ee415d16f2f426c660c2fdc6218cd8efab39d76f0416afec466b3f +oid sha256:de7302097274187e98fc56bba05001836e6ca66e6efb6244e520fcca10a194b8 size 21446 diff --git a/data/minecraft/structure/trial_chambers/corridor/end_2.nbt b/data/minecraft/structure/trial_chambers/corridor/end_2.nbt index a0a9b3e7..243c6da4 100644 --- a/data/minecraft/structure/trial_chambers/corridor/end_2.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/end_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2959440499ce11730c79bb1b11dd1ad7bef139764dbd2ae811a5b59c38b613ff +oid sha256:bbf072dfdb7f27d119d0465d1fb0ff79d75e0e3901241be3b722a064effd7130 size 21889 diff --git a/data/minecraft/structure/trial_chambers/corridor/entrance_1.nbt b/data/minecraft/structure/trial_chambers/corridor/entrance_1.nbt index 535f78e0..284a6d3c 100644 --- a/data/minecraft/structure/trial_chambers/corridor/entrance_1.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/entrance_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:134f786c95e43a9f942a3c496fe2bd0b294ed98ee9970a022cad91ad1d75aca0 +oid sha256:b3ea86f43ba4f25e7796d77c4b185f72c65cd4c590035d9ce7912c0cff6402c5 size 22026 diff --git a/data/minecraft/structure/trial_chambers/corridor/entrance_2.nbt b/data/minecraft/structure/trial_chambers/corridor/entrance_2.nbt index fe5dc3e2..34677a04 100644 --- a/data/minecraft/structure/trial_chambers/corridor/entrance_2.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/entrance_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb71681fbcc000740999b838b288ac49a58d011b396b43dce296caff85371c91 +oid sha256:79f1dc54d3cc05eef78c91b35e14e397472943c36b00aab367cf29280c0e1b95 size 21600 diff --git a/data/minecraft/structure/trial_chambers/corridor/entrance_3.nbt b/data/minecraft/structure/trial_chambers/corridor/entrance_3.nbt index cd3c31ca..6ab418c8 100644 --- a/data/minecraft/structure/trial_chambers/corridor/entrance_3.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/entrance_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f66d749481a4399cc80ea67d0241438797f65c920ce47e883673034e3080b08b +oid sha256:1b98fc7e0409d5890fa23d293c85525a25d12fd15c8ac7094bbea9400ae9f361 size 24031 diff --git a/data/minecraft/structure/trial_chambers/corridor/first_plate.nbt b/data/minecraft/structure/trial_chambers/corridor/first_plate.nbt index 16b5fb69..3f89cac4 100644 --- a/data/minecraft/structure/trial_chambers/corridor/first_plate.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/first_plate.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:106d9ef484311d65ea35259a853c2862fc6dbccf5878c3b4e3928a4fd5245a3a +oid sha256:b6bcb0c0aec28bb3a4b1a72724e137de2e4bceae6338ecbeb2264d8d9d07cea6 size 1473 diff --git a/data/minecraft/structure/trial_chambers/corridor/second_plate.nbt b/data/minecraft/structure/trial_chambers/corridor/second_plate.nbt index 34a69cfc..cd2dda31 100644 --- a/data/minecraft/structure/trial_chambers/corridor/second_plate.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/second_plate.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6cbcfcd481fa5c7528af69a3d4eeede0c76e0311d716ea9f7a1bebd5b27bcbe7 +oid sha256:47829112873a71008858043117617127052b307fbba0ab2ad5c28aba7963df13 size 1478 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_1.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_1.nbt index e7fcb332..214809b4 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_1.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0944582de23e4acc1a450fc393c1cde1899c2c2186fae4e36199bda3a0a9283 +oid sha256:3f4de5bf2a3b66c0bba342d7e63f1a833e1032f4cd90183c62b61a0d83fc3d71 size 5672 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_2.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_2.nbt index 4aa32e41..d58d4d8c 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_2.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ec3478d919a5bc0c95706525ae04e52c39d681efa45148f27dbca8d01b19e73 +oid sha256:7c47034a17a944c24ff6872c7ad5a91717bc01c3d7e04383d5f26258be528602 size 5848 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_3.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_3.nbt index 07f7e05b..719db7f9 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_3.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf8733c20534181fde972c2e25f2a3207b08f81e312a07d2c1e6478091dc639f +oid sha256:6fc09078c53cf9ed9b8c9668bb38e3c4d0e436fd05387975c37863235b1bca55 size 5821 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_4.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_4.nbt index ded51f5a..67d29c45 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_4.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97867a7d0ccc3fba3fda9a8d2a3d413c43be7f23ebd1d0c0e356122e3c47629e +oid sha256:3da10c3baf36506b2bfdd5f3f9e97d32751bccc748fd687df70f21d7d5d338b0 size 5815 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_5.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_5.nbt index 99a2c2af..87039013 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_5.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e5016424d227a3066e9e421c4382c4e7f72a31a282cb0ee910dd72a8a150296a +oid sha256:4fb02a793cc0b2db59ab497eb717298d488cc02450c4af7b4e607a2631908c4d size 5822 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_6.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_6.nbt index 14677715..96168951 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_6.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:417e7366ebcc3db3a65697bd4e76d27d5f5c8279b4d13e097a4e3c3f9ec93a89 +oid sha256:25b9d258cb44d6e59ad3cd816adc3bfac02291f6c6a1c3e403fcbc57e760a840 size 5788 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_7.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_7.nbt index d4bbe26c..cac0d903 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_7.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5541e8101938f4c4326f97525ff0599ba7f22f5eed00161bf23f846181e5adc6 +oid sha256:699aac5dcb4cb0bc40f3058d9c064b2691861fb32a5385085d9a6b7e7c5fc4fb size 5777 diff --git a/data/minecraft/structure/trial_chambers/corridor/straight_8.nbt b/data/minecraft/structure/trial_chambers/corridor/straight_8.nbt index 67d2ecd3..fa2f4636 100644 --- a/data/minecraft/structure/trial_chambers/corridor/straight_8.nbt +++ b/data/minecraft/structure/trial_chambers/corridor/straight_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ff514c0730fd62dc6eb728ac255040bcd3d38fff6203a3ec68c6e60402271816 +oid sha256:1d788ee3adf237dd5e3e9ca80ab249e591ca2f4e28198813008bb9eb260c3c03 size 5562 diff --git a/data/minecraft/structure/trial_chambers/decor/barrel.nbt b/data/minecraft/structure/trial_chambers/decor/barrel.nbt index 77697b26..7dee7a3e 100644 --- a/data/minecraft/structure/trial_chambers/decor/barrel.nbt +++ b/data/minecraft/structure/trial_chambers/decor/barrel.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e933bc1212db348dfad0acaa74a0e75057df8e3afb147c995c16f236765766f +oid sha256:8f02f40bb49bbc5b63eb7399221be793cd705274aba04ec66c38429cf2fe3034 size 337 diff --git a/data/minecraft/structure/trial_chambers/decor/black_bed.nbt b/data/minecraft/structure/trial_chambers/decor/black_bed.nbt index ed576c26..db1b9500 100644 --- a/data/minecraft/structure/trial_chambers/decor/black_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/black_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:696f4e7f7c53b066ed233bc15c93409a9138d50066584c1937d6b32687e64e6f +oid sha256:2554e0973060b623405d00c323569a0ecd7a0fc0e7ddbd6fa7f8fd16f543692b size 327 diff --git a/data/minecraft/structure/trial_chambers/decor/blue_bed.nbt b/data/minecraft/structure/trial_chambers/decor/blue_bed.nbt index e7d9f765..da285d80 100644 --- a/data/minecraft/structure/trial_chambers/decor/blue_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/blue_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a294b92349680ce4d13acd6586d01820b35aff9a02f3eb2f48d5e1823cfc686b +oid sha256:7fa4d8cd52524fbaa1efa184db2112bd9e26b0bd3438b15651b786dcd57d3e76 size 325 diff --git a/data/minecraft/structure/trial_chambers/decor/brown_bed.nbt b/data/minecraft/structure/trial_chambers/decor/brown_bed.nbt index daaec739..c83e07cf 100644 --- a/data/minecraft/structure/trial_chambers/decor/brown_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/brown_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef4a59d532829d98428401f36b0a86f74c58c72d592468508502ad84cdd583af +oid sha256:39c7e148e6c939c7dfed9428ad15890ffc507f143fe36dbdbd0b90e41ed0d323 size 327 diff --git a/data/minecraft/structure/trial_chambers/decor/candle_1.nbt b/data/minecraft/structure/trial_chambers/decor/candle_1.nbt index 4c913385..71132e21 100644 --- a/data/minecraft/structure/trial_chambers/decor/candle_1.nbt +++ b/data/minecraft/structure/trial_chambers/decor/candle_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b18fd01d6ee24f7316c91ccce3c285bc525a825afd67a1827ede7fd81ff5401 +oid sha256:66658e01fbc8a9269fbc29bec2bfcdbfb3deadaadd01cc942d55e24d1942a04b size 307 diff --git a/data/minecraft/structure/trial_chambers/decor/candle_2.nbt b/data/minecraft/structure/trial_chambers/decor/candle_2.nbt index 0170e3f1..9787c6cd 100644 --- a/data/minecraft/structure/trial_chambers/decor/candle_2.nbt +++ b/data/minecraft/structure/trial_chambers/decor/candle_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:35222b83e494ef9888b54a238a4540d2d806c88948d0119c75f4159f7dfce782 +oid sha256:74ace71130521564b4de11085ba6218f392abbd686e5e027bc99061ac87663f4 size 307 diff --git a/data/minecraft/structure/trial_chambers/decor/candle_3.nbt b/data/minecraft/structure/trial_chambers/decor/candle_3.nbt index 690a78a2..19fa8f2c 100644 --- a/data/minecraft/structure/trial_chambers/decor/candle_3.nbt +++ b/data/minecraft/structure/trial_chambers/decor/candle_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c4ada4ecaca30af141166637a2a63c81934dd7fb40ab28339d269c670f66394 +oid sha256:80b4c9847da490d93b299f23737495857db9ab3476be0d9e57b355bfda9ac58d size 307 diff --git a/data/minecraft/structure/trial_chambers/decor/candle_4.nbt b/data/minecraft/structure/trial_chambers/decor/candle_4.nbt index 409feaaa..e619963c 100644 --- a/data/minecraft/structure/trial_chambers/decor/candle_4.nbt +++ b/data/minecraft/structure/trial_chambers/decor/candle_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aa44843870c01663d75d1ab8616562b4571273b862d49236f9c5c7fd12005bc0 +oid sha256:330381b33122114dcdaa591a1e31b9bccbe69039eb58acea947595e4678cf5bd size 307 diff --git a/data/minecraft/structure/trial_chambers/decor/cyan_bed.nbt b/data/minecraft/structure/trial_chambers/decor/cyan_bed.nbt index 9a3e08cb..9b7431bb 100644 --- a/data/minecraft/structure/trial_chambers/decor/cyan_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/cyan_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d2b2c538661c52c6420b689500a06bb914ab7b8959582cedb4f813de2727f5a +oid sha256:8df5a4036da9ed3cb7a6005d6992bc8ec28862a5162276e75e9ab6e1c3463398 size 325 diff --git a/data/minecraft/structure/trial_chambers/decor/dead_bush_pot.nbt b/data/minecraft/structure/trial_chambers/decor/dead_bush_pot.nbt index 50ac2be4..1ea73786 100644 --- a/data/minecraft/structure/trial_chambers/decor/dead_bush_pot.nbt +++ b/data/minecraft/structure/trial_chambers/decor/dead_bush_pot.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:926f22a3195e286a99f6a68de64925bb61b93c740628de27264f03a8645af9bd +oid sha256:7c87d702839a06526efef9ab5f4e619f5a78a43a0d60e6717e48227adb9a7761 size 290 diff --git a/data/minecraft/structure/trial_chambers/decor/disposal.nbt b/data/minecraft/structure/trial_chambers/decor/disposal.nbt index 12bbb22d..b2e1aa3e 100644 --- a/data/minecraft/structure/trial_chambers/decor/disposal.nbt +++ b/data/minecraft/structure/trial_chambers/decor/disposal.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30385c4ea432a34d3b36444c2c424d69f72a99ee0ddc999711046245931cae98 +oid sha256:af065f22bd951688bee153625eefdd7c813bc88ce957af6cbe9425d734d88eb0 size 516 diff --git a/data/minecraft/structure/trial_chambers/decor/empty_pot.nbt b/data/minecraft/structure/trial_chambers/decor/empty_pot.nbt index d006200a..5eb8ac77 100644 --- a/data/minecraft/structure/trial_chambers/decor/empty_pot.nbt +++ b/data/minecraft/structure/trial_chambers/decor/empty_pot.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e02070da095d7db4f05c50f6f14b3f82bd704bf612c7541780fe9435f5094348 +oid sha256:6b686dae0eee9ee5f7f7b61736525274a5d2eb52af456f7219409cd44f32dc61 size 286 diff --git a/data/minecraft/structure/trial_chambers/decor/flow_pot.nbt b/data/minecraft/structure/trial_chambers/decor/flow_pot.nbt index 6f8c9617..f4c65f6c 100644 --- a/data/minecraft/structure/trial_chambers/decor/flow_pot.nbt +++ b/data/minecraft/structure/trial_chambers/decor/flow_pot.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eee033b84df4626084b85c09d23790312bfa05ec94fb1e23012f4922c7396eb1 +oid sha256:4424603c3596425a401c0f718df1ca6b8d00dcda0ea272ea387fce34d3dd15f8 size 388 diff --git a/data/minecraft/structure/trial_chambers/decor/gray_bed.nbt b/data/minecraft/structure/trial_chambers/decor/gray_bed.nbt index cf7e54b9..9d9826ff 100644 --- a/data/minecraft/structure/trial_chambers/decor/gray_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/gray_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:93df09f2eec452961222c9070ddbb926e6da57fbf13eea610d445774112f5829 +oid sha256:f095218a65d4e623cbd817e5f3f6dabc6374fd8da5efd1f031f6f3d4144afd80 size 326 diff --git a/data/minecraft/structure/trial_chambers/decor/green_bed.nbt b/data/minecraft/structure/trial_chambers/decor/green_bed.nbt index c0766ddb..40108450 100644 --- a/data/minecraft/structure/trial_chambers/decor/green_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/green_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:364e6b862f8277f668a9be85c744c38707a3b4fcec23595307d7bbef0aaa670e +oid sha256:93c09682c390f6ee84c3f5263876862ddc16891aab0cba00c3c57a7d97f68def size 327 diff --git a/data/minecraft/structure/trial_chambers/decor/guster_pot.nbt b/data/minecraft/structure/trial_chambers/decor/guster_pot.nbt index bc22f4d5..5d024e36 100644 --- a/data/minecraft/structure/trial_chambers/decor/guster_pot.nbt +++ b/data/minecraft/structure/trial_chambers/decor/guster_pot.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f80be1dd69a5cb452d0a6283edf8961bde5a8e09d0e6d54cd8dca882ab70da1 +oid sha256:e569438c83f915f3484d6a2951246ca9e59fd039e1a69cc4d3139bbe1201a284 size 385 diff --git a/data/minecraft/structure/trial_chambers/decor/light_blue_bed.nbt b/data/minecraft/structure/trial_chambers/decor/light_blue_bed.nbt index 7373e18a..8101ac47 100644 --- a/data/minecraft/structure/trial_chambers/decor/light_blue_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/light_blue_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c35a771a3757c3df791e1fab53c5755dfcf0a9721fbfe213f845b0c8c4d7a72f +oid sha256:d5970190a82f2670626ea79555d88206aab23327ad1c01d22d149c3756503184 size 331 diff --git a/data/minecraft/structure/trial_chambers/decor/light_gray_bed.nbt b/data/minecraft/structure/trial_chambers/decor/light_gray_bed.nbt index b4662de4..04e7d7c4 100644 --- a/data/minecraft/structure/trial_chambers/decor/light_gray_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/light_gray_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e81d3ca8ad54da837013414d9f80b560bff5f05fabc7c95d62013406e9a8b104 +oid sha256:b3cdfd195075acb8f90f4c0a6d47c93efcb14c4b358341afb65e4bccb54c648a size 331 diff --git a/data/minecraft/structure/trial_chambers/decor/lime_bed.nbt b/data/minecraft/structure/trial_chambers/decor/lime_bed.nbt index 28a4280d..f1e0b59b 100644 --- a/data/minecraft/structure/trial_chambers/decor/lime_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/lime_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:deebd9331005a03542fb31ef265aed9327b08fdcee6fb9abca5e0905537e50ca +oid sha256:e1e2a2c7c87cd746d315eba9d072b2accaa238aaef26cbd469ac6d7aa6745016 size 325 diff --git a/data/minecraft/structure/trial_chambers/decor/magenta_bed.nbt b/data/minecraft/structure/trial_chambers/decor/magenta_bed.nbt index 1641762a..a38c1c6f 100644 --- a/data/minecraft/structure/trial_chambers/decor/magenta_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/magenta_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:561e51f4047c4cb8b6f5c3213210ab5ae8b250504cb48f66ebe27151c46d5c03 +oid sha256:fe66563f9ce85e3092c0a2e6eccb01d6513e871bbdef18f6c0d6331c89f05f6b size 328 diff --git a/data/minecraft/structure/trial_chambers/decor/orange_bed.nbt b/data/minecraft/structure/trial_chambers/decor/orange_bed.nbt index 6408af62..dceb6608 100644 --- a/data/minecraft/structure/trial_chambers/decor/orange_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/orange_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ec1d6ad6b01239c76c74f2167e7ef8859466f366cd32278e89e23c9b2e0f9c1 +oid sha256:4494f04c54d320f880799023d448d856a2ae4f2c6c0360fcc713c9cda9ed6c4e size 328 diff --git a/data/minecraft/structure/trial_chambers/decor/pink_bed.nbt b/data/minecraft/structure/trial_chambers/decor/pink_bed.nbt index 2bcce0d0..69ded993 100644 --- a/data/minecraft/structure/trial_chambers/decor/pink_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/pink_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eccda93a1ee818f9d458b1837f1d4ef99ef5bfc4923c1608fc9921888d625a31 +oid sha256:acaeb8fec3073d04332ec1703743a916e8858939d907b58c94c44ea14fc954a2 size 325 diff --git a/data/minecraft/structure/trial_chambers/decor/purple_bed.nbt b/data/minecraft/structure/trial_chambers/decor/purple_bed.nbt index c35d8c33..f3b838d6 100644 --- a/data/minecraft/structure/trial_chambers/decor/purple_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/purple_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:800dba76e678c8899cf85dc6950e1e4a815865dc5f2a2ea21331acd13bdfa729 +oid sha256:d59c396cc9794352e88ddef846ff6923c08ed1bf3db98c37e3b421f72ea431e8 size 328 diff --git a/data/minecraft/structure/trial_chambers/decor/red_bed.nbt b/data/minecraft/structure/trial_chambers/decor/red_bed.nbt index 265430ca..b796d416 100644 --- a/data/minecraft/structure/trial_chambers/decor/red_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/red_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:50008f2e8c8eb04eb9ea2481b1e499933bf5df66327af5a2e27249d642134ac9 +oid sha256:88a4259ffad60db289b71e25a2048151c1891b2b84a5ecd2d46dc4f23ddf8c54 size 324 diff --git a/data/minecraft/structure/trial_chambers/decor/scrape_pot.nbt b/data/minecraft/structure/trial_chambers/decor/scrape_pot.nbt index 9eee2b89..2c45a380 100644 --- a/data/minecraft/structure/trial_chambers/decor/scrape_pot.nbt +++ b/data/minecraft/structure/trial_chambers/decor/scrape_pot.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d2074d292315fb6701f9bbfddf95c13e13bcc6191c9ca08cead74780a4a2bd5e +oid sha256:533118846448e63a3419052e4bc1d1486d8f3be99062ce6e18be21bd42db1eca size 384 diff --git a/data/minecraft/structure/trial_chambers/decor/undecorated_pot.nbt b/data/minecraft/structure/trial_chambers/decor/undecorated_pot.nbt index 1ba61ffd..131cc587 100644 --- a/data/minecraft/structure/trial_chambers/decor/undecorated_pot.nbt +++ b/data/minecraft/structure/trial_chambers/decor/undecorated_pot.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62fc268533e8cc20c54856abdedb42b5238583417ab8403a357211b3835cfc84 +oid sha256:7b52d2cf3b5b0d6dd1dc66f1a63438e4b45230e3b9f8fdc913253f90ffab7f7b size 353 diff --git a/data/minecraft/structure/trial_chambers/decor/white_bed.nbt b/data/minecraft/structure/trial_chambers/decor/white_bed.nbt index 7a6336d8..9fdafc66 100644 --- a/data/minecraft/structure/trial_chambers/decor/white_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/white_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c33c83750c9838d29c6c00e9211d132de0d33caf7321179f1a40cfbab35022b6 +oid sha256:21311ccd1dc6c59f4c7c41af9715c7fca2eba0807f39e3d330b8c7ca6fa9ba43 size 327 diff --git a/data/minecraft/structure/trial_chambers/decor/yellow_bed.nbt b/data/minecraft/structure/trial_chambers/decor/yellow_bed.nbt index 53b7a7ce..c66d0387 100644 --- a/data/minecraft/structure/trial_chambers/decor/yellow_bed.nbt +++ b/data/minecraft/structure/trial_chambers/decor/yellow_bed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77bede75328695c77794d33e61fe0bbd7637aafd82b7fb0761cb37816cd8aee7 +oid sha256:14043ae10b594f2cbadccf75a428aa8512790fca3bc31819c36a7bd4865cdf39 size 328 diff --git a/data/minecraft/structure/trial_chambers/dispensers/chamber.nbt b/data/minecraft/structure/trial_chambers/dispensers/chamber.nbt index 0652c129..67c13100 100644 --- a/data/minecraft/structure/trial_chambers/dispensers/chamber.nbt +++ b/data/minecraft/structure/trial_chambers/dispensers/chamber.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:05e30cbb19f3112cfe18b65e91022933c82254b7408d4c2e7ee4ccb1d9fe3684 +oid sha256:4cf5141966ee0730cc625655c1124eecfac244c591de7bfd303beedc8b51cfe5 size 384 diff --git a/data/minecraft/structure/trial_chambers/dispensers/floor_dispenser.nbt b/data/minecraft/structure/trial_chambers/dispensers/floor_dispenser.nbt index d8961fd0..0b244761 100644 --- a/data/minecraft/structure/trial_chambers/dispensers/floor_dispenser.nbt +++ b/data/minecraft/structure/trial_chambers/dispensers/floor_dispenser.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62fce59fb6b6ac926fa795126dd8b3f73ad421fda5e60d9da2cd8465a91d3756 +oid sha256:89a0522c5d6bec0881324d104560aefbe6524ac43e3cf622ac2acf51648815c1 size 358 diff --git a/data/minecraft/structure/trial_chambers/dispensers/wall_dispenser.nbt b/data/minecraft/structure/trial_chambers/dispensers/wall_dispenser.nbt index d5574b8a..544fc773 100644 --- a/data/minecraft/structure/trial_chambers/dispensers/wall_dispenser.nbt +++ b/data/minecraft/structure/trial_chambers/dispensers/wall_dispenser.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:65a140bbb0ed5d939af25d64c0babf0be3a7fa5460285576edcb96878511d4c0 +oid sha256:fa2fd4a7d59f39195b79307556a216c9d4b3baadb74a8e52004c666ece55a3b7 size 414 diff --git a/data/minecraft/structure/trial_chambers/hallway/cache_1.nbt b/data/minecraft/structure/trial_chambers/hallway/cache_1.nbt index 64402a6d..41d8256e 100644 --- a/data/minecraft/structure/trial_chambers/hallway/cache_1.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/cache_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d1e6db09be197e553f4a88eeeb0f46cd263cd0e578730afde2cb6a35761dc35 +oid sha256:a1e89f645289a1230f896f76b02f3f9f70b1eb434788fb122fd1f5ae63faab17 size 2709 diff --git a/data/minecraft/structure/trial_chambers/hallway/corner_staircase.nbt b/data/minecraft/structure/trial_chambers/hallway/corner_staircase.nbt index 982a9db8..2e632fa3 100644 --- a/data/minecraft/structure/trial_chambers/hallway/corner_staircase.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/corner_staircase.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af854868cab8866de827b54efb8da593b111043ac0e0dcf9b3b39b4974b98814 +oid sha256:9c235c7436a03797059027f430ca3987c365b8da93a65140c3c66ac16c6bd3c7 size 1435 diff --git a/data/minecraft/structure/trial_chambers/hallway/corner_staircase_down.nbt b/data/minecraft/structure/trial_chambers/hallway/corner_staircase_down.nbt index cdad9ea8..672441b3 100644 --- a/data/minecraft/structure/trial_chambers/hallway/corner_staircase_down.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/corner_staircase_down.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:317228f4ba7a1283080951f1d80a9003da513de25123dc3c2749e0638565d997 +oid sha256:61d7b52a6f3f5b5015faa82d439f108ed12ce6389f501435df31c036994b49c6 size 1438 diff --git a/data/minecraft/structure/trial_chambers/hallway/corridor_connector_1.nbt b/data/minecraft/structure/trial_chambers/hallway/corridor_connector_1.nbt index 9726c85a..c86bb76a 100644 --- a/data/minecraft/structure/trial_chambers/hallway/corridor_connector_1.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/corridor_connector_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:272362ffb8e7d730ad659b0971fe84db15553ab7ae7bd5a116f99159154beec6 +oid sha256:cd18cad0204fe772b62f752041e0bb086798edd4fee37e44ead8b7abadbc6943 size 689 diff --git a/data/minecraft/structure/trial_chambers/hallway/encounter_1.nbt b/data/minecraft/structure/trial_chambers/hallway/encounter_1.nbt index 1e7889d0..af9ea41b 100644 --- a/data/minecraft/structure/trial_chambers/hallway/encounter_1.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/encounter_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68e2852f7279c291f9cd544e751ff1bc337b0770db59c62472855cef0faca54d +oid sha256:4f1b003a9f15d3c74ae8b13ef807c37bd9c85b0338685f539a50589fe1eac73f size 7351 diff --git a/data/minecraft/structure/trial_chambers/hallway/encounter_2.nbt b/data/minecraft/structure/trial_chambers/hallway/encounter_2.nbt index 71058b0f..b34016d0 100644 --- a/data/minecraft/structure/trial_chambers/hallway/encounter_2.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/encounter_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edd4ae40d1c58177e08d24de157a8f594767e31f11939364248d8b6d33668eaf +oid sha256:cd179efbabd12a7b8b7262bdcd30c882fc7ff4e7182e11dd9b9184c9f5bcbad8 size 6705 diff --git a/data/minecraft/structure/trial_chambers/hallway/encounter_3.nbt b/data/minecraft/structure/trial_chambers/hallway/encounter_3.nbt index 498b1178..abfe86a9 100644 --- a/data/minecraft/structure/trial_chambers/hallway/encounter_3.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/encounter_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab3cc7fb6e82b254570739a7dda6c647547a9274d3804a1d3f7f10258363fe3d +oid sha256:3e62bca308656b4d1b8262cf15f36e427f6164993ed775e47279b9ec632edf38 size 5627 diff --git a/data/minecraft/structure/trial_chambers/hallway/encounter_4.nbt b/data/minecraft/structure/trial_chambers/hallway/encounter_4.nbt index c1a88568..187b254d 100644 --- a/data/minecraft/structure/trial_chambers/hallway/encounter_4.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/encounter_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f09de2ff257f8830eb6060bedaaf11af2111728b888376ede154eabb151fc6b8 +oid sha256:5d11fb3211e39a7958e9aa4872dfc719881d187c8fffaf479b4ac8e92e13586b size 17907 diff --git a/data/minecraft/structure/trial_chambers/hallway/encounter_5.nbt b/data/minecraft/structure/trial_chambers/hallway/encounter_5.nbt index 78958a85..073b39fd 100644 --- a/data/minecraft/structure/trial_chambers/hallway/encounter_5.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/encounter_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:429024043424740e34f3b20f61ea3f28faf5ee94166f81a2482224dc1a48d39c +oid sha256:c57795732d57ce9b2f7766e4d4e246b3f0c6e0882afac1c0462b44f7fd00306e size 14324 diff --git a/data/minecraft/structure/trial_chambers/hallway/left_corner.nbt b/data/minecraft/structure/trial_chambers/hallway/left_corner.nbt index 90908f8a..4f4d7427 100644 --- a/data/minecraft/structure/trial_chambers/hallway/left_corner.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/left_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31f31cdeedb9a19ab16369cb01e88e582be10f06cdf8689e612e1b53a00b81b6 +oid sha256:548f95915fca58c742627324b349861edd2004f35f36c1d99e4e8d8c164b193c size 938 diff --git a/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase.nbt b/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase.nbt index eb95c657..f83c09a4 100644 --- a/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2af413a97cf10c26de442d704389602a161bc2fd37b85b56006ebad754b9024c +oid sha256:a96c411f9a83d0e8b4ca490abe953cf75af369d87647195d4f2f22bf668bf895 size 2593 diff --git a/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase_down.nbt b/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase_down.nbt index 39eb19b1..da844d75 100644 --- a/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase_down.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/long_straight_staircase_down.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:43411feacf86b393665fedc1a662ccd00e04cba4205a3e58874fd6b5451f896b +oid sha256:7df106d9c8f66eb9806be998cbb30f82c71ef3808ccab9034d023fad4b5aa381 size 2594 diff --git a/data/minecraft/structure/trial_chambers/hallway/lower_hallway_connector.nbt b/data/minecraft/structure/trial_chambers/hallway/lower_hallway_connector.nbt index 2a3d0baa..da037fd0 100644 --- a/data/minecraft/structure/trial_chambers/hallway/lower_hallway_connector.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/lower_hallway_connector.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a1cf5ba3d40a53aede13f920a6b88b925f9a2805bee12d3ba73e1ae9118e2ee +oid sha256:357c0e5adcfabeeb57c98418d3fb56d726747a679b69ffc36ec1f7bc46065254 size 3186 diff --git a/data/minecraft/structure/trial_chambers/hallway/right_corner.nbt b/data/minecraft/structure/trial_chambers/hallway/right_corner.nbt index 4bb4ca34..666998c4 100644 --- a/data/minecraft/structure/trial_chambers/hallway/right_corner.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/right_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c5b48ad1bb613f6c6bd97564bcff27f3e0dceb6a9dc3da3344e78802205a0e9f +oid sha256:f95e844794b6ed63ce7dbc21a90809b1ddd739e8760d938873b8d16dc48e60ef size 945 diff --git a/data/minecraft/structure/trial_chambers/hallway/rubble.nbt b/data/minecraft/structure/trial_chambers/hallway/rubble.nbt index 41595e3e..02609699 100644 --- a/data/minecraft/structure/trial_chambers/hallway/rubble.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/rubble.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48bc137a467729d67a8f276fe75d962bcc24bbc1134c83924a2db7d8ab63e5fb +oid sha256:84c57c3f754a128c32069ec8a735a21998dd03ac0f117c6ea4f7d45643e1865c size 936 diff --git a/data/minecraft/structure/trial_chambers/hallway/rubble_chamber.nbt b/data/minecraft/structure/trial_chambers/hallway/rubble_chamber.nbt index f419c2ba..3aa72a11 100644 --- a/data/minecraft/structure/trial_chambers/hallway/rubble_chamber.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/rubble_chamber.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1923e0823b06802c2c5f2451d919c500c4fe68ce9e8dcbeae7c7eeb05ecc91eb +oid sha256:e3453393b0098b3f804c146b5581432708f795ce551946a6aaf912b915c94e2f size 926 diff --git a/data/minecraft/structure/trial_chambers/hallway/rubble_chamber_thin.nbt b/data/minecraft/structure/trial_chambers/hallway/rubble_chamber_thin.nbt index 8e53c780..265a25a3 100644 --- a/data/minecraft/structure/trial_chambers/hallway/rubble_chamber_thin.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/rubble_chamber_thin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de1a88b20c679493b93adbbd52b9a398ba9cd504ad407a2899030d2ec9f5e760 +oid sha256:00cf0af319aeb4318490d6a428c2e5d595761d1296b2ea54ba799cf4ddc8d061 size 471 diff --git a/data/minecraft/structure/trial_chambers/hallway/rubble_thin.nbt b/data/minecraft/structure/trial_chambers/hallway/rubble_thin.nbt index 8e53c780..265a25a3 100644 --- a/data/minecraft/structure/trial_chambers/hallway/rubble_thin.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/rubble_thin.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de1a88b20c679493b93adbbd52b9a398ba9cd504ad407a2899030d2ec9f5e760 +oid sha256:00cf0af319aeb4318490d6a428c2e5d595761d1296b2ea54ba799cf4ddc8d061 size 471 diff --git a/data/minecraft/structure/trial_chambers/hallway/straight.nbt b/data/minecraft/structure/trial_chambers/hallway/straight.nbt index 4788f4d7..85fdeba8 100644 --- a/data/minecraft/structure/trial_chambers/hallway/straight.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/straight.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6e78c5e58d30d83fc34247146a60c56c14f1b84307f921e28fe3c9453ab57602 +oid sha256:5bc4ed23257213e513dec11c50a69de921b489c5ca2d2a129c7e9df9743595d9 size 932 diff --git a/data/minecraft/structure/trial_chambers/hallway/straight_staircase.nbt b/data/minecraft/structure/trial_chambers/hallway/straight_staircase.nbt index 397b8c81..7b3f6b45 100644 --- a/data/minecraft/structure/trial_chambers/hallway/straight_staircase.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/straight_staircase.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c3c67bffe44294ca263ace58b3de100abb63f7ed6c4d8423238e0567d41dc168 +oid sha256:d2699f0db7c72e0b949908f588103c086046235a811f8b2be6108d5e4cf44780 size 1178 diff --git a/data/minecraft/structure/trial_chambers/hallway/straight_staircase_down.nbt b/data/minecraft/structure/trial_chambers/hallway/straight_staircase_down.nbt index 1baf003b..f1eea195 100644 --- a/data/minecraft/structure/trial_chambers/hallway/straight_staircase_down.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/straight_staircase_down.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d52dffbac590b63fa0ae1ad4b3015ee150654f2949e6ba53c9007a69abaec3e8 +oid sha256:7aef3c4518923b2b7edef1f42dbca39026305bbaf3e673a9e32be2854005ab0f size 1177 diff --git a/data/minecraft/structure/trial_chambers/hallway/trapped_staircase.nbt b/data/minecraft/structure/trial_chambers/hallway/trapped_staircase.nbt index dc011ed7..32494199 100644 --- a/data/minecraft/structure/trial_chambers/hallway/trapped_staircase.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/trapped_staircase.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce085df4a5091a9fd38014c04260d9c42dec6897dc3acccd22b35a48154a1c72 +oid sha256:6e37faf3969177e637b1a0f90b7f1cbaec75b551e90a6d4a8a76a8111a96e727 size 3613 diff --git a/data/minecraft/structure/trial_chambers/hallway/upper_hallway_connector.nbt b/data/minecraft/structure/trial_chambers/hallway/upper_hallway_connector.nbt index f535bf20..551d234a 100644 --- a/data/minecraft/structure/trial_chambers/hallway/upper_hallway_connector.nbt +++ b/data/minecraft/structure/trial_chambers/hallway/upper_hallway_connector.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a37179366cf289b191ec9e9caba20a7eae9bcdcd8efeda17f66cb0bc1f4f338 +oid sha256:1ab22df4c27ef7ca5065670aca063956037a13b4e2e6fc0d6e2c30f3e1ca6da8 size 2700 diff --git a/data/minecraft/structure/trial_chambers/intersection/intersection_1.nbt b/data/minecraft/structure/trial_chambers/intersection/intersection_1.nbt index 8da146ef..3854094d 100644 --- a/data/minecraft/structure/trial_chambers/intersection/intersection_1.nbt +++ b/data/minecraft/structure/trial_chambers/intersection/intersection_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:88cb188e2bd55f043a1d95c44e7e7f2f8d9d4b7beea5ab2f7367ff034b1ccf92 +oid sha256:9e9ce757164c0e4da60d15d32193c56a72724127742d783e6bc5cdcfba8bc046 size 29422 diff --git a/data/minecraft/structure/trial_chambers/intersection/intersection_2.nbt b/data/minecraft/structure/trial_chambers/intersection/intersection_2.nbt index 1149d57c..68413aa1 100644 --- a/data/minecraft/structure/trial_chambers/intersection/intersection_2.nbt +++ b/data/minecraft/structure/trial_chambers/intersection/intersection_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:89a26dcac4eb71552cbdad6fc3652b6588a21ba8066134b270cb21b12160099c +oid sha256:a3820bb94db7b84ba2263a9f0f375d44fc289b5dda22dcf50824a566adf0ad40 size 30344 diff --git a/data/minecraft/structure/trial_chambers/intersection/intersection_3.nbt b/data/minecraft/structure/trial_chambers/intersection/intersection_3.nbt index 82a059e3..b0d2dc07 100644 --- a/data/minecraft/structure/trial_chambers/intersection/intersection_3.nbt +++ b/data/minecraft/structure/trial_chambers/intersection/intersection_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e67de627a5a6415a5e892668befb7e85df483c6550c5549c5517ddf8f89c9b9e +oid sha256:35d7dbfe632b699bc993c3d98c7bb066a94cb19688762e9b851c8f4803c1b0dd size 49356 diff --git a/data/minecraft/structure/trial_chambers/reward/ominous_vault.nbt b/data/minecraft/structure/trial_chambers/reward/ominous_vault.nbt index 716a6c9b..7646c15f 100644 --- a/data/minecraft/structure/trial_chambers/reward/ominous_vault.nbt +++ b/data/minecraft/structure/trial_chambers/reward/ominous_vault.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4884221d7773efd9e487ab2920bdda99c93a19ed399fa20ce8b419a93a47fffe +oid sha256:ddb62ad9b230d689caaf7413208921c77b1c437877ff51bddbcb776480ff0dd0 size 690 diff --git a/data/minecraft/structure/trial_chambers/reward/vault.nbt b/data/minecraft/structure/trial_chambers/reward/vault.nbt index 6cd242d9..cac76dbf 100644 --- a/data/minecraft/structure/trial_chambers/reward/vault.nbt +++ b/data/minecraft/structure/trial_chambers/reward/vault.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:075feb4aed9b164b0bdaf22d24c2402ca98de5bef5844d79383126b5deecbc8d +oid sha256:b266205b7c4c55de6faedacdc39995f2c95b97803826938beaeed1cb230d4d21 size 504 diff --git a/data/minecraft/structure/trial_chambers/spawner/breeze/breeze.nbt b/data/minecraft/structure/trial_chambers/spawner/breeze/breeze.nbt index c0b8cdfc..ff0ddba9 100644 --- a/data/minecraft/structure/trial_chambers/spawner/breeze/breeze.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/breeze/breeze.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:735e95bf2477bd31efa5c69daa8160e2c1293a813348aa542e41a2c8b814c8bb +oid sha256:87399fc8ec2689b3bdc9d589475381edf3fb393079b97c1784dcea9a4843c4bb size 469 diff --git a/data/minecraft/structure/trial_chambers/spawner/connectors/breeze.nbt b/data/minecraft/structure/trial_chambers/spawner/connectors/breeze.nbt index 5082ab6b..2a7bd8f5 100644 --- a/data/minecraft/structure/trial_chambers/spawner/connectors/breeze.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/connectors/breeze.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b2008c7d1dbbdd20879b0556afec59a8055fdd42f2b727823fab76d0fe605ef8 +oid sha256:8320d94c033401180d9794e51f00b31e30d49002d9aaececd88454bce74813ae size 328 diff --git a/data/minecraft/structure/trial_chambers/spawner/connectors/melee.nbt b/data/minecraft/structure/trial_chambers/spawner/connectors/melee.nbt index ea3534f8..f076b37e 100644 --- a/data/minecraft/structure/trial_chambers/spawner/connectors/melee.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/connectors/melee.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3da4f0d57072cc69d44a520acd86fda3d79b1a46bb02c26453770b8a4d02b2bc +oid sha256:615eda1e58d302084858c604ced09370361bcdabf66abaa3d33f3905b401b083 size 327 diff --git a/data/minecraft/structure/trial_chambers/spawner/connectors/ranged.nbt b/data/minecraft/structure/trial_chambers/spawner/connectors/ranged.nbt index 8ef56c25..732e942f 100644 --- a/data/minecraft/structure/trial_chambers/spawner/connectors/ranged.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/connectors/ranged.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d82b3966eed727e52995437b5df9d17ff6f4b16ddacf9efcc65160e7d34a17cb +oid sha256:8ef650e3c5c0c8932ccb0c22ad233149fc6d7176b129584f6c2ca6ee5970d81a size 327 diff --git a/data/minecraft/structure/trial_chambers/spawner/connectors/slow_ranged.nbt b/data/minecraft/structure/trial_chambers/spawner/connectors/slow_ranged.nbt index 40647b35..d95316dc 100644 --- a/data/minecraft/structure/trial_chambers/spawner/connectors/slow_ranged.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/connectors/slow_ranged.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:754bca2af1597953ad00b480f0f47b92881d4f332cac6a0e0275e8e00eebe916 +oid sha256:b374d4b76932d57ed2e939a0c437d50a78d17728e49c963ffdb026a697d49e84 size 331 diff --git a/data/minecraft/structure/trial_chambers/spawner/connectors/small_melee.nbt b/data/minecraft/structure/trial_chambers/spawner/connectors/small_melee.nbt index ae8a13b5..1e0c6f3e 100644 --- a/data/minecraft/structure/trial_chambers/spawner/connectors/small_melee.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/connectors/small_melee.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a96408a7dae012a70c6cef2590114a786ef9566878c52f09517f1d298d7f55b +oid sha256:f856ffb61ed1d9c25df0591efd104e808553d8c7be91c17d3663394818420f0f size 330 diff --git a/data/minecraft/structure/trial_chambers/spawner/melee/husk.nbt b/data/minecraft/structure/trial_chambers/spawner/melee/husk.nbt index f9d84275..f5e3809c 100644 --- a/data/minecraft/structure/trial_chambers/spawner/melee/husk.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/melee/husk.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c61c571d9a59548b1ed05fdc99d486dbdbecf711ca01ac282817d1ceea3e1283 +oid sha256:4e62e48606c81c4f470101a386fd7bed5124572e50f23b6095c24dd382f446bf size 473 diff --git a/data/minecraft/structure/trial_chambers/spawner/melee/spider.nbt b/data/minecraft/structure/trial_chambers/spawner/melee/spider.nbt index 3660cae0..99d40585 100644 --- a/data/minecraft/structure/trial_chambers/spawner/melee/spider.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/melee/spider.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa9b6f64a0261dbeb65aad2ce15b1580b89efe00955a09ab9be80e9ba796336b +oid sha256:882e1e2ac297d271c5c34ebf3ef730d9354df95ed694a6e5c1b571a4dec08a38 size 481 diff --git a/data/minecraft/structure/trial_chambers/spawner/melee/zombie.nbt b/data/minecraft/structure/trial_chambers/spawner/melee/zombie.nbt index 923a02ad..e8c67247 100644 --- a/data/minecraft/structure/trial_chambers/spawner/melee/zombie.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/melee/zombie.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fee380edfe800aa2173b0632feab28d76c668f987a8f861b10dee4d56c5cd693 +oid sha256:166773102aec72975df41aedc68dfe66535a51d95a0caa969386503e0fd51a1d size 480 diff --git a/data/minecraft/structure/trial_chambers/spawner/ranged/poison_skeleton.nbt b/data/minecraft/structure/trial_chambers/spawner/ranged/poison_skeleton.nbt index c8ad7d90..adbe4751 100644 --- a/data/minecraft/structure/trial_chambers/spawner/ranged/poison_skeleton.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/ranged/poison_skeleton.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0145ddd0a84d72f91561d227fce42470042e44e63dfdc8c619e4d10b4cb1095d +oid sha256:9df3ca105e66fb9e21e3b08341c7f4babf4a507aac5bbcb376f4223f9e0bec41 size 524 diff --git a/data/minecraft/structure/trial_chambers/spawner/ranged/skeleton.nbt b/data/minecraft/structure/trial_chambers/spawner/ranged/skeleton.nbt index 4407adcf..340f3cb4 100644 --- a/data/minecraft/structure/trial_chambers/spawner/ranged/skeleton.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/ranged/skeleton.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0f1a7d2e81efb1304343f7adfa311a2bb3d5c153f8acd68ea7120a7a0091dfe +oid sha256:ce508f1f1ab5089fb91e137bec09aa6406691e98b28794668f76cd6ebc622e35 size 480 diff --git a/data/minecraft/structure/trial_chambers/spawner/ranged/stray.nbt b/data/minecraft/structure/trial_chambers/spawner/ranged/stray.nbt index 8469451e..84938161 100644 --- a/data/minecraft/structure/trial_chambers/spawner/ranged/stray.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/ranged/stray.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9f2a9207d369ea7442ec1b4927fe3599f4f57898952d41533080401b0f09dbc0 +oid sha256:aed7b36ce93860a7691c74cbc43dfc4f31a5d8e3530baddaaec55ef0eca83d46 size 476 diff --git a/data/minecraft/structure/trial_chambers/spawner/slow_ranged/poison_skeleton.nbt b/data/minecraft/structure/trial_chambers/spawner/slow_ranged/poison_skeleton.nbt index 294d7272..98ede40a 100644 --- a/data/minecraft/structure/trial_chambers/spawner/slow_ranged/poison_skeleton.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/slow_ranged/poison_skeleton.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c57ec721a495343bb7c5fd1c74dcd9cee602ae4582f0fe876dbc5640352636c5 +oid sha256:5350d668302c02121c457dcee1bc3f5b6758a4ee6392bd09429f820f870c2e0c size 527 diff --git a/data/minecraft/structure/trial_chambers/spawner/slow_ranged/skeleton.nbt b/data/minecraft/structure/trial_chambers/spawner/slow_ranged/skeleton.nbt index d0882938..5bd10355 100644 --- a/data/minecraft/structure/trial_chambers/spawner/slow_ranged/skeleton.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/slow_ranged/skeleton.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1cbb3fedfd65c38e8717e8d01222d9ce3041e7eb3cb5c50bf192f960098ed86 +oid sha256:bc6cc45dfbc199f95dd8d82d910d0d4b9ea660404bba7dcb9e7f54bb37b38a97 size 485 diff --git a/data/minecraft/structure/trial_chambers/spawner/slow_ranged/stray.nbt b/data/minecraft/structure/trial_chambers/spawner/slow_ranged/stray.nbt index ebb59e3f..8ee06537 100644 --- a/data/minecraft/structure/trial_chambers/spawner/slow_ranged/stray.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/slow_ranged/stray.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97c5398536469f8a178037546b34f0f38519fbcec152fed44dc5478787c15812 +oid sha256:db3fe03ee3a10e2bb12b249a8c346fa3af83a13066cd9715693390627ab34faf size 479 diff --git a/data/minecraft/structure/trial_chambers/spawner/small_melee/baby_zombie.nbt b/data/minecraft/structure/trial_chambers/spawner/small_melee/baby_zombie.nbt index 82d9c1ca..3d418bdd 100644 --- a/data/minecraft/structure/trial_chambers/spawner/small_melee/baby_zombie.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/small_melee/baby_zombie.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:71949f72692573c8d041f2d8e6f3ac7cc431c332db71360851eca57c79e2e0fd +oid sha256:32d3c38daa1782200d9983969ce4006597cec8566ae3525bd08f65165ffe72aa size 499 diff --git a/data/minecraft/structure/trial_chambers/spawner/small_melee/cave_spider.nbt b/data/minecraft/structure/trial_chambers/spawner/small_melee/cave_spider.nbt index aac9b275..141a743b 100644 --- a/data/minecraft/structure/trial_chambers/spawner/small_melee/cave_spider.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/small_melee/cave_spider.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e79ab405d514d5dbd596150e532101c1c76c4e65514c195eb20dc9a640f3e565 +oid sha256:03a2153784cb5e007511e26ad7e353eece478f5346e4dc082511bb6673d0e6ae size 523 diff --git a/data/minecraft/structure/trial_chambers/spawner/small_melee/silverfish.nbt b/data/minecraft/structure/trial_chambers/spawner/small_melee/silverfish.nbt index bf54ac14..86ddab6a 100644 --- a/data/minecraft/structure/trial_chambers/spawner/small_melee/silverfish.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/small_melee/silverfish.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8044ed8454b70f2b375ad13d2621ca714beecb0feebf872ca017cf88bb37034 +oid sha256:b731ddac8513aa5ec3dc62a067a3b8a30d6c2a8a26d72f5945a46b71f0c2e59d size 483 diff --git a/data/minecraft/structure/trial_chambers/spawner/small_melee/slime.nbt b/data/minecraft/structure/trial_chambers/spawner/small_melee/slime.nbt index 6814a048..8aa7d487 100644 --- a/data/minecraft/structure/trial_chambers/spawner/small_melee/slime.nbt +++ b/data/minecraft/structure/trial_chambers/spawner/small_melee/slime.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9434a7143e9465de2e927d3594107447fe527c8fa9948cc8d2d7b86005888f4f +oid sha256:5772c3f4e8f96b3b70002dfaffe1857d826ec0b44b1e41b980ebf9a35e18825f size 473 diff --git a/data/minecraft/structure/underwater_ruin/big_brick_1.nbt b/data/minecraft/structure/underwater_ruin/big_brick_1.nbt index 61d8c918..c49c1b3a 100644 --- a/data/minecraft/structure/underwater_ruin/big_brick_1.nbt +++ b/data/minecraft/structure/underwater_ruin/big_brick_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:99c82d8fb2e6921f0978ceaddcd9b55dd5311e120fab99932a4beb695e673e38 +oid sha256:30d8cb8d95969691275a0894c517a06faa69328588f60d783fab2e657f909697 size 11114 diff --git a/data/minecraft/structure/underwater_ruin/big_brick_2.nbt b/data/minecraft/structure/underwater_ruin/big_brick_2.nbt index 35e26792..9c02159f 100644 --- a/data/minecraft/structure/underwater_ruin/big_brick_2.nbt +++ b/data/minecraft/structure/underwater_ruin/big_brick_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ea3da26692dfc2e14367d0a8fa855191e2f084ebf17a02c63df29aff45bf781 +oid sha256:c5b0d7c118f5f799fee03faef084e9744c70dd0d1b569c8d9ec3f19eedff525e size 11461 diff --git a/data/minecraft/structure/underwater_ruin/big_brick_3.nbt b/data/minecraft/structure/underwater_ruin/big_brick_3.nbt index 97b5ce6a..bd394b04 100644 --- a/data/minecraft/structure/underwater_ruin/big_brick_3.nbt +++ b/data/minecraft/structure/underwater_ruin/big_brick_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c3a29698d1b2f5a3e1d5a24d17839520529b6a010002cf7f339972d0c09417f +oid sha256:79b2d734a7bfe8f7a2721734c383f12e9f3c1b06bc3b3572cf90a7c9ab992251 size 11632 diff --git a/data/minecraft/structure/underwater_ruin/big_brick_8.nbt b/data/minecraft/structure/underwater_ruin/big_brick_8.nbt index 16f49f57..4064f7e2 100644 --- a/data/minecraft/structure/underwater_ruin/big_brick_8.nbt +++ b/data/minecraft/structure/underwater_ruin/big_brick_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fdf2524fd72c578fc2898e014e8d37a0fabe1eff7219c50ac539d1b28bd059f8 +oid sha256:a1b32a0f8c0e23b77a82e66f3fc4b45df33e59dd37608deef20b12aed1e575f9 size 11014 diff --git a/data/minecraft/structure/underwater_ruin/big_cracked_1.nbt b/data/minecraft/structure/underwater_ruin/big_cracked_1.nbt index 989cc098..29ae324a 100644 --- a/data/minecraft/structure/underwater_ruin/big_cracked_1.nbt +++ b/data/minecraft/structure/underwater_ruin/big_cracked_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e72f478573fee6c741d7659c270eb19aab8402dfff61a9820b738585c7adcb62 +oid sha256:b9f667e685f616f5231cda9a0a4c5fcab8ea75ccf853d938300f603f6f29225f size 11096 diff --git a/data/minecraft/structure/underwater_ruin/big_cracked_2.nbt b/data/minecraft/structure/underwater_ruin/big_cracked_2.nbt index cb935eca..c705b39f 100644 --- a/data/minecraft/structure/underwater_ruin/big_cracked_2.nbt +++ b/data/minecraft/structure/underwater_ruin/big_cracked_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24c28b9e1520fc0744405c9d97debf1ab990c7dd905591e032088c46361be268 +oid sha256:c17e48d1c9f37d8333966f5264818019c89d09454e6308c6af1f63749e6a23fc size 11505 diff --git a/data/minecraft/structure/underwater_ruin/big_cracked_3.nbt b/data/minecraft/structure/underwater_ruin/big_cracked_3.nbt index 7fab1335..80d0030e 100644 --- a/data/minecraft/structure/underwater_ruin/big_cracked_3.nbt +++ b/data/minecraft/structure/underwater_ruin/big_cracked_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:964fa1fe8181fcf51a7287f40ec84c46189a95391eee0e06f15bc95dcf5b3739 +oid sha256:f189af1f6c9042f93eeade9c63564309b943b64bead5904b5cf25d64466c0b57 size 11622 diff --git a/data/minecraft/structure/underwater_ruin/big_cracked_8.nbt b/data/minecraft/structure/underwater_ruin/big_cracked_8.nbt index d6159b4d..1646152f 100644 --- a/data/minecraft/structure/underwater_ruin/big_cracked_8.nbt +++ b/data/minecraft/structure/underwater_ruin/big_cracked_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c0317734f912369daf267249600804658e88607d48ed009937acb4aab85f007 +oid sha256:d2b38506d35b5e7f377bad498fd2879fb6dcb5eeac075709dbc8f0f470d27eeb size 11024 diff --git a/data/minecraft/structure/underwater_ruin/big_mossy_1.nbt b/data/minecraft/structure/underwater_ruin/big_mossy_1.nbt index f32b179d..e09562e1 100644 --- a/data/minecraft/structure/underwater_ruin/big_mossy_1.nbt +++ b/data/minecraft/structure/underwater_ruin/big_mossy_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8770da915ae094de0f0b5d476d63598ea7f0416e195cfd763d00cb0f2914b85b +oid sha256:c6ab67ad8a7db446620b2ec9fc42ed5613d2f1eda467962a325b98041ffa5a20 size 11096 diff --git a/data/minecraft/structure/underwater_ruin/big_mossy_2.nbt b/data/minecraft/structure/underwater_ruin/big_mossy_2.nbt index 9a38ad40..7892b02c 100644 --- a/data/minecraft/structure/underwater_ruin/big_mossy_2.nbt +++ b/data/minecraft/structure/underwater_ruin/big_mossy_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53c9ed99ca52bea13f351b7d8e5144f42414fd0311afa23ee6b07404e4f23e4c +oid sha256:dd7d6b131618ccc63663cc071c4b34028e3501cb606a4f21c5193b46f7a0b1ff size 11504 diff --git a/data/minecraft/structure/underwater_ruin/big_mossy_3.nbt b/data/minecraft/structure/underwater_ruin/big_mossy_3.nbt index 75cdd5b7..f965f97f 100644 --- a/data/minecraft/structure/underwater_ruin/big_mossy_3.nbt +++ b/data/minecraft/structure/underwater_ruin/big_mossy_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1956778ae53129fff2e58e9ac4a5381870935c629bb87a48d61957ef546f4e1 +oid sha256:f1fffda1b6e9b195caae5960668c9519cf2fe8c0ffaaa2a897fef788b77e42b2 size 11632 diff --git a/data/minecraft/structure/underwater_ruin/big_mossy_8.nbt b/data/minecraft/structure/underwater_ruin/big_mossy_8.nbt index a3d41f41..788241fb 100644 --- a/data/minecraft/structure/underwater_ruin/big_mossy_8.nbt +++ b/data/minecraft/structure/underwater_ruin/big_mossy_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1bf6259130065da6aa778a59fbff03834d8e587f346ce8f99df212d5cc1b888c +oid sha256:85d653f34156bf1ba3a7cfd1ab64a7bb56e11d169e00af5b1c6f63f99c2676e3 size 11045 diff --git a/data/minecraft/structure/underwater_ruin/big_warm_4.nbt b/data/minecraft/structure/underwater_ruin/big_warm_4.nbt index 30647101..4117ba2a 100644 --- a/data/minecraft/structure/underwater_ruin/big_warm_4.nbt +++ b/data/minecraft/structure/underwater_ruin/big_warm_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f983adacea640b6162815a5f9956f767ba610e959ff2d810f06e5114d2f9969 +oid sha256:c437e7c31b94b662d46894a3c2cdd383d4dccc58e712d112677613060aaccb5d size 11266 diff --git a/data/minecraft/structure/underwater_ruin/big_warm_5.nbt b/data/minecraft/structure/underwater_ruin/big_warm_5.nbt index aa312205..84138de7 100644 --- a/data/minecraft/structure/underwater_ruin/big_warm_5.nbt +++ b/data/minecraft/structure/underwater_ruin/big_warm_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5858bcf81d2849d4b8edec3ff5a03de2a1449f6150017c53ba402866f61d6d75 +oid sha256:d916009e0dd85b9ba52f399e5b49ea9de573c6584b9126836b3a3c0db3d22226 size 11032 diff --git a/data/minecraft/structure/underwater_ruin/big_warm_6.nbt b/data/minecraft/structure/underwater_ruin/big_warm_6.nbt index 1622714b..d3b37a7d 100644 --- a/data/minecraft/structure/underwater_ruin/big_warm_6.nbt +++ b/data/minecraft/structure/underwater_ruin/big_warm_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8fb3e2aee56ae2579c0627cada16f3e9179a3d7c880173d5f9bbec3143bfede5 +oid sha256:57b00a88f4212fe93109c0b11e2c581ddb223164a6894a9f88fd4489e37f54f4 size 11106 diff --git a/data/minecraft/structure/underwater_ruin/big_warm_7.nbt b/data/minecraft/structure/underwater_ruin/big_warm_7.nbt index a1cf2fa7..f6b585ed 100644 --- a/data/minecraft/structure/underwater_ruin/big_warm_7.nbt +++ b/data/minecraft/structure/underwater_ruin/big_warm_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:72e2068259bbd6c3706c80869451f0bd213262325654e5006302caf276babc1e +oid sha256:921c648ca2f22645c9f75752af1ac0e931df5332f919a17aa08aa6f9cab3f2af size 11140 diff --git a/data/minecraft/structure/underwater_ruin/brick_1.nbt b/data/minecraft/structure/underwater_ruin/brick_1.nbt index 8b46f551..dc2485cf 100644 --- a/data/minecraft/structure/underwater_ruin/brick_1.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4592b7f1afa1321566776be7e87e25c25c9ff8db1673c73ec0ec07a88ad2f900 +oid sha256:96fa7509a6ae331fc2cd5daba8f5772b94ab169bfafa0e6a5e43ae45f698b17b size 1270 diff --git a/data/minecraft/structure/underwater_ruin/brick_2.nbt b/data/minecraft/structure/underwater_ruin/brick_2.nbt index 0ba96dfd..39b2b2f8 100644 --- a/data/minecraft/structure/underwater_ruin/brick_2.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:421164a00567f6e60e596e220411f4dc6df0545885da277ff37fece2a08ce912 +oid sha256:6c567a8497c0c258677bd70f225b1aa7caae677714f034b1aaeb805245479a59 size 1260 diff --git a/data/minecraft/structure/underwater_ruin/brick_3.nbt b/data/minecraft/structure/underwater_ruin/brick_3.nbt index c64427f8..f67e7052 100644 --- a/data/minecraft/structure/underwater_ruin/brick_3.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f6e78fe570d1e2cd50d3c7ba6cf79ec156a34aadc2dcf87b9f1eb0cdbad4844e +oid sha256:b35cd26732198273814a20be008d47c164281ba5bc09dff9dcf89fe068ff7fdf size 1319 diff --git a/data/minecraft/structure/underwater_ruin/brick_4.nbt b/data/minecraft/structure/underwater_ruin/brick_4.nbt index 7cef6b39..eaf5cce4 100644 --- a/data/minecraft/structure/underwater_ruin/brick_4.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a53a04c4a0ebcafc342577c1b10824cc0939e547c6eaa144f6b78d70969fb752 +oid sha256:876aa3769952774a754120194183a79495be106d1d8c36121113363027da4d6f size 1296 diff --git a/data/minecraft/structure/underwater_ruin/brick_5.nbt b/data/minecraft/structure/underwater_ruin/brick_5.nbt index d4b15917..4ef06d61 100644 --- a/data/minecraft/structure/underwater_ruin/brick_5.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6604f99e4288d75cfb3a44182ceffdc9c26514a4c53477a42873ba2642956c99 +oid sha256:dd11367f5a24e01d38506f0d7dc917806d805b9207e876df2e6c59560435382a size 1277 diff --git a/data/minecraft/structure/underwater_ruin/brick_6.nbt b/data/minecraft/structure/underwater_ruin/brick_6.nbt index 779ab908..1f8796c4 100644 --- a/data/minecraft/structure/underwater_ruin/brick_6.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0bfb90321b7894e81a5a63c75f283311c0323854cb5883797864cdb3fd791564 +oid sha256:3feb5a7d056c6f52c98dffb4d5b26481d5c21f4683f89cb248554de16348f1a5 size 1468 diff --git a/data/minecraft/structure/underwater_ruin/brick_7.nbt b/data/minecraft/structure/underwater_ruin/brick_7.nbt index 4fd6ff46..d9ddb9de 100644 --- a/data/minecraft/structure/underwater_ruin/brick_7.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf9e640b38f07cacd546f715654d0f2e5a86489c61dd7e331138dc3259020cf3 +oid sha256:b2ce8df940847820c04eadb795e531b50cfba5d067e5c2cecf95204385b83472 size 1293 diff --git a/data/minecraft/structure/underwater_ruin/brick_8.nbt b/data/minecraft/structure/underwater_ruin/brick_8.nbt index 49d77e8e..af941169 100644 --- a/data/minecraft/structure/underwater_ruin/brick_8.nbt +++ b/data/minecraft/structure/underwater_ruin/brick_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:534a7c94c9bd642486f841113d56132dccd92cc28f70939566e21c5e021c6f8e +oid sha256:95f30ba68591d740cf1d2e90dc095e81e63770e2e8d19d9a357ec176ca5b8323 size 1306 diff --git a/data/minecraft/structure/underwater_ruin/cracked_1.nbt b/data/minecraft/structure/underwater_ruin/cracked_1.nbt index 8bf72d32..41b164bf 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_1.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d502418decfe6b82d7cbea8b848a564f9c7f82070a1a1f3eeb060549780af0c +oid sha256:73d53de4b13ab780036b8e0e7b831d469af1003ae6876d50446742ceb3f2d74f size 1266 diff --git a/data/minecraft/structure/underwater_ruin/cracked_2.nbt b/data/minecraft/structure/underwater_ruin/cracked_2.nbt index 24d14a3f..074f4b1b 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_2.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf73bc4c99499f507d3b095c88ec5afdfacd0fb23fc2bea69580e1f16a85f4eb +oid sha256:d5148bd2a3247fb6edfbe364ccd5e04eeebca4724ce6752c487d38e8da93afe7 size 1258 diff --git a/data/minecraft/structure/underwater_ruin/cracked_3.nbt b/data/minecraft/structure/underwater_ruin/cracked_3.nbt index 2d0450be..a0a4953d 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_3.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6864f2ca493618ac46f9ff94963fabee3057db6ff2532ca3328ef9e50886a3f1 +oid sha256:4aedc7b1fcd03be7c11e9ac568e2780002b4ed5fd8d264aeea26e9398871ad12 size 1348 diff --git a/data/minecraft/structure/underwater_ruin/cracked_4.nbt b/data/minecraft/structure/underwater_ruin/cracked_4.nbt index 5e914138..0a6fd4e3 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_4.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1af16b31b66ca2fe3c18a4c3ad7d8e5e985455757a368aee0b10a64f87bd0551 +oid sha256:09bb8c1d0c995b1ede44b325016cbed3ec5700a2935f2a862996604e00b66adb size 1257 diff --git a/data/minecraft/structure/underwater_ruin/cracked_5.nbt b/data/minecraft/structure/underwater_ruin/cracked_5.nbt index 080bb5b7..1505eccd 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_5.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bce9c88a1ae5344829a18a1ff0f9a157661aca0edfa2a849b962b76cfc16c067 +oid sha256:be634a8bb9dae20c5000ec5926b88bf6beee4433491886471805219c07c1cc32 size 1282 diff --git a/data/minecraft/structure/underwater_ruin/cracked_6.nbt b/data/minecraft/structure/underwater_ruin/cracked_6.nbt index 272c2608..f44ba16c 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_6.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:51462571fb070af39b92bb1d724b70aefc2c24eb56490a06a84bc7517b0b17d7 +oid sha256:a43c42726c6f77bfe666ee9cbc9191397b6e92400270f5ecd6dcdad3c962de2c size 1410 diff --git a/data/minecraft/structure/underwater_ruin/cracked_7.nbt b/data/minecraft/structure/underwater_ruin/cracked_7.nbt index c70abd4b..94d77afc 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_7.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb29d0b94ff74ba6d4c5a6a85c4b4c49e607f868eeabec0224070b2c5ba112ab +oid sha256:84de376d970a807bb4c44c7738c7fea61091e06bf0dd7663eb241efbcd8f5b1f size 1314 diff --git a/data/minecraft/structure/underwater_ruin/cracked_8.nbt b/data/minecraft/structure/underwater_ruin/cracked_8.nbt index 76ad35e0..eeb83445 100644 --- a/data/minecraft/structure/underwater_ruin/cracked_8.nbt +++ b/data/minecraft/structure/underwater_ruin/cracked_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:89fd5af54c9141586ba81bfaa116de6c02cd81b2bec009db4455b74bab3dc681 +oid sha256:0bba5156853e5ffc382524bf0c42b35ac88cd2e0b16cd7f8a9bc94b1670f9872 size 1294 diff --git a/data/minecraft/structure/underwater_ruin/mossy_1.nbt b/data/minecraft/structure/underwater_ruin/mossy_1.nbt index e2d0024d..3e5156e2 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_1.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e574f29779f4b0beef08e8b0dce7610f1e5f6d632304beb2973f4c8182c89a1e +oid sha256:566dc4fe981031f3ee3f01c2e02d8f301542f173695786282c72f8b4e8708941 size 1279 diff --git a/data/minecraft/structure/underwater_ruin/mossy_2.nbt b/data/minecraft/structure/underwater_ruin/mossy_2.nbt index 37604777..6702e13c 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_2.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7bad743ef5e94a1979e09ea31a69e6e66c7854b4e9c45e8e27e35ffcfe8955dd +oid sha256:841195b06238758f3ea2030ae7ea77a05ec20baa7014712cbbce88acdb0459e6 size 1233 diff --git a/data/minecraft/structure/underwater_ruin/mossy_3.nbt b/data/minecraft/structure/underwater_ruin/mossy_3.nbt index de226dc5..99ac5a31 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_3.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:03de01ae377fbc7a0164176b244d6d17c5c94daa126781c77b05f66e3edf178c +oid sha256:d7229f7728246614d7000a669135db679844d5ce14df33e9f83e05cbced791fd size 1323 diff --git a/data/minecraft/structure/underwater_ruin/mossy_4.nbt b/data/minecraft/structure/underwater_ruin/mossy_4.nbt index 2f656b39..bbf3451c 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_4.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9647b26df01e63caa2e9ef5059726e1f0deeef79f39d550ad151fb6161540ad9 +oid sha256:c88b4ba4d5c4f465b86c20e54b391807ca2d11c7cb37474c12f4ef9fcd3d3d5a size 1282 diff --git a/data/minecraft/structure/underwater_ruin/mossy_5.nbt b/data/minecraft/structure/underwater_ruin/mossy_5.nbt index 62aa8b5b..0e4255e1 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_5.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a45a3396b0eeaa4bc27fbe1cd4217916eade481193b8420fd3ea621a738a5335 +oid sha256:2e36f8dfedecc8114bfa759552b2d028eb7190c0fefa31408fe96bda2e069eb1 size 1300 diff --git a/data/minecraft/structure/underwater_ruin/mossy_6.nbt b/data/minecraft/structure/underwater_ruin/mossy_6.nbt index bdd9e3a2..d9b84a55 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_6.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a7aa8e2a6a9cca5f7d76ce91068fb8a0d9b5b5b964c1126ad178a58fc99a9d9 +oid sha256:2471140382e176704c3157a6ab54b897a0e8f09261a0017deab00114c96c241c size 1452 diff --git a/data/minecraft/structure/underwater_ruin/mossy_7.nbt b/data/minecraft/structure/underwater_ruin/mossy_7.nbt index 8227bf50..a2b7becc 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_7.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f38b823603895267f33acf2fb33a5c5120d991fe8ddba40aacbedda2a0ca9b65 +oid sha256:9edf4f4950bd5a644ef1c0e5c383863f5af25255cc60cc59d8a6dc67bd93c492 size 1310 diff --git a/data/minecraft/structure/underwater_ruin/mossy_8.nbt b/data/minecraft/structure/underwater_ruin/mossy_8.nbt index a0403d4c..66d00421 100644 --- a/data/minecraft/structure/underwater_ruin/mossy_8.nbt +++ b/data/minecraft/structure/underwater_ruin/mossy_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7bd214dd82ba03f176a34e86060527a38f2180d76aa439af3928bef1ef6572c4 +oid sha256:610269c990db4797741a2df6f571f1cc79637e11bb7205e86b7eb0e490891c9b size 1322 diff --git a/data/minecraft/structure/underwater_ruin/warm_1.nbt b/data/minecraft/structure/underwater_ruin/warm_1.nbt index 8cdfa6a5..b0997a13 100644 --- a/data/minecraft/structure/underwater_ruin/warm_1.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fb0185cb5c65aa1855b5c0b201647accaa03f5c79f4c6ac7b3029f5fd77fba74 +oid sha256:e487aa5de4ac93e55d26e9a0c47f5d30d5ccc57c83e32304a1680ef3016074b1 size 1269 diff --git a/data/minecraft/structure/underwater_ruin/warm_2.nbt b/data/minecraft/structure/underwater_ruin/warm_2.nbt index 17e233ee..1e2c46ec 100644 --- a/data/minecraft/structure/underwater_ruin/warm_2.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a02698f6956b10def8ca416ef442baed825b215f3c98dab789b31ae17daaa1fb +oid sha256:ed3641a79fc720c913389dc31ef6d290741298607b5c2d9bfa8d36b1473e11cf size 1298 diff --git a/data/minecraft/structure/underwater_ruin/warm_3.nbt b/data/minecraft/structure/underwater_ruin/warm_3.nbt index d9b8f725..dbe73159 100644 --- a/data/minecraft/structure/underwater_ruin/warm_3.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f849dff94463e7ea576dbea9faa5314eb005094a65b3590455307e82dd6e69a0 +oid sha256:a23ba8f156a8cf5191b6f2fccd820dd9f73e1ddfd2d9493542a4156fb5b43b9c size 1272 diff --git a/data/minecraft/structure/underwater_ruin/warm_4.nbt b/data/minecraft/structure/underwater_ruin/warm_4.nbt index c35a07d0..51c05d7e 100644 --- a/data/minecraft/structure/underwater_ruin/warm_4.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cd398f44200c3170d83a3f038b20929fac9887ef1b86cf0f7ac01ad697a94edb +oid sha256:6126683f17b8ef6a1f2be40bf6df1cfce57cae9da66a47eb632008aca1cfe572 size 1348 diff --git a/data/minecraft/structure/underwater_ruin/warm_5.nbt b/data/minecraft/structure/underwater_ruin/warm_5.nbt index a244a0bd..896a1269 100644 --- a/data/minecraft/structure/underwater_ruin/warm_5.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:22fd38e1b4a787075d5309fa70f93e4298cce7939ae2637f95aee6f5031dac6a +oid sha256:1536aed8f423f5b4f36c0638b08645f3503a20b99d861230817fe2b94aa4f2ca size 1226 diff --git a/data/minecraft/structure/underwater_ruin/warm_6.nbt b/data/minecraft/structure/underwater_ruin/warm_6.nbt index ba5252db..9ed6822d 100644 --- a/data/minecraft/structure/underwater_ruin/warm_6.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f2958eec6a10e32956681dc1c55ba2988655e052dd93c36174327cfdfb99078d +oid sha256:4da522b3658af8e860849fbbcb73e616abb45198b82ee3dc7a1dbf74b5380834 size 1271 diff --git a/data/minecraft/structure/underwater_ruin/warm_7.nbt b/data/minecraft/structure/underwater_ruin/warm_7.nbt index 3741b948..d789ecb5 100644 --- a/data/minecraft/structure/underwater_ruin/warm_7.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b5c91f2115b7e60dd5b548daaf8fc994019a1c6a1fa000755d46003e7700f92 +oid sha256:cb719f9980220adc703e369ce1b805b34039ced7ad2d60f94e37ea3d71765ebd size 1211 diff --git a/data/minecraft/structure/underwater_ruin/warm_8.nbt b/data/minecraft/structure/underwater_ruin/warm_8.nbt index dad8f035..2b19b454 100644 --- a/data/minecraft/structure/underwater_ruin/warm_8.nbt +++ b/data/minecraft/structure/underwater_ruin/warm_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e15c1dddba1446e6c005038d1708bc25734422b5bbd083fc784008daf12f59e +oid sha256:0d22129c7632b30dd67c575388538d912e9e20013b9c042cc4d9853f84ad968a size 1339 diff --git a/data/minecraft/structure/village/common/animals/cat_black.nbt b/data/minecraft/structure/village/common/animals/cat_black.nbt index 994bcf60..9e146882 100644 --- a/data/minecraft/structure/village/common/animals/cat_black.nbt +++ b/data/minecraft/structure/village/common/animals/cat_black.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e56e34ef63e5f6fdd74a4e96b61c85000d59aaff999854cfdc3f9a6276ff0c17 +oid sha256:55715cbc4e78cc3eda5e3664dd6c22ece247bf94955c50a40e516de99dcefbd2 size 924 diff --git a/data/minecraft/structure/village/common/animals/cat_british.nbt b/data/minecraft/structure/village/common/animals/cat_british.nbt index 5911e3af..639d2ed9 100644 --- a/data/minecraft/structure/village/common/animals/cat_british.nbt +++ b/data/minecraft/structure/village/common/animals/cat_british.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34a14a9c6ca6fff0eb8945fde7f12c4b3fdb66495a6d0b3cb8e87204d308f3ca -size 931 +oid sha256:05e370506b3dcb30687f9e7ba01be3433a056cc9934022478c4283444d2f7d79 +size 932 diff --git a/data/minecraft/structure/village/common/animals/cat_calico.nbt b/data/minecraft/structure/village/common/animals/cat_calico.nbt index 63d9cefb..6dbca8ec 100644 --- a/data/minecraft/structure/village/common/animals/cat_calico.nbt +++ b/data/minecraft/structure/village/common/animals/cat_calico.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f05e58dd8f03137eed0b9b6775034940758b7819e2ee8e23d4a1282dc67f8797 -size 855 +oid sha256:08a15213ae5c67e5a7a3332a87794ef39e6ba1abd4b7ca0fa0b2002c0120ecd1 +size 856 diff --git a/data/minecraft/structure/village/common/animals/cat_jellie.nbt b/data/minecraft/structure/village/common/animals/cat_jellie.nbt index b7629e8e..cf0a2445 100644 --- a/data/minecraft/structure/village/common/animals/cat_jellie.nbt +++ b/data/minecraft/structure/village/common/animals/cat_jellie.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0887b44081b16913cde01753e92fb07a8230414649bebfbb528a4906018ff6b +oid sha256:606a9bdb0c1e9a8ddf014fab2bc32e815df4055c58bd5bba0a61779851f43acf size 926 diff --git a/data/minecraft/structure/village/common/animals/cat_persian.nbt b/data/minecraft/structure/village/common/animals/cat_persian.nbt index 430f9c99..29314aad 100644 --- a/data/minecraft/structure/village/common/animals/cat_persian.nbt +++ b/data/minecraft/structure/village/common/animals/cat_persian.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b83b6664bcc3bd85ddbf5feda87223ea5ff2bb91b3e3143b0f97851a44b1b95a -size 857 +oid sha256:f7d4a0c2323c56ecb4f3d85a2985286b30861243183f5af12a06ce340b893ef8 +size 856 diff --git a/data/minecraft/structure/village/common/animals/cat_ragdoll.nbt b/data/minecraft/structure/village/common/animals/cat_ragdoll.nbt index 91aaf0e0..ce9a31d7 100644 --- a/data/minecraft/structure/village/common/animals/cat_ragdoll.nbt +++ b/data/minecraft/structure/village/common/animals/cat_ragdoll.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:521eae96900bb7af677e1030fd5330eaa521b426395a876872d2ddf9beb831e5 +oid sha256:af46555b439db869820c7031ee06532c3245f185e54e9ee18c69e5fe14f8df94 size 923 diff --git a/data/minecraft/structure/village/common/animals/cat_red.nbt b/data/minecraft/structure/village/common/animals/cat_red.nbt index a2628741..bcff7117 100644 --- a/data/minecraft/structure/village/common/animals/cat_red.nbt +++ b/data/minecraft/structure/village/common/animals/cat_red.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e8bef215d0e5a1f9f78dc4dc2cafe2a7b9af4d98f0853efde1da76f69f646b0 +oid sha256:5de821fecc89d4acd564e1d3f23adb91860fd14df59fe112e860ea373c6b135f size 839 diff --git a/data/minecraft/structure/village/common/animals/cat_siamese.nbt b/data/minecraft/structure/village/common/animals/cat_siamese.nbt index 99e0c427..4e76ac85 100644 --- a/data/minecraft/structure/village/common/animals/cat_siamese.nbt +++ b/data/minecraft/structure/village/common/animals/cat_siamese.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d2162a0c5d361c9da182d376f8ed5b817a0d7d4952936955dfd765e0e6ec790 -size 845 +oid sha256:68c3a5079f81cd05a6c54b745ef2f933a73df236956d08512ae9aee11534ad5d +size 847 diff --git a/data/minecraft/structure/village/common/animals/cat_tabby.nbt b/data/minecraft/structure/village/common/animals/cat_tabby.nbt index 3ee1de21..94d510b1 100644 --- a/data/minecraft/structure/village/common/animals/cat_tabby.nbt +++ b/data/minecraft/structure/village/common/animals/cat_tabby.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3a6a5f4c20528bdd3f0d43dbbaa5cdb15fa841b2c19d4592cfe342dc94a8502 -size 919 +oid sha256:5cdb015b640c5259b153bc77a8fa93049e725900e1526d1de084734e0efca6d7 +size 920 diff --git a/data/minecraft/structure/village/common/animals/cat_white.nbt b/data/minecraft/structure/village/common/animals/cat_white.nbt index 7b63f854..0ed35add 100644 --- a/data/minecraft/structure/village/common/animals/cat_white.nbt +++ b/data/minecraft/structure/village/common/animals/cat_white.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c6f9330c8c7b1bac1c6dc9f621ec7ba3c237422bdd8974347515938cda94ac8 +oid sha256:4f3121f9b93f53d0a3ce5d8f9442f41d8681048a0c1833211743b6363df486f8 size 915 diff --git a/data/minecraft/structure/village/common/animals/cows_1.nbt b/data/minecraft/structure/village/common/animals/cows_1.nbt index 954ef08f..1e0388e9 100644 --- a/data/minecraft/structure/village/common/animals/cows_1.nbt +++ b/data/minecraft/structure/village/common/animals/cows_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c4cb690f930064657cd8ec3b2cf68edf94fca39615cd77b154b85601296c391 +oid sha256:82a894f46c1f49d19959dead5fd91aa7b83bc9f2ef2115ab7810dc254e4ad6ce size 960 diff --git a/data/minecraft/structure/village/common/animals/horses_1.nbt b/data/minecraft/structure/village/common/animals/horses_1.nbt index 6c9e23fa..691261f5 100644 --- a/data/minecraft/structure/village/common/animals/horses_1.nbt +++ b/data/minecraft/structure/village/common/animals/horses_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a52d61a94c7869c086e58319d1c75f44935c10fae2b9b96caddff6d8e77c9631 +oid sha256:d001f330687faf2717733f306769d0b7d1678af724592acdc09b82d81a2c6d7c size 920 diff --git a/data/minecraft/structure/village/common/animals/horses_2.nbt b/data/minecraft/structure/village/common/animals/horses_2.nbt index 3baf21f9..03ab2f24 100644 --- a/data/minecraft/structure/village/common/animals/horses_2.nbt +++ b/data/minecraft/structure/village/common/animals/horses_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:28f097817289a0206edfef332272789b3ae47a18c61de4cc36fd9fadc107ac88 -size 1035 +oid sha256:c452e3dbcbafcf7eb609a22854de2945133b194a2f82e7aa1d7cac751d6511e2 +size 1036 diff --git a/data/minecraft/structure/village/common/animals/horses_3.nbt b/data/minecraft/structure/village/common/animals/horses_3.nbt index 091449b3..1ee1ea02 100644 --- a/data/minecraft/structure/village/common/animals/horses_3.nbt +++ b/data/minecraft/structure/village/common/animals/horses_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad5e0d92235dc9ab38a8b2f365fe7ce7dbba7561a137504db43e048c8d2d10a5 +oid sha256:7f9d637a12a4fa1c85a059e889c8954dfe62861a73e3d109045f6f4259c75f71 size 1043 diff --git a/data/minecraft/structure/village/common/animals/horses_4.nbt b/data/minecraft/structure/village/common/animals/horses_4.nbt index 27745877..2a82691a 100644 --- a/data/minecraft/structure/village/common/animals/horses_4.nbt +++ b/data/minecraft/structure/village/common/animals/horses_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b831b6074247a43545f6ca4cbb06619b1add465504c94e92fd6061010f140b0d +oid sha256:7c09e0aeae6a59f9fb57327fb7a495657067049a73bc2dbb9d11a1f9967a2de4 size 915 diff --git a/data/minecraft/structure/village/common/animals/horses_5.nbt b/data/minecraft/structure/village/common/animals/horses_5.nbt index 4cbf99bb..bcf94977 100644 --- a/data/minecraft/structure/village/common/animals/horses_5.nbt +++ b/data/minecraft/structure/village/common/animals/horses_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:debf6de217bee4111372c4364e011f60341937d9d54f690f5804fe20c521348b +oid sha256:e3e148a9fba588d6c5cf25db36c306d4edf82a4cb4dd0e6c0a9d85c1d757aa10 size 936 diff --git a/data/minecraft/structure/village/common/animals/pigs_1.nbt b/data/minecraft/structure/village/common/animals/pigs_1.nbt index 5dff0116..0298cd70 100644 --- a/data/minecraft/structure/village/common/animals/pigs_1.nbt +++ b/data/minecraft/structure/village/common/animals/pigs_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1ef17d8a4b1e15226d117d664818fb981cbe86d83f500fb7490787d672d3c7f +oid sha256:68ab531e0c536124b637a1e3d207e39a7466330b42f7366ff1af85d4d4daf5a7 size 968 diff --git a/data/minecraft/structure/village/common/animals/sheep_1.nbt b/data/minecraft/structure/village/common/animals/sheep_1.nbt index 397438e7..89834326 100644 --- a/data/minecraft/structure/village/common/animals/sheep_1.nbt +++ b/data/minecraft/structure/village/common/animals/sheep_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0db880b596fcac5e5270d17d24029a2c2c697899dd1cf94bd9e20102ae229d3 +oid sha256:b3bccc5f93879da945f29e2de6ca97c393d9bb77c2984e583f802817bc4ba6dc size 982 diff --git a/data/minecraft/structure/village/common/animals/sheep_2.nbt b/data/minecraft/structure/village/common/animals/sheep_2.nbt index 847ba201..c7fa3137 100644 --- a/data/minecraft/structure/village/common/animals/sheep_2.nbt +++ b/data/minecraft/structure/village/common/animals/sheep_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd0158f2e56fac26848ad7db38489dbb0b4758b2f211f81f1cc5d0c8bf336ce4 -size 981 +oid sha256:ce990f763d0805720fb44dce086f4dbcee466266dda0c5efcfe2c42db32a8408 +size 982 diff --git a/data/minecraft/structure/village/common/iron_golem.nbt b/data/minecraft/structure/village/common/iron_golem.nbt index 8c902762..66887254 100644 --- a/data/minecraft/structure/village/common/iron_golem.nbt +++ b/data/minecraft/structure/village/common/iron_golem.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c005e44fdf79db36feabdafeed010f1d425a00bfca156ff775a9a7687aae8ec -size 855 +oid sha256:2026498ce3ef082732d835824506559a667694776c7f1d191564c8d06f501031 +size 856 diff --git a/data/minecraft/structure/village/common/well_bottom.nbt b/data/minecraft/structure/village/common/well_bottom.nbt index fa113451..0444ab50 100644 --- a/data/minecraft/structure/village/common/well_bottom.nbt +++ b/data/minecraft/structure/village/common/well_bottom.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48cc5521beb415880504cdb09a5526c377899f4abb33ca8bc21004d7ec1266cd +oid sha256:6d9cdf46821b75845a897d1faf8b723c415032374fd60d73bc69f98cfafc60d2 size 427 diff --git a/data/minecraft/structure/village/decays/grass_11x13.nbt b/data/minecraft/structure/village/decays/grass_11x13.nbt index e321b60a..d57daa3a 100644 --- a/data/minecraft/structure/village/decays/grass_11x13.nbt +++ b/data/minecraft/structure/village/decays/grass_11x13.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9906336706bffdb7aa737b65cbe50fe02bac7c2993bd18dba8109bf5b03fde7a +oid sha256:a66a9c19d403c0db72378bdc3f7ec081bd008ab0906df188e6b11cf94d96d2d4 size 558 diff --git a/data/minecraft/structure/village/decays/grass_16x16.nbt b/data/minecraft/structure/village/decays/grass_16x16.nbt index df5a0fde..7ab388df 100644 --- a/data/minecraft/structure/village/decays/grass_16x16.nbt +++ b/data/minecraft/structure/village/decays/grass_16x16.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a9f7dac4f6e44abeda6ff3a7af4f2809d733d6d50cd148254ef8abb28ba10ff9 +oid sha256:25956b53db16c5fc432e88ba4ee2bca58787ec7871ef2d8b7268435f618e5aba size 874 diff --git a/data/minecraft/structure/village/decays/grass_9x9.nbt b/data/minecraft/structure/village/decays/grass_9x9.nbt index d62a05eb..0da30d1d 100644 --- a/data/minecraft/structure/village/decays/grass_9x9.nbt +++ b/data/minecraft/structure/village/decays/grass_9x9.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:06d634c5a4f31ee66c87ccabeb30d32ff83bae640314b89cb9e971a0871d418e +oid sha256:1f62aa22fb63563cda36fbeccecc1536be62375939ad99e1a984d5d6ad640c2a size 393 diff --git a/data/minecraft/structure/village/desert/camel_spawn.nbt b/data/minecraft/structure/village/desert/camel_spawn.nbt index 6cb24a90..c0488c68 100644 --- a/data/minecraft/structure/village/desert/camel_spawn.nbt +++ b/data/minecraft/structure/village/desert/camel_spawn.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4d384d61ec082f7ca5b7f7191956deae6b401b5425e45cb1d61899425511f628 +oid sha256:2862fbb22b8997b8ff21050f79e5565fbf3153648f29d05969e5520b206838b0 size 283 diff --git a/data/minecraft/structure/village/desert/desert_lamp_1.nbt b/data/minecraft/structure/village/desert/desert_lamp_1.nbt index 08efac95..9f1b88cc 100644 --- a/data/minecraft/structure/village/desert/desert_lamp_1.nbt +++ b/data/minecraft/structure/village/desert/desert_lamp_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31870bbf83937fac2c9ad0f8641532ea2bb21faef0c77ba25f0fa457ec31353c +oid sha256:50656f3bd668e18337bdd34a4cd10e2ecd24dd8603c10909f45e7795c5d717f1 size 279 diff --git a/data/minecraft/structure/village/desert/houses/desert_animal_pen_1.nbt b/data/minecraft/structure/village/desert/houses/desert_animal_pen_1.nbt index fb43bb2c..695acfa4 100644 --- a/data/minecraft/structure/village/desert/houses/desert_animal_pen_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_animal_pen_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e485644b6fda3d177aa994991766a35a71e201dde7a36777ebaf8ed52d818443 +oid sha256:ed065e25ca3b9864fc6d8149075558d480df88ba8519d076cabd3ced74d1377b size 1690 diff --git a/data/minecraft/structure/village/desert/houses/desert_animal_pen_2.nbt b/data/minecraft/structure/village/desert/houses/desert_animal_pen_2.nbt index e0169e9e..7696a0ce 100644 --- a/data/minecraft/structure/village/desert/houses/desert_animal_pen_2.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_animal_pen_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:04ce299b3d07a76e9a5d72dc554e949ceac834242df85b712cbe0e9589d3eb6d +oid sha256:cdc533c02eda06e0a391685d23f35a778c9e39406d3888ef08094fba23297b4b size 1864 diff --git a/data/minecraft/structure/village/desert/houses/desert_armorer_1.nbt b/data/minecraft/structure/village/desert/houses/desert_armorer_1.nbt index 0a994323..be633afb 100644 --- a/data/minecraft/structure/village/desert/houses/desert_armorer_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_armorer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:705a89e8a130634f708e895d5abfd161152fa39c2b940a0521d82750538bd717 +oid sha256:428e470c2e63e292dfeb4a4c33c671f4b520bd9fcb39d317d046beef78bf0a03 size 1746 diff --git a/data/minecraft/structure/village/desert/houses/desert_butcher_shop_1.nbt b/data/minecraft/structure/village/desert/houses/desert_butcher_shop_1.nbt index f10c54d4..b81c1fdd 100644 --- a/data/minecraft/structure/village/desert/houses/desert_butcher_shop_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_butcher_shop_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:73a66fc7243b7aa0db4f580568bc83622cb6ee15d63d48949c739ec934bae8ff +oid sha256:cc540bf9693a17f1fc7839784947e86026d9564ca25820311e7764012434eacb size 1779 diff --git a/data/minecraft/structure/village/desert/houses/desert_cartographer_house_1.nbt b/data/minecraft/structure/village/desert/houses/desert_cartographer_house_1.nbt index eaf2f01d..8a405e63 100644 --- a/data/minecraft/structure/village/desert/houses/desert_cartographer_house_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_cartographer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:071bd1262d1b132ccf5f0d92ac6c322eb87c19487967fe7eae04ff5bf8e742bc +oid sha256:d9facf7152c085db0ba922671ef527581a6fe8af89c0f8545a31efb613eba3e3 size 1677 diff --git a/data/minecraft/structure/village/desert/houses/desert_farm_1.nbt b/data/minecraft/structure/village/desert/houses/desert_farm_1.nbt index 1327aa06..125f568e 100644 --- a/data/minecraft/structure/village/desert/houses/desert_farm_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2030ff71c975128b7fff9261185d40c1e489c0fe155a50feeb79b5faf78330e4 +oid sha256:6b51f922619e3d01be7183ebb31983e362cdf7ca6ddae96a71353c1d4fbedb89 size 715 diff --git a/data/minecraft/structure/village/desert/houses/desert_farm_2.nbt b/data/minecraft/structure/village/desert/houses/desert_farm_2.nbt index e43f426a..7ab66e38 100644 --- a/data/minecraft/structure/village/desert/houses/desert_farm_2.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_farm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd58d708919825c80a5484ce582b5a20a55430063af66d6f8aae3b84884918b0 +oid sha256:38d0dbd7c77a3a4209f05d5293698a5840a2b3073121bd2520c6fe5032141f90 size 887 diff --git a/data/minecraft/structure/village/desert/houses/desert_fisher_1.nbt b/data/minecraft/structure/village/desert/houses/desert_fisher_1.nbt index 9423cedf..1c33f13e 100644 --- a/data/minecraft/structure/village/desert/houses/desert_fisher_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_fisher_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b42963a7da75d841f3a7e7b8a41f1aae8207fe7c52088ed5255c9e033a29b37c +oid sha256:dc012467ae5cbc76ec29e4a1ed59db517e65e8740de293cb6f332207c2bdf152 size 2286 diff --git a/data/minecraft/structure/village/desert/houses/desert_fletcher_house_1.nbt b/data/minecraft/structure/village/desert/houses/desert_fletcher_house_1.nbt index bec7bf8a..bcd87a71 100644 --- a/data/minecraft/structure/village/desert/houses/desert_fletcher_house_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_fletcher_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e62f71e265471dcdeaa4d2c7bd135ab83845739a6b82881440a944227c800b8c +oid sha256:79eebcd4a9d1f1778eab5da9ae11de9970744e1cc3c57b5b515461ae74916a81 size 3096 diff --git a/data/minecraft/structure/village/desert/houses/desert_large_farm_1.nbt b/data/minecraft/structure/village/desert/houses/desert_large_farm_1.nbt index 281e733b..3599d3db 100644 --- a/data/minecraft/structure/village/desert/houses/desert_large_farm_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_large_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d626ff6ecc55e1cc4c15e5480b209703659bb9bd902fb69244989f5cb6882ae +oid sha256:11779cc3a2a4418263c2684cb412a6f7d347278b8263f60751f096a9e6339a09 size 1623 diff --git a/data/minecraft/structure/village/desert/houses/desert_library_1.nbt b/data/minecraft/structure/village/desert/houses/desert_library_1.nbt index a9d771fc..62702d94 100644 --- a/data/minecraft/structure/village/desert/houses/desert_library_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_library_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3b90b9849ee20bee2a5f3fd0d60b1a7086cec602628b6179e321f0d735d3735a +oid sha256:a03bbe1da2109d3cd7de37adfacdd385a202b13c5d44d8e075edaa8daefe2960 size 1539 diff --git a/data/minecraft/structure/village/desert/houses/desert_mason_1.nbt b/data/minecraft/structure/village/desert/houses/desert_mason_1.nbt index 2aafed5f..7ad72f9c 100644 --- a/data/minecraft/structure/village/desert/houses/desert_mason_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_mason_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2474eeb51242929ffc7cc69b3f17351fe76ec4693f46efe17ecc64aa9ffd033e +oid sha256:6db72360f76201423aef85d633ce297706ce9307387b0574c8f87fb9a91ffaae size 1442 diff --git a/data/minecraft/structure/village/desert/houses/desert_medium_house_1.nbt b/data/minecraft/structure/village/desert/houses/desert_medium_house_1.nbt index 87fdaa72..3f5a614c 100644 --- a/data/minecraft/structure/village/desert/houses/desert_medium_house_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d25a0c0a5fac1555e419bf7e1d286496aa9925fa3361a7b5d7f96d6ab37a613 -size 1441 +oid sha256:5a70853cc624c1ad87d398ae7e30aacc96e6c2c1b4065de53244e722ca8e118e +size 1440 diff --git a/data/minecraft/structure/village/desert/houses/desert_medium_house_2.nbt b/data/minecraft/structure/village/desert/houses/desert_medium_house_2.nbt index d6a811d3..c0cfad52 100644 --- a/data/minecraft/structure/village/desert/houses/desert_medium_house_2.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5e62f8ad463405560b70fa742f953669c316b934a933da2c136ac6f46c85207a +oid sha256:425f293ee2af4f9634c05de6babbe2ecdae8d06d1dfb93abbee8a7dd88fee51d size 2838 diff --git a/data/minecraft/structure/village/desert/houses/desert_shepherd_house_1.nbt b/data/minecraft/structure/village/desert/houses/desert_shepherd_house_1.nbt index 0921a174..9c736937 100644 --- a/data/minecraft/structure/village/desert/houses/desert_shepherd_house_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_shepherd_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f79b861a27aa53d88fc774444e2221966aba6b2c7c40f61666d652005e1948f7 +oid sha256:52a8e231aaacbcdb5d7ac8cd973769df02dd6508d4fd0d474eaf709895747df5 size 1567 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_1.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_1.nbt index fc66ab9c..6623bf33 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9a15921147906138c175120962d09ecd758032b8ecfbc702802f0856a8eb78b +oid sha256:ac6a32c1b3fdb966cdbd13396f24dd94c4c4c82255931a897c9367ae24daab94 size 1180 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_2.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_2.nbt index 852b97fb..d40f3c5b 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_2.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f6f5102c21c5dc7787616d44a9b1aa01b820bd8415e5cd8deb17bf8d750976d5 +oid sha256:89c997708028401bbe6c19671f75d8de0e0585e3cd921716fa498a2faba29caa size 1314 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_3.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_3.nbt index 212dcef8..ec014cb0 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_3.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:176c359db6c71029d16e73d3998be647fe9d8f7eb75fdb4b2918100757132bfb +oid sha256:3bc3fceb3fd5989323433be2b7c464a8244331ab429304189e4fa156d159704b size 1132 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_4.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_4.nbt index ace3a51a..5c0264f1 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_4.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0295a6fe5d66a6fd1eba8796b970c735f42cd77556e8550e377d44eef0dc6c4b +oid sha256:6ecc9b69f0a2f810a3a5f08bbf1c3801020d9a5cabcfb5fde36f0596d12b7ee5 size 1055 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_5.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_5.nbt index bbff13e9..c695a2aa 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_5.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0d98afd7b3f3feb803af2ce7a8a996921b5e39241b2b9022041f3dce48a33db +oid sha256:3286a89f17790aa2d5a349f59c7ea02ed84e46befb1c65213d1adafc263b5111 size 1108 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_6.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_6.nbt index 81ddd77d..4eb3ec75 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_6.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:21217fa23e697ccf10632940adcf225c2755bf5f353926d2c703286714e2a446 +oid sha256:2c7350b71ad3d6430a4e31660cb6de3cd7adab5ba36dc96d8d0233ea349b065f size 2293 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_7.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_7.nbt index 0551cb8d..6fc9c6a7 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_7.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d7816d1b146333536bd0c627333d83d5197d90a2fbf891d6bf3aa6bf4e335b60 +oid sha256:8ff6429fa89eb2bbdefad5d4574cbad4abd1ca7f200a9f70cef2eb587d04ab2e size 1600 diff --git a/data/minecraft/structure/village/desert/houses/desert_small_house_8.nbt b/data/minecraft/structure/village/desert/houses/desert_small_house_8.nbt index 5d9433b3..a1f687cf 100644 --- a/data/minecraft/structure/village/desert/houses/desert_small_house_8.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f1f6deaad5c47669c0631a66770c66c7d6df95c9560cd50ca45f4f7c00cb002 +oid sha256:810a6891db2d19012268e375e32acccdd92b485a3f232f0b5f1df9a631513a5a size 1026 diff --git a/data/minecraft/structure/village/desert/houses/desert_tannery_1.nbt b/data/minecraft/structure/village/desert/houses/desert_tannery_1.nbt index 59004a4f..120d99b6 100644 --- a/data/minecraft/structure/village/desert/houses/desert_tannery_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_tannery_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d413a2c9a85337a876c1a77e084c25948b9639cebe175c9e8c25ec07e2d5799 +oid sha256:803c880383453492adcc10ee7ba0514895ca9fb36104c357d08d611eb957d88d size 1836 diff --git a/data/minecraft/structure/village/desert/houses/desert_temple_1.nbt b/data/minecraft/structure/village/desert/houses/desert_temple_1.nbt index 8c87ad6d..21aada82 100644 --- a/data/minecraft/structure/village/desert/houses/desert_temple_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_temple_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c4e1c881cde884dbad3b9d89bb1755576e55fadfb68a80b8e6151718d7b780c +oid sha256:651a6e909f3fcca52c63daa066c2de88f53b6ee6e8c69a4b4b882cfac32b689b size 2999 diff --git a/data/minecraft/structure/village/desert/houses/desert_temple_2.nbt b/data/minecraft/structure/village/desert/houses/desert_temple_2.nbt index 656d37d7..0e50badb 100644 --- a/data/minecraft/structure/village/desert/houses/desert_temple_2.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_temple_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e1ef234745dc762fbb4317c78bd9249bf38d3ee87dba320caa2843f1972756f3 +oid sha256:5ae94fbc4fca8d0baf232a767942fa8cf2a328185c387bdcbdcda548f48e9b41 size 2881 diff --git a/data/minecraft/structure/village/desert/houses/desert_tool_smith_1.nbt b/data/minecraft/structure/village/desert/houses/desert_tool_smith_1.nbt index 08d41651..2431948f 100644 --- a/data/minecraft/structure/village/desert/houses/desert_tool_smith_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_tool_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:481aaf68b187ff78ea658127baebdf499005ffab34f06aa11112d9e7a685b30d +oid sha256:946375be419b5cfc2b2c6fe72b6b8b6bfc87b75c77f1073194409a2bce1fd7cc size 2961 diff --git a/data/minecraft/structure/village/desert/houses/desert_weaponsmith_1.nbt b/data/minecraft/structure/village/desert/houses/desert_weaponsmith_1.nbt index 9c3fa4fa..4e5102bc 100644 --- a/data/minecraft/structure/village/desert/houses/desert_weaponsmith_1.nbt +++ b/data/minecraft/structure/village/desert/houses/desert_weaponsmith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df85de65bdde9461eb8a08d8bf35ee0650036376267c270d3a4bf06785e108c2 +oid sha256:c001bc6dce8b8ac0c379e8a3a2cefd26453f9cb5e37750a9f356352335e2bbb7 size 2066 diff --git a/data/minecraft/structure/village/desert/streets/corner_01.nbt b/data/minecraft/structure/village/desert/streets/corner_01.nbt index 0d92ee06..7fea2a6e 100644 --- a/data/minecraft/structure/village/desert/streets/corner_01.nbt +++ b/data/minecraft/structure/village/desert/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a5b5775f03abea9dd102d4c905a163fbc95c2d0b9cd3ca9554bbdf363ab5a02 +oid sha256:ea1c9da107bd16e541cc079df2e60d1a00a74da49242bc6237cf884ae1d6b00a size 749 diff --git a/data/minecraft/structure/village/desert/streets/corner_02.nbt b/data/minecraft/structure/village/desert/streets/corner_02.nbt index f053a870..6f45cb85 100644 --- a/data/minecraft/structure/village/desert/streets/corner_02.nbt +++ b/data/minecraft/structure/village/desert/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a94f97ef94ca2533bc8c1842216cda7f34f201cbcabccdef786936373cb78c0c +oid sha256:1054cedb7c32229d6afb1e129a1a55c301291a4f73a89654528f8d8d71d15b4c size 469 diff --git a/data/minecraft/structure/village/desert/streets/crossroad_01.nbt b/data/minecraft/structure/village/desert/streets/crossroad_01.nbt index d9e22adb..0f11aae4 100644 --- a/data/minecraft/structure/village/desert/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/desert/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce3b8d3e27ecaded2480b395e84cb184c575160c8652729f63e1c059f535bcbf +oid sha256:5f7695f348c5820586fd3949ec56f33e1400baa2495a092f5b5f3d2ba57210c9 size 1273 diff --git a/data/minecraft/structure/village/desert/streets/crossroad_02.nbt b/data/minecraft/structure/village/desert/streets/crossroad_02.nbt index 5301b659..783380d8 100644 --- a/data/minecraft/structure/village/desert/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/desert/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ea98a0062e99924966ee69591753561f68f3515e758360027875216d22987be +oid sha256:52bb1e78d99592788094ce97c9c27d31804ad290af6fbd7e0e83be9694af20e6 size 783 diff --git a/data/minecraft/structure/village/desert/streets/crossroad_03.nbt b/data/minecraft/structure/village/desert/streets/crossroad_03.nbt index 5cc42c80..e8bbcc47 100644 --- a/data/minecraft/structure/village/desert/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/desert/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5dd4dae918e9e14f7c91348ca59239a1fa3e18dfc701eee1eec087a35c4c8bc4 +oid sha256:3f7cc5c8105c7c9f06b6e3823fc685605fd45f354f05d86391f4e9d9243ea085 size 444 diff --git a/data/minecraft/structure/village/desert/streets/square_01.nbt b/data/minecraft/structure/village/desert/streets/square_01.nbt index c8b73619..f758ff91 100644 --- a/data/minecraft/structure/village/desert/streets/square_01.nbt +++ b/data/minecraft/structure/village/desert/streets/square_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a207db394f84ba861a238b2b0f7ab8decedec935e56a025d078301ba61dc9eff +oid sha256:360712f80e9a89455f9688648db200ba3d867f692cbd3e4d6ce6eb306ff5b7d6 size 1582 diff --git a/data/minecraft/structure/village/desert/streets/square_02.nbt b/data/minecraft/structure/village/desert/streets/square_02.nbt index 7fd60ec0..7601db41 100644 --- a/data/minecraft/structure/village/desert/streets/square_02.nbt +++ b/data/minecraft/structure/village/desert/streets/square_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e69bbd3cc7ef8afdb6e37e25c8093d6dd6d85b007c3cfb2527f5f701027af1d9 +oid sha256:cbc16bd2a672534496e25ef9349574ead7b8a58c5cc490239b538d327cab6b51 size 1311 diff --git a/data/minecraft/structure/village/desert/streets/straight_01.nbt b/data/minecraft/structure/village/desert/streets/straight_01.nbt index c19be8ad..3702b2d4 100644 --- a/data/minecraft/structure/village/desert/streets/straight_01.nbt +++ b/data/minecraft/structure/village/desert/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c6bd4ce7821a837ef73f907dbd406647557488034b6fcbc0bce8afa27110867 +oid sha256:9be409cd38119cae2ace8126181631cfdc9adecb6d9f73ec1e1457a6a6b3f92f size 985 diff --git a/data/minecraft/structure/village/desert/streets/straight_02.nbt b/data/minecraft/structure/village/desert/streets/straight_02.nbt index 34892dfe..09abab3a 100644 --- a/data/minecraft/structure/village/desert/streets/straight_02.nbt +++ b/data/minecraft/structure/village/desert/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d53ded7e12570d788e5c06646489f33038ccd13a04f7c623e2f29578c471a680 +oid sha256:b287d060cf3409cb172149184b775c6cfe84ad77a40802ed28561fa24ae0c100 size 1230 diff --git a/data/minecraft/structure/village/desert/streets/straight_03.nbt b/data/minecraft/structure/village/desert/streets/straight_03.nbt index 930fb805..206757b8 100644 --- a/data/minecraft/structure/village/desert/streets/straight_03.nbt +++ b/data/minecraft/structure/village/desert/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea32a269ad883d81ccaeeb99ac2cab972b8dffe6e3c67ae35081a372e2eb24eb +oid sha256:dd8ce3e4af38933330d9030b202ba6c79fbac0768be5080ecdcf3f95e7873d33 size 323 diff --git a/data/minecraft/structure/village/desert/streets/turn_01.nbt b/data/minecraft/structure/village/desert/streets/turn_01.nbt index c0a012da..1a50b72d 100644 --- a/data/minecraft/structure/village/desert/streets/turn_01.nbt +++ b/data/minecraft/structure/village/desert/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:247531b7ac0ae6b4dc6dd7cebc3478df66663b3120ad2f0883d4974b12f5b021 +oid sha256:a4ec891b5f728667eda22da0e98e5714c08bb9775ada825fbd8bff7f9df5ca82 size 402 diff --git a/data/minecraft/structure/village/desert/terminators/terminator_01.nbt b/data/minecraft/structure/village/desert/terminators/terminator_01.nbt index 03050eb1..bfeb9851 100644 --- a/data/minecraft/structure/village/desert/terminators/terminator_01.nbt +++ b/data/minecraft/structure/village/desert/terminators/terminator_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5eee3b61e7496c478d344b88e4c130398f0934a750fdb31d83e379e240f6da42 +oid sha256:9e78b45e269e7ef3c1198e6ce6196feb2278d4da5553a0de21f670725501bbda size 294 diff --git a/data/minecraft/structure/village/desert/terminators/terminator_02.nbt b/data/minecraft/structure/village/desert/terminators/terminator_02.nbt index 8be92d3a..fcceee73 100644 --- a/data/minecraft/structure/village/desert/terminators/terminator_02.nbt +++ b/data/minecraft/structure/village/desert/terminators/terminator_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:510ddfd23846bc9532edb44354aa1b132422006693d8d06084d5b8db977b7f8b +oid sha256:7fd2a1cdc16e2d63a76dcf0d8c3b1957796a9aaaa94bd5e0e19b1efb06b7a854 size 373 diff --git a/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_1.nbt b/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_1.nbt index d528a9bd..8da7d6b9 100644 --- a/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_1.nbt +++ b/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d45220adda6987be9549303df20067417d4418387390bd3c325018429aab5890 +oid sha256:a968f08bf7c4377b5f228f6cb8e96b1fdf1e84c447af72acb685cf221ad57208 size 1016 diff --git a/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_2.nbt b/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_2.nbt index c5e2ccac..49226ffc 100644 --- a/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_2.nbt +++ b/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a469ddea02c6b702ddc82573f5b21b265b9bfde69112110b510bcb4cc48e520 +oid sha256:04a6aa45421f2635b36d0cf10bfb62ad24ed2c7e6f9ed23d8788e1e80167b1c9 size 1835 diff --git a/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_3.nbt b/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_3.nbt index 1c4be53d..3a226aaf 100644 --- a/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_3.nbt +++ b/data/minecraft/structure/village/desert/town_centers/desert_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34de3d1666c32e3f09957e8534bb4f07f00b36be40b69fc5346b5390ac64b52e +oid sha256:9d75deccdb251c835a07dfba313458d5d5353f11f6e22e0591a9dfda05a76845 size 1899 diff --git a/data/minecraft/structure/village/desert/villagers/baby.nbt b/data/minecraft/structure/village/desert/villagers/baby.nbt index 0f6ebc71..4fd2c307 100644 --- a/data/minecraft/structure/village/desert/villagers/baby.nbt +++ b/data/minecraft/structure/village/desert/villagers/baby.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:526c3b4ddddc8568ee8f56e887a24cf2c52dfd08e01a95172e288306ad555529 -size 750 +oid sha256:27a26b47c8c8f31e7989afe16ac650bfcc0b09e773fb3f3ddd967a3ba1f35b6a +size 751 diff --git a/data/minecraft/structure/village/desert/villagers/nitwit.nbt b/data/minecraft/structure/village/desert/villagers/nitwit.nbt index 3f22b1be..237a27c3 100644 --- a/data/minecraft/structure/village/desert/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/desert/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4199b395986ccbd545f793fb223bc2788cd3d7a622abfb660c8ce92ecedfdb6e -size 750 +oid sha256:1fd132ed570664cf6bda00cf2f486ab95ee6d77850e93f7cd1f079189466deaa +size 751 diff --git a/data/minecraft/structure/village/desert/villagers/unemployed.nbt b/data/minecraft/structure/village/desert/villagers/unemployed.nbt index e67002c1..863d8f0a 100644 --- a/data/minecraft/structure/village/desert/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/desert/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:703cab74f98beaa1e0d190e71b48234ab377452805765560f8837ff87e1e04c6 +oid sha256:ac9e6e6d388d962503f3e11b69359f88edd08edab2994c79827629651afc4ac7 size 750 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_1.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_1.nbt index 4e986263..96abe3e1 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_1.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b73bd48dfea5bba165851d6d59186326d3e627d12c51eeb7b75659770eb50238 -size 1449 +oid sha256:9827ca4fbb2950c7840085f9fc3d0cce4435a3d7789a8788dfcb6f98ed8c260b +size 1448 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_2.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_2.nbt index 1a6fe6e1..e5d46849 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_2.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:044902782035fed7a7c4ad494f7a83f5f35300d247bca4ec87e89246c8eb54a6 +oid sha256:90b293c15977709d04b1b88577af2a4fdae9e063fcfa48671a562c4b7abe28b4 size 2846 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_1.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_1.nbt index 4c607af0..0f1f4003 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_1.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db2d5443c5c7afa9c936e07021a2b29d3e4b8b7b79bc507a8b5b1c93ebfad72d +oid sha256:94c2f7f42f1c027bacdcb58f96d4072f5f47d55dfdeed28e2b5e83d8b5f740e4 size 1186 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_2.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_2.nbt index 691c1bbf..226f33e8 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_2.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ba42ab2b00b3c8847a8dd07444f685bf2020eec9e735826a638259f46350672 +oid sha256:baea204ef7e6cb31af3e26c23571657c005873d618908a3ed6d6385b82dc543a size 1319 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_3.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_3.nbt index c7d76418..190ec756 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_3.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55cb4570ea3c264f27bc0e04a46af98ea4c5f08da448f5233eb975f7c86f465a +oid sha256:7e87184ce2c718304cc784c18896d6afa9897fb39ef65b237f11f64c92391fd0 size 1138 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_4.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_4.nbt index 7d5432cb..31ff850e 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_4.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ea5f721eba285438780b3c7f0ea14e7686e0cea7f098ef472b5b0fe0095710b +oid sha256:aef2afca495af7d5e5353f76c2f9a4583fe9b5332c5ed866838ddeb43eb2e24a size 1062 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_5.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_5.nbt index 5e5128dd..1e29568f 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_5.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6749d6250164c5cf9f93e1e6cb3aafd41b1818c2aad6a929bff178c72d062cc8 +oid sha256:397dde98d9cab87bd3c893cb43ad2afab107a965c848ade9c7cb64e174d1a03b size 1114 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_6.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_6.nbt index 3525a0c2..95cb19ad 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_6.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0db9175f1cb88bbcd02b3ce028306bd49194e9dcfe66c09f1632d7850918261d +oid sha256:50d2c624f9ce4ed777edaa6c3dbe99910ee1c17bc681fc795aa2c27a939bfbbf size 1964 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_7.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_7.nbt index f196f7c7..213c40f8 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_7.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c82b44e79add36caa6566addb0b5688f89c825bf0d8e065c6795274325c7ae3f +oid sha256:980f962b7225b22da4d3d1d462b29b9423f4125107cdd32c6346034ccc66099a size 1606 diff --git a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_8.nbt b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_8.nbt index 4649eeb5..a2e414fd 100644 --- a/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_8.nbt +++ b/data/minecraft/structure/village/desert/zombie/houses/desert_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3bfe9c8c6352195a6e918030fa6fee9f9e411f9f870e77113b59a3a3a39e0cb2 +oid sha256:4e64dd823abf78f6b72bbd020f2608ba6536fe6d14b9af53f0d8eeff8379639a size 1031 diff --git a/data/minecraft/structure/village/desert/zombie/streets/corner_01.nbt b/data/minecraft/structure/village/desert/zombie/streets/corner_01.nbt index 40428c41..36836cc8 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/corner_01.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:297cd0f1bb642021f4bc200c467c6c5d46894bb8414d345f85edc9b2350344a5 +oid sha256:fbdaa62b869145c6d53ecffbfde22e2918366a8ade79590490160f31a92c0146 size 754 diff --git a/data/minecraft/structure/village/desert/zombie/streets/corner_02.nbt b/data/minecraft/structure/village/desert/zombie/streets/corner_02.nbt index 432fc3bd..2e26a112 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/corner_02.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:10009a70ac04930984cbfb9d9fa923b844420c9695521d3ede14010838072e5b +oid sha256:1518d52dae25d5b4ab53925001482b1d874e75810bcbba4a66381c6a53817e50 size 473 diff --git a/data/minecraft/structure/village/desert/zombie/streets/crossroad_01.nbt b/data/minecraft/structure/village/desert/zombie/streets/crossroad_01.nbt index 5eced4a6..06e1947d 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5293580ba6bc939879c8299f13d7c5c78fcfc350bb0395928ca0cbfce3ee4f4c +oid sha256:2dafed3949ef074d8aca502e9da4ea1d2ae3ca04e576c109346388603a1c38f3 size 1279 diff --git a/data/minecraft/structure/village/desert/zombie/streets/crossroad_02.nbt b/data/minecraft/structure/village/desert/zombie/streets/crossroad_02.nbt index df93ab41..e6a98f35 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12ff49fd84b0ea80a8c0670ec08aba8823bd8f26f3242d35b29e9b355fdf199c +oid sha256:0f73dd71b93e2791d62696836043794d3b58b8d13e0014d9671a5a0a4af9dfae size 787 diff --git a/data/minecraft/structure/village/desert/zombie/streets/crossroad_03.nbt b/data/minecraft/structure/village/desert/zombie/streets/crossroad_03.nbt index 6a8b43e8..30e1d7d3 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ade8f3528e257cfba17a7e5ec9cfed7f4bdbf769c3a0623741257ee56d43e703 +oid sha256:3fb37c550b5d7cbdb5cd73f9546d55dcd6120222c0c91a5b9c3b1fe8ce0884cf size 450 diff --git a/data/minecraft/structure/village/desert/zombie/streets/square_01.nbt b/data/minecraft/structure/village/desert/zombie/streets/square_01.nbt index ebc98156..18cbde81 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/square_01.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/square_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52e7eb6e4b2994a94d59b28422f20fe0933761b9faea83b76f341cf607b1b4ac +oid sha256:c655b2da4bd828b239231330757a151477c754d79030783f6fa7c8ab8e4a6817 size 1587 diff --git a/data/minecraft/structure/village/desert/zombie/streets/square_02.nbt b/data/minecraft/structure/village/desert/zombie/streets/square_02.nbt index 971e291d..ff56037b 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/square_02.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/square_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d15c95b54a8353a63dca6d91c80b702b22a9af09c3bcf0ddce2648b0e4544b5 +oid sha256:6c7d8f094716138692f114f4959a67cc651f62aa0bb635d17ec9306c674b705b size 1315 diff --git a/data/minecraft/structure/village/desert/zombie/streets/straight_01.nbt b/data/minecraft/structure/village/desert/zombie/streets/straight_01.nbt index 103fc35e..1b7e3e29 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/straight_01.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0daca19ee1b5d33c6d5d6ddc8b1525d2c21751b7dd7fcbbfdd75db58a1377f7f +oid sha256:892b32a4551ca47d297fed7038a27678724f6bb4093a85eda0101c50e22dd7f0 size 989 diff --git a/data/minecraft/structure/village/desert/zombie/streets/straight_02.nbt b/data/minecraft/structure/village/desert/zombie/streets/straight_02.nbt index bb4a9cca..e1ca9b4e 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/straight_02.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ebe155574ff2d4a51db04a512577d43b5ff23896449a332b41d36e6793d2213 +oid sha256:e5eb6c6741af16c07d67e69c551f5f1e90ff0d066947a9dba0bb2285bb4eac3c size 1234 diff --git a/data/minecraft/structure/village/desert/zombie/streets/straight_03.nbt b/data/minecraft/structure/village/desert/zombie/streets/straight_03.nbt index e8fc699c..b2f8fb56 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/straight_03.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1b5f9d2dc8ed0bf0b37087a5af7ab013a64fdef4dcebc44afa39a5689a1d8ebc +oid sha256:b3dd41daeca1bc09991d1e2571d8c2525192adb35f30f361f2d5f235231de01a size 328 diff --git a/data/minecraft/structure/village/desert/zombie/streets/turn_01.nbt b/data/minecraft/structure/village/desert/zombie/streets/turn_01.nbt index 7eea96d2..e0327fec 100644 --- a/data/minecraft/structure/village/desert/zombie/streets/turn_01.nbt +++ b/data/minecraft/structure/village/desert/zombie/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:091be914da64c8f3e27df4810425fd1bc3e711b75209af7c2c80ef2a012c0abd +oid sha256:37222692e9b15925b45196f19705c7532bfc6d8a1f0ee73f02fb79502a95c398 size 406 diff --git a/data/minecraft/structure/village/desert/zombie/terminators/terminator_02.nbt b/data/minecraft/structure/village/desert/zombie/terminators/terminator_02.nbt index 72bb8e40..137e5366 100644 --- a/data/minecraft/structure/village/desert/zombie/terminators/terminator_02.nbt +++ b/data/minecraft/structure/village/desert/zombie/terminators/terminator_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a365459182cad25b5d2c101295fbadb8212a9a783c8697d097720c361b2a1fa8 +oid sha256:883ed3109e27fd457358f573386102d3cee137f0fb69c099a2d354b4b38b1912 size 377 diff --git a/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_1.nbt b/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_1.nbt index f4ea4d7a..26a4a1b5 100644 --- a/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_1.nbt +++ b/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1cc6554827086187937f439bfa5a8a0e66e64304d9b92144ca127289d0caf5d7 +oid sha256:85199fec7a87eaf6b8585e7187909fee2814933db086cee5bc853e3bc2c489ac size 1128 diff --git a/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_2.nbt b/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_2.nbt index 6c2a16c3..58166989 100644 --- a/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_2.nbt +++ b/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d20d0fe65d898b800aab1c648409511e91c9cf643cc6518127d43827231fc729 +oid sha256:6464db749db21f811ddc510f9e2d25a6b7fca781e273df37f6fb2eee100452c7 size 2313 diff --git a/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_3.nbt b/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_3.nbt index 5f3abf34..7a715a7f 100644 --- a/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_3.nbt +++ b/data/minecraft/structure/village/desert/zombie/town_centers/desert_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:755cb959d568a61248b188596da7757e7ae8718d7b1f8f9c836740cd8e631ff0 +oid sha256:5c4f54741e9d8a32d1ec0a6a2182b62e49783d13d668ed12bc18e27e43c2c827 size 4580 diff --git a/data/minecraft/structure/village/desert/zombie/villagers/nitwit.nbt b/data/minecraft/structure/village/desert/zombie/villagers/nitwit.nbt index 249eee17..7235f6f6 100644 --- a/data/minecraft/structure/village/desert/zombie/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/desert/zombie/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e7c6f233f3e8049b4927725a9f4b7f781577830a6b9eac909051f6337e1ccb2 +oid sha256:21b175a7ef8acf456061c97d0b8983eade0db2f20e72d603e56d8c23dc1818c6 size 755 diff --git a/data/minecraft/structure/village/desert/zombie/villagers/unemployed.nbt b/data/minecraft/structure/village/desert/zombie/villagers/unemployed.nbt index be3292d3..d0affb64 100644 --- a/data/minecraft/structure/village/desert/zombie/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/desert/zombie/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:76a825a3ee6fc49073aa757f71bbcbb9fa8ff6cc836d558a8e537d447e87f5a1 +oid sha256:62a296211fb1708890d790e402ca4f6093f6418fe27396f92fac94f1feb9fbfb size 755 diff --git a/data/minecraft/structure/village/plains/houses/plains_accessory_1.nbt b/data/minecraft/structure/village/plains/houses/plains_accessory_1.nbt index cd97770f..a1ff1474 100644 --- a/data/minecraft/structure/village/plains/houses/plains_accessory_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_accessory_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aaa4baa94be88bb1fcca55c2be2a2bdae1d1faa59019c5734df9929d91797177 +oid sha256:6ad8cb7bc7ed1bda57946d90242f8c7956f7e4c56d04383af8dfd71b2f301a3e size 523 diff --git a/data/minecraft/structure/village/plains/houses/plains_animal_pen_1.nbt b/data/minecraft/structure/village/plains/houses/plains_animal_pen_1.nbt index 6a791a93..4b491977 100644 --- a/data/minecraft/structure/village/plains/houses/plains_animal_pen_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_animal_pen_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6532c98c416a8bddc16622ebbcc458b031bf9710ecba46dc32bf482c82ea5c8 +oid sha256:b54ddc33c7e2103e2219a789764410d64e59f0bb790beafdea204a62028b2bc1 size 726 diff --git a/data/minecraft/structure/village/plains/houses/plains_animal_pen_2.nbt b/data/minecraft/structure/village/plains/houses/plains_animal_pen_2.nbt index e8a79c13..af8715e6 100644 --- a/data/minecraft/structure/village/plains/houses/plains_animal_pen_2.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_animal_pen_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:160141275d60f836f0c9ba7d8e2739b4ce6249feec74fece1fc6ce06450ebf1b +oid sha256:623f7d42f1fa1285c461535dbbb68bf41d73e0ead0f48dc0be48088c7149fe8a size 1013 diff --git a/data/minecraft/structure/village/plains/houses/plains_animal_pen_3.nbt b/data/minecraft/structure/village/plains/houses/plains_animal_pen_3.nbt index 7a08e6f8..f8c787b3 100644 --- a/data/minecraft/structure/village/plains/houses/plains_animal_pen_3.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_animal_pen_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:331a2103bf3c1a18ed1aa080aace9cfacd20e2b8095b9bbd3ced3e62bccb95fa -size 1355 +oid sha256:1728db91d5bd6305933e180e80d0e8c855044427f3a190cdffb82c7420d6dac8 +size 1354 diff --git a/data/minecraft/structure/village/plains/houses/plains_armorer_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_armorer_house_1.nbt index 29db27d9..b431411d 100644 --- a/data/minecraft/structure/village/plains/houses/plains_armorer_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_armorer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fe82998c0a704e9d8446aa3fd2aa1abd6985da8152867b4ad98d04c66850a9e1 +oid sha256:e3effbdc0be096d8693368a84655f970c9e5bab6855cadfdbb132fe0dbccef24 size 2612 diff --git a/data/minecraft/structure/village/plains/houses/plains_big_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_big_house_1.nbt index 1e24dad1..59cfcbc1 100644 --- a/data/minecraft/structure/village/plains/houses/plains_big_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_big_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4aef50989cd0ac17a91b82a656d529a664a78eac3364731063d93a9f409bc2a6 +oid sha256:4c091a572fb3d12e7df2c53af883e119738b209198d1a3f35a5f16fab50050d9 size 3263 diff --git a/data/minecraft/structure/village/plains/houses/plains_butcher_shop_1.nbt b/data/minecraft/structure/village/plains/houses/plains_butcher_shop_1.nbt index 940fee45..afed88e2 100644 --- a/data/minecraft/structure/village/plains/houses/plains_butcher_shop_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_butcher_shop_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:41db86d3187d6453912c8985a04188aa4b90bd760f700be7f8e346aa7b9b7462 +oid sha256:9e4fb5fb8e5d4ec0f6abfedf25c281d07a7481a4e3333bb4f5c4c5511e2f4fcd size 4166 diff --git a/data/minecraft/structure/village/plains/houses/plains_butcher_shop_2.nbt b/data/minecraft/structure/village/plains/houses/plains_butcher_shop_2.nbt index 77d6a863..35acd41e 100644 --- a/data/minecraft/structure/village/plains/houses/plains_butcher_shop_2.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_butcher_shop_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f1e8e0e1c7fb81565bbeac00a32871058d8cc07eecee675628064df5660c2bc1 +oid sha256:bdc6eee29aed6979548bb127a07fd755cd9cda2402e943feb2f20d21f420092f size 4561 diff --git a/data/minecraft/structure/village/plains/houses/plains_cartographer_1.nbt b/data/minecraft/structure/village/plains/houses/plains_cartographer_1.nbt index b68ab171..91e57dae 100644 --- a/data/minecraft/structure/village/plains/houses/plains_cartographer_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_cartographer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c44dd872a33aab5c36777fdf5c34acab87905ba54a2a704104b9e04649529171 +oid sha256:a3a199171cde2059b6764845cd1f1f28bca7869f6f8de427925a82e5b3bd83b9 size 2393 diff --git a/data/minecraft/structure/village/plains/houses/plains_fisher_cottage_1.nbt b/data/minecraft/structure/village/plains/houses/plains_fisher_cottage_1.nbt index e69d104e..8d2432a6 100644 --- a/data/minecraft/structure/village/plains/houses/plains_fisher_cottage_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_fisher_cottage_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:505fdcdff3d92a217da835370f379d06f71c78b8bd69ae436a17bbaf5a5daa68 +oid sha256:4209bdee17df555ec7644290dc80b6601722e75e5e3c5031fe5e91e53e83d8d7 size 3527 diff --git a/data/minecraft/structure/village/plains/houses/plains_fletcher_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_fletcher_house_1.nbt index a6c7b2d1..ab7d959c 100644 --- a/data/minecraft/structure/village/plains/houses/plains_fletcher_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_fletcher_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:02adc07872c4e4819c88653b2134d531edfb6d25ea95a85cdd237595e2952afa +oid sha256:850a807fdbb6f8e13846d6b546599f84e912e0830e458f2b9dad272a859cb399 size 2914 diff --git a/data/minecraft/structure/village/plains/houses/plains_large_farm_1.nbt b/data/minecraft/structure/village/plains/houses/plains_large_farm_1.nbt index 732f93a2..7447fc86 100644 --- a/data/minecraft/structure/village/plains/houses/plains_large_farm_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_large_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:455825490e9aa8a7a9c31d570e1aa9ed2e0b457a183bc1ea1c97d0a5b07c3050 +oid sha256:bbdf87b6ede87256192a40eb052ba429a09b9bec2d42998b5ed55279ebf475ae size 1157 diff --git a/data/minecraft/structure/village/plains/houses/plains_library_1.nbt b/data/minecraft/structure/village/plains/houses/plains_library_1.nbt index 1e778f48..ba95dd64 100644 --- a/data/minecraft/structure/village/plains/houses/plains_library_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_library_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf15744c0bee6ade6ee7a6d0b2d19a7a0404269c8489cbaa703271eed6dba602 +oid sha256:0bd6ad5e428f546d6ed1f589a9b2ff94452feae7fcef5a86fbe9e28dd408d775 size 6515 diff --git a/data/minecraft/structure/village/plains/houses/plains_library_2.nbt b/data/minecraft/structure/village/plains/houses/plains_library_2.nbt index fde35355..b3d5d055 100644 --- a/data/minecraft/structure/village/plains/houses/plains_library_2.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_library_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0bb5e5ca53405b860303706d5bff7b72e04c587802b2a2d8f37e65dc1e3632c2 +oid sha256:704316bf6014f05f375eb80b478781672244454503f0b986b702e8ab8ae9e98a size 2917 diff --git a/data/minecraft/structure/village/plains/houses/plains_masons_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_masons_house_1.nbt index 2532543f..68972808 100644 --- a/data/minecraft/structure/village/plains/houses/plains_masons_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_masons_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6e9b7e07396f55a3007235ffd66b173c7c8e07b3b07cdf791c31d6f79e3bfda3 +oid sha256:b8c3f59762aad1b50ee93b1519820855d4a11bfba2a971042371fd01842c2fce size 2296 diff --git a/data/minecraft/structure/village/plains/houses/plains_medium_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_medium_house_1.nbt index 46d134ac..e33f7ac7 100644 --- a/data/minecraft/structure/village/plains/houses/plains_medium_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64f6fe9ba6f2cdc0dd5f32ae0a1e7c2d0675d3eef9396ba9abc5b0a537f56c9e +oid sha256:83142bd31dfd436d6d2da737244af8ec28c45797123f0f25cde817ae8d95f048 size 4241 diff --git a/data/minecraft/structure/village/plains/houses/plains_medium_house_2.nbt b/data/minecraft/structure/village/plains/houses/plains_medium_house_2.nbt index baebda0f..1c2db009 100644 --- a/data/minecraft/structure/village/plains/houses/plains_medium_house_2.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e22bde22d97248d760f19d9e3b0cde7a63d86b9de5c60008ea4263bddc7eb89 +oid sha256:054d68f059341e67ed48a3e0a534f2558d357168c709edbf777f26a64f54b3bb size 2543 diff --git a/data/minecraft/structure/village/plains/houses/plains_meeting_point_4.nbt b/data/minecraft/structure/village/plains/houses/plains_meeting_point_4.nbt index 9704cb6b..541a0a2c 100644 --- a/data/minecraft/structure/village/plains/houses/plains_meeting_point_4.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_meeting_point_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54a6b09df3fb6825a38cafc97bc1f34a3c8af57a30e4a52890353ebd2bbfc182 +oid sha256:481d6dfbc29f5f5522558aed209a5dcf06dcdd3cab217f7febdd6757086d7f65 size 3906 diff --git a/data/minecraft/structure/village/plains/houses/plains_meeting_point_5.nbt b/data/minecraft/structure/village/plains/houses/plains_meeting_point_5.nbt index 62b870d8..4fa75dda 100644 --- a/data/minecraft/structure/village/plains/houses/plains_meeting_point_5.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_meeting_point_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dfa5b9923a6bc8a5d8a737b7c2e45b2f6c70ecf4b64e0931865f6f118742355e +oid sha256:c5e4c37c955450523ecc840dcc44eec536aaf4f87ecadf4466e489d8a71c5e69 size 2652 diff --git a/data/minecraft/structure/village/plains/houses/plains_shepherds_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_shepherds_house_1.nbt index 7f6f94ed..e3863ea3 100644 --- a/data/minecraft/structure/village/plains/houses/plains_shepherds_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_shepherds_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aaaa768a8d0733e412c10bf3c9c862f89ddd5f1934f3fab80485c519385cb60f +oid sha256:4c6dd3e1a7e5b282d90731054b931155c2b17d95e6c72f841621a61d111bc19f size 2915 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_farm_1.nbt b/data/minecraft/structure/village/plains/houses/plains_small_farm_1.nbt index 93b90432..4b041ea7 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_farm_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb26343ba5b66b929a99671ed0307e6aa984c88c6f6093aa26a0365d112e2702 +oid sha256:5220b249d54d02ef384c99a85a23ec7f7224fce205418d1cb9cdf81875011b50 size 773 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_1.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_1.nbt index 763c6fd2..d16f4eef 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e1e1be82ae0c4962aa93a0eeb1fcc1304d89359c2dd3f3c5cb1527f010246b92 +oid sha256:71d13c83774c151256b5cd385a766d220036e6e6b4c4d24580e2a722459cfab3 size 1809 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_2.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_2.nbt index a04a6e23..395411c7 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_2.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee14384c558940679b1e948f4842477bb9508e55eb68d4585ebe414ed883a409 +oid sha256:fe1fe8ea97335126a023d647ae32d04e5296ea34c29c1db69bbcd0a4a0b8fe75 size 1700 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_3.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_3.nbt index 164a3b98..c574a786 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_3.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e88ff690cdce006dbef6211841269dd6c8ece5686b7ff747de3644379ba0eb8c +oid sha256:17350128e1eaf62f0d7d95384a7608940fa835abe89dbdbf0d3790137a413d7d size 1803 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_4.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_4.nbt index 24d4f81b..945a855e 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_4.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d3a75866af6e400976c1af644a9e9118fdbe763ff10ccb9d79f9eea78d950a2e +oid sha256:0bf85d2a6a92482548b4f40f87775c9409ca2d72774ef03daf76f1cc70efbdfd size 1726 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_5.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_5.nbt index e9bef0ee..93cdfbf9 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_5.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc6247121a26b57d40e6162af5134eb0b9f90cdcc61dae949ba143ca7e810d47 +oid sha256:94a322e4dad5d6f2432dc4274230916b2b9f5765fe227361197d29ca38168dc7 size 3491 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_6.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_6.nbt index 7e957bcc..ca8f7a45 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_6.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:13840a845a286888d1887f3a20829efb5dcb5a51cfd72859824158c93babe65d +oid sha256:9c3ad1d494911fa09bb99716935bb847489554bb7fd08d15d4373223b7f01d06 size 1775 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_7.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_7.nbt index 68cfd468..d5235626 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_7.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c41d15ec12b10b89e01d3a6f4d68b519bc06414c531e4c0135bcc35605d594a +oid sha256:c10991a08a82887cad2723a7c1f803a2fc029474811f489ee97149b19b778d4e size 2036 diff --git a/data/minecraft/structure/village/plains/houses/plains_small_house_8.nbt b/data/minecraft/structure/village/plains/houses/plains_small_house_8.nbt index 18d8521d..45d083f8 100644 --- a/data/minecraft/structure/village/plains/houses/plains_small_house_8.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b494280cf0b3e426dd78e191281a8b221511bd7c0700a378fc75c665536d283 +oid sha256:8d3f39484536ab5db26ec4f7d5ba1acde723c9500ad8b1a4a33e8b43e462aecd size 2683 diff --git a/data/minecraft/structure/village/plains/houses/plains_stable_1.nbt b/data/minecraft/structure/village/plains/houses/plains_stable_1.nbt index 9756e889..f37933e1 100644 --- a/data/minecraft/structure/village/plains/houses/plains_stable_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_stable_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d4469c9746f7195a8cf703eaf4ab6a2fbb0748b2bbfd868f04ce90613bcdb08 +oid sha256:acefc0c9d59ba674311b94ac2861204b87e61abcb611ae591d5e5fca7e94d21f size 3779 diff --git a/data/minecraft/structure/village/plains/houses/plains_stable_2.nbt b/data/minecraft/structure/village/plains/houses/plains_stable_2.nbt index 406df3d3..7ae3e220 100644 --- a/data/minecraft/structure/village/plains/houses/plains_stable_2.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_stable_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01117ea15b3000379b18c3d9371a0dc10d10568334720ec18f65ca84db7b69ec +oid sha256:c3b33fe15982aa7e143951149140cb6cfae5e2d3ed3daca893cf50f566e470a0 size 3072 diff --git a/data/minecraft/structure/village/plains/houses/plains_tannery_1.nbt b/data/minecraft/structure/village/plains/houses/plains_tannery_1.nbt index 4a7d88d8..f9d19128 100644 --- a/data/minecraft/structure/village/plains/houses/plains_tannery_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_tannery_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:072d3a77cc918295cac3de5da887f1ff39ad1614dff30fca2d5940c1f602921f +oid sha256:87d28f405dd93c528fae465d7c7b2c384dc4c439fd0bb1bc4f96d98946decb02 size 2502 diff --git a/data/minecraft/structure/village/plains/houses/plains_temple_3.nbt b/data/minecraft/structure/village/plains/houses/plains_temple_3.nbt index 19145139..4ef375d6 100644 --- a/data/minecraft/structure/village/plains/houses/plains_temple_3.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_temple_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:232ae84a1256abcb3829268c7dafb51a034cf38b294972cfdd5802058128c884 +oid sha256:2608116262430ca154d5b8a8839b8dd300299311b3f0486b5217ca406fe51b85 size 2493 diff --git a/data/minecraft/structure/village/plains/houses/plains_temple_4.nbt b/data/minecraft/structure/village/plains/houses/plains_temple_4.nbt index 81277c20..686df3b4 100644 --- a/data/minecraft/structure/village/plains/houses/plains_temple_4.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_temple_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b85903eb06da353179011035385d9e234a3c02cc880a25d12098380f74f6c786 +oid sha256:d7a69d62b968033f68e1fba2928f3862395433685153c75e1d09e4acc5e0a948 size 3211 diff --git a/data/minecraft/structure/village/plains/houses/plains_tool_smith_1.nbt b/data/minecraft/structure/village/plains/houses/plains_tool_smith_1.nbt index 177a55e3..3cae0f78 100644 --- a/data/minecraft/structure/village/plains/houses/plains_tool_smith_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_tool_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a78dca8aad121187ffda67b7192b0c640c512fea59118cd54c7d193f9c2c9ce +oid sha256:5c75d1baeaa57b5d8c05cf419bec84254d98ed149439ec6e8587dd33f5baf9db size 2675 diff --git a/data/minecraft/structure/village/plains/houses/plains_weaponsmith_1.nbt b/data/minecraft/structure/village/plains/houses/plains_weaponsmith_1.nbt index 1475bb21..24c8549f 100644 --- a/data/minecraft/structure/village/plains/houses/plains_weaponsmith_1.nbt +++ b/data/minecraft/structure/village/plains/houses/plains_weaponsmith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b53b6eb3e45dca7a9b5ecab3d03d14c41cd3c2c7c482447f65769cd98af6de15 +oid sha256:132f833d4fed9328e0c441bbe3cc2a9f34dccfb29f9cc03a40e4ac5320e9e0b3 size 3342 diff --git a/data/minecraft/structure/village/plains/plains_lamp_1.nbt b/data/minecraft/structure/village/plains/plains_lamp_1.nbt index 0901a4df..dfa0015e 100644 --- a/data/minecraft/structure/village/plains/plains_lamp_1.nbt +++ b/data/minecraft/structure/village/plains/plains_lamp_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1778d887f9015b0a332ff94a5eb4f8a345c4af1f24f8391372db03551be912bd +oid sha256:f3d3f889281a3d7f4ff4e6531b5696cc5d1632e772c3ebc9dc3003284b33b901 size 470 diff --git a/data/minecraft/structure/village/plains/streets/corner_01.nbt b/data/minecraft/structure/village/plains/streets/corner_01.nbt index d061a609..99315c5d 100644 --- a/data/minecraft/structure/village/plains/streets/corner_01.nbt +++ b/data/minecraft/structure/village/plains/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01305baf5f12a739d22e0ae10dcd1480c4bfe2befeb367d70d67f86bb9a0c36a +oid sha256:c929f569c4734f09d33f6d3da653bad925d9be6ab1ec5c5c45ac71debaab8ad8 size 1183 diff --git a/data/minecraft/structure/village/plains/streets/corner_02.nbt b/data/minecraft/structure/village/plains/streets/corner_02.nbt index 3d7dac13..5141ea03 100644 --- a/data/minecraft/structure/village/plains/streets/corner_02.nbt +++ b/data/minecraft/structure/village/plains/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30d06708a5c944b939d40fca1fdeeb028f1c6459d67d95819af756e113463bff +oid sha256:4d7adbfe867c364d5895cde32da8cf4b2a2ae5737c9ce4e329e1dec93b357a98 size 1110 diff --git a/data/minecraft/structure/village/plains/streets/corner_03.nbt b/data/minecraft/structure/village/plains/streets/corner_03.nbt index 2e47d7f6..5121d37d 100644 --- a/data/minecraft/structure/village/plains/streets/corner_03.nbt +++ b/data/minecraft/structure/village/plains/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6618f8e135e94f9032216d36d5940d185a3679eb89a104a599615261b8a91b77 +oid sha256:a003f659748ca879cc3031b3b02c38b1187996b596814af173172b8b7d0b421a size 352 diff --git a/data/minecraft/structure/village/plains/streets/crossroad_01.nbt b/data/minecraft/structure/village/plains/streets/crossroad_01.nbt index b2afc1b3..ef35b2c5 100644 --- a/data/minecraft/structure/village/plains/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/plains/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:73a8e60802a46aa8d23a9470028c10e3c6c0c52b94446ce978dbd224eb46cace +oid sha256:0d24c7e3b8bef28d1c981a1e9ba43b56db6857eba8824512c2791f100b40732a size 1216 diff --git a/data/minecraft/structure/village/plains/streets/crossroad_02.nbt b/data/minecraft/structure/village/plains/streets/crossroad_02.nbt index 3a4e22b5..621b8028 100644 --- a/data/minecraft/structure/village/plains/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/plains/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b97ab71db36ecfbdd6160336994ced34c8b6deee80ff403607310beef2b8c49a +oid sha256:2d3fb3ae66999f3b741557ab19097533d6f03b6a34409a216ca17c2a79d8889c size 1161 diff --git a/data/minecraft/structure/village/plains/streets/crossroad_03.nbt b/data/minecraft/structure/village/plains/streets/crossroad_03.nbt index 3a0ab588..16d40da9 100644 --- a/data/minecraft/structure/village/plains/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/plains/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6058e9554eb26ec6c7c1779937041dff3a3762bf1b3004305a01f5221801e8e +oid sha256:155cd4140c6785809369a001927ab13cb61abaff6aca0ae7799d634d4297d6a3 size 1205 diff --git a/data/minecraft/structure/village/plains/streets/crossroad_04.nbt b/data/minecraft/structure/village/plains/streets/crossroad_04.nbt index 789cd666..ce77ba5d 100644 --- a/data/minecraft/structure/village/plains/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/plains/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ac1745ee49e27373bf26f45414b1c958c77733aec718a849786aa7976dac42b +oid sha256:227dd5fdb7faaae867b184229a65fbddd0ad3e2cc85ec1c483b729e94746937a size 378 diff --git a/data/minecraft/structure/village/plains/streets/crossroad_05.nbt b/data/minecraft/structure/village/plains/streets/crossroad_05.nbt index 8c38ff9d..a6d8f6d5 100644 --- a/data/minecraft/structure/village/plains/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/plains/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:864bdf0390f2854a96d549ef44e99a2e55977631bf45f1c8cf0ca8b137ebc859 +oid sha256:064941d74072998b4431bde8867daebf3dadc27c433192b7b9affa31679371b7 size 410 diff --git a/data/minecraft/structure/village/plains/streets/crossroad_06.nbt b/data/minecraft/structure/village/plains/streets/crossroad_06.nbt index 0e6f0c79..f97992bc 100644 --- a/data/minecraft/structure/village/plains/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/plains/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a671b622bd10d8b7775debad11d979b1e33c375c2fd6a6e82f43656f3d50419e +oid sha256:82a212f2611ddbb2679382074a5da36b2b81a6f8cf7dcf5636531f9363c16594 size 472 diff --git a/data/minecraft/structure/village/plains/streets/straight_01.nbt b/data/minecraft/structure/village/plains/streets/straight_01.nbt index a72ab7b3..7133c301 100644 --- a/data/minecraft/structure/village/plains/streets/straight_01.nbt +++ b/data/minecraft/structure/village/plains/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c34355585083681868bb21cf3638f9f37adf26a97597f21a1caad0969aac31b7 +oid sha256:8f7cc1da78a9a03a77b7f14b385139136de1647354ae8db38d13ed335fbf0547 size 1132 diff --git a/data/minecraft/structure/village/plains/streets/straight_02.nbt b/data/minecraft/structure/village/plains/streets/straight_02.nbt index 150076eb..44592a2b 100644 --- a/data/minecraft/structure/village/plains/streets/straight_02.nbt +++ b/data/minecraft/structure/village/plains/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a114e39384e8e3a758f996d69811d5b1b5baef0b8e2135d3e326ad626250b2b +oid sha256:910305923b8a5d1f7fbe1129bef33af5374e4c84e70097c843d20553440af675 size 1085 diff --git a/data/minecraft/structure/village/plains/streets/straight_03.nbt b/data/minecraft/structure/village/plains/streets/straight_03.nbt index d5c74e45..9e6a6445 100644 --- a/data/minecraft/structure/village/plains/streets/straight_03.nbt +++ b/data/minecraft/structure/village/plains/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:111fb1bb1df390b75360ebe6ab1898ed93d451f446d8a88e445fd8441fe15006 +oid sha256:f10962fe8bd23f98453dbf94b5955e2d6a79dea2c398bdc35f1eddec840d9168 size 778 diff --git a/data/minecraft/structure/village/plains/streets/straight_04.nbt b/data/minecraft/structure/village/plains/streets/straight_04.nbt index 8aa00433..ce20119b 100644 --- a/data/minecraft/structure/village/plains/streets/straight_04.nbt +++ b/data/minecraft/structure/village/plains/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bdba6232c08a59bcf3f81f7f86242478a891d6072502ae5d97a2207b2f291ee0 +oid sha256:d0c6b318f1e6781a5352f939ff9ffc0fcb63feb1ab01104336a0e74028deb454 size 635 diff --git a/data/minecraft/structure/village/plains/streets/straight_05.nbt b/data/minecraft/structure/village/plains/streets/straight_05.nbt index ea3f9411..987e1260 100644 --- a/data/minecraft/structure/village/plains/streets/straight_05.nbt +++ b/data/minecraft/structure/village/plains/streets/straight_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f60d43ef3f8f749802146937224857958da8fc52fac44a27403fcb504c29851c +oid sha256:13455ea5ebd7ec1053aef0316cb8b4af8ea3f01352ed86f520885dab1cf1b39d size 1330 diff --git a/data/minecraft/structure/village/plains/streets/straight_06.nbt b/data/minecraft/structure/village/plains/streets/straight_06.nbt index 89ed5732..960cfb3d 100644 --- a/data/minecraft/structure/village/plains/streets/straight_06.nbt +++ b/data/minecraft/structure/village/plains/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7d0a2399ad2d8637b6141ed833e319a147748fc31262db5f7cf0f0976d6cbd3 +oid sha256:b931784a786f3d7a632140c0870bb7840f714cf5bb574b2cf19dd1915a3c0081 size 1704 diff --git a/data/minecraft/structure/village/plains/streets/turn_01.nbt b/data/minecraft/structure/village/plains/streets/turn_01.nbt index 125caefd..64205d77 100644 --- a/data/minecraft/structure/village/plains/streets/turn_01.nbt +++ b/data/minecraft/structure/village/plains/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:634aaae75e0d07e6048081b50537a32bae0cb7c176e649f7fb1678f59aabc986 +oid sha256:7cde992128c5106f6015995e4b343f7ff135a3164ccc661924efcb47fd896c8f size 790 diff --git a/data/minecraft/structure/village/plains/terminators/terminator_01.nbt b/data/minecraft/structure/village/plains/terminators/terminator_01.nbt index 5fa45c05..1763a46e 100644 --- a/data/minecraft/structure/village/plains/terminators/terminator_01.nbt +++ b/data/minecraft/structure/village/plains/terminators/terminator_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c5a54418efe9c561d8e3443fcc7bd66886688a70d71d68f8b81e3ddae3a6076e +oid sha256:2529783c4af944f4133ba357c81efc41d595c5bde7695a3577a9cbdf65a6d078 size 285 diff --git a/data/minecraft/structure/village/plains/terminators/terminator_02.nbt b/data/minecraft/structure/village/plains/terminators/terminator_02.nbt index f28945aa..04f6a22c 100644 --- a/data/minecraft/structure/village/plains/terminators/terminator_02.nbt +++ b/data/minecraft/structure/village/plains/terminators/terminator_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ba9fb7cbc06385dc7bc5d39ce7d2c199f3d276ab7037790688263b52a234f138 +oid sha256:d920d371cd887a3ccc83502caee4b1890755d3dd9adc5faee20c009472b2f21b size 251 diff --git a/data/minecraft/structure/village/plains/terminators/terminator_03.nbt b/data/minecraft/structure/village/plains/terminators/terminator_03.nbt index adcbf838..e49b0a79 100644 --- a/data/minecraft/structure/village/plains/terminators/terminator_03.nbt +++ b/data/minecraft/structure/village/plains/terminators/terminator_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d9808bf798da49a9c93735be19f371d565ac9af754ee4280f61055c8d2bc27c +oid sha256:a5ce87fadd4e41bd34c38b508adaa5c949b039c0658cd6e4c400a90f69d10368 size 292 diff --git a/data/minecraft/structure/village/plains/terminators/terminator_04.nbt b/data/minecraft/structure/village/plains/terminators/terminator_04.nbt index 98f03a3f..f57595d0 100644 --- a/data/minecraft/structure/village/plains/terminators/terminator_04.nbt +++ b/data/minecraft/structure/village/plains/terminators/terminator_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:14b8f9a3a60f446efc6b891ac911f918153e72f241f67d337031dcf89a4abbd2 +oid sha256:534e5850e5ced123e0e4ee1524805be03a1b36fc78678309e1a8afc3099d9ef9 size 322 diff --git a/data/minecraft/structure/village/plains/town_centers/plains_fountain_01.nbt b/data/minecraft/structure/village/plains/town_centers/plains_fountain_01.nbt index b67df07c..e34dcf69 100644 --- a/data/minecraft/structure/village/plains/town_centers/plains_fountain_01.nbt +++ b/data/minecraft/structure/village/plains/town_centers/plains_fountain_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb957f3c85d6411eb16ea1e5c3782fef5cb75647c240cc2c576a5ef2d7514015 +oid sha256:9cf765bebe9ad32f9780fd70cc23b1c166b3749c400a6e4a6aff5a3a56186fce size 957 diff --git a/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_1.nbt b/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_1.nbt index d3de886a..2b32abcb 100644 --- a/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_1.nbt +++ b/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de4092b166d4c932962baf08a270f1bb58af6f5f3ddfc0b83c7c090be9661f05 +oid sha256:7adf13c4860707a189ec3b536bad07ec16380b269f59af2e237a3b751f9347af size 1052 diff --git a/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_2.nbt b/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_2.nbt index 63939190..785709fb 100644 --- a/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_2.nbt +++ b/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8197afd6589070a47d67b362c11e80d2a87e660a1af51b3dae4f96497f7ea601 +oid sha256:0ff56777d12629ba7376a1576cc17181a11c670ccc7b2b61deae6375aaed111f size 2540 diff --git a/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_3.nbt b/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_3.nbt index e04bab83..c34d1c0c 100644 --- a/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_3.nbt +++ b/data/minecraft/structure/village/plains/town_centers/plains_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f53c1015240a4ee548be648375b9cfc3391d79b34f738c410d517dd8562e412 -size 1586 +oid sha256:96cf3733bc5d07887205876ecc85b72fbb2e5519260607f4789e4e3a4b648a04 +size 1587 diff --git a/data/minecraft/structure/village/plains/villagers/baby.nbt b/data/minecraft/structure/village/plains/villagers/baby.nbt index 59d1e0a8..52d03c9f 100644 --- a/data/minecraft/structure/village/plains/villagers/baby.nbt +++ b/data/minecraft/structure/village/plains/villagers/baby.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a783d3e056a62527372d7e82065dc5a43bd1b171a66ca68d5812087135c31f8d +oid sha256:160a6b254bb923c2ad6bcdbf22410851d9a5beb171b829a0c3909130ce7aceda size 750 diff --git a/data/minecraft/structure/village/plains/villagers/nitwit.nbt b/data/minecraft/structure/village/plains/villagers/nitwit.nbt index e814977c..cf3a8fa6 100644 --- a/data/minecraft/structure/village/plains/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/plains/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1cb215803777dcd0e114041ccfff259ee2b542165f946dec77a5b9066c685ee0 -size 749 +oid sha256:999c822d514fe69f514d3116d7cc595bdf4567688bc841c1aa9b1c6b94e5c6b1 +size 750 diff --git a/data/minecraft/structure/village/plains/villagers/unemployed.nbt b/data/minecraft/structure/village/plains/villagers/unemployed.nbt index a1d25bc3..4f8e75b8 100644 --- a/data/minecraft/structure/village/plains/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/plains/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a5dcc6243031b474d12d3d3578af026510b6844637ecc157c0be55e9b9d923e -size 749 +oid sha256:2d5c7861d0898ae8d1245b66f0099580079e22039e0d1aa7a4342ea3180a650f +size 750 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_animal_pen_3.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_animal_pen_3.nbt index e1a843ed..7c143863 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_animal_pen_3.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_animal_pen_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cffef7763e54f35ab60231b0e0f96d099bba40d5b5bc5dce93fc51f5ba0d04d9 -size 1362 +oid sha256:d81f116601258e129a448428c1cde6c12cf51cea41190b68d90b5dc63019a774 +size 1361 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_big_house_1.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_big_house_1.nbt index 92221263..d3899d61 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_big_house_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_big_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4cd72bf090d57db276cac363b62b8c57c68fad99695bf4b82a48d9bb8b2bcdcc +oid sha256:e3b1851977266eb8f31070e168d1f6f4491a1b3c26972ff60a9f7fa802790570 size 3272 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_butcher_shop_2.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_butcher_shop_2.nbt index 28e1375c..2e96073a 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_butcher_shop_2.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_butcher_shop_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:17a0ea7f3a651c0b5eda06788232ac165fe092e5cf7c1206a7106b942232dfa8 +oid sha256:d1f2b409a73d15591ff0026e01b506c9aba50b4ddaccd0c9ec84a6b779e1ff70 size 4644 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_fletcher_house_1.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_fletcher_house_1.nbt index 6fab6c9b..b3b027e0 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_fletcher_house_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_fletcher_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f635ca4e0bbba90637618a0e25269237da5f3de6ef54f62b6d3f76def40e1fe1 +oid sha256:6277611744a1055af55852513833dc00e8545e8ba89a53705de9fbeddd22895a size 2912 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_1.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_1.nbt index 231228b7..c2ad6c53 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a4f85020029993e6bc8507eb2cb15b6ee6005645e55e799177c29d9e9e43a0e +oid sha256:f8a402809c0fee17a385163144c60c959e965bce73ffd29222e5fa71f2d5b2b8 size 4248 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_2.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_2.nbt index 114bfd03..812916ea 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_2.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e8b4af1462f5d6a837714b2f320a422d8cab271704a038b6f38904ff247768da +oid sha256:64dacb6430330e49a36515ecc5f5a1be130e69111e85ae6e17b69525c1edf32b size 2541 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_4.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_4.nbt index 00d5024c..5481952f 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_4.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d959c3fd4cfb4c00d86b66c4db9565344234f3c7f0e76cd87e4bea5d9d6631e +oid sha256:af25cf9b07f743096b54834c09bc1ff143063359afb13a0f7bc88e0ca8c7a295 size 3919 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_5.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_5.nbt index 0754570e..73ab2aa9 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_5.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_meeting_point_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46a6b8b5915d988ea86b0ae228a35d777de0847636c476247a59100fcc4cb7d0 +oid sha256:f2353521c158d1b31e8a12a8743c3eff6d6405c3b1509e01a555a22e43386e3b size 2598 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_shepherds_house_1.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_shepherds_house_1.nbt index 16cca1dc..c9844f95 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_shepherds_house_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_shepherds_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab4486b11c586ad2f16c69dddeff550972602a1d930ddfcbab021e465ac9a73d +oid sha256:43210a0b9e01dea7b465e5a5d4aed7fa88c1c7e10b9bd9329382c40d39d4b580 size 2924 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_1.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_1.nbt index cf713c7b..6d7d4f82 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3dcbfc37b3c7a6792b14f7aea9554253bc90cf87090cdfc52821f0dacddf15ff +oid sha256:ba42b9590129927fb344bf7bafdf6035c50c050f49d1b2f836b29abb8cf88f43 size 1810 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_2.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_2.nbt index 3674df6a..2848dcba 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_2.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c6bfce7dcb03647ac53ca039c57f39ae5884ef1d965a1d0c09aa3a8e6e779898 +oid sha256:98be55c7ce073e41d86c8aa4f65c226408e243a2aa8d5d5934a927ec2e022b55 size 1707 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_3.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_3.nbt index a1e3ec2b..4e580299 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_3.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa43b01d9769c678478c01344ec88a9d4693aa53b5343b6b3186b18848328b91 +oid sha256:669559489f79415b6ce9e124d3edcea5b4becb80e5310eea627e393c63760a58 size 1810 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_4.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_4.nbt index 98527aa7..ba88b072 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_4.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0f24ab9470433ce7258234e4bf3a84129814e091bf8386739042ad20c4068fc0 +oid sha256:39ee51fac7360d0dfd1321aad66ed3846cd11e31ab465cd9eca3516852fc5363 size 1783 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_5.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_5.nbt index 4b673d71..01a51839 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_5.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a015bd278dda535bb4ccbde2f2f971616f1e0b98e4ff7244392b73706d411f32 +oid sha256:b929c3eca3a1ed1e412ad42843da08c3d4d14ff22fdab54c4bde03d84ab6f6f1 size 3494 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_6.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_6.nbt index d381e361..ebd8bfa7 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_6.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4acea5de12367dd5ede54b2c6e0f71b52fec51669b69bd1d378047725109af97 +oid sha256:aab6046447c19ed0e57c7479386879969145a996d32c16e9956efd1e92ea0c30 size 1767 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_7.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_7.nbt index e487563e..3b42e376 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_7.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ae2840d82c2e49c85c0f153f457a74e9f316765a74975795e46fee6d2482da82 +oid sha256:a740eddbe928ae6c95bcf794d1b2c76ab645a9754220bbe54f7115ff2e609ece size 2034 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_8.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_8.nbt index 4c089675..d3a97af2 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_8.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62fd264ae4dc978f614cd2f431063a001f58d2c772ebe4f46837cdfadb60b808 +oid sha256:9886cb0df3298abbf4578bc898ab44e04c59b84e5f25c3bf56594003af863ec5 size 2691 diff --git a/data/minecraft/structure/village/plains/zombie/houses/plains_stable_1.nbt b/data/minecraft/structure/village/plains/zombie/houses/plains_stable_1.nbt index 5f96340e..f5b43caa 100644 --- a/data/minecraft/structure/village/plains/zombie/houses/plains_stable_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/houses/plains_stable_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce8d9350166cccd3c11219598102f388e79998e30d42b3f014f4ae6721d85e5c -size 3859 +oid sha256:9ae7627e0f1db916e54ead3536b648216230656649634fcfed7e218c7ecf1918 +size 3860 diff --git a/data/minecraft/structure/village/plains/zombie/streets/corner_01.nbt b/data/minecraft/structure/village/plains/zombie/streets/corner_01.nbt index 8a7eea11..444a535f 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/corner_01.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01ba5bd6e3920dc1b3e08e147ec918099e73fa469fa4d5e53bc3ca5145a5d4f1 +oid sha256:d9870841fff5d23654e93361ab233a9d234ad2544dfec4e769a4572763fd6752 size 1188 diff --git a/data/minecraft/structure/village/plains/zombie/streets/corner_02.nbt b/data/minecraft/structure/village/plains/zombie/streets/corner_02.nbt index b544cf64..30858ee2 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/corner_02.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c7b5d2a0ba8bc64fd42eaef1d2b2ff2339d704ba2035c373a0aaaf6995c858d +oid sha256:7b35ec14f644ec4953285b7985e1836055338f81a84cf52b11e09ebbf02d35bd size 1116 diff --git a/data/minecraft/structure/village/plains/zombie/streets/corner_03.nbt b/data/minecraft/structure/village/plains/zombie/streets/corner_03.nbt index d774a9b7..baf72768 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/corner_03.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4aed22283bcb4c95522e4d47498846fc0943710339ed1d99f5c85fbf7ac24d75 +oid sha256:ceb584fed057028d13196e6c638d9984261035d06f0f3f3df05f71dfd1b14637 size 357 diff --git a/data/minecraft/structure/village/plains/zombie/streets/crossroad_01.nbt b/data/minecraft/structure/village/plains/zombie/streets/crossroad_01.nbt index ab535feb..a6216cd8 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9cf412b4e635107d8545103fcc7409bbbcc0d2b71793c38de4acd33d20406f88 +oid sha256:83d66cafdf0184e84d20259f21a8d7bb9cfa5f1c83859a926e4746a8fdfae748 size 1221 diff --git a/data/minecraft/structure/village/plains/zombie/streets/crossroad_02.nbt b/data/minecraft/structure/village/plains/zombie/streets/crossroad_02.nbt index 2c9c86c8..22489931 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec032aa26736ea1ac7c91505f380c3fad212bb5920b7b0e4380b72ae02064c14 +oid sha256:b55aee7adae9924566f2165ef2cfd94a9e4ebe56ecf165cb2e1da5878320989f size 1166 diff --git a/data/minecraft/structure/village/plains/zombie/streets/crossroad_03.nbt b/data/minecraft/structure/village/plains/zombie/streets/crossroad_03.nbt index 9275dd1d..44bda914 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f72db504ce27e6972873bf418393e0cabba12f4fb1f3a32cb833912709532a8 +oid sha256:b330d40211a61df84d68b447d3515d6bca6768dc59407becc09fc2513c29d56a size 1209 diff --git a/data/minecraft/structure/village/plains/zombie/streets/crossroad_04.nbt b/data/minecraft/structure/village/plains/zombie/streets/crossroad_04.nbt index 3fc74082..4a0fc475 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e366fd0c7fd02b4ef4300cc42850da58f7a92e2c5d09d7f6c312a04b114bcf78 +oid sha256:b39552fae361e94ad099c47c616e90349a47c005f209af48255b1a28c5ff4c60 size 383 diff --git a/data/minecraft/structure/village/plains/zombie/streets/crossroad_05.nbt b/data/minecraft/structure/village/plains/zombie/streets/crossroad_05.nbt index 42104fae..eeb43d2c 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8032fbcb89e62fc2c3db0c5f60f6e9375ec3c3629605087ffbb9c11055480bcb +oid sha256:09c6ad7d1193de62b112041dfaf92590478a536db045405f8cbd0b047c784bbc size 415 diff --git a/data/minecraft/structure/village/plains/zombie/streets/crossroad_06.nbt b/data/minecraft/structure/village/plains/zombie/streets/crossroad_06.nbt index 30aed354..4fcff707 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84ba47f947c6530d4332deb9bff8e9dd7c7f804d9dfc704c12e69c7819b6103b +oid sha256:044c5e21dcb45ab232053ab520778fefea9629d73772dd380b490fc9e17f1357 size 476 diff --git a/data/minecraft/structure/village/plains/zombie/streets/straight_01.nbt b/data/minecraft/structure/village/plains/zombie/streets/straight_01.nbt index 5dd8b84c..faff7437 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/straight_01.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c57dbc1fe4e9e8a242aa7a07d384027f2a1f6bf68a2c98821ca95638b3c66a41 +oid sha256:b888a185825d88c9e9506619e52fe37c2a49c44cb009dcdd321605cbfcb49f96 size 1137 diff --git a/data/minecraft/structure/village/plains/zombie/streets/straight_02.nbt b/data/minecraft/structure/village/plains/zombie/streets/straight_02.nbt index 8ddda641..d127906a 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/straight_02.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c085bd6dc9bd6e9e2786932e13d8f42cbaa489418d3f2c6f70f253fe4fdd9ed +oid sha256:669ebb699f11456c47f7617185cdf761154d418d4f2fe31b86da73ec2aa5284d size 1091 diff --git a/data/minecraft/structure/village/plains/zombie/streets/straight_03.nbt b/data/minecraft/structure/village/plains/zombie/streets/straight_03.nbt index 42cdf78c..05f6e7bf 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/straight_03.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:677ecb33d46d32e5640d1f21847acae245e3a681279c376f61c4ae6aa76751b2 +oid sha256:048dca0de3ff16a98b9faa2894ac080738bb43ade91ed8bcac328914c0165688 size 783 diff --git a/data/minecraft/structure/village/plains/zombie/streets/straight_04.nbt b/data/minecraft/structure/village/plains/zombie/streets/straight_04.nbt index b6f016f2..bbde8692 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/straight_04.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:13b0e1555ab079cc31a390ac79107657abfeb69368099d1148b95d748704f769 +oid sha256:cd075debd3f9b0cbacccd59f80ceac15073386bf669bee88075985ace51fe5bc size 640 diff --git a/data/minecraft/structure/village/plains/zombie/streets/straight_05.nbt b/data/minecraft/structure/village/plains/zombie/streets/straight_05.nbt index 20c87609..8cc35e16 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/straight_05.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/straight_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5529314ebcd18eadfdd83704d2c72113bfdb464e2ce1a487e1e46fcdf951cf48 +oid sha256:c44b72d47b54b7ecdcb18be73c354cef37ffcb2078544a6b5c57ef5b0282e192 size 1334 diff --git a/data/minecraft/structure/village/plains/zombie/streets/straight_06.nbt b/data/minecraft/structure/village/plains/zombie/streets/straight_06.nbt index e0729a92..bccf9c31 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/straight_06.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b69c7de84434e1affabc39b4ebc96afc65dac6c4e20b0746215c6e616c40cd21 +oid sha256:246f1fc9385e6d67c4a306b59745199a7a0238aebdd59ce332d34cb1bcb20ef0 size 1709 diff --git a/data/minecraft/structure/village/plains/zombie/streets/turn_01.nbt b/data/minecraft/structure/village/plains/zombie/streets/turn_01.nbt index 9a7d8979..5b80c4cf 100644 --- a/data/minecraft/structure/village/plains/zombie/streets/turn_01.nbt +++ b/data/minecraft/structure/village/plains/zombie/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:37fcb421a006aeffc0ce2d38240d8ea6394e7d7dd2a43fd9ef2f57f6561387a3 +oid sha256:48ec334a2c12a22f2fc807d97fcb7a26486457672f51174fbbbca3dc4370cb24 size 795 diff --git a/data/minecraft/structure/village/plains/zombie/town_centers/plains_fountain_01.nbt b/data/minecraft/structure/village/plains/zombie/town_centers/plains_fountain_01.nbt index 87ee3552..099c083e 100644 --- a/data/minecraft/structure/village/plains/zombie/town_centers/plains_fountain_01.nbt +++ b/data/minecraft/structure/village/plains/zombie/town_centers/plains_fountain_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8366aaff51bb87350bbf9d962d8a16d8329d07d8f8d11b9e055cc3e8a5ac69fe +oid sha256:7a1570d9445e6733d092039029c87772eb566e2afac84a5e7d4e3729c2fbfb58 size 933 diff --git a/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_1.nbt b/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_1.nbt index 7ccf47d0..a9bfc01f 100644 --- a/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_1.nbt +++ b/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:63ae352b6df9e4847c9a4d29f21da3e110fac8eaca31a32384669ec4bfb28378 +oid sha256:f162c456adc71ac6db0401ec171074f3a333f5f7023367b76d8723067df0b367 size 994 diff --git a/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_2.nbt b/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_2.nbt index 32985caa..8e0ea9f1 100644 --- a/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_2.nbt +++ b/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68cb8404438239a596947503a2d8ebd6e451b229e5dac5b732486647c56f5257 +oid sha256:686dd4e303ce4d511c3798267f4390d47bbad713eb901f0d9c4e925e58dd3467 size 2485 diff --git a/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_3.nbt b/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_3.nbt index c00598f7..e4dd2e15 100644 --- a/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_3.nbt +++ b/data/minecraft/structure/village/plains/zombie/town_centers/plains_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d5af6d20750f6498fa21fd882c7cb5d125c73ad87f84b57f0a9b861fbcf8aa38 +oid sha256:197aa625371407e7f66b3bdaa14b4a1f7e25fc31505dd03141ab6cfc8f53ce5c size 1528 diff --git a/data/minecraft/structure/village/plains/zombie/villagers/nitwit.nbt b/data/minecraft/structure/village/plains/zombie/villagers/nitwit.nbt index 9d0caabc..79ef965a 100644 --- a/data/minecraft/structure/village/plains/zombie/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/plains/zombie/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e71cbd6eb143c5735c16bb8b60de1c74839a88c52e77d90ca23bc774b448bfa -size 755 +oid sha256:600cb7f512db046205fd5a28128ddc2abcf7731d8f90cebef79b4604c29ec829 +size 756 diff --git a/data/minecraft/structure/village/plains/zombie/villagers/unemployed.nbt b/data/minecraft/structure/village/plains/zombie/villagers/unemployed.nbt index 586926c6..e60a4470 100644 --- a/data/minecraft/structure/village/plains/zombie/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/plains/zombie/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ea66e508a59b25877f38984724608244cbf18d0c43453d34aef491f8681a522 -size 755 +oid sha256:33f63fef396632ee1ec8f682adde027f67fec113b28e1b672a73e733e88a8ca7 +size 756 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_1.nbt index 3a9491ed..c248ae99 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0ad337a1cb292f975afc81b548c414d4a101fae0bc74149b3f0c450c730e612 +oid sha256:aa03e6a474d2418fe1f6cdeb30bd2eaff017993aadecb3c1e6dd541f25817504 size 1861 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_2.nbt index d39787e7..e7995641 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:63be1f6923c39e6ccb4d03c501de885241097164f39d4380106784e0d4a810e1 -size 3473 +oid sha256:8539a71bd7196abff5c80b277eb655360f4407c403714433628c3fbf54e28cba +size 3474 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_3.nbt b/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_3.nbt index 8276993c..ce8bbdb3 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_3.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_animal_pen_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc2ebe8ef9ced8b5e2a5124ca07eefbf783bfa5afd713c70b50c70c7f38ba97d +oid sha256:3aa12c0a2489522aa26b6180b71b494746666adb3dc6c2b0ee0b79fcf233bdfe size 1660 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_armorer_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_armorer_1.nbt index b867fce6..fef6bcd6 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_armorer_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_armorer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:142b25fb1d5a80a1918aea6d2770299a9dcdeee7c4c8d1f8dad0e51332edba3c +oid sha256:787c8c1afff9787b4f762834f5006387106646f0872629ecbdf34438f0c86433 size 1706 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_1.nbt index 10cf26e6..762a6929 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8cf4b588c66deb0d31bb3c0e2cf3d08811abb2d8def5fc711fd1683f15271224 +oid sha256:a0f7989c355f5ebf9d7f19d83f5ee6b58ff5c3b09e9f552a946104cc318eaa6c size 3922 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_2.nbt index 26cc3d49..07cc9c92 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_butchers_shop_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f52a26d0ff538f130c9a51e95a5c7f0c9567dcf92af7c76f788827627aaa4779 +oid sha256:ccd56e0bed08417fb6bede3acf6f315618460adc493d2364f9e5908a3f6aec9b size 2068 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_cartographer_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_cartographer_1.nbt index 2f1f5160..61759ebd 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_cartographer_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_cartographer_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56e60f63661a0d8517006b03ced2f86957a663cddb1d46424b6aa7529b375fd4 +oid sha256:5a62abffab178f468f5c33d1bae78bd3f9f757d9707bc3c492579f085519e34a size 2644 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_fisher_cottage_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_fisher_cottage_1.nbt index f802d6de..7234edf0 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_fisher_cottage_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_fisher_cottage_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:554c15e17438afd491ab92eb516c3d0ff2b86bdc946965dde1fc3c985030fc3c +oid sha256:6ca478b597c26a70bfca3cdd8d458bc19a8c3616e782d24c8aa4a486d62ea8bf size 3180 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_fletcher_house_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_fletcher_house_1.nbt index 985966d0..47281ff9 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_fletcher_house_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_fletcher_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f73251f2b626363c01929ecf659c36b693a331baa6743c781eb9f31f762101a2 +oid sha256:83dd2d8230acb817b3bda406442cf7c435cb68b4e71ff01319c4c310d9e79f6b size 3036 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_large_farm_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_large_farm_1.nbt index 64e1e162..e7c8eac7 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_large_farm_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_large_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e28b93ce5df13dd9263ea742d4bcc8bb087186b32b68b07a16b31da8fa3b8c4 -size 1245 +oid sha256:7e2065c787e3935318579738b8a1d596bd2045ab4e99c53cc1d6d71b9390d6bd +size 1244 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_large_farm_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_large_farm_2.nbt index f5d58fdd..f79bb050 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_large_farm_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_large_farm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a2e980c6f1f449d1934c46541914dfba841312fc2df8ba93abf4bf1aeed0aaa +oid sha256:181cd630a7fd5526553a09293b548f9581215611446d2cd1ba9c7883377abd5d size 2153 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_library_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_library_1.nbt index 522a8fba..13849322 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_library_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_library_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9bb502d0bf2e1dad7b36c48beba418a5ce7001af770afc143f403a3c9bde460 +oid sha256:1abf98ec78e4cdc2019ce3e3d8c6a12fd00d235c9404c3075c275598357c61c8 size 2770 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_mason_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_mason_1.nbt index d514f4a4..9ed110a3 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_mason_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_mason_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6945fd3b4d8d9af59ef58dfae72fbbd012a5ed8cf32ed1e0f130cbd12b9bca9e +oid sha256:ca11c49193b910aa9c318caa07f58ac3a87c1e654e0f7b1bd8d2b15d5707b8b1 size 2520 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_medium_house_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_medium_house_1.nbt index bae2e521..aff00baf 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_medium_house_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:462d22ab8568d0c76fefe3ff3c18fb4a3d9eb682e08c48978e9000068e256387 +oid sha256:6af58812a1601c1547b36cc00ef533e7dc404b797abf7f44265fdc98491f86a1 size 3642 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_medium_house_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_medium_house_2.nbt index 9714985b..4b8cc8dc 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_medium_house_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68bd758666579dcdfc8a7f80fce219f04993c7db2c7a474f2006893756d153b2 +oid sha256:a26a9121ebe2f2a5882f991bdd609787346755bc5560d177ea21d5be132a1fd3 size 1859 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_shepherd_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_shepherd_1.nbt index 1e95415d..89ab1cec 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_shepherd_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_shepherd_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:334ef13bafd270fd5d325b94fad1d21c1e0498356cc706504deb0c99f19224d4 +oid sha256:4ed74012eb27264d623518c4fe93f578a0ab47dc704accdce23f0324e285e3e5 size 6327 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_farm.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_farm.nbt index 5458722a..5f4d2944 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_farm.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_farm.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d09251a855daaf1c101e24dac3b9241e6c27259290388a3eeb8423c7b4d5c6c +oid sha256:9fe93a169d6b934e4c493a761cb3a0021d8ef5d656f8cba35ef9cf8b38025a1a size 1138 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_1.nbt index 5091197b..4cb5c445 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e10811f4639e517807867bf5428bbf4372c802a11a97d40e583b16a92084abbc +oid sha256:939772ebfdb8f22c91ad7c321984227919b1390bbe1d057c523a84799d7e026e size 1851 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_2.nbt index a24ce10d..dabe8727 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ee7b778572184b989476fa0394ffbfae05d96c423bc97db5ef69ddfd6c6c518 +oid sha256:0e63033c520e0a29d411fb878e1e5f4f9e2d90b335539bdee05d64dfe20cfdda size 1860 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_3.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_3.nbt index 706441a5..36718ace 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_3.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:611c9ba94295e1e34053bfae7392797c14a26f673fae3e439fc2fa407bfba936 +oid sha256:fa86bad02600a66f0522a4976985ec96f2609bddd355f08c2862d9eb624e0365 size 1812 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_4.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_4.nbt index 40bfde83..18c02cb4 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_4.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77e722219280294336a208bcfeef8d531220eb874c143082993f4cf0b57ed98b +oid sha256:29e48049c3ef5a9588c24b1abfb61ed7baa42fd6d5583808376477e07fc3e366 size 2707 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_5.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_5.nbt index 23219fd3..4d30a89e 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_5.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b804264189bb88f5de7ef4d3da6880d32616b114f02b342d1420601635f96cf6 +oid sha256:34686004f981e3eea098d0f33bb3898bcad4661af9edf33e478d00cfc7c219e9 size 2374 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_6.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_6.nbt index e9121ab1..06d52709 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_6.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a39655cda8edf9ad699f69ff808e8e7a791563248be141744efdb5a2419fac5 +oid sha256:9c2f73e6b918607101985997051178a1e2480a95ca6a9f4b3fba5ab556613683 size 1786 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_7.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_7.nbt index 751aa8bb..eeff9049 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_7.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2590505da90431cedf361bf2abf894a5fc054ede666a45cb80e27522539af466 +oid sha256:b8cedf2b2feb93832cbacefd5067efa4a8a4521005284bb922e70f795020e154 size 1883 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_small_house_8.nbt b/data/minecraft/structure/village/savanna/houses/savanna_small_house_8.nbt index 964ce2cd..4dca77ae 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_small_house_8.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:926afbc3fc8fc907a690e146a152c2be6fd7dfc192dcb47f0c04b3d9ab3287f4 +oid sha256:0304b89ae76e2470cb4aeaae394297d6dfb1fc1e01901efb1bdd08ae020d4c39 size 1546 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_tannery_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_tannery_1.nbt index 7fc543ca..fa65fb52 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_tannery_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_tannery_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0141c393963a6d72a59c2ab4a7521eef007d4ab71a9943a739af5f259ca7b5e +oid sha256:92b5bdbbaf5782520aea32d556f01acf64542e0520d1b1b15a0c662bcf341727 size 2132 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_temple_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_temple_1.nbt index 7f3d6211..b4f2c1a8 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_temple_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_temple_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:57ad05a36946686ca39f483fd014307c7cf6b89dff12851cfcb24ead349d0495 +oid sha256:5b22776e0af60888b8493c89ecd791efd865cec5d5a40f227eeb1bef74158fe1 size 3629 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_temple_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_temple_2.nbt index bea02215..3d16c4ae 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_temple_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_temple_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b51ac7fb049fabf822f49c3f196d7a7c4a05ee4fd92717d703645df5f4205e9 +oid sha256:1d82a568aea3d4c8f92d8fcfc42605ea6d3e4ef47ee2aedc6fd80883a7e5b8f7 size 2026 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_tool_smith_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_tool_smith_1.nbt index bc5875bb..b6b87ff3 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_tool_smith_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_tool_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea94b23e42cd25f00beb179d05c6364da429953883980c836e5e51548d380d2f +oid sha256:77a9f39571fe09acde389c6340ebb8e95f38fdc82aab34d5d3a31ae8c60cebc7 size 2461 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_1.nbt b/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_1.nbt index 172e5dc1..834b75d2 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_1.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef4253e2827c07321ca8ae1195e5866226abffaa728982434e1b067770747546 +oid sha256:00081691b0af1d87ac8a464e1e25bbf84aad4e3cfd30db830325b894d0a311b8 size 2079 diff --git a/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_2.nbt b/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_2.nbt index 6b9fc6a2..0dc39cd9 100644 --- a/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_2.nbt +++ b/data/minecraft/structure/village/savanna/houses/savanna_weaponsmith_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d5cde489b76d55151b86855d45895f1c692be335abd23c865c4e5e5f71d1451 +oid sha256:ad06ce5333e32dbd899dab16cad3dd23e6fdc5e372130aac71f4d66d72c60ce9 size 2199 diff --git a/data/minecraft/structure/village/savanna/savanna_lamp_post_01.nbt b/data/minecraft/structure/village/savanna/savanna_lamp_post_01.nbt index 82d58439..479bd0e6 100644 --- a/data/minecraft/structure/village/savanna/savanna_lamp_post_01.nbt +++ b/data/minecraft/structure/village/savanna/savanna_lamp_post_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:706f09f338ec1f9ef91026816ae6236c1ac1ed5906fb87297bf151feceda71a0 +oid sha256:855106e423f901b666045919dedbf910da3e00b09700bd6306e77268cd83cb12 size 284 diff --git a/data/minecraft/structure/village/savanna/streets/corner_01.nbt b/data/minecraft/structure/village/savanna/streets/corner_01.nbt index 648d8794..bac29e47 100644 --- a/data/minecraft/structure/village/savanna/streets/corner_01.nbt +++ b/data/minecraft/structure/village/savanna/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78e1e188bc4c82933920ca9077836fb90df808ef574749138a27ba6b91a99777 +oid sha256:d20f6caf99868795f30298b3dd710770a23ae74701c330d8a38abbc5c918b1c9 size 1198 diff --git a/data/minecraft/structure/village/savanna/streets/corner_03.nbt b/data/minecraft/structure/village/savanna/streets/corner_03.nbt index d1495bcb..79c58217 100644 --- a/data/minecraft/structure/village/savanna/streets/corner_03.nbt +++ b/data/minecraft/structure/village/savanna/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ac7ca47515fd51e9ebf9291d3129dee00b87813f072653949a7d7f2b569f8af +oid sha256:ebe2dbda7cf0090f2b48dcdda62ad647317b23cb70e671ee4e8850df65d46a02 size 352 diff --git a/data/minecraft/structure/village/savanna/streets/crossroad_02.nbt b/data/minecraft/structure/village/savanna/streets/crossroad_02.nbt index aeaac5d5..cc3ce04d 100644 --- a/data/minecraft/structure/village/savanna/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/savanna/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c24c679c48af59f629d3a1d2b23baf129af73bb0206404ef910ddba594e18e39 +oid sha256:2275b575eb0c64d73e2efff8a59e6794b7988c150b7f0019aa71cbc758f93857 size 628 diff --git a/data/minecraft/structure/village/savanna/streets/crossroad_03.nbt b/data/minecraft/structure/village/savanna/streets/crossroad_03.nbt index 7b2ba786..571a9bd7 100644 --- a/data/minecraft/structure/village/savanna/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/savanna/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f7c599b8602cdc7a78efae9a031fc43f6e9f246b5dfb3ec9e247185b007db65 +oid sha256:612ff3a79b9c3494a9cb70ecc6c3a82f24cf68024fb14330030e088eeb83a452 size 1227 diff --git a/data/minecraft/structure/village/savanna/streets/crossroad_04.nbt b/data/minecraft/structure/village/savanna/streets/crossroad_04.nbt index 9b991301..db5c6171 100644 --- a/data/minecraft/structure/village/savanna/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/savanna/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b9f2347f4aee6ddc4e8c29ebae841e6b0679640061128b14ca1f435fc17e913d +oid sha256:6e0f4516fefcade6b3f8534ee92b13b4339e0fcc09904a25525b8a5bedfb7361 size 380 diff --git a/data/minecraft/structure/village/savanna/streets/crossroad_05.nbt b/data/minecraft/structure/village/savanna/streets/crossroad_05.nbt index 844cd31c..637cb66a 100644 --- a/data/minecraft/structure/village/savanna/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/savanna/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:62fa4d1a1a6e8cdf5722b19483603804f028d1cb2be7d8f9348f169a4153c91a +oid sha256:40b6a110de250fa9ff8d53cc92df774a7b6c663a0c44bef90803ea754cec8fb3 size 411 diff --git a/data/minecraft/structure/village/savanna/streets/crossroad_06.nbt b/data/minecraft/structure/village/savanna/streets/crossroad_06.nbt index 9157bdcf..187fd48f 100644 --- a/data/minecraft/structure/village/savanna/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/savanna/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea123af2e9f8c8ce8d8937b74bc4f9b92247df4d3d49394c58fa5ae1cb1af221 +oid sha256:4bbeba9a261b2ea2c536a6db45e1bcdf14400447b6637c19898308f7bd4f3fab size 468 diff --git a/data/minecraft/structure/village/savanna/streets/crossroad_07.nbt b/data/minecraft/structure/village/savanna/streets/crossroad_07.nbt index d54dcf06..0ec52d14 100644 --- a/data/minecraft/structure/village/savanna/streets/crossroad_07.nbt +++ b/data/minecraft/structure/village/savanna/streets/crossroad_07.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c2e2ceb32f708b6e903017ebc7ed5888888a41f78cc90c7f5980f8ab558974c +oid sha256:d5a1050b5c8a9f564d2b5fcdb59a2a9fcf90b881bd77c1bef69f34cc360bc511 size 1382 diff --git a/data/minecraft/structure/village/savanna/streets/split_01.nbt b/data/minecraft/structure/village/savanna/streets/split_01.nbt index ab9d32e1..eb3942ce 100644 --- a/data/minecraft/structure/village/savanna/streets/split_01.nbt +++ b/data/minecraft/structure/village/savanna/streets/split_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a8b5571e4a5cace831049f78ae0312e2aa6a7ac4ae456cd846b25dfcdba42e0 +oid sha256:a15a812cf519ee2266eb5a5014b7fb3c4b2992a22dc8e3a63f4b619e993216f0 size 525 diff --git a/data/minecraft/structure/village/savanna/streets/split_02.nbt b/data/minecraft/structure/village/savanna/streets/split_02.nbt index 82e93ddd..1d1318e7 100644 --- a/data/minecraft/structure/village/savanna/streets/split_02.nbt +++ b/data/minecraft/structure/village/savanna/streets/split_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55569b25b03845d31fb282eca47b560c0e5d72096649d06936e49f9ede9d3a76 +oid sha256:72dcebedb7358215a08bc800e8c461be3ed7c0eb4442cb03c304c66bfdbf6cc4 size 737 diff --git a/data/minecraft/structure/village/savanna/streets/straight_02.nbt b/data/minecraft/structure/village/savanna/streets/straight_02.nbt index 09610aee..0e918790 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_02.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5cc2461c85a73aa219eb3866f2947bcef4b98fa60575559d2932978e4d148955 +oid sha256:d9eb29b9cabb3ddbee2c9a262e83f49a9185ce6a304e33567c4ec6f63bb97642 size 1125 diff --git a/data/minecraft/structure/village/savanna/streets/straight_04.nbt b/data/minecraft/structure/village/savanna/streets/straight_04.nbt index db91d745..252d9b07 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_04.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97c138b267b293b5a3d3b0737399f6f1ec1514f8b00e7def0c91dd21cc98f1f6 +oid sha256:9bb6bafe306301a4730f5ddcddfa8e9d40ef20bbf6373f39228471debadf84a1 size 641 diff --git a/data/minecraft/structure/village/savanna/streets/straight_05.nbt b/data/minecraft/structure/village/savanna/streets/straight_05.nbt index 453c86ad..15d24e64 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_05.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52a33200929a76035d5e3a2ffb140b829826bbde2c890c15cfd6a14f7e8c184b +oid sha256:175c7d5cba01989ca2d419519062232243aa1559713b5da18dc665e8af7c34bf size 1931 diff --git a/data/minecraft/structure/village/savanna/streets/straight_06.nbt b/data/minecraft/structure/village/savanna/streets/straight_06.nbt index da1b833d..06f805d3 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_06.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6afa6eb4989b7c94d50921204836b113333f9b928eec08ac2a9c4febb70418d7 +oid sha256:2b39cb3b881d00a5c78e8b5a70f85fd9050253601cfbd20503af6057b963d2a7 size 1088 diff --git a/data/minecraft/structure/village/savanna/streets/straight_08.nbt b/data/minecraft/structure/village/savanna/streets/straight_08.nbt index 260dac61..baf1eef5 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_08.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_08.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d1090098ae8d6b2ee25f6454bc69a66e846e4c034a89f3c83cc5a826627000dd +oid sha256:c7b9225fdc7fbd01ec48cc2cc2e5f35d17ee324df8d724d84f63fe4fd7228b57 size 940 diff --git a/data/minecraft/structure/village/savanna/streets/straight_09.nbt b/data/minecraft/structure/village/savanna/streets/straight_09.nbt index 82aab733..56642e86 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_09.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_09.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c2b849c1251812eb01705e7b922ae0c3b09217513c60d4621431ee71a68fda3 +oid sha256:2b68fe61ae3a9fb66ecfbce0611635cac69db4c4cae3aea864abcc6843c5c1d1 size 1523 diff --git a/data/minecraft/structure/village/savanna/streets/straight_10.nbt b/data/minecraft/structure/village/savanna/streets/straight_10.nbt index d1ae6003..369a13d4 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_10.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_10.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:541474ae86ef535febc67b0ac7ac85eb4006655499776ac63c54da0ab6c4c8de +oid sha256:e2c15b438fd01ac2446e8cf9412b7c5e0f55c1fe9eb39c34954e590eae28a75c size 524 diff --git a/data/minecraft/structure/village/savanna/streets/straight_11.nbt b/data/minecraft/structure/village/savanna/streets/straight_11.nbt index 82292c19..ab2caf14 100644 --- a/data/minecraft/structure/village/savanna/streets/straight_11.nbt +++ b/data/minecraft/structure/village/savanna/streets/straight_11.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:175d421f7b74289c37343db9bcd285cc85446288c704f9cc021960eb40b1f662 +oid sha256:18c0062d5f99289712218ce78c84192e84e7b804de891746421ea41a44137a3a size 1561 diff --git a/data/minecraft/structure/village/savanna/streets/turn_01.nbt b/data/minecraft/structure/village/savanna/streets/turn_01.nbt index 7b09208c..a6eda253 100644 --- a/data/minecraft/structure/village/savanna/streets/turn_01.nbt +++ b/data/minecraft/structure/village/savanna/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ce1e5e4087c180952a7f2df92cd57736d58493fef8b992d9693bb792942d233 +oid sha256:1d3ce68aab9790578259477686d191126aeb4f6d0d0be03a1b9667b2a8e85420 size 1159 diff --git a/data/minecraft/structure/village/savanna/terminators/terminator_05.nbt b/data/minecraft/structure/village/savanna/terminators/terminator_05.nbt index aedc5069..5f00218b 100644 --- a/data/minecraft/structure/village/savanna/terminators/terminator_05.nbt +++ b/data/minecraft/structure/village/savanna/terminators/terminator_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:28e406f0da73ae76f9e92c2692e7801bfadbb3728627882ecf64bdc76e99539c +oid sha256:8a4285fb683f0234417a65c386711e6888d22bd1730e1c1eb233f68b99aa7f79 size 1191 diff --git a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_1.nbt b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_1.nbt index 6c5ea384..042eb0ec 100644 --- a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_1.nbt +++ b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6164c4390471727f0a3368691fc67d02bb167399da9b529aa8e3fd858012038b +oid sha256:6c1b2cf50f41c57b897afb3a729c9647fae272645d114403728b85a84778347a size 3287 diff --git a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_2.nbt b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_2.nbt index d948c838..843cccad 100644 --- a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_2.nbt +++ b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a262e1373286b070bc45ae2e426986949dbfabb62d21184265ea94eacd35d7f6 +oid sha256:3c19c4d86da708838d6afe723369f95952c2a7fa6441922a7d1c7012f0a6b0be size 1119 diff --git a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_3.nbt b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_3.nbt index ec1d63bc..ce658817 100644 --- a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_3.nbt +++ b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d233742739c65db2784b5bf3e4139c767f0e810961f232df8c3e734aa11da1bf +oid sha256:c48a39ce52f4491a620ca28a2ac98c3f7fe491e3a3dfae44f7863b4995810d89 size 981 diff --git a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_4.nbt b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_4.nbt index 94eb7806..5773119b 100644 --- a/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_4.nbt +++ b/data/minecraft/structure/village/savanna/town_centers/savanna_meeting_point_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:345d89699572b6814a4c96321c3d1e9cdbe933edda6b330b2311ab6ad3322933 +oid sha256:30167a16c063c02f710961a778e564fd10901e16e2573a96831f8772616f3d24 size 1187 diff --git a/data/minecraft/structure/village/savanna/villagers/baby.nbt b/data/minecraft/structure/village/savanna/villagers/baby.nbt index 12ff3848..683e5a0d 100644 --- a/data/minecraft/structure/village/savanna/villagers/baby.nbt +++ b/data/minecraft/structure/village/savanna/villagers/baby.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9825050ac92a7464a8cba7bf3e4d60fe5e9b9c5a33e5c053cf2c765b4ff281a4 -size 752 +oid sha256:933fa9d80ff87b9c1850149e1e8bc05a6828d278bdf8c81932472a5b55c6742a +size 753 diff --git a/data/minecraft/structure/village/savanna/villagers/nitwit.nbt b/data/minecraft/structure/village/savanna/villagers/nitwit.nbt index 818b52fa..54e07f6e 100644 --- a/data/minecraft/structure/village/savanna/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/savanna/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a94e63aaf97cb039108e90edf58a84c26427708895816f2be1e686949ec9193d -size 751 +oid sha256:598a7fdbd64cf872d708223cf0f6665ece2f8ac962458114da0ebda9da697093 +size 753 diff --git a/data/minecraft/structure/village/savanna/villagers/unemployed.nbt b/data/minecraft/structure/village/savanna/villagers/unemployed.nbt index ddf7b90b..485b8c93 100644 --- a/data/minecraft/structure/village/savanna/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/savanna/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6da3825c339c8f76748c16873d3b145dd171f10b168ee41728b32a85ced981ba -size 750 +oid sha256:02fc38bf413abd727a169ddff3c780772c6f7507bc4107daa590b1ef2b6a9be5 +size 751 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_2.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_2.nbt index 5cd839d8..eb63ed22 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_2.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bbf7cec33e85d6fc3b3353b785b30c072dde4bb996eb196504762f31aee192a3 -size 3481 +oid sha256:e5ce2f745bec1433d99f12d83604d79b5513fdf31c2ab573abbf5286f5f120de +size 3482 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_3.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_3.nbt index fe1d0760..09b28143 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_3.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_animal_pen_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0adce5cb570bb68ebcdb4eb2747281c014a5504dd6d81f79de94b89b0dadb849 +oid sha256:8ff9a01d1fb5163b911f48d35580bceb867af89dbf19d7ea4598a588172db8d4 size 1666 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_large_farm_2.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_large_farm_2.nbt index bfa9f49b..de01796c 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_large_farm_2.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_large_farm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c758c887bf0f8e48b76c6ebceab9331c58f0a5599e866d34c05d9660cda9a6b0 +oid sha256:5b3aed4c4859e3c735162a88d3e9a2a182a6c088db1fd03190c66b7fa14bff49 size 2162 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_1.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_1.nbt index a9c02460..be910d68 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_1.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f511e47931adcae254a418a13b53925ebfd260158093d8b3de379f17d5b65ccd +oid sha256:55490f68f114a72dedbb368525831283aaa68c9796e6fe2507eaa65b7d3e42af size 3645 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_2.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_2.nbt index da69a401..8222df12 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_2.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:98494c035c348eb4d114d4e6b6567b10e2609007c599dbf7087102f7ad35490c +oid sha256:660fd1c0f318ff2b4bb04c2c0762fc65a3063c01c0fe036498603fe98b443414 size 1866 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_1.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_1.nbt index f9fb58ea..4bf8850b 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_1.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:814b61e5ff11a1e42073fecf422eab68f2ec9a2f8fe00e534cfdaa6c26db094e +oid sha256:12b48ca11f35a000b452d991357efd6e0f82b2d0246a24c178f05f87fb648005 size 1880 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_2.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_2.nbt index 66bb97ad..aa28c411 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_2.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a41ad602a66f7e5ec0fb79cf613d1398f9101fb5d814cf641e62dfe47eaec93d +oid sha256:a8e1b5a435c59ebd761e092c7bba580b482006baa8858fa1008fb33c7cc38f62 size 1877 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_3.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_3.nbt index 66cf76ff..7a1ea361 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_3.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1b7a842475f7d10e52a192ba4ba12ec4e2c3f0fe55945ee63404b695eb144927 +oid sha256:3f5ef9d60a501eedd822670a4434bff0df84cd0bb098d68e92865cfc483815da size 1829 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_4.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_4.nbt index 0a8da6e4..4a556439 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_4.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:925733470cf77d10ac48fee3079fc5078ee160bdb98c00ff5f5c35c93c2176a9 +oid sha256:bcd8609f502a3f0d45ebd30fd76878d367c0e2a48eb06bfb522f9a735acdc9ab size 2710 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_5.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_5.nbt index 59cd4304..a4e6b155 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_5.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d0648364639516f167d62ca35da85b873c25d0832021e3d2ac20398f88fb9fb +oid sha256:2522215ac8d05f41b1ff76b68850e6ee951efba32b4c636990b1b4e4399bec90 size 2395 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_6.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_6.nbt index 853c2fdf..307ae1f0 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_6.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef78adda83ccff6016f83d3572f072e96fcead381300d5b994e73563b4dffb05 +oid sha256:abf051f6f0e2f7574ca9ea4ff5dd9873bb99ba71c2513e159ecae6fa35a15442 size 1793 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_7.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_7.nbt index 5e5060df..65af5eaa 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_7.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9cd3be418eeb6ef06ebd4389c4607466317003dc351d083ddbee4346a6abb034 +oid sha256:24f6d863c5ad5fa9ebad1fc119600a7c384ce7fe092c7aea403b237efc5efbb8 size 1909 diff --git a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_8.nbt b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_8.nbt index 96387759..bd932b6d 100644 --- a/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_8.nbt +++ b/data/minecraft/structure/village/savanna/zombie/houses/savanna_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44b9eedab2e555be4ae2549d7ce9593ce09db473824c17f95f208adeaae1f6b5 +oid sha256:a420705898bd8df5d03ec0c03013ebe58662ef24800e7769195c0a88b7abe401 size 1552 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/corner_01.nbt b/data/minecraft/structure/village/savanna/zombie/streets/corner_01.nbt index f8ebc0cf..21ec0d18 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/corner_01.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9cb3e32f7e09bc67749b1d5650faedccf8877b586cad93c44cb3d2dcdf1d59e2 +oid sha256:c22079e8f87435a2c3fe232b6d749f8af2ceb9e93cea2809668406472d45fbef size 1204 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/corner_03.nbt b/data/minecraft/structure/village/savanna/zombie/streets/corner_03.nbt index 7ccb8839..3ac9fbb6 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/corner_03.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9643e85ae60f06afffe100a70500fed9e1eddd6144e4964d1cd978749dcd2157 +oid sha256:27aae037092de2905e5188b8f854fe8d3c06d30176ebb5771bbdad10007f594f size 357 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_02.nbt b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_02.nbt index 3a548396..ed23ff06 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e990e60af33e07ab69767f4509e943f7bcdf891ac0a223070361e14dcdb8eeb +oid sha256:1920ab97974f5007dadd8cd17cd2dab88841208672b0cb23fe54cf9b1b8bfef1 size 632 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_03.nbt b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_03.nbt index 603fbcd6..d25a2aa7 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a36f2f331ab3e050b6f502f4c03de8e903702548a9f389b20a8622673e9d9e7 +oid sha256:fa388ba222b5dce800c67b96200eaad74049319bf3b69d8c54e4029d57b07a71 size 1231 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_04.nbt b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_04.nbt index b156168a..66478c86 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5a3736190a189fab68857f98ddaeca18a346505559c7f3fb30c74b634b11fb8f +oid sha256:9d03118df32da3d135b098303746b09b66db71f91348d25005eafd8bd7be5dda size 384 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_05.nbt b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_05.nbt index 26862b4f..f361bcb0 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0dd37e551f074821db95dd0f2cd91393ff3b6a0218534a68a0585424f34d6bfa +oid sha256:fdc66ac9d5920f6b6ce20e61e9212800806be007d5a5ad7433e746b468a80dc8 size 416 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_06.nbt b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_06.nbt index 59843529..24549836 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce743ea18e2a0861abba7ffd5aad0c3f801c0ed69aa0933307acb2b176135d76 +oid sha256:3f453de46fa2e2c6d75bc8a100d9af84187bce5e68f2718cddc3edbf0e6e32b7 size 473 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_07.nbt b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_07.nbt index cbc990d8..e1515244 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/crossroad_07.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/crossroad_07.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8645c0d4c9aa995305537084e436f0dd48ad734c0c30b48daba5472293827265 +oid sha256:53a0bfe2abcf1cb530c66550f49f4ca2c852094a0cb0055cd9b6768dc36be023 size 1385 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/split_01.nbt b/data/minecraft/structure/village/savanna/zombie/streets/split_01.nbt index 89cf110d..71de0452 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/split_01.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/split_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7dafd4cab125657a6fb6a3947b4bddc38750659e3111a9cf0fae90032228ff0c +oid sha256:cb6eba7453916054d124a321981d295cc0afba2f63ffa6fb89cb4c42d72c355f size 531 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/split_02.nbt b/data/minecraft/structure/village/savanna/zombie/streets/split_02.nbt index 744c9706..ac8e9cfc 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/split_02.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/split_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0f0a5010bdd0da85564eba1679b2acf7e4c8add42eb09b2f89b3135b1f5bcd20 +oid sha256:d405b181258569b383fbdc7167e691ea500f0404b562669022d2681cbcc9b5b0 size 744 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_02.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_02.nbt index c9e0776e..9c19ee90 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_02.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52ff6d04c317cf645c75b8951eb193915ba8cd729f933838bef3582168b3dbcf +oid sha256:22e3b55e2a12c8c11335880436d8f00bf95ee67f81cb1868487e054a7190b72a size 1131 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_04.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_04.nbt index 1ec010c3..c80af99e 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_04.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da0e80068a2eccc63226728e4bcada60b26930fb457000a618518340ff3d7fdf +oid sha256:cf7044acc022daf18c2bc5a3accbbc6a92ffa737cf3e600e047457962843c0e3 size 646 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_05.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_05.nbt index 041d0dbb..1d86d806 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_05.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb42a4bf867ad920bdffc005a630606755dd2f8fca297e318764034f232685c3 +oid sha256:1d5c626aaf2ceba918a918d085feabaf3b02d3f7bb4eb8b5c18bb9ec933225df size 1938 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_06.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_06.nbt index 35172dc7..527e4d6d 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_06.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d3466ea81c25418440786900552f07de8d9b3257e1336a73c75e6818994ca0e1 +oid sha256:ff7e0088b4b7909f68e039d7ba2169b96b45aa0d8ecac6714056caedbfdb1682 size 1094 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_08.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_08.nbt index aa165544..ff6e0964 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_08.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_08.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e63a3e6b46282d3c59209e95e6c5bc29f1d1300472527aef1fe85535dc358a7f +oid sha256:cdccb4ab07b7fd5c4950ff622cc6b34818ddc34503a164ab38598c6533086724 size 945 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_09.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_09.nbt index f9b8d79d..909b2267 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_09.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_09.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:856582c95ca89a20d0a28526197974aff19e374c35e4570247a2d24f7eb99eaf +oid sha256:ab9f442a7656c7ecbca232cf6ddca973d6bbb6c19befd03af42aafa55aa752af size 1527 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_10.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_10.nbt index df91fad4..9e7137ae 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_10.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_10.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:724bfdce0ecd80799404b0109413e1d080776ffad5f78ac339786dc29df4a9cc +oid sha256:2e963e20ca79218a489bdefc4aa47f8d34c98134e3d96d61251acdac04150d8f size 530 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/straight_11.nbt b/data/minecraft/structure/village/savanna/zombie/streets/straight_11.nbt index 04835362..ae184c22 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/straight_11.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/straight_11.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad27edd971edf075bdf7fbabe76ae9e7038267295a591ec7080b288baf86ba31 +oid sha256:c65c5e46432ad8c9fc5955d36ce225819f0373507540e056fa13867c100ed374 size 1569 diff --git a/data/minecraft/structure/village/savanna/zombie/streets/turn_01.nbt b/data/minecraft/structure/village/savanna/zombie/streets/turn_01.nbt index 3dd59663..7c661e9c 100644 --- a/data/minecraft/structure/village/savanna/zombie/streets/turn_01.nbt +++ b/data/minecraft/structure/village/savanna/zombie/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:626d484ae958ddf262288ecc4916b6ed339c5cbce789d3407896a7b37369884c +oid sha256:9a4a634c7d970514e461ffe48b01cf3bade893b9daa6904602025e5d069f6b10 size 1167 diff --git a/data/minecraft/structure/village/savanna/zombie/terminators/terminator_05.nbt b/data/minecraft/structure/village/savanna/zombie/terminators/terminator_05.nbt index fa5ff868..2c190659 100644 --- a/data/minecraft/structure/village/savanna/zombie/terminators/terminator_05.nbt +++ b/data/minecraft/structure/village/savanna/zombie/terminators/terminator_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ccfe5d1e1a82dbdb57225ecccaf1951170be43ab716d2ee3491c2f2554f3e8cd +oid sha256:e42760eed184901903f9036496250706750af8a1b2c3240060de95e35341f16a size 1193 diff --git a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_1.nbt b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_1.nbt index 5c0f7970..a444daab 100644 --- a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_1.nbt +++ b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1636499ed0bf541f6183d6880a008764896c9939630133715e7917bdf2d8f057 +oid sha256:46c1ed61379e9ab295202710a7d1bf13b09cb44b6c316a29f1e36c69bd4fe2cb size 3185 diff --git a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_2.nbt b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_2.nbt index 34c110b4..c20a739a 100644 --- a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_2.nbt +++ b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:597ed883515bdf5146561d7f235aa5b3dc53d1577f4a8b0017e761a8dda4428c +oid sha256:b59ba1dbfa4d2864c12d4bf4f066981e09f62ce755b80782b98c80b8378c9503 size 2713 diff --git a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_3.nbt b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_3.nbt index e5f075ce..0d1c1e52 100644 --- a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_3.nbt +++ b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b462fe9f448e20f5ea455e1fdf9668590482a3af58f7ed8a4c82c7688c4f2003 +oid sha256:0dacf7dfab9e1fb32c3b9d70c372adfcf3dbd18ab90383b0dcbd84a5afc4bd61 size 919 diff --git a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_4.nbt b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_4.nbt index 8ce0f668..9143f23e 100644 --- a/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_4.nbt +++ b/data/minecraft/structure/village/savanna/zombie/town_centers/savanna_meeting_point_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b9f78e5753115b19ba68c289e440177aa96b7532bf9bdf8d784351584c6c1fc6 +oid sha256:e648afaf381aa76f51374bbe88a99259e8069baaa3b380beaaba34c5ee80874a size 1146 diff --git a/data/minecraft/structure/village/savanna/zombie/villagers/nitwit.nbt b/data/minecraft/structure/village/savanna/zombie/villagers/nitwit.nbt index 17373ed9..49c6db1e 100644 --- a/data/minecraft/structure/village/savanna/zombie/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/savanna/zombie/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b7f27c0ce8e339e6b2d36ed6c5f5490108c63658b4d243ba4db068c501976c89 -size 758 +oid sha256:64307fce0b89a68cbe2c3b474fcf4f678cb6d54fa862bc06fcd16f60b865df91 +size 759 diff --git a/data/minecraft/structure/village/savanna/zombie/villagers/unemployed.nbt b/data/minecraft/structure/village/savanna/zombie/villagers/unemployed.nbt index 9ce3280d..c4fadb9e 100644 --- a/data/minecraft/structure/village/savanna/zombie/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/savanna/zombie/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d2700173e247cd00f53cdea2426305c47cb04be93e6ad8314abac45e7bf8f75 -size 756 +oid sha256:70f93a2bff48270f545fcfc120a769cdcf7a6fb15419c1ca132773f21bbb5e17 +size 757 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_1.nbt index b6b318af..46bd1442 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad23252a4c5207b15bcfe485952ca4c5b87b7f6adb2390319c6ad60eae5f4c06 +oid sha256:00469e0f4568c737c43f466b65e32c76e483d5b36d8df2ab4d7fdb62b9161d32 size 1622 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_2.nbt index a22d6602..f8af67f4 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_animal_pen_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da42285c7ddf8f5577c543714641dd693763e9d8ce24f8c0de686e7a3f01de80 +oid sha256:fbdf8faa036697298b38acd2165a9222d4a5f89b41f34da1274310b708d0b835 size 1262 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_1.nbt index ee5fa0be..c07b62e5 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c7fc784f41d503fdc1afbba22b1080bf5a43190d9d951f93dbf08d0c2696c80 +oid sha256:ef6eddf156a9f029c1587d4653c10488f534a5e2fd1d716c51a4559b2da49e14 size 2172 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_2.nbt index 58b840b5..cb8df4c4 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_armorer_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34656879eab6c965517b2c01ca51a5b5b39db12b27ddc5e925e75cbd97ef6a99 +oid sha256:48b972c0c87e0a3c2f8759e0aaf24a15d857a8250fe8ec08c4c43b44c1a34858 size 2052 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_1.nbt index 90833062..fe06fd0e 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:35a990bc1930ec8ce6e6ac92e1767a277ba684ddad374235431140bb3d077eab +oid sha256:53f8e591bf7491e3173550b0a98a0b305ffaaae6ac64386458f9838e4a8c3d0a size 2548 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_2.nbt index 3d8bbaeb..8abbd6c4 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_butchers_shop_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b7227d95a67c8c9505f8c0fa41f25bf91847a8816efee228ee582c795133bcc8 +oid sha256:c780f05d48b17afafcc7b2f27ca71ebf8ae0c584d65bdcb52eb9aae2882d26ed size 1446 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_cartographer_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_cartographer_house_1.nbt index 49ec9e0c..2efb552e 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_cartographer_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_cartographer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c5a3da406bfa2acd2bb343d35678b1b06e64e63fcd630700bfb298110be6d815 +oid sha256:613c40881eb1212673af5e3534247684193b509ff0477b6564b8bb42b73e3380 size 2362 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_farm_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_farm_1.nbt index 1ee93662..6ee269a8 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_farm_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d52e350178dc443f15b6c3dcfa251b40f832929553013bf28d63dbae28685a1 -size 1254 +oid sha256:2379320b45b28f13fcd20069ae86a4d5a4f1cb1c399baa984da1d42fb6cdcc81 +size 1253 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_farm_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_farm_2.nbt index ad4d6d92..4336f76d 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_farm_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_farm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b592315705480f21cd7475336c19b42b8846572cd335b62ade35afacfbba6f27 +oid sha256:f9505c09aaec57feb856b9ece48f549f8bdb8f25a2f8ac551f5c1282ec10ad6e size 1076 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_fisher_cottage.nbt b/data/minecraft/structure/village/snowy/houses/snowy_fisher_cottage.nbt index bed4113b..2abe113f 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_fisher_cottage.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_fisher_cottage.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1283a0ec170aae180cc8c7b0ef217ee43847febb5a2005cf1adaf10bffaaba33 +oid sha256:fdbecb56449d2b2aa6655e3c8323daab061a3915d84026df280fd8c6874c07e8 size 2236 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_fletcher_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_fletcher_house_1.nbt index d08a0fdc..5f4f7219 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_fletcher_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_fletcher_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3173c04f63fe027114292bbb44ecc66cbac3029c192e9971c9c1582e49ab5139 +oid sha256:ed7c4682d412986e8c44dee22fe711406ac96b58070697f56a7cd81b77fcf9a8 size 2121 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_library_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_library_1.nbt index d5d00d98..5079875f 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_library_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_library_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e5a7c96af3d7512dbd6cd95b4d14fd1a373d008c7408a3d54784041343181b8 +oid sha256:a5cce41f42d2c7db4fbe3bc633ba223243cd6c0fe18b015d53cdc80a17c1efcd size 3447 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_masons_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_masons_house_1.nbt index 12356be2..6f454a32 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_masons_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_masons_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a6057acf76c399084aec183fae41692660df1af4d80da938bee86b2955d1f69c +oid sha256:0b6dcaa63ad422e72bd0f1af67a41fbe49526763674fe4cc1d2e120c65776daf size 2980 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_masons_house_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_masons_house_2.nbt index 6d931751..655761d0 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_masons_house_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_masons_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b96da83f9ef15ab919e6b56d80ed48824555a4286d9bc31044f351bd44f6e76 +oid sha256:cb03867f39428f6ba731d72f9424c01b2e0d62468eb0a91f7e276f43c1b9c997 size 3166 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_medium_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_medium_house_1.nbt index bbf60b43..a28b06f9 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_medium_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34c949b3b741f25a2b57ebbf1592392d5cc84397790542e37fddd1f88322eab1 +oid sha256:7dcee75496ffaf17bae572d3484d283be323b508393892e72ac81e8625ed0fcb size 1595 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_medium_house_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_medium_house_2.nbt index b94c5aaf..d2b384cd 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_medium_house_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:868298b28be108c67f4e1a935e5c2437084736f44e404b218ed6b5203f9f31b7 +oid sha256:86d567b1aac8aae349f249ce762ff865b95ce100c62a1b18cbd7d8a8dbf35be9 size 3511 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_medium_house_3.nbt b/data/minecraft/structure/village/snowy/houses/snowy_medium_house_3.nbt index ecc31ece..6faa7a77 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_medium_house_3.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_medium_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac3b162dfe2de736d12a9fb9c6d7fc97239f60be309d4264436d4b6be0468615 +oid sha256:a9526e82841cccac9e7a9858ba087f8d03d59076a817d79f46ee655503881506 size 1189 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_shepherds_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_shepherds_house_1.nbt index 07754ee1..4f0bd3fd 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_shepherds_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_shepherds_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79364888344951a70fe4861a94cfa8740f246dad0b0b4fa85a49d16e7a29a037 +oid sha256:3b50ef14ac0a05ae6007185a844e3ff4080d28edcb1d96388846fb7589695f7f size 2167 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_1.nbt index 691c100e..5ecd82dd 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3339eebfce39168ae582f6573ddf45107f18b2ce01800a9439b42f889b653cc1 +oid sha256:f9669fa15f6834563005cc51aced143a69fbb6bb86fc4fd8df92dddd030f418e size 1318 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_2.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_2.nbt index bac00356..03762d37 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_2.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f96a7f9ff9db90d708993fa68f63d6c35776913d2d2120bbce8103f5979a0399 +oid sha256:6a0a22b71665bcf6a4ad31ac859cc0349607280c50a5dad9696a5ea6b42cc459 size 2100 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_3.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_3.nbt index 2a9d7232..279104cd 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_3.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ef06b099a3b90bc86792053f43ceacacc567d054ac94060c450b86d826ca8de +oid sha256:11ab0962e01e7ecf3b927ec74968e8a318cc15eb575dfafd93b3eb6044f426e4 size 1738 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_4.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_4.nbt index db018ea0..bb7c89cc 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_4.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf742a0337473d282ee4a70ae3860c0c307415e2cb34d5cac0c89f111af4404e +oid sha256:6afa4477e7c19ab6661623b4d2c0e686c1eb6f7717ead4ab50369698a5bdf937 size 1586 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_5.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_5.nbt index 9dee0fa5..da7e6d46 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_5.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f2e07129854a4d284a735da25d1f1f5d3274b8d8a86841d2a72c05e51157b2c0 +oid sha256:f50e2d7e516fd6234f84a7db00c533681c5ad7a9dc4caa1d894d9e9fe2207773 size 1141 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_6.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_6.nbt index deeb16de..6d194cd4 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_6.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d3df9fb0ad74631c02efa1f0c8caaee5470f436d30665c369b1485a05810c72d +oid sha256:e61efa75533964696c47551f19a6282174f72c6cf359b998f86ac489e1a52614 size 2198 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_7.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_7.nbt index 9b25e480..cd560790 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_7.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6268bcc456cca495216b8bb2ec8a9cae8c700b9a8b3d5b3623059544ff4cc663 +oid sha256:d0e40af18d865ad93cf571004704d5cf44711d829e79ffcd910b4f5fd434897c size 1619 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_small_house_8.nbt b/data/minecraft/structure/village/snowy/houses/snowy_small_house_8.nbt index 586acd31..87cbbf2f 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_small_house_8.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c9e654969daa241f4c32de4bebac99bffe7d90e20c6213913afca7436875dba +oid sha256:787491232835cd4e6971bac83ff855097a4ef3715bed5f51c46b46b700d70637 size 1021 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_tannery_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_tannery_1.nbt index 7d22649d..4c90befb 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_tannery_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_tannery_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d464b230fd6decf0b5ae5989c54b56aa8eda22740c2fddb0b0b7448de7917748 +oid sha256:7c08073c53e5326eaf0d115795884cc4561d58e9bdb27323c027a2b1c77ec108 size 2956 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_temple_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_temple_1.nbt index 4ad56561..7722b596 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_temple_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_temple_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54cbe0b0823f126fef1b1a2c2da2d159733a4e0292dc17ae4d3ffb13978e3278 +oid sha256:9fe2b3b44def396f4fb83d135f0ffc427e657cf169123885a0e0237199426982 size 3574 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_tool_smith_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_tool_smith_1.nbt index 53b4a3f0..8a18b618 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_tool_smith_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_tool_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5bd84e2a28ba765a786daf64ed2c7509cc337b7ffb7d80fc156f37295265e727 +oid sha256:ec89e4b348867aab24fc8319ca332afccd6ca1071d9372bf664d752b30e8ca27 size 1915 diff --git a/data/minecraft/structure/village/snowy/houses/snowy_weapon_smith_1.nbt b/data/minecraft/structure/village/snowy/houses/snowy_weapon_smith_1.nbt index d59b498b..5c4bce1f 100644 --- a/data/minecraft/structure/village/snowy/houses/snowy_weapon_smith_1.nbt +++ b/data/minecraft/structure/village/snowy/houses/snowy_weapon_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:231d642dae849d30cac0b2a3527c0279d6f44d6de55f11994e9c03b8fe31c00c +oid sha256:f9d093a222a065165fa130b50c073fbec9aa97aa97a9409d1d7d91ada1b9360e size 2757 diff --git a/data/minecraft/structure/village/snowy/snowy_lamp_post_01.nbt b/data/minecraft/structure/village/snowy/snowy_lamp_post_01.nbt index 2dced28b..b0e515ac 100644 --- a/data/minecraft/structure/village/snowy/snowy_lamp_post_01.nbt +++ b/data/minecraft/structure/village/snowy/snowy_lamp_post_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3153cab3ce3c6bf4908fd30f939a3f7007a18ae64650d09d6f92b4c8f5c7514 +oid sha256:f940300c4af32de68ba50a9d2b04fc477f3a4cbae1a964db937e0c60a04e4376 size 380 diff --git a/data/minecraft/structure/village/snowy/snowy_lamp_post_02.nbt b/data/minecraft/structure/village/snowy/snowy_lamp_post_02.nbt index c3016553..c860c9e0 100644 --- a/data/minecraft/structure/village/snowy/snowy_lamp_post_02.nbt +++ b/data/minecraft/structure/village/snowy/snowy_lamp_post_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c293433294bf01d4fde845c1745aa4ee475761894bb220470d2281bb8ac37fc +oid sha256:e670143223a65917a83d2c2b8d1fdc0ca035731a287ae48836d2d6bb819937f8 size 357 diff --git a/data/minecraft/structure/village/snowy/snowy_lamp_post_03.nbt b/data/minecraft/structure/village/snowy/snowy_lamp_post_03.nbt index ea90388a..a56265a0 100644 --- a/data/minecraft/structure/village/snowy/snowy_lamp_post_03.nbt +++ b/data/minecraft/structure/village/snowy/snowy_lamp_post_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9fdf1ec3c188289198ef37bdda308af1d492e560fef77be09b6539c5a51e3379 +oid sha256:cf12efe8643ddfb0806c64f5a095ec222d88d078d4b1eaa5018a6a81fa37f961 size 504 diff --git a/data/minecraft/structure/village/snowy/streets/corner_01.nbt b/data/minecraft/structure/village/snowy/streets/corner_01.nbt index 805a8977..e824bd04 100644 --- a/data/minecraft/structure/village/snowy/streets/corner_01.nbt +++ b/data/minecraft/structure/village/snowy/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b94fbdadd3294956220932ea70f551f991a6df456d04307a19ad1664d986cde8 +oid sha256:6f169e4ab303a8924b3a9785f80a2fbc9765d0d1bb0cfd11b4760ed6b18008dd size 1098 diff --git a/data/minecraft/structure/village/snowy/streets/corner_02.nbt b/data/minecraft/structure/village/snowy/streets/corner_02.nbt index 470d2b6d..9bf56f48 100644 --- a/data/minecraft/structure/village/snowy/streets/corner_02.nbt +++ b/data/minecraft/structure/village/snowy/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd0183f117ccf684fb05fdd01146da5b2a16e13da5833eb8d38ff3a042982328 +oid sha256:3d205e6582cf546e4ad3f948d280098f86167258a79a3e8e3cf767b217e63d8b size 1809 diff --git a/data/minecraft/structure/village/snowy/streets/corner_03.nbt b/data/minecraft/structure/village/snowy/streets/corner_03.nbt index aa4f3123..9a36b597 100644 --- a/data/minecraft/structure/village/snowy/streets/corner_03.nbt +++ b/data/minecraft/structure/village/snowy/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc8c3f05ea3417f8874d30c9f8884054058105417e7227bb6e26dde4e5227f68 +oid sha256:3ba58b8b2f468b9fba56d01764857be5f1c1ea841242e69ded2c1635b61e9996 size 395 diff --git a/data/minecraft/structure/village/snowy/streets/crossroad_01.nbt b/data/minecraft/structure/village/snowy/streets/crossroad_01.nbt index 76d0f9a2..97df2a5b 100644 --- a/data/minecraft/structure/village/snowy/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/snowy/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36b1578eb2197d6b99095f43e92bc65a44da2aeeb32aeef9f9ba7bb7c15172d6 +oid sha256:00ba0b59ab8e9c71b6797cfdf78fdf7f642fcda90b90d168228dd243ee2c78c4 size 1920 diff --git a/data/minecraft/structure/village/snowy/streets/crossroad_02.nbt b/data/minecraft/structure/village/snowy/streets/crossroad_02.nbt index a5a8e24d..803bd2a9 100644 --- a/data/minecraft/structure/village/snowy/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/snowy/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d12eba346fcc0ed34d5370ecbadceeb0b8ccb26ae54200607fe4a293996684b2 +oid sha256:3c18c42d44f7b29760548010ee449076c7b7d2bbaa85a7961070bd76b6fe5577 size 1958 diff --git a/data/minecraft/structure/village/snowy/streets/crossroad_03.nbt b/data/minecraft/structure/village/snowy/streets/crossroad_03.nbt index c30f938a..61cd71e7 100644 --- a/data/minecraft/structure/village/snowy/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/snowy/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6d6792e6d01552dfeb8270e389f50b833612b537108acbf5bea07b7b755b550e +oid sha256:1216f5652c666ca3c937d2f616a51c1dbed9481773e4151138a4b0d58d8cee3d size 2024 diff --git a/data/minecraft/structure/village/snowy/streets/crossroad_04.nbt b/data/minecraft/structure/village/snowy/streets/crossroad_04.nbt index c1a6d194..c3629f9c 100644 --- a/data/minecraft/structure/village/snowy/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/snowy/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ddbd805cea45a6662a21a6f620279f6825ee2a34cfd116a32d41572e1a86f74a +oid sha256:1a3420d468a92a9119b07398b1f6fb99144de37f30074ec619f60d618b6aa0de size 432 diff --git a/data/minecraft/structure/village/snowy/streets/crossroad_05.nbt b/data/minecraft/structure/village/snowy/streets/crossroad_05.nbt index 3fa6e39c..1304298b 100644 --- a/data/minecraft/structure/village/snowy/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/snowy/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5da0d8f93104867604d7b62762c32c2a2a14c18c391f7af7c1a792888510f32d +oid sha256:5f402c5c4b10d5e5ccc03a6d89efb6404133fa60cb09b9124ff563a714e7dd55 size 474 diff --git a/data/minecraft/structure/village/snowy/streets/crossroad_06.nbt b/data/minecraft/structure/village/snowy/streets/crossroad_06.nbt index b9ee8e21..182387fa 100644 --- a/data/minecraft/structure/village/snowy/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/snowy/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:91c7eba4c197d201d9ce984374f5d99d832dd8a204cfacadebc83ffcac219b97 +oid sha256:69081d6b11ddceb90f00413d825658530324fea3a0941d45ab9e2f66b9e17bb3 size 529 diff --git a/data/minecraft/structure/village/snowy/streets/square_01.nbt b/data/minecraft/structure/village/snowy/streets/square_01.nbt index b316c34f..a4c423c3 100644 --- a/data/minecraft/structure/village/snowy/streets/square_01.nbt +++ b/data/minecraft/structure/village/snowy/streets/square_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb2d1ecbbbbcc6b54e04d27c2f53c8ccf3d362b705502a75a468d1416a7ebcad +oid sha256:317fd7a383fad1855b26152620cd02f23e596754a30f905a27cdb79336ff0960 size 1511 diff --git a/data/minecraft/structure/village/snowy/streets/straight_01.nbt b/data/minecraft/structure/village/snowy/streets/straight_01.nbt index 1245b597..a23ff405 100644 --- a/data/minecraft/structure/village/snowy/streets/straight_01.nbt +++ b/data/minecraft/structure/village/snowy/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34f51a3366b3abdb54379024f51c6caee6989be24c77008b8be6ced1834965cd +oid sha256:d73f665ec0969410024f1a524514855b6c745c4a5cf5b3182f7000abcf94f57c size 1852 diff --git a/data/minecraft/structure/village/snowy/streets/straight_02.nbt b/data/minecraft/structure/village/snowy/streets/straight_02.nbt index 749846b7..2207cd0c 100644 --- a/data/minecraft/structure/village/snowy/streets/straight_02.nbt +++ b/data/minecraft/structure/village/snowy/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2114008987ba7512bdd169b1f6f21b430c71206fefbb0d9cc8e0ba018cb31d65 +oid sha256:00050cacf637f8f4475e68db1d02bc5d50cee327b55b957aa65177f3da8fb0f6 size 1775 diff --git a/data/minecraft/structure/village/snowy/streets/straight_03.nbt b/data/minecraft/structure/village/snowy/streets/straight_03.nbt index a2c302cf..bfa6aea9 100644 --- a/data/minecraft/structure/village/snowy/streets/straight_03.nbt +++ b/data/minecraft/structure/village/snowy/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf8e847f3da24e4c347f0b59fb02b4cfad990b4a858959b7a4c247e12868f5f4 +oid sha256:f134b4f2493826e9756a7bfced8c6913868e19251ae35291900496aacd9fb6cd size 1220 diff --git a/data/minecraft/structure/village/snowy/streets/straight_04.nbt b/data/minecraft/structure/village/snowy/streets/straight_04.nbt index 0d34c5cc..9f0d2abb 100644 --- a/data/minecraft/structure/village/snowy/streets/straight_04.nbt +++ b/data/minecraft/structure/village/snowy/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a5504039a0209346913db528b40ab8a022942e3e1e3440c00b9c6deb96242467 +oid sha256:f926af02770d0dbba696c554ebf328d5e4e14a8952856b6ee0380439550614ca size 710 diff --git a/data/minecraft/structure/village/snowy/streets/straight_06.nbt b/data/minecraft/structure/village/snowy/streets/straight_06.nbt index 6dd0110c..3b7a1033 100644 --- a/data/minecraft/structure/village/snowy/streets/straight_06.nbt +++ b/data/minecraft/structure/village/snowy/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64b5d02af3386133a4f96bc0aee30303b61689f993ca592a868c476b17da52fb +oid sha256:831e65ed2961cf0cbf3af79fc0f404adc8ac197996e66970a684bbf8e3404cd7 size 2618 diff --git a/data/minecraft/structure/village/snowy/streets/straight_08.nbt b/data/minecraft/structure/village/snowy/streets/straight_08.nbt index 0350b9c5..30e9427e 100644 --- a/data/minecraft/structure/village/snowy/streets/straight_08.nbt +++ b/data/minecraft/structure/village/snowy/streets/straight_08.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee1a58d06350e0d8cf1a1961760ff944a0e48cbda2a2bd0250be42b18719ca40 +oid sha256:b9b13ac9a63093ada308e12052205b5d434db972705c4be2556d116096d1fa9a size 1943 diff --git a/data/minecraft/structure/village/snowy/streets/turn_01.nbt b/data/minecraft/structure/village/snowy/streets/turn_01.nbt index 46b69070..42f1fcba 100644 --- a/data/minecraft/structure/village/snowy/streets/turn_01.nbt +++ b/data/minecraft/structure/village/snowy/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b2df93d57f554465a5635d3153233726ee7b869ef93064d4529451370fbf923f +oid sha256:f2069b5b059156449975ebd330680f5235615e97031e79de187d08b91ef4cb78 size 1234 diff --git a/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_1.nbt b/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_1.nbt index 7aa6aeca..3bd521d7 100644 --- a/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_1.nbt +++ b/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a32967ff6ca05595c6392729a1f5ba5933108ca8c0a2853d9a8673f4d66e5ae +oid sha256:5c1ca986d03202449c1ec3d4c8374bb1de4f10c3a8ec87eda6b40f194c5c5a9d size 2734 diff --git a/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_2.nbt b/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_2.nbt index 8d91ed12..28c4f784 100644 --- a/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_2.nbt +++ b/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c80e5168685dfe4a2779e60f07e85b7f175e7dae29a2b08c884d3bf4499828a +oid sha256:706bc3e4b1b95deb6b178cd02383c258a0d31606da6f02f73df5fe23bff5fdb8 size 1036 diff --git a/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_3.nbt b/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_3.nbt index 8a5621b1..b689a941 100644 --- a/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_3.nbt +++ b/data/minecraft/structure/village/snowy/town_centers/snowy_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:637d174c10d9661c21f72a3f3a84b1c97c3cd3e2ba2bf044234282c8cf226d71 +oid sha256:26e1a7c4976d1870d2601cb4d2429cb0d4e78f164dc4e8265e08bc432c12e75b size 852 diff --git a/data/minecraft/structure/village/snowy/villagers/baby.nbt b/data/minecraft/structure/village/snowy/villagers/baby.nbt index cc239641..3e644c56 100644 --- a/data/minecraft/structure/village/snowy/villagers/baby.nbt +++ b/data/minecraft/structure/village/snowy/villagers/baby.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a8bab00d84f4addc699abe94843344b5a6a4a8ed51845247ca04d501e5e5303a +oid sha256:ef2bb6885bcf45a89d8c8d3ce3d61cc1a6d4faef867e30f60fd88297960d5500 size 749 diff --git a/data/minecraft/structure/village/snowy/villagers/nitwit.nbt b/data/minecraft/structure/village/snowy/villagers/nitwit.nbt index 524fbadb..8a33ab42 100644 --- a/data/minecraft/structure/village/snowy/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/snowy/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef8f517553c3917e8cdd2ad5af94da21dff70d9f7b0431b9fd57f40f99d06eab -size 749 +oid sha256:029bdda715ff0df3c7f6b63b8f3e630937cf7347b28d9985ea784247b41ac5c3 +size 751 diff --git a/data/minecraft/structure/village/snowy/villagers/unemployed.nbt b/data/minecraft/structure/village/snowy/villagers/unemployed.nbt index 0edae8ba..20e7a2eb 100644 --- a/data/minecraft/structure/village/snowy/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/snowy/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5802d07fca4c0af185d3023642f3435250a82cb89472caf400316fda898cd74a -size 746 +oid sha256:2e366320c8585e46b426ccf7710d577205a9632bb4094ef6f65f27f31dedf579 +size 747 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_1.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_1.nbt index 10c8fee7..192b79d6 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_1.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f062b4272b1483365c75f6bd03dafc66215de19a51a97b8f2b797addc59f3f76 +oid sha256:c75b0a3b0455495fccea8065cd2396d682ff7d10955ef19d4a4554e4b7cc2047 size 1601 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_2.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_2.nbt index 62ad0e22..fca94166 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_2.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8165f2b0f6991d0635ee585eed9b2badf0c3c621b832fc050bdcb4f819a69b35 +oid sha256:41d374b390e535f7fbdba17805d335b62bd97d47de3df70f614eefd39e01153a size 3559 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_3.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_3.nbt index 9ed1c536..8f0b09a2 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_3.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_medium_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5773f82030227c269a3b95e4f632c84104ef467950183f3fcb16fda3d4f8ab39 +oid sha256:abbf3273ddf26049da76df0ab8a1c4460431bb646c3ae2635fd087f5fb3df495 size 1195 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_1.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_1.nbt index 078e3650..ea231561 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_1.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f59d98cb392d950a4ad4dbd6995e6053af336412547321f70535a8f3956a1d01 +oid sha256:adb679f15508dbdde086c5473d538c6e65bc7dafd55fe923d2fa625597f840ff size 1323 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_2.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_2.nbt index 4176f32b..2a78e61c 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_2.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c3a3aacf88ce1886305c3542cd63a04d16aba89a5b761fdf08934d33a450140e +oid sha256:0c4a8af53feefbbc0f488d03293e98db16715375196319f9635ccf20a1daeb3c size 2121 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_3.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_3.nbt index 3446e4bf..43810bde 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_3.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:976eb9916bf6edf7cd071291ca9852cccf10ec718fe1fc55e6a3eb8fef5febe8 +oid sha256:0a5119142ccb0d270f9ac0ea83c0bfb4064816ccc466be902d3d522cb1211dad size 1796 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_4.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_4.nbt index ec85cc9c..d54109b2 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_4.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:20efe4ebbe8c471cd437467213f811c6e64aeb6483ab03fe47e6b82a0bd434df +oid sha256:96cd1d6ba80cb3e6f22636e9427f5476bbbbcdd2c8aa45f91790826d7edcc5f2 size 1592 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_5.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_5.nbt index 34e54191..7cf77d48 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_5.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:286a3de3644dfabf1ca00852ad6e5c8daa20a5de0b69fd11036744aec3afac05 +oid sha256:50f98c97c2d40c3f8be267374f866f436c2121f08d7885902e1de61d3b1646b9 size 1148 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_6.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_6.nbt index 18e8ea05..b220e6aa 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_6.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c435a808d793f915755f42dd98739e96eea9f6bf7b65429f6824dd37a583f6f4 +oid sha256:09468095cf018865b84903cad6a7a20bd0bcc88bda19680a46ebae1fce9b9c2a size 2206 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_7.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_7.nbt index f1e78f88..b18da03c 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_7.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc76b8bd9ecccb97111957fd932c037ba05e385bfd28c0a94c2d122708c44e77 +oid sha256:d190d8ce16c5c9e00ff4db6040bf9145ae23d46d85216a14342ab90d3c0f638a size 1625 diff --git a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_8.nbt b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_8.nbt index 7b6362b7..fecf9fce 100644 --- a/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_8.nbt +++ b/data/minecraft/structure/village/snowy/zombie/houses/snowy_small_house_8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e2ddc530b007b2ce48c7f2855cb10837488f8c88771d5a10a465a992d0b02524 +oid sha256:b31cfce1326014e0e94ca66c036aa38447a90b0fe132ef8be4642f9ad07483e9 size 860 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/corner_01.nbt b/data/minecraft/structure/village/snowy/zombie/streets/corner_01.nbt index 82ccdb50..3a2e64fb 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/corner_01.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:573716f57ce0fa6fe575b200285be027929bad8a4f03d7794ff1e5e3244bb708 +oid sha256:68a32500d8fc9867c533a0dc312df5de23c627c11e8e61152584db6c409d4734 size 1108 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/corner_02.nbt b/data/minecraft/structure/village/snowy/zombie/streets/corner_02.nbt index 30fa41a7..b12a6981 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/corner_02.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b5b3516263c69581a52c144714ae751a87e48719352987aaf78a086219e854ed +oid sha256:880ea3287e02b067a6a993698cf8cac1e6d9aea36b5e9f07b64bd81534474a62 size 1816 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/corner_03.nbt b/data/minecraft/structure/village/snowy/zombie/streets/corner_03.nbt index 47f79568..7d7948a1 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/corner_03.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a17b95b8f1606f27bfbc5e46955c16149d62a68f1b5ea8df0422bd2b717e1ec +oid sha256:960c918906d5e217cd1eb95e36c25c823ec2d564ad6f92289669febdbe4148f7 size 400 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_01.nbt b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_01.nbt index 200720a4..6f7ff894 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4864e0821364f0fd85371fdf06aef9b2d9f2c3b7de302a4c504a397566be36e7 +oid sha256:b53515c80ec95e4e28ddfc0114febe66b2dd74241aef420e486c90f99f44509a size 1925 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_02.nbt b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_02.nbt index 723a1226..f67cfa06 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38a1387994e1efe11280fc4c4182aedf21efd3ccd0bd05f351a79ee640c9b4ab +oid sha256:01bf20653d45e7d78bf646e77dd8f72867e458d6817d2a4f81ed136c8f330494 size 1963 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_03.nbt b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_03.nbt index b86fc93e..ffc429ca 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af198796b7beb4aa7939238ccea531f1908ce49ece25260f4126ba0b3fd8e103 +oid sha256:b33889bc2a50800c5775f485d92042f0993aeb59f6229fa728df3ba39e04f6f0 size 2030 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_04.nbt b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_04.nbt index f39e892a..9faec5ae 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:083f9c3bfeb77fb7ce2d8d469ae97fe1ddf000ad4f5b26f72777a383c8c4095c +oid sha256:c9062895bbaea4521b2e3ce353a858b3030c0437ef6dcb89832a813c392a0ec5 size 436 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_05.nbt b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_05.nbt index 3510b434..7e48da6b 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf3665c54d861c6d34e0880682b1e08d40b56ad7acd9b61a7af5f40aee4afbc5 +oid sha256:647c77558d6f8e9e3980dc845a4d2759d44af5c2ea7dc0135c8ea048ca31610f size 478 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_06.nbt b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_06.nbt index cd12950e..89cc7437 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30f7893b6fce7a39b8e6ed752d6da7a63548fd7af6f2a740af525939e8705cca +oid sha256:1c1d357188a368d2feb3d3262a4d252d086453a0e8cdffd4972e8ea9e6e6db59 size 533 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/square_01.nbt b/data/minecraft/structure/village/snowy/zombie/streets/square_01.nbt index 61cec6f1..bab29b22 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/square_01.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/square_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cfe5ae39303a84935c0ddc9f8989144eaa8b64a3c3bdd25c16ac0d06763ed750 +oid sha256:b3bedc880d13b3f859bd0e918379f23ddface1fd4124a0c9bff99b817f6d1ee4 size 1517 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/straight_01.nbt b/data/minecraft/structure/village/snowy/zombie/streets/straight_01.nbt index d0d16319..4bdefb63 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/straight_01.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e048e5aebd7ffa8169367dedd1326a4780702e518d84877042eb8d4a075902a +oid sha256:60a869460af967d8cd828ade63d3e1612482d493b9a21077ad16594e883ba73f size 1857 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/straight_02.nbt b/data/minecraft/structure/village/snowy/zombie/streets/straight_02.nbt index ba634dae..922bc5f4 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/straight_02.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4b61d4f18a7cc0dd5494c823b0f487e05ccd9fa4a7a78187db6eef6246dc771 +oid sha256:9bfa3ba6348600f0135129b10e95fcafebb347f7450ce4b7f021ec0330239f4c size 1782 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/straight_03.nbt b/data/minecraft/structure/village/snowy/zombie/streets/straight_03.nbt index c4872199..ca2466c4 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/straight_03.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:25e6587c801b5dbf1915edac5274db90ff55ed014ae2e72ac3f9208db29079fa +oid sha256:1be9ed9e649965587b65d7ac67bf3516a5e75bb4183271c7a1f2a66a207b81cb size 1225 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/straight_04.nbt b/data/minecraft/structure/village/snowy/zombie/streets/straight_04.nbt index 567ae77c..bcab6593 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/straight_04.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ddab494b52339f38501cf51e4506b4072c4eaea5fa8cd8624dc615911f697857 +oid sha256:6c6afe79f1a3340e495fd54b762a8099d0b28004f12959d433f6bd279d7b4a3a size 719 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/straight_06.nbt b/data/minecraft/structure/village/snowy/zombie/streets/straight_06.nbt index 8b42d18f..542713c1 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/straight_06.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3521fbab3994eef1f8e5c96a4939209dfdc7329bb213b5e67a0987bbe556df4f +oid sha256:d3eadfcaa15589a4a4358ff3cc86fb82ed723975d5bda8c21b8814e897c6bede size 2624 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/straight_08.nbt b/data/minecraft/structure/village/snowy/zombie/streets/straight_08.nbt index c92a0ed8..cb220d98 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/straight_08.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/straight_08.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a2404963f730682474ae3e0ed95e50aefc3cd394bc162a74be51f502f8155a7 +oid sha256:04e77e3819ee66f77d762596c3062c40aa149a4fa26c368f7024de5670bcf14c size 1948 diff --git a/data/minecraft/structure/village/snowy/zombie/streets/turn_01.nbt b/data/minecraft/structure/village/snowy/zombie/streets/turn_01.nbt index c733b554..9577235d 100644 --- a/data/minecraft/structure/village/snowy/zombie/streets/turn_01.nbt +++ b/data/minecraft/structure/village/snowy/zombie/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:132f4350c5de1369c4a23b63d4e19b0f648b5def54f835cdae68c06873c2cbd6 +oid sha256:f91d6fefd86bc7a26c9628c250be5c47ea22cbedcc10466214fd9eff58bb62f3 size 1239 diff --git a/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_1.nbt b/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_1.nbt index 8255abcf..9332118e 100644 --- a/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_1.nbt +++ b/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1573670191b0d531d46ec11e3a533c3137bc3784ce23412682cdedb659646bf0 +oid sha256:a917d75562204f864def9d97247c338cb7cac31a7e9c05bdb1949ef36451a4f9 size 2694 diff --git a/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_2.nbt b/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_2.nbt index dca146fb..932d7e18 100644 --- a/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_2.nbt +++ b/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0f94812df36a36e911341cfb8a59f617b952b40bc3a5747e94a703a308f0ac7 +oid sha256:2ee94f8ea5663da2249b11a67ba28f3b42feaad27a7e724a1fb7e508b86cb1cb size 991 diff --git a/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_3.nbt b/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_3.nbt index 922d57b3..ba116d0a 100644 --- a/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_3.nbt +++ b/data/minecraft/structure/village/snowy/zombie/town_centers/snowy_meeting_point_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:082c2bee707a5bc76402431831b26b7353fbb5adcb6a937e6b6193f39b06e5d3 +oid sha256:cb793055106a42bcb1ec381521b2e1563af53afe7b32a8acf2cfda49d55658f0 size 817 diff --git a/data/minecraft/structure/village/snowy/zombie/villagers/nitwit.nbt b/data/minecraft/structure/village/snowy/zombie/villagers/nitwit.nbt index 6db90263..690b4650 100644 --- a/data/minecraft/structure/village/snowy/zombie/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/snowy/zombie/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8103d404eabe5c87d6a789c3306dbe50edf94ac30c35d6124c64a8263eb8872 -size 755 +oid sha256:2a50dfec18ec1baf9753f506c319617c0bba8a5d7f554213323ac751e270db01 +size 756 diff --git a/data/minecraft/structure/village/snowy/zombie/villagers/unemployed.nbt b/data/minecraft/structure/village/snowy/zombie/villagers/unemployed.nbt index b278091e..0cdab5d1 100644 --- a/data/minecraft/structure/village/snowy/zombie/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/snowy/zombie/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad573ccd0ccf1ad4e537a3014934aaa0f2e40d04113566ede87e9e1888a8051b -size 752 +oid sha256:95139d0fd21b95a681f3fb608d148eaef9af7192cc7053e2c631dc6403417932 +size 753 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_animal_pen_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_animal_pen_1.nbt index 99041526..19997f6d 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_animal_pen_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_animal_pen_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc5029b59e5626012fbd7f58e870f47e25a2fd772a58368b3d6c9667e7530b23 +oid sha256:fca23b890164d7414323ab9122320b6ffccd3abd8df2c4dd2159fb1b73d419ac size 2091 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_armorer_2.nbt b/data/minecraft/structure/village/taiga/houses/taiga_armorer_2.nbt index 3eec9307..a670608c 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_armorer_2.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_armorer_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b05dff6a165cf1f8966897d31f39ccf0e02ea5d895c3a404a9689c90a3138abd +oid sha256:e5aceacdaf03921321711f3ae63560e9f705cede72003a457035d0a2dd9daca4 size 2528 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_armorer_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_armorer_house_1.nbt index 8070d9c9..295c0f32 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_armorer_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_armorer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2249e45864ba8bad34d427018f353cff04a0f08d51c1998c0821058f6f7e0a03 +oid sha256:68ed5258547f4613fe579f9177e641f9660d6264a7f2da15f4323ede9f602e0c size 2058 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_butcher_shop_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_butcher_shop_1.nbt index 1430b63d..235b0042 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_butcher_shop_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_butcher_shop_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7f4e3ee6c69c4a32017940d87958c6fea7f2f6afef8d0c89f8a091b5aaa3cf0e +oid sha256:fbe83d100b3740931a1ae73a7240134ef64be84445a5e2fd04bc1c71af0b95cc size 3279 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_cartographer_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_cartographer_house_1.nbt index f183c3a7..845a3789 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_cartographer_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_cartographer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:859475e5edc4e8dd06d93dbe75adfcf761dd2098cd9070276d622d36213e6e6c +oid sha256:31a6888be1dd1826985518dd304a79505c4a81a7fc29d2a1da5c6d45d1aab449 size 2607 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_fisher_cottage_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_fisher_cottage_1.nbt index eea13209..133687f4 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_fisher_cottage_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_fisher_cottage_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac850024212d94f96b2fde65c09a0927459c5927d25d811a507cee2ab34415d2 +oid sha256:2123f52d1ca525f823827ad5cc067d12bec86989577023ca5ef8d329db65a57f size 3655 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_fletcher_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_fletcher_house_1.nbt index ef71237d..0a73f0ed 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_fletcher_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_fletcher_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e15e5e497ade629bd5287612b5f0cd391b1906c7c0d4fc0b1a3ffe0ceb8a9478 +oid sha256:bc907e96b3101edec5cb7f0c8eaa6b08f3b3fe11df8d9e32cd88ffb3ba70c47c size 2768 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_large_farm_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_large_farm_1.nbt index d91f19f5..7ba7e086 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_large_farm_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_large_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0516f275702d9317ff6024b97b9c3023c50647d8db80cf845ea2e9fe9a850d6b -size 2213 +oid sha256:b1b2aa63eaec12263276524518eb2909d917093c59570ee20de90244c44dfef6 +size 2212 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_large_farm_2.nbt b/data/minecraft/structure/village/taiga/houses/taiga_large_farm_2.nbt index 9fe1e352..d4308afa 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_large_farm_2.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_large_farm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee588b5e828787941c21f89186a889880975430c70d59f849fca08b58194bd88 +oid sha256:aad84644f4628dc97ca8d2bf592dd442028003053561a1a3bea56141f1575eac size 1601 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_library_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_library_1.nbt index 056c0459..2134a44a 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_library_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_library_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a58a79b0e379f68549fc2e4386b5a6f3604eca8b42103f27880a59fe3af7842 +oid sha256:0eaff08a057fb80b66b5f84b285449bc8ecd0c469564c812f92cf6fe9385baa3 size 3449 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_masons_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_masons_house_1.nbt index deddc30a..e3be56e3 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_masons_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_masons_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6225df2d12f025a3317f29ac5c92a24bb26d6dc7e477a07a46437d0c6fd59ac +oid sha256:5bd207fd76940b2096969fef4c91ed02f5c2cead7e9ef2602ee7eaf735fcae54 size 2191 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_1.nbt index aca0dfeb..7f0ef253 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c8a1092d36e98bb3297847266d26269322c55e1f5c0bb3ff0579594e085752b2 +oid sha256:80dc036eb39542f3201692015e15c0ac022c5b17d4fc3ef774519ccf37f86713 size 2837 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_2.nbt b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_2.nbt index ecfa1f7d..53b85d41 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_2.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:57ded897464d0050436976d30335dff66a2317b9c9bf431b9f7f8fba2f0da47b +oid sha256:86422237e9843660add1f9ba16f031361ca7a3bc05fc30d9457f83563e3c42be size 2610 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_3.nbt b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_3.nbt index 59755fc2..a7d508c6 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_3.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:765a8364da1f6a8347188b6ee189238be4828f789ba95ac13b4c29a9d96132a7 +oid sha256:fc50341df72ed49b96537c61d7c7acf6fb5adbe75fc086462529c2252003c37c size 3066 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_4.nbt b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_4.nbt index ae30bab3..43a66a19 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_medium_house_4.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_medium_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:909b5fecf3c7855b23e71f9ad0eb6350714d8bffb26cbc682eec5b84f22b1f0b +oid sha256:baa12e3f6cbe2aa224dbf6dfc19bf948d8ffc1a9fff48e59f79033b168386d21 size 2754 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_shepherds_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_shepherds_house_1.nbt index 3c5c72a7..7c2c2e11 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_shepherds_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_shepherds_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f09002f7be0cb974bf955648992f45ed6b4d499f479822c35c16f3763305f588 +oid sha256:597cf9764c2b7b8e165f9a8a4a9b727938119da7cea2358f09eeb0b012ea8501 size 3017 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_small_farm_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_small_farm_1.nbt index 1f6f7cb7..85aaa6da 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_small_farm_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_small_farm_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18f1ca6d2e0854f03f15a46ade04c3b914ceb2f7e27713ebc73b6e1e9f1db462 +oid sha256:f0f3de2722bbde67b47b54e4cf447625469f9d317673c7dc7e68b86804e24e48 size 1258 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_small_house_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_small_house_1.nbt index 862e8e60..77987675 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_small_house_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1832b84e50b850a90c05ae0065668a22404067398baefe107f33b3cbc9398ecb +oid sha256:f6d54d737338a4ad2ceeb0c5da840b212f2fb764e740504cbd43cb9926cd7732 size 2386 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_small_house_2.nbt b/data/minecraft/structure/village/taiga/houses/taiga_small_house_2.nbt index f878edec..1da4cb25 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_small_house_2.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c2cafb702f45db9406484af468911d12e8bbbb60a84b3a29e0d6317e375627d +oid sha256:b10342ead3dc43f7eac8fb978dce5f084d9f9f3c5eed7c71a1109ebd5470e21b size 1777 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_small_house_3.nbt b/data/minecraft/structure/village/taiga/houses/taiga_small_house_3.nbt index bd738ce7..ca1e6b50 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_small_house_3.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48fa0825fc1c765e8bf5b2a4c7790d7ba179a21fe949b63abe0fc336c16100a7 +oid sha256:a6d4ce8013f64068ba4c0111db5dcce0bb0836bbaa7e4c593a253ed3fb6f8a56 size 1871 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_small_house_4.nbt b/data/minecraft/structure/village/taiga/houses/taiga_small_house_4.nbt index ad92ed51..52fc3860 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_small_house_4.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7789a648fa932595427ca3ebdb03178e515257f47aa4f967097fe2b860e3c3d3 +oid sha256:4aa0cc8b68ff189e45740be6896e9879ff37c8399051d86394726d007d42875c size 1609 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_small_house_5.nbt b/data/minecraft/structure/village/taiga/houses/taiga_small_house_5.nbt index 628eeb4f..0ce670c0 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_small_house_5.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e07df1b14a05c4f0205919787666248c610662d470c6e7531deb906251858df +oid sha256:d097c681eaf6916aa75742744760809e3a90b24774138fb407cf372d93d992f9 size 2042 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_tannery_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_tannery_1.nbt index a420d103..bda1f6ee 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_tannery_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_tannery_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b91acb7c9df8f3ab0dbc07953fb1009e90b4201bd41b9518e519796285574259 -size 2156 +oid sha256:e9fe892d9f25430fbd1cb58672409062bbeb9a9989b50fad800389131ca557e6 +size 2157 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_temple_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_temple_1.nbt index 33af7939..1b6a139e 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_temple_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_temple_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24463bee6a4467c302d1bf17beddd55c03fa870ee3d876fc12f9c52bdbb354c8 +oid sha256:c3823637c4480e969e4d501996bc1e47272437a4dbbb0c0f3903e82749978888 size 6643 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_tool_smith_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_tool_smith_1.nbt index 34ad8d64..d29fe616 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_tool_smith_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_tool_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2dc3a88132b5636b8970fcd2b715d94a450e4fab5336822e7b134bb5af5a46a9 +oid sha256:0bd9366f82e7e85eb0b8fd3e9ea1c18bf27aafabc9ca752b7512f182c2cabac8 size 2165 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_1.nbt b/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_1.nbt index 80396a81..c67dde90 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_1.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:41ae05da1727fc31c9fbfdee59927d15f2a8e6b0de645ca8fd01c102f60360ec +oid sha256:fa6803d66546144157f978b2c4063aaf5e7c1309fd2cee639583f58e880177ee size 2077 diff --git a/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_2.nbt b/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_2.nbt index c4c7581e..623344fb 100644 --- a/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_2.nbt +++ b/data/minecraft/structure/village/taiga/houses/taiga_weaponsmith_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e0094a7fcad47b66cad8a4d46b15679135d0b4b882f5c8763c180ebce5cb30e +oid sha256:82dce3e61acc885a985a666f0b41ffa2111f54049f935ccfa38314242d715e54 size 1189 diff --git a/data/minecraft/structure/village/taiga/streets/corner_01.nbt b/data/minecraft/structure/village/taiga/streets/corner_01.nbt index e58ac225..556323e6 100644 --- a/data/minecraft/structure/village/taiga/streets/corner_01.nbt +++ b/data/minecraft/structure/village/taiga/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4eb49e6994ec55caf7c499fddb62961e3de389cb1094c712b2b4c506ef55d406 +oid sha256:e5e20b4fe88c1a0ef776605da1d958f585bc3af98f52a08789f3f9c915904f25 size 1182 diff --git a/data/minecraft/structure/village/taiga/streets/corner_02.nbt b/data/minecraft/structure/village/taiga/streets/corner_02.nbt index b6b4ed29..b48cf6f9 100644 --- a/data/minecraft/structure/village/taiga/streets/corner_02.nbt +++ b/data/minecraft/structure/village/taiga/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f43169b99fd8f1368fb04c7958a14fe20fde0dab8a7ac60878824e2357cd708 +oid sha256:d9d2ce07e365e21b3561afb8f0640d443bdd5946884b890f2123931ed3c4b03c size 1184 diff --git a/data/minecraft/structure/village/taiga/streets/corner_03.nbt b/data/minecraft/structure/village/taiga/streets/corner_03.nbt index c25d41ce..c8eae2be 100644 --- a/data/minecraft/structure/village/taiga/streets/corner_03.nbt +++ b/data/minecraft/structure/village/taiga/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d43b1fe4209ab4c4711cd1169810e458428371c7d6e555e5ed5cd47c9206645 +oid sha256:e6ea66ab83686752595706c3011f6c9be58057b93ef05a9c7783d4be7be63beb size 351 diff --git a/data/minecraft/structure/village/taiga/streets/crossroad_01.nbt b/data/minecraft/structure/village/taiga/streets/crossroad_01.nbt index 51a0ba46..222ba609 100644 --- a/data/minecraft/structure/village/taiga/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/taiga/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32c74360f6e1e02fcdb6e8ad647b38ca68fffa30d377d3cf2b6b3ea095f49cb8 +oid sha256:54de2734dc818b9fa4ff53119d91c771d527adf3aa0cc13d8fa1f7843720e953 size 1214 diff --git a/data/minecraft/structure/village/taiga/streets/crossroad_02.nbt b/data/minecraft/structure/village/taiga/streets/crossroad_02.nbt index 8c61f368..9aab15b8 100644 --- a/data/minecraft/structure/village/taiga/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/taiga/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:003b336210355ff6b39c60d4b3c3923c70a0e4e1e25917823d6dbbfd83dbaf5e +oid sha256:ac038c95f0b166f3260d8ea6571e0e2de339de890c61c13bb8cc452c05c8839a size 1160 diff --git a/data/minecraft/structure/village/taiga/streets/crossroad_03.nbt b/data/minecraft/structure/village/taiga/streets/crossroad_03.nbt index c6cba0aa..572ee5bd 100644 --- a/data/minecraft/structure/village/taiga/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/taiga/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cbe4a5821af32b8c87c125785a71f488fcf6b77ab8346ffbbefdfbc0ca7966c5 +oid sha256:9983fe7019e26e0375bb489b262dae7a625c3bf6d22ee5e7ff1319a4255731dd size 1203 diff --git a/data/minecraft/structure/village/taiga/streets/crossroad_04.nbt b/data/minecraft/structure/village/taiga/streets/crossroad_04.nbt index 62caa556..c8a06bcd 100644 --- a/data/minecraft/structure/village/taiga/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/taiga/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a754cc0eab20eb45a21dd8439fb7c84dfd4222ebb07d5f2cc8f3271b05ea619e +oid sha256:f6d238a788f9bbaa9fefab307897b13e4dfda06c0ed23465b8236025aef77c48 size 437 diff --git a/data/minecraft/structure/village/taiga/streets/crossroad_05.nbt b/data/minecraft/structure/village/taiga/streets/crossroad_05.nbt index 683e23b8..711f1c84 100644 --- a/data/minecraft/structure/village/taiga/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/taiga/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a2c315b874157261af303e0282c8716357d5d2d5324a2f9dd19c7eabe6d9ebc +oid sha256:fb3d0d9583900acc731b1d519c20c81174ad19e672aa623845607c054196fa0a size 410 diff --git a/data/minecraft/structure/village/taiga/streets/crossroad_06.nbt b/data/minecraft/structure/village/taiga/streets/crossroad_06.nbt index 032e12da..88ac0209 100644 --- a/data/minecraft/structure/village/taiga/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/taiga/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6b23a398e2289ce9b28b87c44419bbd65c951e258d94f96a77f8b33434968b78 +oid sha256:f15cc4360ec4a6a4b492175cce32b4baf43da32606670645f43bf4a1d2cf8e3b size 472 diff --git a/data/minecraft/structure/village/taiga/streets/straight_01.nbt b/data/minecraft/structure/village/taiga/streets/straight_01.nbt index 8ec9c67e..d0e5febd 100644 --- a/data/minecraft/structure/village/taiga/streets/straight_01.nbt +++ b/data/minecraft/structure/village/taiga/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f14e7ad2eb8a9b744ee473673ecb7a37c5cfb53d6289292f3a6d494257afa22f +oid sha256:c269bf41e0c9a5d7e27c94a884ba3f942fbeebf13c5c582010d246c9265b7387 size 1131 diff --git a/data/minecraft/structure/village/taiga/streets/straight_02.nbt b/data/minecraft/structure/village/taiga/streets/straight_02.nbt index e5472154..a50d259d 100644 --- a/data/minecraft/structure/village/taiga/streets/straight_02.nbt +++ b/data/minecraft/structure/village/taiga/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc7596811940ea5285983c1c95c40ed4a8afd88b30f71d9592e405cdf42e7881 +oid sha256:884da81198f82ce83b959ba3c6eb83d73474bd7a3ab0cb8bb28a1480d187412f size 1147 diff --git a/data/minecraft/structure/village/taiga/streets/straight_03.nbt b/data/minecraft/structure/village/taiga/streets/straight_03.nbt index b754bcb6..2b93ab6e 100644 --- a/data/minecraft/structure/village/taiga/streets/straight_03.nbt +++ b/data/minecraft/structure/village/taiga/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da26b0f57dc1dff3f28f1d4e8246707ea83e0c903690c021856888ad4ecae282 +oid sha256:677942755394a93105ac0e4bde76f0d86c6460a70184970ec512816288f9297e size 777 diff --git a/data/minecraft/structure/village/taiga/streets/straight_04.nbt b/data/minecraft/structure/village/taiga/streets/straight_04.nbt index 3b4326ad..549a888c 100644 --- a/data/minecraft/structure/village/taiga/streets/straight_04.nbt +++ b/data/minecraft/structure/village/taiga/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54f45fa8e9195c3958052ef86556914278a422ca6e199e0bf1114d3161f05503 +oid sha256:70b2f4de51772a6e8ab89d2149679f561706121ea46f6ba2883bfa994509c2fd size 687 diff --git a/data/minecraft/structure/village/taiga/streets/straight_05.nbt b/data/minecraft/structure/village/taiga/streets/straight_05.nbt index 00f23bc2..aa04e59f 100644 --- a/data/minecraft/structure/village/taiga/streets/straight_05.nbt +++ b/data/minecraft/structure/village/taiga/streets/straight_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c8cd504e934ff6c2d753ade58faf85cc190fe18ff0e5248eba5450d21d81c2f +oid sha256:0d9ee9a9a17298618e8ec25d2c2edba88f00d1908843ae231bb427f38d63b3a8 size 1390 diff --git a/data/minecraft/structure/village/taiga/streets/straight_06.nbt b/data/minecraft/structure/village/taiga/streets/straight_06.nbt index 94ddc316..d1f99b92 100644 --- a/data/minecraft/structure/village/taiga/streets/straight_06.nbt +++ b/data/minecraft/structure/village/taiga/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4fdbae73062f4996d0849b2464ed2bd1262f5b77c9ede0d6b3c91d389ed247ff +oid sha256:7acee031327fdb346984e7b195af77c1846a6e07e006c692fa62071fce8d8b22 size 1703 diff --git a/data/minecraft/structure/village/taiga/streets/turn_01.nbt b/data/minecraft/structure/village/taiga/streets/turn_01.nbt index 187aab47..7705605c 100644 --- a/data/minecraft/structure/village/taiga/streets/turn_01.nbt +++ b/data/minecraft/structure/village/taiga/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32222705e00ba5ad13fe436f884e634f61ad115ad0507235fee7de7d33fbf4cb +oid sha256:6c2a94077d7e2329060f4a69bc00644df8e9c70a5328e6cc72e37e0fc2bb731c size 790 diff --git a/data/minecraft/structure/village/taiga/taiga_decoration_1.nbt b/data/minecraft/structure/village/taiga/taiga_decoration_1.nbt index a97a8dd7..1a5635b9 100644 --- a/data/minecraft/structure/village/taiga/taiga_decoration_1.nbt +++ b/data/minecraft/structure/village/taiga/taiga_decoration_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:83a0c4fdeebb69c48f0410bdcdca9fd579d1bf90d830e8d9695b4d0d5bb704b6 +oid sha256:6c17ca3813b549485ae834dacfa165db1caf65740f577b034368658f4f9e2812 size 423 diff --git a/data/minecraft/structure/village/taiga/taiga_decoration_2.nbt b/data/minecraft/structure/village/taiga/taiga_decoration_2.nbt index bbdb40ae..a790e6a1 100644 --- a/data/minecraft/structure/village/taiga/taiga_decoration_2.nbt +++ b/data/minecraft/structure/village/taiga/taiga_decoration_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48ea26a3f72a73639e538bf4c3e5834d67cda5ab6e058f207652d7b461376494 +oid sha256:e6d432ce29e4d229fb44a5a90dd67560a4fe7482e709bacd9076e28d840f1ab9 size 368 diff --git a/data/minecraft/structure/village/taiga/taiga_decoration_3.nbt b/data/minecraft/structure/village/taiga/taiga_decoration_3.nbt index 5b1490a2..8bbfe9c4 100644 --- a/data/minecraft/structure/village/taiga/taiga_decoration_3.nbt +++ b/data/minecraft/structure/village/taiga/taiga_decoration_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ece4aa3f6b5e5e8241bb0ec6581ab94b18b207cfce9319da56ed8d452bad137 +oid sha256:0fd6ec1f061ad451602d0b7b7619605d2d48fc2a7876e542d7adb046887c7466 size 354 diff --git a/data/minecraft/structure/village/taiga/taiga_decoration_4.nbt b/data/minecraft/structure/village/taiga/taiga_decoration_4.nbt index a4046b38..c16cacfe 100644 --- a/data/minecraft/structure/village/taiga/taiga_decoration_4.nbt +++ b/data/minecraft/structure/village/taiga/taiga_decoration_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9468f63ef62542502c4c9cfb32a6f1eb29505250fca4eac8de9ec44bf618677 +oid sha256:6e8d35c00f8efa61748dea8ffd45a8b1d137c5a76e8e5e164f70ba4c87c336a9 size 323 diff --git a/data/minecraft/structure/village/taiga/taiga_decoration_5.nbt b/data/minecraft/structure/village/taiga/taiga_decoration_5.nbt index e84cf9cb..16a295de 100644 --- a/data/minecraft/structure/village/taiga/taiga_decoration_5.nbt +++ b/data/minecraft/structure/village/taiga/taiga_decoration_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d5330ecd5ec82f9641ab61ff3dede4bfc6c226337e4d32c04ed4e3ac37ac208d +oid sha256:c513d4520dbd67669c2afe6c04d0db9822373bde20ca6f3c21aaabb66386dde1 size 250 diff --git a/data/minecraft/structure/village/taiga/taiga_decoration_6.nbt b/data/minecraft/structure/village/taiga/taiga_decoration_6.nbt index f1ddb286..0a90e6f7 100644 --- a/data/minecraft/structure/village/taiga/taiga_decoration_6.nbt +++ b/data/minecraft/structure/village/taiga/taiga_decoration_6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1093485ea375b9633c36abdde907be6e42f8fff8e0f31a2e0ae107b76f5ed241 +oid sha256:f3f5b766afcb6dd7f422b796210e1db2beb1258a7703fef9aaad2281dc3ef1c5 size 471 diff --git a/data/minecraft/structure/village/taiga/taiga_lamp_post_1.nbt b/data/minecraft/structure/village/taiga/taiga_lamp_post_1.nbt index 426bbdc1..1335fcf0 100644 --- a/data/minecraft/structure/village/taiga/taiga_lamp_post_1.nbt +++ b/data/minecraft/structure/village/taiga/taiga_lamp_post_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a475b7e5146166a8bf3dcb53086253d1412f6529372e67997a146791b0c336c1 +oid sha256:acb6841ce762db945e55825545984dcc2330e5070be21af210a6118b47878d4f size 252 diff --git a/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_1.nbt b/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_1.nbt index e502c1b8..2b5e4fbb 100644 --- a/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_1.nbt +++ b/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:785d5f03843d5d2a6ae30926f3a2de599ea50b1829e4ceb024514d6a1b6d72a4 +oid sha256:90aadc961bec52ab213425fc805944aae96bb05d2a8f91f1cf84e67f182d03ac size 3947 diff --git a/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_2.nbt b/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_2.nbt index 1daf1b34..e61fa79c 100644 --- a/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_2.nbt +++ b/data/minecraft/structure/village/taiga/town_centers/taiga_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:06148974d8da96089b228e860299b7a211346cb900995c53e5e2baae00eeec11 +oid sha256:2aa4a1f2502302e1b72e4ba6561cf5189c9ddcfaa810ba74bd9f0213149d3adb size 2272 diff --git a/data/minecraft/structure/village/taiga/villagers/baby.nbt b/data/minecraft/structure/village/taiga/villagers/baby.nbt index 3c62e6b8..6718abac 100644 --- a/data/minecraft/structure/village/taiga/villagers/baby.nbt +++ b/data/minecraft/structure/village/taiga/villagers/baby.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:efdb6334cba16c7a5839f1de2e559fc82f9f79f4e11569cd6500c5698393bf96 +oid sha256:078378ef5a19d804e235d7e3a983d5a88ac2a9f481b58b913d243ae58244ec00 size 750 diff --git a/data/minecraft/structure/village/taiga/villagers/nitwit.nbt b/data/minecraft/structure/village/taiga/villagers/nitwit.nbt index f00d6e60..98df8eae 100644 --- a/data/minecraft/structure/village/taiga/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/taiga/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7b848aa30dcba4e7a080042cc68bf23ce8c06246a3f45cf80d768df4eabfc7cf +oid sha256:c26ee49c3418572562dd6d68660a3eed9d8a237ff4f7c131662fcde35967f2d0 size 750 diff --git a/data/minecraft/structure/village/taiga/villagers/unemployed.nbt b/data/minecraft/structure/village/taiga/villagers/unemployed.nbt index 20fd7a42..eee08dbb 100644 --- a/data/minecraft/structure/village/taiga/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/taiga/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2717e902a833f7bf2ff8970211a7a13f1bf101a1d74bf53112e60b9b5ba08767 -size 748 +oid sha256:f6f9af687d74422dd6aa64448bc753c77fa2d364596252bb28121be8c31e76f6 +size 749 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_cartographer_house_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_cartographer_house_1.nbt index a3e2ac2d..7f7c84f7 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_cartographer_house_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_cartographer_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:75e13d74dc26fb67e2cebd2c9905bcb946a794e1dd62a7144c1dc341f1d46c21 +oid sha256:668b4f0dbc658ae7a9b55dac2a3be5b6af50318d7357702a039e769f27f23b4a size 2613 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_fisher_cottage_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_fisher_cottage_1.nbt index 14e0ef60..dd049e6d 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_fisher_cottage_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_fisher_cottage_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e72619ce34ee7a436ba0c3d62ec8e0d1e99196a86df8ad51c55234c424350ce1 +oid sha256:6883356ffb7df633649e1eef952dc47557a475a4ff806b6593cd3b4f60469840 size 3666 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_large_farm_2.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_large_farm_2.nbt index f1f8bd22..cea51007 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_large_farm_2.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_large_farm_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:525fdadd347ae65784f4e885b7cf07e5836778e244ce4fb33720afaaa60ca4ff +oid sha256:309f838a6a7420632689792dc33694cf8503d1d477f564a76a5feac1af2537a9 size 1607 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_library_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_library_1.nbt index 82427773..c6027144 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_library_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_library_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2e77464afbbc4d11db500e00b3ce0b40db51034762d8a05d39b5fb28bdb309d4 +oid sha256:6d684da00a57238ef368b6d18798179926d2eb95fc7797323f030ce2e0a9b49d size 3460 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_1.nbt index 33c77ff1..fc0dc4a2 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:348f1c1faa52c42402d8807839eba0dfce2e4e16a5fab32e2bb859045371592e +oid sha256:bc535d08cec66485444ed44cfdc66af14648498c3cb56dd48bb941c517b0ef3b size 2790 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_2.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_2.nbt index d1fe319a..db7049b7 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_2.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46cac63c9e53fec5c24d7bd5cc0aed5618358f93f27d282b676b2cac7086fc01 +oid sha256:5c8f46481d87f1086a860c351856f8941e6980eb3a13f7d4fc87681e415aaedb size 2607 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_3.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_3.nbt index 745a5c05..04da7e21 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_3.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c31c10e88eef1862051dc7812de9dad6a1604a9cc1faec704d110eda89d02e83 +oid sha256:b6fe4b19c9e5e3a706ef74dedf166c281b948aa66a135a8c87a111cf046a6218 size 3070 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_4.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_4.nbt index 6e05333d..cb04fc4d 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_4.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_medium_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa06522f1feae0c5ec5e8d0d6b8c67fb129a0ca4a4e5432fa3296578557c41e7 +oid sha256:5e98d1ecd28a5d27a17b54358520d4881c00f44bf800657a4e7e89811e50a67f size 2692 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_shepherds_house_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_shepherds_house_1.nbt index 333c5a98..eaf882c0 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_shepherds_house_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_shepherds_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:323c6ac3ee89249bf433f56889854a1711898bd14995329e137bc243fef02d48 +oid sha256:76d522fd65d211dd89cdd62cc8674c3e161557ba6f37530b5bc8c82a37d41b2e size 3041 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_1.nbt index 957da1df..e2b03355 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:583c166e7e3ec4561751c0896ba8e2c0769dbd9fd52b9c00292f80e859aa750c +oid sha256:bfd91bcb132f6ebda2a76453aacd41b42fbaad3e6d96b365f0b3cd1e75caa23d size 2392 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_2.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_2.nbt index 57f56860..774c75e4 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_2.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a27cfeadaf80060680b00f918138ee7467a8815bb267c4a2c27358e6ca1f25dc +oid sha256:a9c136cd6e70fc6be36e599abb355439079ff5f4a86ff5e55205623c70301d22 size 1796 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_3.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_3.nbt index fe1cb0df..76715cbd 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_3.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ee926f94da52eeb8a47bdf42373b4aa29378068b3e0cb49ec49b0b105f4fc92 +oid sha256:d44f7f6676a218334c0c22aef5b9a71e8eeaceb635e2c0033bb0891d4f181ed4 size 1887 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_4.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_4.nbt index 83c100c2..585014fd 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_4.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f362621612a22e0863df3b175f52015926f0f9ae3c2bc1ed075213a6d7649ad +oid sha256:ef3440f1b161bd01eff740ab2d317dff8018257b3074861d5fdb6dc0bc938e0a size 1615 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_5.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_5.nbt index dba55a68..aa59c976 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_5.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_small_house_5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b2388207ee8320de185d4623a3f5525854d09d9de5bbcf756755d910db9c55f +oid sha256:74361d9cfe0afc4d5666ced67de46f11f8bdfeec46ad0e1dbe5a61fc4530116a size 2049 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_temple_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_temple_1.nbt index 33af7939..1b6a139e 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_temple_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_temple_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24463bee6a4467c302d1bf17beddd55c03fa870ee3d876fc12f9c52bdbb354c8 +oid sha256:c3823637c4480e969e4d501996bc1e47272437a4dbbb0c0f3903e82749978888 size 6643 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_tool_smith_1.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_tool_smith_1.nbt index 0378fc7e..c5e7cd19 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_tool_smith_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_tool_smith_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a2e02b9b67d64956d99d6fa6a6778a7aa3babad15cde194838b885fac0f16dca +oid sha256:e9da346db76553ed670664144423d7bddbb56a141aa167cff14d37c5a3135091 size 2175 diff --git a/data/minecraft/structure/village/taiga/zombie/houses/taiga_weaponsmith_2.nbt b/data/minecraft/structure/village/taiga/zombie/houses/taiga_weaponsmith_2.nbt index 023f98e7..58c6fcbf 100644 --- a/data/minecraft/structure/village/taiga/zombie/houses/taiga_weaponsmith_2.nbt +++ b/data/minecraft/structure/village/taiga/zombie/houses/taiga_weaponsmith_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d8cec3c367018acdb2c8754e3508372138ceac022fb0d1f82f154e6f7a5fdc1 +oid sha256:c38e622072cb5da72e58739cffeed52af26b57ec1a599722b26c76feb41cd100 size 1194 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/corner_01.nbt b/data/minecraft/structure/village/taiga/zombie/streets/corner_01.nbt index 3893345f..55cf926d 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/corner_01.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/corner_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cdab1ada9cda40822f4b2747fddccad23641771138d1ac79e03930ea070e6bbc +oid sha256:aac536069294ab41a0ce11f5523e83251e9b87074c8c00abdf6cd8a6e8e87ed5 size 1187 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/corner_02.nbt b/data/minecraft/structure/village/taiga/zombie/streets/corner_02.nbt index ec01df14..abcb79b6 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/corner_02.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/corner_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4ad952d8cc438f2591dc3277f901ad903fb3b472ab01202316f7e4105aeb8f9 +oid sha256:28ec841c4ca4d704a7310a4b4024a146313882d4c9854b3986ea73a332feb13f size 1191 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/corner_03.nbt b/data/minecraft/structure/village/taiga/zombie/streets/corner_03.nbt index 71322151..d656ce74 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/corner_03.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/corner_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:852fc709d79297a9bfc7af9093c2c6db89928ccc6f0f5c300eb7790cb1b032f8 +oid sha256:074f18a954017bcefb95a3d73c2dfaeb2ceb3c9e5c12829fb37258bcfc6dd6cf size 356 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_01.nbt b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_01.nbt index 767f73f2..8d892d0b 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_01.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b18932e9c07f3a0ff6b0ab33333e95c6e353ebcc7fd00414fd092602b7ba807a +oid sha256:7de26f4b3f84c8a9a6150fae0afd50dab9fb8c2cec04da0e9a8d087a659624e9 size 1221 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_02.nbt b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_02.nbt index 324a7ae3..a61816b4 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_02.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f1af214a727d746d8e450463a88ae901dbd61dae6948f0520ea72b1f33e550a +oid sha256:231f02c562eb750dff9fb9e98904f36f7b58d930281c6a0ae7224d321842eca7 size 1165 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_03.nbt b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_03.nbt index cd64f0af..08af8ba4 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_03.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8b51c5ac9b5ee24c55fbcbc0173aa041b1b7dcc9612e51b1b4dc4ad5130b943 +oid sha256:8f4c15704bdbfdae7f97f37d427a66d0202d6c3772482fa129a73575666adcfd size 1208 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_04.nbt b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_04.nbt index b8c58110..c59427a7 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_04.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e5af4724bc63ff19ae1a7e1bc3bdd520cfe44b46590ff51c0e0a46145e0e5983 +oid sha256:57225a13022a8b69012355ee044383dca0c31b8e5203013d2eeef5e382e89163 size 445 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_05.nbt b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_05.nbt index ad88e5d6..25ea87a0 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_05.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:622b3ce9aeb05db0c95f44fad5e75eb5e5241a11523617748f907efb0c75b348 +oid sha256:89d5eba46a245c30764c7ef3fe43d128d8f76ee43b4459d5527b269e7ab66ea6 size 414 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_06.nbt b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_06.nbt index 18fa6909..bb1177f8 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/crossroad_06.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/crossroad_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a6871e21c50977990de8a4c2f496c85913cd8d8c9481661c70cfed4ad19ce7c +oid sha256:68eff88f7716f3a3f733c01f3e88773933b03365fd967003c3f7c162cbdf97e0 size 476 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/straight_01.nbt b/data/minecraft/structure/village/taiga/zombie/streets/straight_01.nbt index 16374dd4..b140cd62 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/straight_01.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/straight_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb5c5dd113d8c31a83c39f2c3126b5728627dd0329bc8e676a7fd6fddcf8e8fd +oid sha256:8df20e7c4445bec55a008ffc32e653db45947695455843efc902faecc1c53d4a size 1135 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/straight_02.nbt b/data/minecraft/structure/village/taiga/zombie/streets/straight_02.nbt index bc5120e6..1b8fb9a1 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/straight_02.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/straight_02.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d71da2038edd208157e6a3287a5323e185663b361e61d3506ab17009804956f +oid sha256:6fe5f2ee20c49c14febcf06103738df5f03de9b0f43c1484825ad2dfc508e8d1 size 1152 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/straight_03.nbt b/data/minecraft/structure/village/taiga/zombie/streets/straight_03.nbt index 62fd7106..5966309f 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/straight_03.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/straight_03.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fe60f5d746e15a9688759a3c5650742f86b433f57e19f112175618c52723f1e7 +oid sha256:cda0ae3a1c701308d002a86857ac43c9982196509a759fb2f6ae10872157bd01 size 781 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/straight_04.nbt b/data/minecraft/structure/village/taiga/zombie/streets/straight_04.nbt index ed37d916..25019a0a 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/straight_04.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/straight_04.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:509c796355bb4ddeb2999bf8e7f864ee4f95de233ec4d5f8f1453031c99df6e0 +oid sha256:697c7124842162e6813ad4db695f900b06c4824ee5a345ea5139eb326b7c8f90 size 693 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/straight_05.nbt b/data/minecraft/structure/village/taiga/zombie/streets/straight_05.nbt index cec2daf6..8566a2a5 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/straight_05.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/straight_05.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c98a9c5fb44f0a83bf20a8dd67f140bac4ea58823f5509ee01b2256b0e18e38 +oid sha256:4660ee96559d0ad2558e0aef58bb9a3aa81755089d2fa246106937853a856410 size 1395 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/straight_06.nbt b/data/minecraft/structure/village/taiga/zombie/streets/straight_06.nbt index b4f2fefa..d09c22c8 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/straight_06.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/straight_06.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf51f44e2c0415650300a16f84e80213c87bbd7896bcc92eac7ff9acfde927bb +oid sha256:0c7cb8356e9bfb222367706e5b3d0c04014d3fda439731b3f6ba672b3cb609c0 size 1708 diff --git a/data/minecraft/structure/village/taiga/zombie/streets/turn_01.nbt b/data/minecraft/structure/village/taiga/zombie/streets/turn_01.nbt index 7ef73265..a573c43b 100644 --- a/data/minecraft/structure/village/taiga/zombie/streets/turn_01.nbt +++ b/data/minecraft/structure/village/taiga/zombie/streets/turn_01.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9958c4ff80acba3c97ec5a7e8ba020bf53ead5541831aec25005d82a9e81a2e4 +oid sha256:5ce4d183d1721dbae1879857e36414a0f326211e61505d69e8fcec8ef4fecdff size 794 diff --git a/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_1.nbt b/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_1.nbt index 49ef014f..9739d21c 100644 --- a/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_1.nbt +++ b/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f59b35eee0ff776e53fa4996b6c2d2d50197bc20709e5ce4df3861ec6c80e89f +oid sha256:e80e74a9d2a9bf0e674381876b6bf2a833c580df0d9faf60fe5e663deace22d6 size 1849 diff --git a/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_2.nbt b/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_2.nbt index 139871f0..cd180da1 100644 --- a/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_2.nbt +++ b/data/minecraft/structure/village/taiga/zombie/town_centers/taiga_meeting_point_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d9b656d28cddd5db7b519da2f76588417c27e881bd9d2ba5ad89e77b50f85b7 +oid sha256:b70591adfdd4cbc7a02a8a0e68cf4d9fc31cf5c2680e7a3a02ce745157e023fe size 2258 diff --git a/data/minecraft/structure/village/taiga/zombie/villagers/nitwit.nbt b/data/minecraft/structure/village/taiga/zombie/villagers/nitwit.nbt index 7b17973a..41cba807 100644 --- a/data/minecraft/structure/village/taiga/zombie/villagers/nitwit.nbt +++ b/data/minecraft/structure/village/taiga/zombie/villagers/nitwit.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:649c74cfdb25c49939e184b0d98638b6d593e606389a71b4375910dde0872add +oid sha256:20bdf9813467978cdb1aded21325f225a449bc6d88fa2344ce77c92b5a5ca650 size 756 diff --git a/data/minecraft/structure/village/taiga/zombie/villagers/unemployed.nbt b/data/minecraft/structure/village/taiga/zombie/villagers/unemployed.nbt index ffb8c4ee..8542a020 100644 --- a/data/minecraft/structure/village/taiga/zombie/villagers/unemployed.nbt +++ b/data/minecraft/structure/village/taiga/zombie/villagers/unemployed.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b537090ec1feef7aa2ce9482a70589678a0588628c9e110df4e1541f7e77fa5 +oid sha256:4fe575c9733946211cd271326b22accda05c9f0ebe95a6939288991d9e8c9208 size 754 diff --git a/data/minecraft/structure/woodland_mansion/1x1_a1.nbt b/data/minecraft/structure/woodland_mansion/1x1_a1.nbt index d3eaaa8f..349ca3e3 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_a1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_a1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5bcff5f6884f99472202e84173278d0fccdf66e8f69ec174968eebb3acd96d8d +oid sha256:2d4b398499f04be756398d18f737c753c82db99e90712958038f988781a17989 size 1434 diff --git a/data/minecraft/structure/woodland_mansion/1x1_a2.nbt b/data/minecraft/structure/woodland_mansion/1x1_a2.nbt index 7d86523b..fc90d74f 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_a2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_a2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d4c11f01f73ba94cf1ff0b384d98612a37c8dfb1b2db6ec41a437cb2e9bf18e +oid sha256:d0cecea447089f03cdee01e4b8895a7dd564e5853a9b4197a9c02b8af9cf6abf size 1529 diff --git a/data/minecraft/structure/woodland_mansion/1x1_a3.nbt b/data/minecraft/structure/woodland_mansion/1x1_a3.nbt index b12c48f8..1b419caa 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_a3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_a3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbb50521b7b6aa1523d0ff99f0836a9b7eebc491614ec05c6a18f0211cc7e357 +oid sha256:74aad643bea9b07f0bd1783212b1e67ff30c7feceb14118faeb2f2d345140f90 size 1417 diff --git a/data/minecraft/structure/woodland_mansion/1x1_a4.nbt b/data/minecraft/structure/woodland_mansion/1x1_a4.nbt index a5bca5f8..8e455c6a 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_a4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_a4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b8a474656eeb60f01ba9e8a65454e0092eeb2798f6a5337e01e489f13c33f4bd +oid sha256:16403a23b317eda24d1ede3e8216944c15c194365e35a7341d8e383311a3caa1 size 1684 diff --git a/data/minecraft/structure/woodland_mansion/1x1_a5.nbt b/data/minecraft/structure/woodland_mansion/1x1_a5.nbt index ec952d13..40be5136 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_a5.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_a5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a700605cb4c40bbcad5d1ae450919d253322515a470429158a3b943bcfad949 +oid sha256:e30a3bc5be496377a3cf1a8516b8650bb3f77ce490d673f68baef9f71fc0108d size 1492 diff --git a/data/minecraft/structure/woodland_mansion/1x1_as1.nbt b/data/minecraft/structure/woodland_mansion/1x1_as1.nbt index 33a20913..4be955ff 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_as1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_as1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9692fff774ec11e226f50ee574f485b472c2221af0e4240db830da16493c85e +oid sha256:c10065d8baa6130204ad6d1830e53979ba47ce4342dbeb30152b70012e54dec4 size 1486 diff --git a/data/minecraft/structure/woodland_mansion/1x1_as2.nbt b/data/minecraft/structure/woodland_mansion/1x1_as2.nbt index 94e99b34..fb462f9f 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_as2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_as2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1dd221728766602fc3518b13ec680c22cdb6d1d31faf6fedaeefb38e3356fc30 +oid sha256:7ab477f01d5d1802bf7544d7e82e3e32fa81b19bd4a790ddcc4285b5edd4e856 size 1457 diff --git a/data/minecraft/structure/woodland_mansion/1x1_as3.nbt b/data/minecraft/structure/woodland_mansion/1x1_as3.nbt index aee77612..f70694c5 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_as3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_as3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:721f72374b71a205e62913098b34d588ed5e98dc16b000fe3aa3981f1dd6f3b1 +oid sha256:88e7cab0d79d775c250703b607fb23d713bd861b789bbf832a941d2a053e57d9 size 1212 diff --git a/data/minecraft/structure/woodland_mansion/1x1_as4.nbt b/data/minecraft/structure/woodland_mansion/1x1_as4.nbt index 17add9e9..784a0f6d 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_as4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_as4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8dc96fd9f45d004a1221edb4dc13911b48a3f989c876682d7ac4664a6142fbea +oid sha256:ca4e9af42eb57a5943b1fd4293dd6abdcd50ab261bcf7db69ee3844a52d66118 size 1211 diff --git a/data/minecraft/structure/woodland_mansion/1x1_b1.nbt b/data/minecraft/structure/woodland_mansion/1x1_b1.nbt index 5073e1ca..5b3015f2 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_b1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_b1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a287922d83f57d0e3ec7d206129a6cce1c49464a6512b34e735167b80d58be7c +oid sha256:5e8e93d46285ee8146ebeb74b9cbf57c9b1538812832158d46de7df50eb04628 size 1925 diff --git a/data/minecraft/structure/woodland_mansion/1x1_b2.nbt b/data/minecraft/structure/woodland_mansion/1x1_b2.nbt index b59b75b6..54d09e11 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_b2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_b2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e5cbd3384f5111fc96e6a6a1163c619e9700a53e19b989b21998595671dcda1 +oid sha256:2cfc5d4feeebf682e409304ae107d8fc9a4ffe0de1813e2706d2328a3f31169e size 1865 diff --git a/data/minecraft/structure/woodland_mansion/1x1_b3.nbt b/data/minecraft/structure/woodland_mansion/1x1_b3.nbt index 5b58e396..9d53b52b 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_b3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_b3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf54056a70523d8f5ee565094450cfcd90bd4b0e47bc95b537515e2a316a9b43 +oid sha256:8edf7cdf8fb76ccad2b096f6cc67e3540037601a8e30275ab660ca159d423f7e size 1808 diff --git a/data/minecraft/structure/woodland_mansion/1x1_b4.nbt b/data/minecraft/structure/woodland_mansion/1x1_b4.nbt index 335c2942..b4363901 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_b4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_b4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ba4814f805e1358977c65d9b3031b6826126addcc778728b5bd4d2a24a7a174 +oid sha256:2c58595cf45d4f5319b771e7f7a322e8be1944f338620d6cff1fe88b4be636bc size 1832 diff --git a/data/minecraft/structure/woodland_mansion/1x1_b5.nbt b/data/minecraft/structure/woodland_mansion/1x1_b5.nbt index c070ee73..ea30439a 100644 --- a/data/minecraft/structure/woodland_mansion/1x1_b5.nbt +++ b/data/minecraft/structure/woodland_mansion/1x1_b5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ec85edf2327a66e7cd2ba766e6e8a804483fb9f09f3bfd3a3f5079f722943d0 +oid sha256:d628a30b0081303df5f5f36b3f32273897d3906434a018f3b9ca05a0dfc273fe size 1923 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a1.nbt b/data/minecraft/structure/woodland_mansion/1x2_a1.nbt index 47f4488e..19c3af5f 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78264377f00db6add122663e985a93586b4dc3c594d42c4559924dbe03792b0c +oid sha256:8b5a75a8b74f93ad76de90250b67a5b2b9ce6fece9dcc0fd275e9a653b3cfa04 size 2938 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a2.nbt b/data/minecraft/structure/woodland_mansion/1x2_a2.nbt index 9be8664f..c98d38b7 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:08aa3f4c48652e0986369f0ba8c862d60bc5b9209f59105f61e8082be5bcae43 +oid sha256:8a859db88d015c7b03e0db415d184d135de6d672c5c0ee5d622975a1be86a4d2 size 2829 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a3.nbt b/data/minecraft/structure/woodland_mansion/1x2_a3.nbt index 1a95f824..ddd2c2b6 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf6d06a43f0e5a50e2530bcf616d071c0ffec08a7bb0172f129f2a7b94f93419 +oid sha256:64abffe6bd327aff60d1b2bdd6e20d651853b5b3ba6c7ae5d7d66bd9e884fd0d size 2951 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a4.nbt b/data/minecraft/structure/woodland_mansion/1x2_a4.nbt index 83c7482f..22651933 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:80e65988d90780c4b57fad008540d5e21ff3b87f1df91cd4b989002249d7ef5c +oid sha256:c2e058bb358369abc377124444ca8eec51c0fa16993bba68b488033c46ad0203 size 2898 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a5.nbt b/data/minecraft/structure/woodland_mansion/1x2_a5.nbt index 766a7534..31c642f4 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a5.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d67792282b4b0be293da3e96cd8fdf58200fae1fa9a09916cc3346199f7774cf +oid sha256:df0c1ab2b7a6a493e4d10308f54538615f169d1ca2f6b011b30096998e2d5d47 size 2571 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a6.nbt b/data/minecraft/structure/woodland_mansion/1x2_a6.nbt index 08d4478a..9837daff 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a6.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a6.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:912d5d6f4957fc39e05097d5a767f426c0f9ce820fde525e7902d26386952571 +oid sha256:73b5dcce1313c6e6bb23fab6dbce5495370b96a8ec2ad1848ed29bc352e5375f size 2815 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a7.nbt b/data/minecraft/structure/woodland_mansion/1x2_a7.nbt index 3089d1fd..15c7f5ed 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a7.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a7.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c8e7acf1ade7da83a2d465999fcbab8d32294b0fadf60aaca05b2386e34af6ba +oid sha256:c1f607c8b116285e4706af77c7681fb13b2bdc9bcb94133a4d53201927e897c5 size 2949 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a8.nbt b/data/minecraft/structure/woodland_mansion/1x2_a8.nbt index 1975c11b..43cd8ee3 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a8.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a8.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5fca6e6725cc0d824eb913ace2ad0f333a2c8d7dab4b76ecd61e66cd890bef88 +oid sha256:d34ce2a7ef4113255d8e8cd794556cb9c85b7382f8630bbed8104486971f0fb2 size 3191 diff --git a/data/minecraft/structure/woodland_mansion/1x2_a9.nbt b/data/minecraft/structure/woodland_mansion/1x2_a9.nbt index 69acbede..5280baf7 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_a9.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_a9.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:712c8e76de3327c395fd95a49853b0d13c97573d553e270adc6a7381d9f8d722 +oid sha256:3bc554df2838a99f1f6be5fa66239f8b776ca714f93b269f96651c4ea82b37d4 size 3096 diff --git a/data/minecraft/structure/woodland_mansion/1x2_b1.nbt b/data/minecraft/structure/woodland_mansion/1x2_b1.nbt index baeb0d69..fab21545 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_b1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_b1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:96572d83bc1f7641daa7840d75f77888f72d2dbcb1792d64b3a7d3066fea0a0a +oid sha256:f0a169e40b6c76ddf6ff7820d5c1299c690c88b4db5a766b84503083a4f2f6cc size 3279 diff --git a/data/minecraft/structure/woodland_mansion/1x2_b2.nbt b/data/minecraft/structure/woodland_mansion/1x2_b2.nbt index ae686ef6..3a2fbd6f 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_b2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_b2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b03406fa1703969463026ba1b6d19ea548324e7182aafd022e8bda5a11004018 +oid sha256:197a2fc1c0b22c235a06cafc26d3b5527ee49f8dbad1dbf2c1582c045f6269b7 size 3135 diff --git a/data/minecraft/structure/woodland_mansion/1x2_b3.nbt b/data/minecraft/structure/woodland_mansion/1x2_b3.nbt index a305af37..b74a71d1 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_b3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_b3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ba6dad0270419c831e790cd0558217cc94457ff3265481d9d90e23b51fedd7ab +oid sha256:afcac41da942cd41bebe19f963a9ca0d6bcb619837f253d586639a1707a65b01 size 2794 diff --git a/data/minecraft/structure/woodland_mansion/1x2_b4.nbt b/data/minecraft/structure/woodland_mansion/1x2_b4.nbt index fb69d0f7..790834a4 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_b4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_b4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0222a2e37e902edabbb2211ae6ce50f2c1da81d3181f3493c7292c27b0c3423 +oid sha256:6a633dde8f4501040d923f6546c16ba8a0b9a2861b6132b4a5c369402ff78a8f size 2965 diff --git a/data/minecraft/structure/woodland_mansion/1x2_b5.nbt b/data/minecraft/structure/woodland_mansion/1x2_b5.nbt index e960575a..46a9fbf4 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_b5.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_b5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f0f108f43cad31535e007a713eca359213190cdbf9cc52bfe8ff5ea07319cdd +oid sha256:b9d0c60b160882b6627a31ecaedfa34b8824b5a2c7425ea11942387d683c85ee size 2409 diff --git a/data/minecraft/structure/woodland_mansion/1x2_c1.nbt b/data/minecraft/structure/woodland_mansion/1x2_c1.nbt index 5e915502..88baf7a8 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_c1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_c1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d74e5a919d621122874c0eaad9b988a137ce934c39659222c4957dfe6273c61 +oid sha256:c54ebf4b946beecf2bb881980c6b80c4eef67532f05be4b934f84464a7f2cdb8 size 3548 diff --git a/data/minecraft/structure/woodland_mansion/1x2_c2.nbt b/data/minecraft/structure/woodland_mansion/1x2_c2.nbt index 3d91189b..b51aae77 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_c2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_c2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0830302037c66b1a2a40a5d0b6188deab13d9326bb82aff404368a8809c0b22d +oid sha256:1c27cec88b9a253504743426965054a5991384d5737bdafe1545941cd3ad14c5 size 3349 diff --git a/data/minecraft/structure/woodland_mansion/1x2_c3.nbt b/data/minecraft/structure/woodland_mansion/1x2_c3.nbt index 5705c738..877991c6 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_c3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_c3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68cc99109345d8bea9c031e3a0ab3f44a952b145ee783fb5e83084d7f092d115 +oid sha256:1c4033c2469f1d14a21dd037981712f5f358f45cbeee41162f03bc5fdc4a950a size 3618 diff --git a/data/minecraft/structure/woodland_mansion/1x2_c4.nbt b/data/minecraft/structure/woodland_mansion/1x2_c4.nbt index 50865390..528fcde7 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_c4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_c4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f108a626aae2403b1eb2db4fd362557bb00cf11be2b24eae8b38c432b16b9161 +oid sha256:588c0790e27519a61b9104795dac241592ee2049b6342067a73665d2f07f0eb3 size 3621 diff --git a/data/minecraft/structure/woodland_mansion/1x2_c_stairs.nbt b/data/minecraft/structure/woodland_mansion/1x2_c_stairs.nbt index 343bc1db..20dde42b 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_c_stairs.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_c_stairs.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:662e9334a931214a4b3167de06e3dd3ec9885fb76fb04bc5e3bca9fc36e6490d +oid sha256:c92ec4cf301556d9e887617ac2e1d989c8d2d27718d5bb3bb7803df8cac449cc size 6731 diff --git a/data/minecraft/structure/woodland_mansion/1x2_d1.nbt b/data/minecraft/structure/woodland_mansion/1x2_d1.nbt index c8969539..14326e42 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_d1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_d1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ac1fc9933aa82ff218e16c7fa463de48f4a1a50d935374edd4eb7c6f2ac2c9a +oid sha256:43c2096b6d44b3a6fc6737f45713db2093a5b1f1cfc3f511ef370eb311f8b6e3 size 3735 diff --git a/data/minecraft/structure/woodland_mansion/1x2_d2.nbt b/data/minecraft/structure/woodland_mansion/1x2_d2.nbt index 6358268d..d85da676 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_d2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_d2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0d9080c7b08705dcab4161b2a14c57f5b16f73a7ab06b297adb58300b962c5a +oid sha256:f780f13793952602dafcfc2c1b966224aa6cea7d59786e840b96cefe667ec167 size 3906 diff --git a/data/minecraft/structure/woodland_mansion/1x2_d3.nbt b/data/minecraft/structure/woodland_mansion/1x2_d3.nbt index 8dcabbe9..3905c220 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_d3.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_d3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7a1ad87f3f6a63a058eebdb3f577239fb614dcd53c6352c0ba67ec85c46a95f +oid sha256:e85304de21fa323f808bf5914482e0793c30cda00bd1dfd8677208f55a8337c7 size 3844 diff --git a/data/minecraft/structure/woodland_mansion/1x2_d4.nbt b/data/minecraft/structure/woodland_mansion/1x2_d4.nbt index 17d8a350..baa1d6af 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_d4.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_d4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a9b53a66e3c1a5d4ba5c29ae68916b01e7595a799c71ea87b0a8faebfaa58f6 +oid sha256:540cc4f611aa2516df5c55cb69d0cca468c5f649c6489e8619d1c500b93fc762 size 3409 diff --git a/data/minecraft/structure/woodland_mansion/1x2_d5.nbt b/data/minecraft/structure/woodland_mansion/1x2_d5.nbt index 18449746..bc304fad 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_d5.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_d5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f38ab49d83b6855eb3b7f044ffb796c44d19a397dcd47a8c9fcecde66f58d3d +oid sha256:feb629a9d501cdc1b682f2d5046d32b85f0de0924f682e8c318225e9688aa50a size 3374 diff --git a/data/minecraft/structure/woodland_mansion/1x2_d_stairs.nbt b/data/minecraft/structure/woodland_mansion/1x2_d_stairs.nbt index 259fb413..f98e945b 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_d_stairs.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_d_stairs.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f79f688776622c0ec3369a16a19e40d61c3f2a8e62bc540fc740b078a135417c +oid sha256:b425da44b5f6b70d32f3fa737f85e6af0a2c53ea03ec8fd8d3ffd0dcc12bdd1e size 6626 diff --git a/data/minecraft/structure/woodland_mansion/1x2_s1.nbt b/data/minecraft/structure/woodland_mansion/1x2_s1.nbt index 01a2b8d5..b92491d4 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_s1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_s1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac0c253807b7e5dc03974cd87a5ceee9f0ce8f2138176c7c7233b488710d48bd +oid sha256:d4995d4f6ddb22d266bb53aca6c8dff825b699defa5f5ca7ece6ce262ff8bc44 size 2687 diff --git a/data/minecraft/structure/woodland_mansion/1x2_s2.nbt b/data/minecraft/structure/woodland_mansion/1x2_s2.nbt index 69e0c72c..446d0fde 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_s2.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_s2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:45b474f03dd27c58fe1417eb719c0109199533cd32d32f7c72326e5a73c6d741 +oid sha256:d5b4e41cc12e6ab58ee202a4fb76595dcb0d8099663cb3ec52a07b0229291f5c size 2733 diff --git a/data/minecraft/structure/woodland_mansion/1x2_se1.nbt b/data/minecraft/structure/woodland_mansion/1x2_se1.nbt index 3fa84c35..7f840e7e 100644 --- a/data/minecraft/structure/woodland_mansion/1x2_se1.nbt +++ b/data/minecraft/structure/woodland_mansion/1x2_se1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7c9c736347ee6466cbe7375d0009dd5aef659eac6a5df4a1583f11ced7628ac +oid sha256:2564e1e2d4bf525931dbc149c249bee2ec8b41d9706ba5bd9ea1805e2b65dadc size 3885 diff --git a/data/minecraft/structure/woodland_mansion/2x2_a1.nbt b/data/minecraft/structure/woodland_mansion/2x2_a1.nbt index 80ae343e..a0ac3e56 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_a1.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_a1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5964e71ed7ddbb9507ffaa6be6f1373398a6d94591c6390e63af6a9ee9075e4a +oid sha256:c2322376c89b3c85e22f4e6637ffee7404f9c41088453c72a673563dae48138a size 6290 diff --git a/data/minecraft/structure/woodland_mansion/2x2_a2.nbt b/data/minecraft/structure/woodland_mansion/2x2_a2.nbt index a093bec8..a365aa0a 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_a2.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_a2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:593d43b2f003a1e8498b3b6a43993e10c07d2993c7929b244bf4cd0c02486954 +oid sha256:85491e1cb876077bcaec4a1b30a439ee791457f99f38e8c71ec453d4a4c0fadc size 5634 diff --git a/data/minecraft/structure/woodland_mansion/2x2_a3.nbt b/data/minecraft/structure/woodland_mansion/2x2_a3.nbt index 22730733..327cf2f9 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_a3.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_a3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6ce03b05bdd3be8b1c45f12644f081c92a142d8e1c5d11dd4e1f030100fb1758 +oid sha256:29c1abdcfa322ebc2a816e844dc962487928a42917e73069ca4d69533ee697b7 size 5214 diff --git a/data/minecraft/structure/woodland_mansion/2x2_a4.nbt b/data/minecraft/structure/woodland_mansion/2x2_a4.nbt index 43984bca..17ce2ef4 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_a4.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_a4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea821132effecdb4987599c2ed3b737d515a15517157e9e7c1938225fed9f6a4 +oid sha256:86f19a0506d954242254a875ec8711641745f2043e23474a4d99a168a0a687ef size 5410 diff --git a/data/minecraft/structure/woodland_mansion/2x2_b1.nbt b/data/minecraft/structure/woodland_mansion/2x2_b1.nbt index 8f29a5ba..2e008a92 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_b1.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_b1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:50958acfab6a25af02f261266f0586019bc7b6d106b8c76c2dca830ecfd173ca +oid sha256:d768e511a3444f25f9d049af605d30375fed1c25ecf65e75df9fa25e9867ca63 size 7314 diff --git a/data/minecraft/structure/woodland_mansion/2x2_b2.nbt b/data/minecraft/structure/woodland_mansion/2x2_b2.nbt index b37f0ef1..868b8e72 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_b2.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_b2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a3c253a191fb69aaa998ce21f5cd8a9847e7eb82247b953b947f2e1fc64b152 +oid sha256:11d895772c4493ce25e32d03fbd93fdbf4ce0a0d58a9c65315094a737d3a5171 size 7300 diff --git a/data/minecraft/structure/woodland_mansion/2x2_b3.nbt b/data/minecraft/structure/woodland_mansion/2x2_b3.nbt index 3f1d3a68..e26e96b9 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_b3.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_b3.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c714e55801e66bcb36100818e6a8154a56be7643b0249d40e61876c9bd32623f +oid sha256:2cb2c2037fd8a5a930e1422952bdbef0d258cbfb1ccabf8b0923ac86a7875496 size 7105 diff --git a/data/minecraft/structure/woodland_mansion/2x2_b4.nbt b/data/minecraft/structure/woodland_mansion/2x2_b4.nbt index 9ff35662..5f798b5f 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_b4.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_b4.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d394e9e9ce1cae422a5531288155284a36e79fea67135c4e6ee1e982fe426ce2 +oid sha256:b295d2ff3889fa9366fc1f6444928cc25bd1769bb2a2c10ec2c61842848ce478 size 7242 diff --git a/data/minecraft/structure/woodland_mansion/2x2_b5.nbt b/data/minecraft/structure/woodland_mansion/2x2_b5.nbt index cb567f59..66146587 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_b5.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_b5.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2bb4c0ad8735901846eb7d99677c4dbc0240c412ea08fc51a6ea2fa811416ba8 +oid sha256:760a9b01e70c62af005e4d885b57dbb4c7346fc766256271837184e4f2f3dff0 size 7544 diff --git a/data/minecraft/structure/woodland_mansion/2x2_s1.nbt b/data/minecraft/structure/woodland_mansion/2x2_s1.nbt index 1fdfee3f..d1435290 100644 --- a/data/minecraft/structure/woodland_mansion/2x2_s1.nbt +++ b/data/minecraft/structure/woodland_mansion/2x2_s1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:86c01d9d5f23ada403d73af03fc11227240dc7091f4ab35c8444eeeaa6c2551f +oid sha256:660c19305d3317ea1a6ff9e7b7304001a348321b687360f4cae1201929f62bf1 size 6794 diff --git a/data/minecraft/structure/woodland_mansion/carpet_east.nbt b/data/minecraft/structure/woodland_mansion/carpet_east.nbt index 3e945d38..ec321d42 100644 --- a/data/minecraft/structure/woodland_mansion/carpet_east.nbt +++ b/data/minecraft/structure/woodland_mansion/carpet_east.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:794930ad8b32763243d572fb9e9e05e455868be494415e1902958b0a4d3f77af +oid sha256:926fa55cd5519d7ccb2561eeef9695c61a84e644c0b404ab1f92919a2de3add3 size 180 diff --git a/data/minecraft/structure/woodland_mansion/carpet_north.nbt b/data/minecraft/structure/woodland_mansion/carpet_north.nbt index ce3d1aa5..356cf1f3 100644 --- a/data/minecraft/structure/woodland_mansion/carpet_north.nbt +++ b/data/minecraft/structure/woodland_mansion/carpet_north.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:246977ec788298c4af0ff4fe06a9606f46d4a69582fd1ec9460acfef0e2ce6ce +oid sha256:ce9690a278f6743c3fc12a9e0c1fe984b7acbae5fdcba82a2127531b3d6d2abc size 178 diff --git a/data/minecraft/structure/woodland_mansion/carpet_south_1.nbt b/data/minecraft/structure/woodland_mansion/carpet_south_1.nbt index a72fe644..f0aa7a7b 100644 --- a/data/minecraft/structure/woodland_mansion/carpet_south_1.nbt +++ b/data/minecraft/structure/woodland_mansion/carpet_south_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e8a0d3a7d5d10a10a83b351f5cbc9f44e0298daf53824e8fa4a55042fd2ad07 +oid sha256:273dcc67978eb2f6288410b315eae037a9dbb06a76eed3493d3339af8e6487f5 size 721 diff --git a/data/minecraft/structure/woodland_mansion/carpet_south_2.nbt b/data/minecraft/structure/woodland_mansion/carpet_south_2.nbt index 4893d44e..d4803bdd 100644 --- a/data/minecraft/structure/woodland_mansion/carpet_south_2.nbt +++ b/data/minecraft/structure/woodland_mansion/carpet_south_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fec55c09ac61385babe21daf873dd0fc4068c0fb0f3ab7e3edb782bf7aae42b4 -size 928 +oid sha256:fd61a059b38f01d13334ca27869c2f681b9937cd2d925863a8d5e895579b0119 +size 929 diff --git a/data/minecraft/structure/woodland_mansion/carpet_west_1.nbt b/data/minecraft/structure/woodland_mansion/carpet_west_1.nbt index 70001260..207df112 100644 --- a/data/minecraft/structure/woodland_mansion/carpet_west_1.nbt +++ b/data/minecraft/structure/woodland_mansion/carpet_west_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b477b37942d323d95cfe36238c64179c0969fa1ede01eadd7c62c14328f79876 +oid sha256:b40dca8410ec25cbc526ae09c1cdded25f5116b35815618f46df93be9b3d792a size 793 diff --git a/data/minecraft/structure/woodland_mansion/carpet_west_2.nbt b/data/minecraft/structure/woodland_mansion/carpet_west_2.nbt index ca763844..9be2b2f8 100644 --- a/data/minecraft/structure/woodland_mansion/carpet_west_2.nbt +++ b/data/minecraft/structure/woodland_mansion/carpet_west_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:078c8d4ae3dbd41c85bca104e66b25eff2d547c96c00e5a0208a81f9350c4fc9 -size 1019 +oid sha256:c3d5a0f589532c65b2c695cc963673d9af2fb0efaeee55983ab2cb7b2c5b6602 +size 1020 diff --git a/data/minecraft/structure/woodland_mansion/corridor_floor.nbt b/data/minecraft/structure/woodland_mansion/corridor_floor.nbt index 0d2598ca..bd975842 100644 --- a/data/minecraft/structure/woodland_mansion/corridor_floor.nbt +++ b/data/minecraft/structure/woodland_mansion/corridor_floor.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ff15125e022eac7d1e0c0534c054199b250b1c6eabb513578450083c2e3059d6 +oid sha256:9046ccd0690b14b172fbb6338153d560f4c1a5feb2617a255948524a76775c00 size 1172 diff --git a/data/minecraft/structure/woodland_mansion/entrance.nbt b/data/minecraft/structure/woodland_mansion/entrance.nbt index 4c6a13bd..d5349414 100644 --- a/data/minecraft/structure/woodland_mansion/entrance.nbt +++ b/data/minecraft/structure/woodland_mansion/entrance.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1825946a75b08630adad6c0131205b12e43031c8f8b4bfd8fed0981b9e0bd09a +oid sha256:f69e503f2433c435d351f834752fb5f795a55a6472c57a953ba7c86e7e7a31a5 size 18256 diff --git a/data/minecraft/structure/woodland_mansion/indoors_door_1.nbt b/data/minecraft/structure/woodland_mansion/indoors_door_1.nbt index 7cf90228..386c4557 100644 --- a/data/minecraft/structure/woodland_mansion/indoors_door_1.nbt +++ b/data/minecraft/structure/woodland_mansion/indoors_door_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c558dc510da0aaa0b5c7d75aeaaf228dc2356c87a49476459b7d1a7fd3515130 +oid sha256:8e8fb41e19be9fd60e3edbe4e9ddac8c4fc901bd58fd9bc23ac0923d72fdcdb2 size 410 diff --git a/data/minecraft/structure/woodland_mansion/indoors_door_2.nbt b/data/minecraft/structure/woodland_mansion/indoors_door_2.nbt index 40ef0505..84fb9fd3 100644 --- a/data/minecraft/structure/woodland_mansion/indoors_door_2.nbt +++ b/data/minecraft/structure/woodland_mansion/indoors_door_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:17adfe2577e314d0704a2603d60e2fbe4f2e7189ef000b4b9057a5081db019e6 +oid sha256:ef63cc5de99e250bf37dedc48740c38d213e90086ad08561a8bde99048c4d50e size 505 diff --git a/data/minecraft/structure/woodland_mansion/indoors_wall_1.nbt b/data/minecraft/structure/woodland_mansion/indoors_wall_1.nbt index 41d72da1..55912c1d 100644 --- a/data/minecraft/structure/woodland_mansion/indoors_wall_1.nbt +++ b/data/minecraft/structure/woodland_mansion/indoors_wall_1.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c03649c1ec72dfd9f6d940cbd935072212c502f92f9dc37eb8a87386a5d2a260 +oid sha256:9e0f44261448a194059f5f9a5f09b02faa36a8b5f1b00e47323054346d6add88 size 366 diff --git a/data/minecraft/structure/woodland_mansion/indoors_wall_2.nbt b/data/minecraft/structure/woodland_mansion/indoors_wall_2.nbt index a204b058..56191b6d 100644 --- a/data/minecraft/structure/woodland_mansion/indoors_wall_2.nbt +++ b/data/minecraft/structure/woodland_mansion/indoors_wall_2.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e67a98670c2304179e0d9225e15b724f49ea8fda43798c788d26479e6e77d469 +oid sha256:7d2caed2b93f9d332f6d98384a44b6288c8b831ab304b0bd115c5401733b090b size 442 diff --git a/data/minecraft/structure/woodland_mansion/roof.nbt b/data/minecraft/structure/woodland_mansion/roof.nbt index e81f2916..35243f09 100644 --- a/data/minecraft/structure/woodland_mansion/roof.nbt +++ b/data/minecraft/structure/woodland_mansion/roof.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:492273453228dbfd1e579553c6f4530ecef4f83cbe4f39aff46d3b244184c088 +oid sha256:0a6afa43a78db04010d8e3b5a251e47f58564671bad15a64f136d54a4941b7db size 333 diff --git a/data/minecraft/structure/woodland_mansion/roof_corner.nbt b/data/minecraft/structure/woodland_mansion/roof_corner.nbt index 652be511..03dab1f2 100644 --- a/data/minecraft/structure/woodland_mansion/roof_corner.nbt +++ b/data/minecraft/structure/woodland_mansion/roof_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:72b7908140f837fe427f612ea4e8a3d7617597b0f579335b17847940644cac9d +oid sha256:405867cca84b5aa0c0dc743d5d15746a3a7940e6e7b441b38b23654d5151baae size 450 diff --git a/data/minecraft/structure/woodland_mansion/roof_front.nbt b/data/minecraft/structure/woodland_mansion/roof_front.nbt index e5fceeb4..9fd56b9a 100644 --- a/data/minecraft/structure/woodland_mansion/roof_front.nbt +++ b/data/minecraft/structure/woodland_mansion/roof_front.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7bdbbd0ebc792c716649a8c026ea87ab3a53da02c165d8429f6c5cb4d86b5699 +oid sha256:620c403b7f77dbbca6d77b343263194d9ff427de3322bbf2ffcf0a75371fe1ae size 636 diff --git a/data/minecraft/structure/woodland_mansion/roof_inner_corner.nbt b/data/minecraft/structure/woodland_mansion/roof_inner_corner.nbt index 60461142..01099039 100644 --- a/data/minecraft/structure/woodland_mansion/roof_inner_corner.nbt +++ b/data/minecraft/structure/woodland_mansion/roof_inner_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0bc4ca3bf3dbda73c0846cf7f58c89df5f4395f2075ffbf80d29dcc58f750f8d +oid sha256:2ca2a61dd1c3fefc0240d12dc24e87d9c5adcb465bed7f5b6ff71ab19a5e6eb1 size 445 diff --git a/data/minecraft/structure/woodland_mansion/small_wall.nbt b/data/minecraft/structure/woodland_mansion/small_wall.nbt index ead6d458..589a9b5c 100644 --- a/data/minecraft/structure/woodland_mansion/small_wall.nbt +++ b/data/minecraft/structure/woodland_mansion/small_wall.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a126a11dabe46c248dca27bb11b9668ccc6e53472f27135f61959bc29c46310e +oid sha256:582181aa9474d221144ea96742b5399d1a11ffdb2f3b21b5ce645240a4b55da3 size 511 diff --git a/data/minecraft/structure/woodland_mansion/small_wall_corner.nbt b/data/minecraft/structure/woodland_mansion/small_wall_corner.nbt index 83179e33..d668468a 100644 --- a/data/minecraft/structure/woodland_mansion/small_wall_corner.nbt +++ b/data/minecraft/structure/woodland_mansion/small_wall_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:007847ff4b54346856bf7da822860ba7bc2853a73ce9b7a5fb85dac6e1adb240 +oid sha256:62d77e9a6fd755651056b639317db74b7f79d75f0b3fdc7a1499ba83c286b3e8 size 262 diff --git a/data/minecraft/structure/woodland_mansion/wall_corner.nbt b/data/minecraft/structure/woodland_mansion/wall_corner.nbt index 41096edb..a47c0a54 100644 --- a/data/minecraft/structure/woodland_mansion/wall_corner.nbt +++ b/data/minecraft/structure/woodland_mansion/wall_corner.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eee3c7058ba4bfdb79424d7972215d3ad438722bdc1cd90ebfc5024d330b360c +oid sha256:837930d2a9792bd3e7da35fc1f4a351d113f215e440ab826ed78c08bd616cac8 size 308 diff --git a/data/minecraft/structure/woodland_mansion/wall_flat.nbt b/data/minecraft/structure/woodland_mansion/wall_flat.nbt index 662e690a..c3269962 100644 --- a/data/minecraft/structure/woodland_mansion/wall_flat.nbt +++ b/data/minecraft/structure/woodland_mansion/wall_flat.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1338f6702ff83000e79287157dc348197be30edcde3b020cea8c1381c8b53a10 +oid sha256:e24589550e92ca8c3437ceae06712cc2d65fe7ccd534127b38ddae6b473b6446 size 727 diff --git a/data/minecraft/structure/woodland_mansion/wall_window.nbt b/data/minecraft/structure/woodland_mansion/wall_window.nbt index b6859e0f..82cb0634 100644 --- a/data/minecraft/structure/woodland_mansion/wall_window.nbt +++ b/data/minecraft/structure/woodland_mansion/wall_window.nbt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8e74e985ae8b79d398e0beefeca06232fe4a89645a351a5fb27a8d987ca3a5e +oid sha256:3c7eb700ad6fce788699e4a1a91bce59dc8acccc15ab102f45202d2271d1d522 size 831 diff --git a/net/minecraft/DetectedVersion.java b/net/minecraft/DetectedVersion.java index a92156a0..31c9a4bf 100644 --- a/net/minecraft/DetectedVersion.java +++ b/net/minecraft/DetectedVersion.java @@ -28,9 +28,9 @@ public class DetectedVersion implements WorldVersion { private DetectedVersion() { this.id = UUID.randomUUID().toString().replaceAll("-", ""); - this.name = "1.21.2"; + this.name = "1.21.3"; this.stable = true; - this.worldVersion = new DataVersion(4080, "main"); + this.worldVersion = new DataVersion(4082, "main"); this.protocolVersion = SharedConstants.getProtocolVersion(); this.resourcePackVersion = 42; this.dataPackVersion = 57; diff --git a/net/minecraft/Optionull.java b/net/minecraft/Optionull.java index 3f1b5146..4744b669 100644 --- a/net/minecraft/Optionull.java +++ b/net/minecraft/Optionull.java @@ -9,8 +9,8 @@ import org.jetbrains.annotations.Nullable; public class Optionull { @Deprecated - public static T orElse(@Nullable T object, T object2) { - return (T)Objects.requireNonNullElse(object, object2); + public static T orElse(@Nullable T value, T defaultValue) { + return (T)Objects.requireNonNullElse(value, defaultValue); } @Nullable diff --git a/net/minecraft/SharedConstants.java b/net/minecraft/SharedConstants.java index a20160bc..005d0b66 100644 --- a/net/minecraft/SharedConstants.java +++ b/net/minecraft/SharedConstants.java @@ -34,7 +34,7 @@ public class SharedConstants { * @deprecated Use {@link #getCurrentVersion()} and {@link com.mojang.bridge.game.GameVersion#getWorldVersion()} instead. */ @Deprecated - public static final int WORLD_VERSION = 4080; + public static final int WORLD_VERSION = 4082; @Deprecated public static final String SERIES = "main"; /** @@ -44,7 +44,7 @@ public class SharedConstants { * @deprecated Use {@link #getCurrentVersion()} and {@link com.mojang.bridge.game.GameVersion#getName()} instead. */ @Deprecated - public static final String VERSION_STRING = "1.21.2"; + public static final String VERSION_STRING = "1.21.3"; /** * The numeric format number for the networking protocol used by the release target of this game version. * diff --git a/net/minecraft/TracingExecutor.java b/net/minecraft/TracingExecutor.java index f689e327..6d0289f0 100644 --- a/net/minecraft/TracingExecutor.java +++ b/net/minecraft/TracingExecutor.java @@ -7,14 +7,14 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; public record TracingExecutor(ExecutorService service) implements Executor { - public Executor forName(String string) { + public Executor forName(String name) { if (SharedConstants.IS_RUNNING_IN_IDE) { return runnable -> this.service.execute(() -> { Thread thread = Thread.currentThread(); String string2 = thread.getName(); - thread.setName(string); + thread.setName(name); - try (Zone zone = TracyClient.beginZone(string, SharedConstants.IS_RUNNING_IN_IDE)) { + try (Zone zone = TracyClient.beginZone(name, SharedConstants.IS_RUNNING_IN_IDE)) { runnable.run(); } finally { thread.setName(string2); @@ -22,7 +22,7 @@ public record TracingExecutor(ExecutorService service) implements Executor { }); } else { return (Executor)(TracyClient.isAvailable() ? runnable -> this.service.execute(() -> { - try (Zone zone = TracyClient.beginZone(string, SharedConstants.IS_RUNNING_IN_IDE)) { + try (Zone zone = TracyClient.beginZone(name, SharedConstants.IS_RUNNING_IN_IDE)) { runnable.run(); } }) : this.service); @@ -33,12 +33,12 @@ public record TracingExecutor(ExecutorService service) implements Executor { this.service.execute(wrapUnnamed(runnable)); } - public void shutdownAndAwait(long l, TimeUnit timeUnit) { + public void shutdownAndAwait(long timeout, TimeUnit unit) { this.service.shutdown(); boolean bl; try { - bl = this.service.awaitTermination(l, timeUnit); + bl = this.service.awaitTermination(timeout, unit); } catch (InterruptedException var6) { bl = false; } @@ -48,10 +48,10 @@ public record TracingExecutor(ExecutorService service) implements Executor { } } - private static Runnable wrapUnnamed(Runnable runnable) { - return !TracyClient.isAvailable() ? runnable : () -> { + private static Runnable wrapUnnamed(Runnable task) { + return !TracyClient.isAvailable() ? task : () -> { try (Zone zone = TracyClient.beginZone("task", SharedConstants.IS_RUNNING_IN_IDE)) { - runnable.run(); + task.run(); } }; } diff --git a/net/minecraft/Util.java b/net/minecraft/Util.java index 0a268ae1..28a8d2de 100644 --- a/net/minecraft/Util.java +++ b/net/minecraft/Util.java @@ -146,7 +146,7 @@ public class Util { return FILENAME_DATE_TIME_FORMATTER.format(ZonedDateTime.now()); } - private static TracingExecutor makeExecutor(String string) { + private static TracingExecutor makeExecutor(String name) { int i = Mth.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, getMaxThreads()); ExecutorService executorService; if (i <= 0) { @@ -154,10 +154,10 @@ public class Util { } else { AtomicInteger atomicInteger = new AtomicInteger(1); executorService = new ForkJoinPool(i, forkJoinPool -> { - final String string2 = "Worker-" + string + "-" + atomicInteger.getAndIncrement(); + final String string2 = "Worker-" + name + "-" + atomicInteger.getAndIncrement(); ForkJoinWorkerThread forkJoinWorkerThread = new ForkJoinWorkerThread(forkJoinPool) { protected void onStart() { - TracyClient.setThreadName(string2, string.hashCode()); + TracyClient.setThreadName(string2, name.hashCode()); super.onStart(); } @@ -214,14 +214,14 @@ public class Util { IO_POOL.shutdownAndAwait(3L, TimeUnit.SECONDS); } - private static TracingExecutor makeIoExecutor(String string, boolean bl) { + private static TracingExecutor makeIoExecutor(String name, boolean daemon) { AtomicInteger atomicInteger = new AtomicInteger(1); return new TracingExecutor(Executors.newCachedThreadPool(runnable -> { Thread thread = new Thread(runnable); - String string2 = string + atomicInteger.getAndIncrement(); - TracyClient.setThreadName(string2, string.hashCode()); + String string2 = name + atomicInteger.getAndIncrement(); + TracyClient.setThreadName(string2, name.hashCode()); thread.setName(string2); - thread.setDaemon(bl); + thread.setDaemon(daemon); thread.setUncaughtExceptionHandler(Util::onThreadException); return thread; })); @@ -268,20 +268,20 @@ public class Util { return type2; } - public static void runNamed(Runnable runnable, String string) { + public static void runNamed(Runnable task, String name) { if (SharedConstants.IS_RUNNING_IN_IDE) { Thread thread = Thread.currentThread(); - String string2 = thread.getName(); - thread.setName(string); + String string = thread.getName(); + thread.setName(name); - try (Zone zone = TracyClient.beginZone(string, SharedConstants.IS_RUNNING_IN_IDE)) { - runnable.run(); + try (Zone zone = TracyClient.beginZone(name, SharedConstants.IS_RUNNING_IN_IDE)) { + task.run(); } finally { - thread.setName(string2); + thread.setName(string); } } else { - try (Zone zone2 = TracyClient.beginZone(string, SharedConstants.IS_RUNNING_IN_IDE)) { - runnable.run(); + try (Zone zone2 = TracyClient.beginZone(name, SharedConstants.IS_RUNNING_IN_IDE)) { + task.run(); } } } @@ -299,28 +299,28 @@ public class Util { return (Predicate)predicate; } - public static Predicate allOf(Predicate predicate, Predicate predicate2) { - return object -> predicate.test(object) && predicate2.test(object); + public static Predicate allOf(Predicate predicate1, Predicate predicate2) { + return object -> predicate1.test(object) && predicate2.test(object); } - public static Predicate allOf(Predicate predicate, Predicate predicate2, Predicate predicate3) { - return object -> predicate.test(object) && predicate2.test(object) && predicate3.test(object); + public static Predicate allOf(Predicate predicate1, Predicate predicate2, Predicate predicate3) { + return object -> predicate1.test(object) && predicate2.test(object) && predicate3.test(object); } public static Predicate allOf( - Predicate predicate, Predicate predicate2, Predicate predicate3, Predicate predicate4 + Predicate predicate1, Predicate predicate2, Predicate predicate3, Predicate predicate4 ) { - return object -> predicate.test(object) && predicate2.test(object) && predicate3.test(object) && predicate4.test(object); + return object -> predicate1.test(object) && predicate2.test(object) && predicate3.test(object) && predicate4.test(object); } public static Predicate allOf( - Predicate predicate, + Predicate predicate1, Predicate predicate2, Predicate predicate3, Predicate predicate4, Predicate predicate5 ) { - return object -> predicate.test(object) && predicate2.test(object) && predicate3.test(object) && predicate4.test(object) && predicate5.test(object); + return object -> predicate1.test(object) && predicate2.test(object) && predicate3.test(object) && predicate4.test(object) && predicate5.test(object); } @SafeVarargs @@ -370,28 +370,28 @@ public class Util { return (Predicate)predicate; } - public static Predicate anyOf(Predicate predicate, Predicate predicate2) { - return object -> predicate.test(object) || predicate2.test(object); + public static Predicate anyOf(Predicate predicate1, Predicate predicate2) { + return object -> predicate1.test(object) || predicate2.test(object); } - public static Predicate anyOf(Predicate predicate, Predicate predicate2, Predicate predicate3) { - return object -> predicate.test(object) || predicate2.test(object) || predicate3.test(object); + public static Predicate anyOf(Predicate predicate1, Predicate predicate2, Predicate predicate3) { + return object -> predicate1.test(object) || predicate2.test(object) || predicate3.test(object); } public static Predicate anyOf( - Predicate predicate, Predicate predicate2, Predicate predicate3, Predicate predicate4 + Predicate predicate1, Predicate predicate2, Predicate predicate3, Predicate predicate4 ) { - return object -> predicate.test(object) || predicate2.test(object) || predicate3.test(object) || predicate4.test(object); + return object -> predicate1.test(object) || predicate2.test(object) || predicate3.test(object) || predicate4.test(object); } public static Predicate anyOf( - Predicate predicate, + Predicate predicate1, Predicate predicate2, Predicate predicate3, Predicate predicate4, Predicate predicate5 ) { - return object -> predicate.test(object) || predicate2.test(object) || predicate3.test(object) || predicate4.test(object) || predicate5.test(object); + return object -> predicate1.test(object) || predicate2.test(object) || predicate3.test(object) || predicate4.test(object) || predicate5.test(object); } @SafeVarargs @@ -543,11 +543,11 @@ public class Util { return object; } - public static , V> EnumMap makeEnumMap(Class class_, Function function) { - EnumMap enumMap = new EnumMap(class_); + public static , V> EnumMap makeEnumMap(Class enumClass, Function valueGetter) { + EnumMap enumMap = new EnumMap(enumClass); - for (K enum_ : (Enum[])class_.getEnumConstants()) { - enumMap.put(enum_, function.apply(enum_)); + for (K enum_ : (Enum[])enumClass.getEnumConstants()) { + enumMap.put(enum_, valueGetter.apply(enum_)); } return enumMap; @@ -768,13 +768,13 @@ public class Util { safeReplaceOrMoveFile(current, latest, oldBackup, false); } - public static boolean safeReplaceOrMoveFile(Path current, Path latest, Path oldBackup, boolean bl) { + public static boolean safeReplaceOrMoveFile(Path current, Path latest, Path oldBackup, boolean restore) { if (Files.exists(current, new LinkOption[0]) && !runWithRetries(10, "create backup " + oldBackup, createDeleter(oldBackup), createRenamer(current, oldBackup), createFileCreatedCheck(oldBackup))) { return false; } else if (!runWithRetries(10, "remove old " + current, createDeleter(current), createFileDeletedCheck(current))) { return false; - } else if (!runWithRetries(10, "replace " + current + " with " + latest, createRenamer(latest, current), createFileCreatedCheck(current)) && !bl) { + } else if (!runWithRetries(10, "replace " + current + " with " + latest, createRenamer(latest, current), createFileCreatedCheck(current)) && !restore) { runWithRetries(10, "restore " + current + " from " + oldBackup, createRenamer(oldBackup, current), createFileCreatedCheck(current)); return false; } else { diff --git a/net/minecraft/advancements/AdvancementRewards.java b/net/minecraft/advancements/AdvancementRewards.java index bb3b1fbc..48e68a60 100644 --- a/net/minecraft/advancements/AdvancementRewards.java +++ b/net/minecraft/advancements/AdvancementRewards.java @@ -112,12 +112,12 @@ public record AdvancementRewards(int experience, List> lo return this; } - public static AdvancementRewards.Builder recipe(ResourceKey> resourceKey) { - return new AdvancementRewards.Builder().addRecipe(resourceKey); + public static AdvancementRewards.Builder recipe(ResourceKey> recipe) { + return new AdvancementRewards.Builder().addRecipe(recipe); } - public AdvancementRewards.Builder addRecipe(ResourceKey> resourceKey) { - this.recipes.add(resourceKey); + public AdvancementRewards.Builder addRecipe(ResourceKey> recipe) { + this.recipes.add(recipe); return this; } diff --git a/net/minecraft/advancements/critereon/BlockPredicate.java b/net/minecraft/advancements/critereon/BlockPredicate.java index 58e0468e..14e3c5c2 100644 --- a/net/minecraft/advancements/critereon/BlockPredicate.java +++ b/net/minecraft/advancements/critereon/BlockPredicate.java @@ -84,17 +84,17 @@ public record BlockPredicate(Optional> blocks, Optional holderGetter, Block... blocks) { - return this.of(holderGetter, Arrays.asList(blocks)); + public BlockPredicate.Builder of(HolderGetter blockRegistry, Block... blocks) { + return this.of(blockRegistry, Arrays.asList(blocks)); } - public BlockPredicate.Builder of(HolderGetter holderGetter, Collection collection) { - this.blocks = Optional.of(HolderSet.direct(Block::builtInRegistryHolder, collection)); + public BlockPredicate.Builder of(HolderGetter blockRegistry, Collection blocks) { + this.blocks = Optional.of(HolderSet.direct(Block::builtInRegistryHolder, blocks)); return this; } - public BlockPredicate.Builder of(HolderGetter holderGetter, TagKey tagKey) { - this.blocks = Optional.of(holderGetter.getOrThrow(tagKey)); + public BlockPredicate.Builder of(HolderGetter blockRegistry, TagKey blockTag) { + this.blocks = Optional.of(blockRegistry.getOrThrow(blockTag)); return this; } diff --git a/net/minecraft/advancements/critereon/ConsumeItemTrigger.java b/net/minecraft/advancements/critereon/ConsumeItemTrigger.java index 48b73ccb..df2dd51b 100644 --- a/net/minecraft/advancements/critereon/ConsumeItemTrigger.java +++ b/net/minecraft/advancements/critereon/ConsumeItemTrigger.java @@ -35,8 +35,8 @@ public class ConsumeItemTrigger extends SimpleCriterionTrigger usedItem(HolderGetter holderGetter, ItemLike itemLike) { - return usedItem(ItemPredicate.Builder.item().of(holderGetter, itemLike.asItem())); + public static Criterion usedItem(HolderGetter itemRegistry, ItemLike item) { + return usedItem(ItemPredicate.Builder.item().of(itemRegistry, item.asItem())); } public static Criterion usedItem(ItemPredicate.Builder item) { diff --git a/net/minecraft/advancements/critereon/ContextAwarePredicate.java b/net/minecraft/advancements/critereon/ContextAwarePredicate.java index 91fc4de6..108b2b8e 100644 --- a/net/minecraft/advancements/critereon/ContextAwarePredicate.java +++ b/net/minecraft/advancements/critereon/ContextAwarePredicate.java @@ -28,10 +28,10 @@ public class ContextAwarePredicate { return this.compositePredicates.test(context); } - public void validate(ValidationContext validationContext) { + public void validate(ValidationContext context) { for (int i = 0; i < this.conditions.size(); i++) { LootItemCondition lootItemCondition = (LootItemCondition)this.conditions.get(i); - lootItemCondition.validate(validationContext.forChild("[" + i + "]")); + lootItemCondition.validate(context.forChild("[" + i + "]")); } } } diff --git a/net/minecraft/advancements/critereon/CriterionValidator.java b/net/minecraft/advancements/critereon/CriterionValidator.java index 7e534614..acf64b79 100644 --- a/net/minecraft/advancements/critereon/CriterionValidator.java +++ b/net/minecraft/advancements/critereon/CriterionValidator.java @@ -29,14 +29,14 @@ public class CriterionValidator { this.validate(entity, LootContextParamSets.ADVANCEMENT_ENTITY, name); } - public void validate(ContextAwarePredicate contextAwarePredicate, ContextKeySet contextKeySet, String string) { - contextAwarePredicate.validate(new ValidationContext(this.reporter.forChild(string), contextKeySet, this.lootData)); + public void validate(ContextAwarePredicate entity, ContextKeySet contextKeySet, String name) { + entity.validate(new ValidationContext(this.reporter.forChild(name), contextKeySet, this.lootData)); } - public void validate(List list, ContextKeySet contextKeySet, String string) { - for (int i = 0; i < list.size(); i++) { - ContextAwarePredicate contextAwarePredicate = (ContextAwarePredicate)list.get(i); - contextAwarePredicate.validate(new ValidationContext(this.reporter.forChild(string + "[" + i + "]"), contextKeySet, this.lootData)); + public void validate(List entities, ContextKeySet contextKeySet, String name) { + for (int i = 0; i < entities.size(); i++) { + ContextAwarePredicate contextAwarePredicate = (ContextAwarePredicate)entities.get(i); + contextAwarePredicate.validate(new ValidationContext(this.reporter.forChild(name + "[" + i + "]"), contextKeySet, this.lootData)); } } } diff --git a/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java b/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java index a89c81bf..d8dcb3a1 100644 --- a/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java +++ b/net/minecraft/advancements/critereon/EntityEquipmentPredicate.java @@ -37,13 +37,13 @@ public record EntityEquipmentPredicate( .apply(instance, EntityEquipmentPredicate::new) ); - public static EntityEquipmentPredicate captainPredicate(HolderGetter holderGetter, HolderGetter holderGetter2) { + public static EntityEquipmentPredicate captainPredicate(HolderGetter itemRegistry, HolderGetter patternRegistry) { return EntityEquipmentPredicate.Builder.equipment() .head( ItemPredicate.Builder.item() - .of(holderGetter, Items.WHITE_BANNER) + .of(itemRegistry, Items.WHITE_BANNER) .hasComponents( - DataComponentPredicate.someOf(Raid.getOminousBannerInstance(holderGetter2).getComponents(), DataComponents.BANNER_PATTERNS, DataComponents.ITEM_NAME) + DataComponentPredicate.someOf(Raid.getOminousBannerInstance(patternRegistry).getComponents(), DataComponents.BANNER_PATTERNS, DataComponents.ITEM_NAME) ) ) .build(); diff --git a/net/minecraft/advancements/critereon/EntityPredicate.java b/net/minecraft/advancements/critereon/EntityPredicate.java index a25dbd31..c2b8cb49 100644 --- a/net/minecraft/advancements/critereon/EntityPredicate.java +++ b/net/minecraft/advancements/critereon/EntityPredicate.java @@ -192,13 +192,13 @@ public record EntityPredicate( return new EntityPredicate.Builder(); } - public EntityPredicate.Builder of(HolderGetter> holderGetter, EntityType entityType) { - this.entityType = Optional.of(EntityTypePredicate.of(holderGetter, entityType)); + public EntityPredicate.Builder of(HolderGetter> entityTypeRegistry, EntityType entityType) { + this.entityType = Optional.of(EntityTypePredicate.of(entityTypeRegistry, entityType)); return this; } - public EntityPredicate.Builder of(HolderGetter> holderGetter, TagKey> tagKey) { - this.entityType = Optional.of(EntityTypePredicate.of(holderGetter, tagKey)); + public EntityPredicate.Builder of(HolderGetter> entityTypeRegistry, TagKey> entityTypeTag) { + this.entityType = Optional.of(EntityTypePredicate.of(entityTypeRegistry, entityTypeTag)); return this; } diff --git a/net/minecraft/advancements/critereon/EntityTypePredicate.java b/net/minecraft/advancements/critereon/EntityTypePredicate.java index a4e89be7..5a4aff45 100644 --- a/net/minecraft/advancements/critereon/EntityTypePredicate.java +++ b/net/minecraft/advancements/critereon/EntityTypePredicate.java @@ -12,12 +12,12 @@ public record EntityTypePredicate(HolderSet> types) { public static final Codec CODEC = RegistryCodecs.homogeneousList(Registries.ENTITY_TYPE) .xmap(EntityTypePredicate::new, EntityTypePredicate::types); - public static EntityTypePredicate of(HolderGetter> holderGetter, EntityType entityType) { + public static EntityTypePredicate of(HolderGetter> entityTypeRegistry, EntityType entityType) { return new EntityTypePredicate(HolderSet.direct(entityType.builtInRegistryHolder())); } - public static EntityTypePredicate of(HolderGetter> holderGetter, TagKey> tagKey) { - return new EntityTypePredicate(holderGetter.getOrThrow(tagKey)); + public static EntityTypePredicate of(HolderGetter> entityTypeRegistry, TagKey> entityTypeTag) { + return new EntityTypePredicate(entityTypeRegistry.getOrThrow(entityTypeTag)); } public boolean matches(EntityType type) { diff --git a/net/minecraft/advancements/critereon/FluidPredicate.java b/net/minecraft/advancements/critereon/FluidPredicate.java index ed0e6ada..2be41418 100644 --- a/net/minecraft/advancements/critereon/FluidPredicate.java +++ b/net/minecraft/advancements/critereon/FluidPredicate.java @@ -47,8 +47,8 @@ public record FluidPredicate(Optional> fluids, Optional holderSet) { - this.fluids = Optional.of(holderSet); + public FluidPredicate.Builder of(HolderSet fluids) { + this.fluids = Optional.of(fluids); return this; } diff --git a/net/minecraft/advancements/critereon/InputPredicate.java b/net/minecraft/advancements/critereon/InputPredicate.java index 4508a7d8..00cb0326 100644 --- a/net/minecraft/advancements/critereon/InputPredicate.java +++ b/net/minecraft/advancements/critereon/InputPredicate.java @@ -37,7 +37,7 @@ public record InputPredicate( && this.matches(this.sprint, input.sprint()); } - private boolean matches(Optional optional, boolean bl) { - return (Boolean)optional.map(boolean_ -> boolean_ == bl).orElse(true); + private boolean matches(Optional input, boolean expectedValue) { + return (Boolean)input.map(boolean_ -> boolean_ == expectedValue).orElse(true); } } diff --git a/net/minecraft/advancements/critereon/ItemPredicate.java b/net/minecraft/advancements/critereon/ItemPredicate.java index f5d533ab..ef558c74 100644 --- a/net/minecraft/advancements/critereon/ItemPredicate.java +++ b/net/minecraft/advancements/critereon/ItemPredicate.java @@ -31,16 +31,16 @@ public record ItemPredicate(Optional> items, Ints count, DataCom .apply(instance, ItemPredicate::new) ); - public boolean test(ItemStack itemStack) { - if (this.items.isPresent() && !itemStack.is((HolderSet)this.items.get())) { + public boolean test(ItemStack stack) { + if (this.items.isPresent() && !stack.is((HolderSet)this.items.get())) { return false; - } else if (!this.count.matches(itemStack.getCount())) { + } else if (!this.count.matches(stack.getCount())) { return false; - } else if (!this.components.test((DataComponentHolder)itemStack)) { + } else if (!this.components.test((DataComponentHolder)stack)) { return false; } else { for (ItemSubPredicate itemSubPredicate : this.subPredicates.values()) { - if (!itemSubPredicate.matches(itemStack)) { + if (!itemSubPredicate.matches(stack)) { return false; } } @@ -62,13 +62,13 @@ public record ItemPredicate(Optional> items, Ints count, DataCom return new ItemPredicate.Builder(); } - public ItemPredicate.Builder of(HolderGetter holderGetter, ItemLike... itemLikes) { - this.items = Optional.of(HolderSet.direct(itemLike -> itemLike.asItem().builtInRegistryHolder(), itemLikes)); + public ItemPredicate.Builder of(HolderGetter itemRegistry, ItemLike... items) { + this.items = Optional.of(HolderSet.direct(itemLike -> itemLike.asItem().builtInRegistryHolder(), items)); return this; } - public ItemPredicate.Builder of(HolderGetter holderGetter, TagKey tagKey) { - this.items = Optional.of(holderGetter.getOrThrow(tagKey)); + public ItemPredicate.Builder of(HolderGetter itemRegistry, TagKey tag) { + this.items = Optional.of(itemRegistry.getOrThrow(tag)); return this; } @@ -77,8 +77,8 @@ public record ItemPredicate(Optional> items, Ints count, DataCom return this; } - public ItemPredicate.Builder withSubPredicate(Type type, T itemSubPredicate) { - this.subPredicates.put(type, itemSubPredicate); + public ItemPredicate.Builder withSubPredicate(Type type, T subPredicate) { + this.subPredicates.put(type, subPredicate); return this; } diff --git a/net/minecraft/advancements/critereon/ItemTrimPredicate.java b/net/minecraft/advancements/critereon/ItemTrimPredicate.java index eb3230c9..2e50dd9f 100644 --- a/net/minecraft/advancements/critereon/ItemTrimPredicate.java +++ b/net/minecraft/advancements/critereon/ItemTrimPredicate.java @@ -28,9 +28,9 @@ public record ItemTrimPredicate(Optional> material, Opti return DataComponents.TRIM; } - public boolean matches(ItemStack itemStack, ArmorTrim armorTrim) { - return this.material.isPresent() && !((HolderSet)this.material.get()).contains(armorTrim.material()) + public boolean matches(ItemStack stack, ArmorTrim value) { + return this.material.isPresent() && !((HolderSet)this.material.get()).contains(value.material()) ? false - : !this.pattern.isPresent() || ((HolderSet)this.pattern.get()).contains(armorTrim.pattern()); + : !this.pattern.isPresent() || ((HolderSet)this.pattern.get()).contains(value.pattern()); } } diff --git a/net/minecraft/advancements/critereon/KilledByArrowTrigger.java b/net/minecraft/advancements/critereon/KilledByArrowTrigger.java index 31b6b2ef..1d29e798 100644 --- a/net/minecraft/advancements/critereon/KilledByArrowTrigger.java +++ b/net/minecraft/advancements/critereon/KilledByArrowTrigger.java @@ -29,16 +29,16 @@ public class KilledByArrowTrigger extends SimpleCriterionTrigger collection, @Nullable ItemStack itemStack) { + public void trigger(ServerPlayer player, Collection victims, @Nullable ItemStack firedFromWeapon) { List list = Lists.newArrayList(); Set> set = Sets.>newHashSet(); - for (Entity entity : collection) { + for (Entity entity : victims) { set.add(entity.getType()); - list.add(EntityPredicate.createContext(serverPlayer, entity)); + list.add(EntityPredicate.createContext(player, entity)); } - this.trigger(serverPlayer, triggerInstance -> triggerInstance.matches(list, set.size(), itemStack)); + this.trigger(player, triggerInstance -> triggerInstance.matches(list, set.size(), firedFromWeapon)); } public record TriggerInstance( @@ -54,28 +54,28 @@ public class KilledByArrowTrigger extends SimpleCriterionTrigger crossbowKilled(HolderGetter holderGetter, EntityPredicate.Builder... builders) { + public static Criterion crossbowKilled(HolderGetter itemRegistry, EntityPredicate.Builder... victims) { return CriteriaTriggers.KILLED_BY_ARROW .createCriterion( new KilledByArrowTrigger.TriggerInstance( - Optional.empty(), EntityPredicate.wrap(builders), Ints.ANY, Optional.of(ItemPredicate.Builder.item().of(holderGetter, Items.CROSSBOW).build()) + Optional.empty(), EntityPredicate.wrap(victims), Ints.ANY, Optional.of(ItemPredicate.Builder.item().of(itemRegistry, Items.CROSSBOW).build()) ) ); } - public static Criterion crossbowKilled(HolderGetter holderGetter, Ints ints) { + public static Criterion crossbowKilled(HolderGetter itemRegistry, Ints uniqueEntityTypes) { return CriteriaTriggers.KILLED_BY_ARROW .createCriterion( new KilledByArrowTrigger.TriggerInstance( - Optional.empty(), List.of(), ints, Optional.of(ItemPredicate.Builder.item().of(holderGetter, Items.CROSSBOW).build()) + Optional.empty(), List.of(), uniqueEntityTypes, Optional.of(ItemPredicate.Builder.item().of(itemRegistry, Items.CROSSBOW).build()) ) ); } - public boolean matches(Collection collection, int i, @Nullable ItemStack itemStack) { - if (!this.firedFromWeapon.isPresent() || itemStack != null && ((ItemPredicate)this.firedFromWeapon.get()).test(itemStack)) { + public boolean matches(Collection context, int uniqueEntityTypes, @Nullable ItemStack firedFromWeapon) { + if (!this.firedFromWeapon.isPresent() || firedFromWeapon != null && ((ItemPredicate)this.firedFromWeapon.get()).test(firedFromWeapon)) { if (!this.victims.isEmpty()) { - List list = Lists.newArrayList(collection); + List list = Lists.newArrayList(context); for (ContextAwarePredicate contextAwarePredicate : this.victims) { boolean bl = false; @@ -96,7 +96,7 @@ public class KilledByArrowTrigger extends SimpleCriterionTrigger PlayerPredicate.Builder addStat(StatType type, Holder.Reference value, Ints range) { + public PlayerPredicate.Builder addStat(StatType type, Reference value, Ints range) { this.stats.add(new PlayerPredicate.StatMatcher<>(type, value, range)); return this; } - public PlayerPredicate.Builder addRecipe(ResourceKey> resourceKey, boolean bl) { - this.recipes.put(resourceKey, bl); + public PlayerPredicate.Builder addRecipe(ResourceKey> recipe, boolean unlocked) { + this.recipes.put(recipe, unlocked); return this; } @@ -223,8 +224,8 @@ public record PlayerPredicate( return this; } - public PlayerPredicate.Builder hasInput(InputPredicate inputPredicate) { - this.input = Optional.of(inputPredicate); + public PlayerPredicate.Builder hasInput(InputPredicate input) { + this.input = Optional.of(input); return this; } diff --git a/net/minecraft/advancements/critereon/PlayerTrigger.java b/net/minecraft/advancements/critereon/PlayerTrigger.java index 95d0a395..01e3ddcd 100644 --- a/net/minecraft/advancements/critereon/PlayerTrigger.java +++ b/net/minecraft/advancements/critereon/PlayerTrigger.java @@ -58,12 +58,12 @@ public class PlayerTrigger extends SimpleCriterionTrigger walkOnBlockWithEquipment( - HolderGetter holderGetter, HolderGetter holderGetter2, Block block, Item item + HolderGetter blockRegistry, HolderGetter itemRegistry, Block block, Item equipment ) { return located( EntityPredicate.Builder.entity() - .equipment(EntityEquipmentPredicate.Builder.equipment().feet(ItemPredicate.Builder.item().of(holderGetter2, item))) - .steppingOn(Builder.location().setBlock(BlockPredicate.Builder.block().of(holderGetter, block))) + .equipment(EntityEquipmentPredicate.Builder.equipment().feet(ItemPredicate.Builder.item().of(itemRegistry, equipment))) + .steppingOn(Builder.location().setBlock(BlockPredicate.Builder.block().of(blockRegistry, block))) ); } } diff --git a/net/minecraft/advancements/critereon/RecipeCraftedTrigger.java b/net/minecraft/advancements/critereon/RecipeCraftedTrigger.java index ba65159a..6f3a0705 100644 --- a/net/minecraft/advancements/critereon/RecipeCraftedTrigger.java +++ b/net/minecraft/advancements/critereon/RecipeCraftedTrigger.java @@ -21,8 +21,8 @@ public class RecipeCraftedTrigger extends SimpleCriterionTrigger> resourceKey, List list) { - this.trigger(serverPlayer, triggerInstance -> triggerInstance.matches(resourceKey, list)); + public void trigger(ServerPlayer player, ResourceKey> recipeId, List ingredients) { + this.trigger(player, triggerInstance -> triggerInstance.matches(recipeId, ingredients)); } public record TriggerInstance(Optional player, ResourceKey> recipeId, List ingredients) @@ -36,28 +36,28 @@ public class RecipeCraftedTrigger extends SimpleCriterionTrigger craftedItem(ResourceKey> resourceKey, List list) { + public static Criterion craftedItem(ResourceKey> recipeId, List ingredients) { return CriteriaTriggers.RECIPE_CRAFTED - .createCriterion(new RecipeCraftedTrigger.TriggerInstance(Optional.empty(), resourceKey, list.stream().map(ItemPredicate.Builder::build).toList())); + .createCriterion(new RecipeCraftedTrigger.TriggerInstance(Optional.empty(), recipeId, ingredients.stream().map(ItemPredicate.Builder::build).toList())); } - public static Criterion craftedItem(ResourceKey> resourceKey) { - return CriteriaTriggers.RECIPE_CRAFTED.createCriterion(new RecipeCraftedTrigger.TriggerInstance(Optional.empty(), resourceKey, List.of())); + public static Criterion craftedItem(ResourceKey> recipeId) { + return CriteriaTriggers.RECIPE_CRAFTED.createCriterion(new RecipeCraftedTrigger.TriggerInstance(Optional.empty(), recipeId, List.of())); } - public static Criterion crafterCraftedItem(ResourceKey> resourceKey) { - return CriteriaTriggers.CRAFTER_RECIPE_CRAFTED.createCriterion(new RecipeCraftedTrigger.TriggerInstance(Optional.empty(), resourceKey, List.of())); + public static Criterion crafterCraftedItem(ResourceKey> recipeId) { + return CriteriaTriggers.CRAFTER_RECIPE_CRAFTED.createCriterion(new RecipeCraftedTrigger.TriggerInstance(Optional.empty(), recipeId, List.of())); } - boolean matches(ResourceKey> resourceKey, List list) { - if (resourceKey != this.recipeId) { + boolean matches(ResourceKey> recipeId, List ingredients) { + if (recipeId != this.recipeId) { return false; } else { - List list2 = new ArrayList(list); + List list = new ArrayList(ingredients); for (ItemPredicate itemPredicate : this.ingredients) { boolean bl = false; - Iterator iterator = list2.iterator(); + Iterator iterator = list.iterator(); while (iterator.hasNext()) { if (itemPredicate.test((ItemStack)iterator.next())) { diff --git a/net/minecraft/advancements/critereon/RecipeUnlockedTrigger.java b/net/minecraft/advancements/critereon/RecipeUnlockedTrigger.java index db5857d8..95909b8d 100644 --- a/net/minecraft/advancements/critereon/RecipeUnlockedTrigger.java +++ b/net/minecraft/advancements/critereon/RecipeUnlockedTrigger.java @@ -22,8 +22,8 @@ public class RecipeUnlockedTrigger extends SimpleCriterionTrigger triggerInstance.matches(recipe)); } - public static Criterion unlocked(ResourceKey> resourceKey) { - return CriteriaTriggers.RECIPE_UNLOCKED.createCriterion(new RecipeUnlockedTrigger.TriggerInstance(Optional.empty(), resourceKey)); + public static Criterion unlocked(ResourceKey> recipe) { + return CriteriaTriggers.RECIPE_UNLOCKED.createCriterion(new RecipeUnlockedTrigger.TriggerInstance(Optional.empty(), recipe)); } public record TriggerInstance(Optional player, ResourceKey> recipe) implements SimpleInstance { diff --git a/net/minecraft/advancements/critereon/SheepPredicate.java b/net/minecraft/advancements/critereon/SheepPredicate.java index 466a438c..492ce723 100644 --- a/net/minecraft/advancements/critereon/SheepPredicate.java +++ b/net/minecraft/advancements/critereon/SheepPredicate.java @@ -33,7 +33,7 @@ public record SheepPredicate(Optional sheared, Optional color } } - public static SheepPredicate hasWool(DyeColor dyeColor) { - return new SheepPredicate(Optional.of(false), Optional.of(dyeColor)); + public static SheepPredicate hasWool(DyeColor color) { + return new SheepPredicate(Optional.of(false), Optional.of(color)); } } diff --git a/net/minecraft/advancements/critereon/ShotCrossbowTrigger.java b/net/minecraft/advancements/critereon/ShotCrossbowTrigger.java index 2874c44f..75401768 100644 --- a/net/minecraft/advancements/critereon/ShotCrossbowTrigger.java +++ b/net/minecraft/advancements/critereon/ShotCrossbowTrigger.java @@ -35,9 +35,9 @@ public class ShotCrossbowTrigger extends SimpleCriterionTrigger shotCrossbow(HolderGetter holderGetter, ItemLike itemLike) { + public static Criterion shotCrossbow(HolderGetter itemRegistry, ItemLike item) { return CriteriaTriggers.SHOT_CROSSBOW - .createCriterion(new ShotCrossbowTrigger.TriggerInstance(Optional.empty(), Optional.of(ItemPredicate.Builder.item().of(holderGetter, itemLike).build()))); + .createCriterion(new ShotCrossbowTrigger.TriggerInstance(Optional.empty(), Optional.of(ItemPredicate.Builder.item().of(itemRegistry, item).build()))); } public boolean matches(ItemStack item) { diff --git a/net/minecraft/advancements/critereon/UsedTotemTrigger.java b/net/minecraft/advancements/critereon/UsedTotemTrigger.java index f3b03f9f..75e8b992 100644 --- a/net/minecraft/advancements/critereon/UsedTotemTrigger.java +++ b/net/minecraft/advancements/critereon/UsedTotemTrigger.java @@ -35,9 +35,9 @@ public class UsedTotemTrigger extends SimpleCriterionTrigger usedTotem(HolderGetter holderGetter, ItemLike itemLike) { + public static Criterion usedTotem(HolderGetter itemRegistry, ItemLike item) { return CriteriaTriggers.USED_TOTEM - .createCriterion(new UsedTotemTrigger.TriggerInstance(Optional.empty(), Optional.of(ItemPredicate.Builder.item().of(holderGetter, itemLike).build()))); + .createCriterion(new UsedTotemTrigger.TriggerInstance(Optional.empty(), Optional.of(ItemPredicate.Builder.item().of(itemRegistry, item).build()))); } public boolean matches(ItemStack item) { diff --git a/net/minecraft/client/ClientRecipeBook.java b/net/minecraft/client/ClientRecipeBook.java index fceec1c3..9cef1d85 100644 --- a/net/minecraft/client/ClientRecipeBook.java +++ b/net/minecraft/client/ClientRecipeBook.java @@ -29,13 +29,13 @@ public class ClientRecipeBook extends RecipeBook { private Map> collectionsByTab = Map.of(); private List allCollections = List.of(); - public void add(RecipeDisplayEntry recipeDisplayEntry) { - this.known.put(recipeDisplayEntry.id(), recipeDisplayEntry); + public void add(RecipeDisplayEntry recipe) { + this.known.put(recipe.id(), recipe); } - public void remove(RecipeDisplayId recipeDisplayId) { - this.known.remove(recipeDisplayId); - this.highlight.remove(recipeDisplayId); + public void remove(RecipeDisplayId recipe) { + this.known.remove(recipe); + this.highlight.remove(recipe); } public void clear() { @@ -43,16 +43,16 @@ public class ClientRecipeBook extends RecipeBook { this.highlight.clear(); } - public boolean willHighlight(RecipeDisplayId recipeDisplayId) { - return this.highlight.contains(recipeDisplayId); + public boolean willHighlight(RecipeDisplayId recipe) { + return this.highlight.contains(recipe); } - public void removeHighlight(RecipeDisplayId recipeDisplayId) { - this.highlight.remove(recipeDisplayId); + public void removeHighlight(RecipeDisplayId recipe) { + this.highlight.remove(recipe); } - public void addHighlight(RecipeDisplayId recipeDisplayId) { - this.highlight.add(recipeDisplayId); + public void addHighlight(RecipeDisplayId recipe) { + this.highlight.add(recipe); } public void rebuildCollections() { @@ -107,7 +107,7 @@ public class ClientRecipeBook extends RecipeBook { return this.allCollections; } - public List getCollection(ExtendedRecipeBookCategory extendedRecipeBookCategory) { - return (List)this.collectionsByTab.getOrDefault(extendedRecipeBookCategory, Collections.emptyList()); + public List getCollection(ExtendedRecipeBookCategory category) { + return (List)this.collectionsByTab.getOrDefault(category, Collections.emptyList()); } } diff --git a/net/minecraft/client/InactivityFpsLimit.java b/net/minecraft/client/InactivityFpsLimit.java index 294a571f..239ca074 100644 --- a/net/minecraft/client/InactivityFpsLimit.java +++ b/net/minecraft/client/InactivityFpsLimit.java @@ -16,10 +16,10 @@ public enum InactivityFpsLimit implements OptionEnum, StringRepresentable { private final String serializedName; private final String key; - private InactivityFpsLimit(final int j, final String string2, final String string3) { - this.id = j; - this.serializedName = string2; - this.key = string3; + private InactivityFpsLimit(final int id, final String serializedName, final String key) { + this.id = id; + this.serializedName = serializedName; + this.key = key; } @Override diff --git a/net/minecraft/client/Minecraft.java b/net/minecraft/client/Minecraft.java index 2d6ef240..bc5a667d 100644 --- a/net/minecraft/client/Minecraft.java +++ b/net/minecraft/client/Minecraft.java @@ -105,6 +105,7 @@ import net.minecraft.client.gui.screens.ProgressScreen; import net.minecraft.client.gui.screens.ReceivingLevelScreen; import net.minecraft.client.gui.screens.Screen; import net.minecraft.client.gui.screens.TitleScreen; +import net.minecraft.client.gui.screens.ReceivingLevelScreen.Reason; import net.minecraft.client.gui.screens.advancements.AdvancementsScreen; import net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen; import net.minecraft.client.gui.screens.inventory.InventoryScreen; @@ -805,16 +806,16 @@ public class Minecraft extends ReentrantBlockableEventLoop implements SystemToast.addOrUpdate(toastManager, SystemToast.SystemToastId.PACK_LOAD_FAILURE, Component.translatable("resourcePack.load_fail"), message); } - public void triggerResourcePackRecovery(Exception exception) { + public void triggerResourcePackRecovery(Exception error) { if (!this.resourcePackRepository.isAbleToClearAnyPack()) { if (this.resourcePackRepository.getSelectedIds().size() <= 1) { - LOGGER.error(LogUtils.FATAL_MARKER, exception.getMessage(), (Throwable)exception); - this.emergencySaveAndCrash(new CrashReport(exception.getMessage(), exception)); + LOGGER.error(LogUtils.FATAL_MARKER, error.getMessage(), (Throwable)error); + this.emergencySaveAndCrash(new CrashReport(error.getMessage(), error)); } else { this.schedule(this::abortResourcePackRecovery); } } else { - this.clearResourcePacksOnError(exception, Component.translatable("resourcePack.runtime_failure"), null); + this.clearResourcePacksOnError(error, Component.translatable("resourcePack.runtime_failure"), null); } } @@ -2021,7 +2022,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.pendingConnection = connection; } - public void setLevel(ClientLevel level, ReceivingLevelScreen.Reason reason) { + public void setLevel(ClientLevel level, Reason reason) { this.updateScreenAndTick(new ReceivingLevelScreen(() -> false, reason)); this.level = level; this.updateLevelInEngines(level); diff --git a/net/minecraft/client/ScrollWheelHandler.java b/net/minecraft/client/ScrollWheelHandler.java index a98cf163..ea5296dc 100644 --- a/net/minecraft/client/ScrollWheelHandler.java +++ b/net/minecraft/client/ScrollWheelHandler.java @@ -9,17 +9,17 @@ public class ScrollWheelHandler { private double accumulatedScrollX; private double accumulatedScrollY; - public Vector2i onMouseScroll(double d, double e) { - if (this.accumulatedScrollX != 0.0 && Math.signum(d) != Math.signum(this.accumulatedScrollX)) { + public Vector2i onMouseScroll(double xOffset, double yOffset) { + if (this.accumulatedScrollX != 0.0 && Math.signum(xOffset) != Math.signum(this.accumulatedScrollX)) { this.accumulatedScrollX = 0.0; } - if (this.accumulatedScrollY != 0.0 && Math.signum(e) != Math.signum(this.accumulatedScrollY)) { + if (this.accumulatedScrollY != 0.0 && Math.signum(yOffset) != Math.signum(this.accumulatedScrollY)) { this.accumulatedScrollY = 0.0; } - this.accumulatedScrollX += d; - this.accumulatedScrollY += e; + this.accumulatedScrollX += xOffset; + this.accumulatedScrollY += yOffset; int i = (int)this.accumulatedScrollX; int j = (int)this.accumulatedScrollY; if (i == 0 && j == 0) { @@ -31,19 +31,19 @@ public class ScrollWheelHandler { } } - public static int getNextScrollWheelSelection(double d, int i, int j) { - int k = (int)Math.signum(d); - i -= k; - i = Math.max(-1, i); + public static int getNextScrollWheelSelection(double yOffset, int selected, int selectionSize) { + int i = (int)Math.signum(yOffset); + selected -= i; + selected = Math.max(-1, selected); - while (i < 0) { - i += j; + while (selected < 0) { + selected += selectionSize; } - while (i >= j) { - i -= j; + while (selected >= selectionSize) { + selected -= selectionSize; } - return i; + return selected; } } diff --git a/net/minecraft/client/animation/KeyframeAnimations.java b/net/minecraft/client/animation/KeyframeAnimations.java index 8c3669cb..955c0c29 100644 --- a/net/minecraft/client/animation/KeyframeAnimations.java +++ b/net/minecraft/client/animation/KeyframeAnimations.java @@ -12,19 +12,19 @@ import org.joml.Vector3f; @Environment(EnvType.CLIENT) public class KeyframeAnimations { - public static void animate(Model model, AnimationDefinition animationDefinition, long l, float f, Vector3f vector3f) { - float g = getElapsedSeconds(animationDefinition, l); + public static void animate(Model model, AnimationDefinition definition, long accumulatedTime, float scale, Vector3f vector) { + float f = getElapsedSeconds(definition, accumulatedTime); - for (Entry> entry : animationDefinition.boneAnimations().entrySet()) { + for (Entry> entry : definition.boneAnimations().entrySet()) { Optional optional = model.getAnyDescendantWithName((String)entry.getKey()); List list = (List)entry.getValue(); optional.ifPresent(modelPart -> list.forEach(animationChannel -> { Keyframe[] keyframes = animationChannel.keyframes(); - int i = Math.max(0, Mth.binarySearch(0, keyframes.length, ix -> g <= keyframes[ix].timestamp()) - 1); + int i = Math.max(0, Mth.binarySearch(0, keyframes.length, ix -> f <= keyframes[ix].timestamp()) - 1); int j = Math.min(keyframes.length - 1, i + 1); Keyframe keyframe = keyframes[i]; Keyframe keyframe2 = keyframes[j]; - float h = g - keyframe.timestamp(); + float h = f - keyframe.timestamp(); float k; if (j != i) { k = Mth.clamp(h / (keyframe2.timestamp() - keyframe.timestamp()), 0.0F, 1.0F); @@ -32,8 +32,8 @@ public class KeyframeAnimations { k = 0.0F; } - keyframe2.interpolation().apply(vector3f, k, keyframes, i, j, f); - animationChannel.target().apply(modelPart, vector3f); + keyframe2.interpolation().apply(vector, k, keyframes, i, j, scale); + animationChannel.target().apply(modelPart, vector); })); } } diff --git a/net/minecraft/client/gui/BundleMouseActions.java b/net/minecraft/client/gui/BundleMouseActions.java index a3cadbb0..951311b0 100644 --- a/net/minecraft/client/gui/BundleMouseActions.java +++ b/net/minecraft/client/gui/BundleMouseActions.java @@ -29,18 +29,18 @@ public class BundleMouseActions implements ItemSlotMouseAction { } @Override - public boolean onMouseScrolled(double d, double e, int i, ItemStack itemStack) { - int j = BundleItem.getNumberOfItemsToShow(itemStack); - if (j == 0) { + public boolean onMouseScrolled(double xOffset, double yOffset, int hoveredSlotIndex, ItemStack hoveredSlotItem) { + int i = BundleItem.getNumberOfItemsToShow(hoveredSlotItem); + if (i == 0) { return false; } else { - Vector2i vector2i = this.scrollWheelHandler.onMouseScroll(d, e); - int k = vector2i.y == 0 ? -vector2i.x : vector2i.y; - if (k != 0) { - int l = BundleItem.getSelectedItem(itemStack); - int m = ScrollWheelHandler.getNextScrollWheelSelection(k, l, j); - if (l != m) { - this.toggleSelectedBundleItem(itemStack, i, m); + Vector2i vector2i = this.scrollWheelHandler.onMouseScroll(xOffset, yOffset); + int j = vector2i.y == 0 ? -vector2i.x : vector2i.y; + if (j != 0) { + int k = BundleItem.getSelectedItem(hoveredSlotItem); + int l = ScrollWheelHandler.getNextScrollWheelSelection(j, k, i); + if (k != l) { + this.toggleSelectedBundleItem(hoveredSlotItem, hoveredSlotIndex, l); } } @@ -60,15 +60,15 @@ public class BundleMouseActions implements ItemSlotMouseAction { } } - private void toggleSelectedBundleItem(ItemStack itemStack, int i, int j) { - if (this.minecraft.getConnection() != null && j < BundleItem.getNumberOfItemsToShow(itemStack)) { + private void toggleSelectedBundleItem(ItemStack stack, int index, int nextIndex) { + if (this.minecraft.getConnection() != null && nextIndex < BundleItem.getNumberOfItemsToShow(stack)) { ClientPacketListener clientPacketListener = this.minecraft.getConnection(); - BundleItem.toggleSelectedItem(itemStack, j); - clientPacketListener.send(new ServerboundSelectBundleItemPacket(i, j)); + BundleItem.toggleSelectedItem(stack, nextIndex); + clientPacketListener.send(new ServerboundSelectBundleItemPacket(index, nextIndex)); } } - public void unselectedBundleItem(ItemStack itemStack, int i) { - this.toggleSelectedBundleItem(itemStack, i, -1); + public void unselectedBundleItem(ItemStack bundle, int slotIndex) { + this.toggleSelectedBundleItem(bundle, slotIndex, -1); } } diff --git a/net/minecraft/client/gui/Font.java b/net/minecraft/client/gui/Font.java index 27b8ea4c..b86c945f 100644 --- a/net/minecraft/client/gui/Font.java +++ b/net/minecraft/client/gui/Font.java @@ -72,8 +72,8 @@ public class Font { float y, int color, boolean dropShadow, - Matrix4f matrix, - MultiBufferSource buffer, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, int backgroundColor, int packedLightCoords @@ -82,7 +82,7 @@ public class Font { text = this.bidirectionalShaping(text); } - return this.drawInternal(text, x, y, color, dropShadow, matrix, buffer, displayMode, backgroundColor, packedLightCoords, true); + return this.drawInternal(text, x, y, color, dropShadow, pose, bufferSource, displayMode, backgroundColor, packedLightCoords, true); } public int drawInBatch( @@ -91,29 +91,31 @@ public class Font { float y, int color, boolean dropShadow, - Matrix4f matrix, - MultiBufferSource buffer, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, int backgroundColor, int packedLightCoords ) { - return this.drawInBatch(text, x, y, color, dropShadow, matrix, buffer, displayMode, backgroundColor, packedLightCoords, true); + return this.drawInBatch(text, x, y, color, dropShadow, pose, bufferSource, displayMode, backgroundColor, packedLightCoords, true); } public int drawInBatch( - Component component, - float f, - float g, - int i, - boolean bl, - Matrix4f matrix4f, - MultiBufferSource multiBufferSource, + Component text, + float x, + float y, + int color, + boolean dropShadow, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, - int j, - int k, - boolean bl2 + int backgroundColor, + int packedLightCoords, + boolean inverseDepth ) { - return this.drawInternal(component.getVisualOrderText(), f, g, i, bl, matrix4f, multiBufferSource, displayMode, j, k, bl2); + return this.drawInternal( + text.getVisualOrderText(), x, y, color, dropShadow, pose, bufferSource, displayMode, backgroundColor, packedLightCoords, inverseDepth + ); } public int drawInBatch( @@ -122,22 +124,20 @@ public class Font { float y, int color, boolean dropShadow, - Matrix4f matrix, - MultiBufferSource buffer, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, int backgroundColor, int packedLightCoords ) { - return this.drawInternal(text, x, y, color, dropShadow, matrix, buffer, displayMode, backgroundColor, packedLightCoords, true); + return this.drawInternal(text, x, y, color, dropShadow, pose, bufferSource, displayMode, backgroundColor, packedLightCoords, true); } public void drawInBatch8xOutline( - FormattedCharSequence text, float x, float y, int color, int backgroundColor, Matrix4f matrix, MultiBufferSource bufferSource, int packedLightCoords + FormattedCharSequence text, float x, float y, int color, int backgroundColor, Matrix4f pose, MultiBufferSource bufferSource, int packedLightCoords ) { int i = adjustColor(backgroundColor); - Font.StringRenderOutput stringRenderOutput = new Font.StringRenderOutput( - bufferSource, 0.0F, 0.0F, i, false, matrix, Font.DisplayMode.NORMAL, packedLightCoords - ); + Font.StringRenderOutput stringRenderOutput = new Font.StringRenderOutput(bufferSource, 0.0F, 0.0F, i, false, pose, Font.DisplayMode.NORMAL, packedLightCoords); for (int j = -1; j <= 1; j++) { for (int k = -1; k <= 1; k++) { @@ -160,7 +160,7 @@ public class Font { stringRenderOutput.renderCharacters(); Font.StringRenderOutput stringRenderOutput2 = new Font.StringRenderOutput( - bufferSource, x, y, adjustColor(color), false, matrix, Font.DisplayMode.POLYGON_OFFSET, packedLightCoords + bufferSource, x, y, adjustColor(color), false, pose, Font.DisplayMode.POLYGON_OFFSET, packedLightCoords ); text.accept(stringRenderOutput2); stringRenderOutput2.finish(x); @@ -176,82 +176,86 @@ public class Font { float y, int color, boolean dropShadow, - Matrix4f matrix, - MultiBufferSource buffer, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, int backgroundColor, int packedLightCoords, - boolean bidirectional + boolean inverseDepth ) { color = adjustColor(color); - Matrix4f matrix4f = new Matrix4f(matrix); + Matrix4f matrix4f = new Matrix4f(pose); if (dropShadow) { - this.renderText(text, x, y, color, true, matrix, buffer, displayMode, backgroundColor, packedLightCoords, bidirectional); + this.renderText(text, x, y, color, true, pose, bufferSource, displayMode, backgroundColor, packedLightCoords, inverseDepth); matrix4f.translate(SHADOW_OFFSET); } - x = this.renderText(text, x, y, color, false, matrix4f, buffer, displayMode, backgroundColor, packedLightCoords, bidirectional); + x = this.renderText(text, x, y, color, false, matrix4f, bufferSource, displayMode, backgroundColor, packedLightCoords, inverseDepth); return (int)x + (dropShadow ? 1 : 0); } private int drawInternal( - FormattedCharSequence formattedCharSequence, - float f, - float g, - int i, - boolean bl, - Matrix4f matrix4f, - MultiBufferSource multiBufferSource, + FormattedCharSequence text, + float x, + float y, + int color, + boolean dropShadow, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, - int j, - int k, - boolean bl2 + int backgroundColor, + int packedLightCoords, + boolean inverseDepth ) { - i = adjustColor(i); - Matrix4f matrix4f2 = new Matrix4f(matrix4f); - if (bl) { - this.renderText(formattedCharSequence, f, g, i, true, matrix4f, multiBufferSource, displayMode, j, k, bl2); - matrix4f2.translate(SHADOW_OFFSET); + color = adjustColor(color); + Matrix4f matrix4f = new Matrix4f(pose); + if (dropShadow) { + this.renderText(text, x, y, color, true, pose, bufferSource, displayMode, backgroundColor, packedLightCoords, inverseDepth); + matrix4f.translate(SHADOW_OFFSET); } - f = this.renderText(formattedCharSequence, f, g, i, false, matrix4f2, multiBufferSource, displayMode, j, k, bl2); - return (int)f + (bl ? 1 : 0); + x = this.renderText(text, x, y, color, false, matrix4f, bufferSource, displayMode, backgroundColor, packedLightCoords, inverseDepth); + return (int)x + (dropShadow ? 1 : 0); } private float renderText( - String string, - float f, - float g, - int i, - boolean bl, - Matrix4f matrix4f, - MultiBufferSource multiBufferSource, + String text, + float x, + float y, + int color, + boolean dropShadow, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, - int j, - int k, - boolean bl2 + int backgroundColor, + int packedLightCoords, + boolean inverseDepth ) { - Font.StringRenderOutput stringRenderOutput = new Font.StringRenderOutput(multiBufferSource, f, g, i, j, bl, matrix4f, displayMode, k, bl2); - StringDecomposer.iterateFormatted(string, Style.EMPTY, stringRenderOutput); - return stringRenderOutput.finish(f); + Font.StringRenderOutput stringRenderOutput = new Font.StringRenderOutput( + bufferSource, x, y, color, backgroundColor, dropShadow, pose, displayMode, packedLightCoords, inverseDepth + ); + StringDecomposer.iterateFormatted(text, Style.EMPTY, stringRenderOutput); + return stringRenderOutput.finish(x); } private float renderText( - FormattedCharSequence formattedCharSequence, - float f, - float g, - int i, - boolean bl, - Matrix4f matrix4f, - MultiBufferSource multiBufferSource, + FormattedCharSequence text, + float x, + float y, + int color, + boolean dropShadow, + Matrix4f pose, + MultiBufferSource bufferSource, Font.DisplayMode displayMode, - int j, - int k, - boolean bl2 + int backgroundColor, + int packedLightCoords, + boolean inverseDepth ) { - Font.StringRenderOutput stringRenderOutput = new Font.StringRenderOutput(multiBufferSource, f, g, i, j, bl, matrix4f, displayMode, k, bl2); - formattedCharSequence.accept(stringRenderOutput); - return stringRenderOutput.finish(f); + Font.StringRenderOutput stringRenderOutput = new Font.StringRenderOutput( + bufferSource, x, y, color, backgroundColor, dropShadow, pose, displayMode, packedLightCoords, inverseDepth + ); + text.accept(stringRenderOutput); + return stringRenderOutput.finish(x); } /** @@ -353,28 +357,28 @@ public class Font { } public StringRenderOutput( - final MultiBufferSource multiBufferSource, - final float f, - final float g, - final int i, - final int j, - final boolean bl, - final Matrix4f matrix4f, + final MultiBufferSource buferSource, + final float x, + final float y, + final int color, + final int backgroundColor, + final boolean dropShadow, + final Matrix4f pose, final Font.DisplayMode displayMode, - final int k, - final boolean bl2 + final int packedLightCoords, + final boolean inverseDepth ) { - this.bufferSource = multiBufferSource; - this.x = f; - this.y = g; - this.dropShadow = bl; - this.dimFactor = bl ? 0.25F : 1.0F; - this.color = ARGB.scaleRGB(i, this.dimFactor); - this.backgroundColor = j; - this.pose = matrix4f; + this.bufferSource = buferSource; + this.x = x; + this.y = y; + this.dropShadow = dropShadow; + this.dimFactor = dropShadow ? 0.25F : 1.0F; + this.color = ARGB.scaleRGB(color, this.dimFactor); + this.backgroundColor = backgroundColor; + this.pose = pose; this.mode = displayMode; - this.packedLightCoords = k; - this.inverseDepth = bl2; + this.packedLightCoords = packedLightCoords; + this.inverseDepth = inverseDepth; } @Override @@ -406,10 +410,10 @@ public class Font { return true; } - float finish(float f) { + float finish(float x) { BakedGlyph bakedGlyph = null; if (this.backgroundColor != 0) { - BakedGlyph.Effect effect = new BakedGlyph.Effect(f - 1.0F, this.y + 9.0F, this.x, this.y - 1.0F, this.getUnderTextEffectDepth(), this.backgroundColor); + BakedGlyph.Effect effect = new BakedGlyph.Effect(x - 1.0F, this.y + 9.0F, this.x, this.y - 1.0F, this.getUnderTextEffectDepth(), this.backgroundColor); bakedGlyph = Font.this.getFontSet(Style.DEFAULT_FONT).whiteGlyph(); VertexConsumer vertexConsumer = this.bufferSource.getBuffer(bakedGlyph.renderType(this.mode)); bakedGlyph.renderEffect(effect, this.pose, vertexConsumer, this.packedLightCoords); diff --git a/net/minecraft/client/gui/Gui.java b/net/minecraft/client/gui/Gui.java index 87554588..1d797920 100644 --- a/net/minecraft/client/gui/Gui.java +++ b/net/minecraft/client/gui/Gui.java @@ -1012,54 +1012,54 @@ public class Gui { guiGraphics.blitSprite(RenderType::guiTextured, heartType.getSprite(hardcore, blinking, halfHeart), x, y, 9, 9); } - private void renderAirBubbles(GuiGraphics guiGraphics, Player player, int i, int j, int k) { - int l = player.getMaxAirSupply(); - int m = Math.clamp(player.getAirSupply(), 0, l); + private void renderAirBubbles(GuiGraphics guiGraphics, Player player, int vehicleMaxHealth, int y, int x) { + int i = player.getMaxAirSupply(); + int j = Math.clamp(player.getAirSupply(), 0, i); boolean bl = player.isEyeInFluid(FluidTags.WATER); - if (bl || m < l) { - j = this.getAirBubbleYLine(i, j); - int n = getCurrentAirSupplyBubble(m, l, -2); - int o = getCurrentAirSupplyBubble(m, l, 0); - int p = 10 - getCurrentAirSupplyBubble(m, l, getEmptyBubbleDelayDuration(m, bl)); - boolean bl2 = n != o; + if (bl || j < i) { + y = this.getAirBubbleYLine(vehicleMaxHealth, y); + int k = getCurrentAirSupplyBubble(j, i, -2); + int l = getCurrentAirSupplyBubble(j, i, 0); + int m = 10 - getCurrentAirSupplyBubble(j, i, getEmptyBubbleDelayDuration(j, bl)); + boolean bl2 = k != l; if (!bl) { this.lastBubblePopSoundPlayed = 0; } - for (int q = 1; q <= 10; q++) { - int r = k - (q - 1) * 8 - 9; - if (q <= n) { - guiGraphics.blitSprite(RenderType::guiTextured, AIR_SPRITE, r, j, 9, 9); - } else if (bl2 && q == o && bl) { - guiGraphics.blitSprite(RenderType::guiTextured, AIR_POPPING_SPRITE, r, j, 9, 9); - this.playAirBubblePoppedSound(q, player, p); - } else if (q > 10 - p) { - int s = p == 10 && this.tickCount % 2 == 0 ? this.random.nextInt(2) : 0; - guiGraphics.blitSprite(RenderType::guiTextured, AIR_EMPTY_SPRITE, r, j + s, 9, 9); + for (int n = 1; n <= 10; n++) { + int o = x - (n - 1) * 8 - 9; + if (n <= k) { + guiGraphics.blitSprite(RenderType::guiTextured, AIR_SPRITE, o, y, 9, 9); + } else if (bl2 && n == l && bl) { + guiGraphics.blitSprite(RenderType::guiTextured, AIR_POPPING_SPRITE, o, y, 9, 9); + this.playAirBubblePoppedSound(n, player, m); + } else if (n > 10 - m) { + int p = m == 10 && this.tickCount % 2 == 0 ? this.random.nextInt(2) : 0; + guiGraphics.blitSprite(RenderType::guiTextured, AIR_EMPTY_SPRITE, o, y + p, 9, 9); } } } } - private int getAirBubbleYLine(int i, int j) { - int k = this.getVisibleVehicleHeartRows(i) - 1; - return j - k * 10; + private int getAirBubbleYLine(int vehicleMaxHealth, int startX) { + int i = this.getVisibleVehicleHeartRows(vehicleMaxHealth) - 1; + return startX - i * 10; } - private static int getCurrentAirSupplyBubble(int i, int j, int k) { - return Mth.ceil((float)((i + k) * 10) / j); + private static int getCurrentAirSupplyBubble(int currentAirSupply, int maxAirSupply, int offset) { + return Mth.ceil((float)((currentAirSupply + offset) * 10) / maxAirSupply); } - private static int getEmptyBubbleDelayDuration(int i, boolean bl) { - return i != 0 && bl ? 4 : 0; + private static int getEmptyBubbleDelayDuration(int airSupply, boolean inWater) { + return airSupply != 0 && inWater ? 4 : 0; } - private void playAirBubblePoppedSound(int i, Player player, int j) { - if (this.lastBubblePopSoundPlayed != i) { - float f = 0.5F + 0.1F * Math.max(0, j - 3 + 1); - float g = 1.0F + 0.1F * Math.max(0, j - 5 + 1); + private void playAirBubblePoppedSound(int bubble, Player player, int pitch) { + if (this.lastBubblePopSoundPlayed != bubble) { + float f = 0.5F + 0.1F * Math.max(0, pitch - 3 + 1); + float g = 1.0F + 0.1F * Math.max(0, pitch - 5 + 1); player.playSound(SoundEvents.BUBBLE_POP, f, g); - this.lastBubblePopSoundPlayed = i; + this.lastBubblePopSoundPlayed = bubble; } } @@ -1255,18 +1255,18 @@ public class Gui { guiGraphics.blitSprite(RenderType::guiTexturedOverlay, textureAtlasSprite, 0, 0, guiGraphics.guiWidth(), guiGraphics.guiHeight(), i); } - private void renderConfusionOverlay(GuiGraphics guiGraphics, float f) { + private void renderConfusionOverlay(GuiGraphics guiGraphics, float intensity) { int i = guiGraphics.guiWidth(); int j = guiGraphics.guiHeight(); guiGraphics.pose().pushPose(); - float g = Mth.lerp(f, 2.0F, 1.0F); + float f = Mth.lerp(intensity, 2.0F, 1.0F); guiGraphics.pose().translate(i / 2.0F, j / 2.0F, 0.0F); - guiGraphics.pose().scale(g, g, g); + guiGraphics.pose().scale(f, f, f); guiGraphics.pose().translate(-i / 2.0F, -j / 2.0F, 0.0F); - float h = 0.2F * f; - float k = 0.4F * f; - float l = 0.2F * f; - guiGraphics.blit(resourceLocation -> RenderType.guiNauseaOverlay(), NAUSEA_LOCATION, 0, 0, 0.0F, 0.0F, i, j, i, j, ARGB.colorFromFloat(1.0F, h, k, l)); + float g = 0.2F * intensity; + float h = 0.4F * intensity; + float k = 0.2F * intensity; + guiGraphics.blit(resourceLocation -> RenderType.guiNauseaOverlay(), NAUSEA_LOCATION, 0, 0, 0.0F, 0.0F, i, j, i, j, ARGB.colorFromFloat(1.0F, g, h, k)); guiGraphics.pose().popPose(); } diff --git a/net/minecraft/client/gui/GuiGraphics.java b/net/minecraft/client/gui/GuiGraphics.java index c43f71fb..98112659 100644 --- a/net/minecraft/client/gui/GuiGraphics.java +++ b/net/minecraft/client/gui/GuiGraphics.java @@ -30,6 +30,7 @@ import net.minecraft.client.gui.screens.inventory.tooltip.TooltipRenderUtil; import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.metadata.gui.GuiSpriteScaling; @@ -61,18 +62,18 @@ public class GuiGraphics { private static final int EXTRA_SPACE_AFTER_FIRST_TOOLTIP_LINE = 2; private final Minecraft minecraft; private final PoseStack pose; - private final MultiBufferSource.BufferSource bufferSource; + private final BufferSource bufferSource; private final GuiGraphics.ScissorStack scissorStack = new GuiGraphics.ScissorStack(); private final GuiSpriteManager sprites; - private GuiGraphics(Minecraft minecraft, PoseStack pose, MultiBufferSource.BufferSource bufferSource) { + private GuiGraphics(Minecraft minecraft, PoseStack pose, BufferSource bufferSource) { this.minecraft = minecraft; this.pose = pose; this.bufferSource = bufferSource; this.sprites = minecraft.getGuiSprites(); } - public GuiGraphics(Minecraft minecraft, MultiBufferSource.BufferSource bufferSource) { + public GuiGraphics(Minecraft minecraft, BufferSource bufferSource) { this(minecraft, new PoseStack(), bufferSource); } @@ -538,309 +539,382 @@ public class GuiGraphics { this.fill(x + width - 1, y + 1, x + width, y + height - 1, color); } - public void blitSprite(Function function, ResourceLocation resourceLocation, int i, int j, int k, int l) { - this.blitSprite(function, resourceLocation, i, j, k, l, -1); + public void blitSprite(Function renderTypeGetter, ResourceLocation sprite, int x, int y, int width, int height) { + this.blitSprite(renderTypeGetter, sprite, x, y, width, height, -1); } - public void blitSprite(Function function, ResourceLocation resourceLocation, int i, int j, int k, int l, int m) { - TextureAtlasSprite textureAtlasSprite = this.sprites.getSprite(resourceLocation); + public void blitSprite(Function renderTypeGetter, ResourceLocation sprite, int x, int y, int width, int height, int blitOffset) { + TextureAtlasSprite textureAtlasSprite = this.sprites.getSprite(sprite); GuiSpriteScaling guiSpriteScaling = this.sprites.getSpriteScaling(textureAtlasSprite); if (guiSpriteScaling instanceof GuiSpriteScaling.Stretch) { - this.blitSprite(function, textureAtlasSprite, i, j, k, l, m); + this.blitSprite(renderTypeGetter, textureAtlasSprite, x, y, width, height, blitOffset); } else if (guiSpriteScaling instanceof GuiSpriteScaling.Tile tile) { - this.blitTiledSprite(function, textureAtlasSprite, i, j, k, l, 0, 0, tile.width(), tile.height(), tile.width(), tile.height(), m); + this.blitTiledSprite(renderTypeGetter, textureAtlasSprite, x, y, width, height, 0, 0, tile.width(), tile.height(), tile.width(), tile.height(), blitOffset); } else if (guiSpriteScaling instanceof GuiSpriteScaling.NineSlice nineSlice) { - this.blitNineSlicedSprite(function, textureAtlasSprite, nineSlice, i, j, k, l, m); + this.blitNineSlicedSprite(renderTypeGetter, textureAtlasSprite, nineSlice, x, y, width, height, blitOffset); } } public void blitSprite( - Function function, ResourceLocation resourceLocation, int i, int j, int k, int l, int m, int n, int o, int p + Function renderTypeGetter, + ResourceLocation sprite, + int textureWidth, + int textureHeight, + int uPosition, + int vPosition, + int x, + int y, + int uWidth, + int vHeight ) { - TextureAtlasSprite textureAtlasSprite = this.sprites.getSprite(resourceLocation); + TextureAtlasSprite textureAtlasSprite = this.sprites.getSprite(sprite); GuiSpriteScaling guiSpriteScaling = this.sprites.getSpriteScaling(textureAtlasSprite); if (guiSpriteScaling instanceof GuiSpriteScaling.Stretch) { - this.blitSprite(function, textureAtlasSprite, i, j, k, l, m, n, o, p, -1); + this.blitSprite(renderTypeGetter, textureAtlasSprite, textureWidth, textureHeight, uPosition, vPosition, x, y, uWidth, vHeight, -1); } else { - this.blitSprite(function, textureAtlasSprite, m, n, o, p); + this.blitSprite(renderTypeGetter, textureAtlasSprite, x, y, uWidth, vHeight); } } - public void blitSprite(Function function, TextureAtlasSprite textureAtlasSprite, int i, int j, int k, int l) { - this.blitSprite(function, textureAtlasSprite, i, j, k, l, -1); + public void blitSprite(Function renderTypeGetter, TextureAtlasSprite sprite, int x, int y, int width, int height) { + this.blitSprite(renderTypeGetter, sprite, x, y, width, height, -1); } - public void blitSprite(Function function, TextureAtlasSprite textureAtlasSprite, int i, int j, int k, int l, int m) { - if (k != 0 && l != 0) { + public void blitSprite(Function renderTypeGetter, TextureAtlasSprite sprite, int x, int y, int width, int height, int blitOffset) { + if (width != 0 && height != 0) { this.innerBlit( - function, - textureAtlasSprite.atlasLocation(), - i, - i + k, - j, - j + l, - textureAtlasSprite.getU0(), - textureAtlasSprite.getU1(), - textureAtlasSprite.getV0(), - textureAtlasSprite.getV1(), - m + renderTypeGetter, sprite.atlasLocation(), x, x + width, y, y + height, sprite.getU0(), sprite.getU1(), sprite.getV0(), sprite.getV1(), blitOffset ); } } private void blitSprite( - Function function, TextureAtlasSprite textureAtlasSprite, int i, int j, int k, int l, int m, int n, int o, int p, int q + Function renderTypeGetter, + TextureAtlasSprite sprite, + int textureWidth, + int textureHeight, + int uPosition, + int vPosition, + int x, + int y, + int uWidth, + int vHeight, + int blitOffset ) { - if (o != 0 && p != 0) { + if (uWidth != 0 && vHeight != 0) { this.innerBlit( - function, - textureAtlasSprite.atlasLocation(), - m, - m + o, - n, - n + p, - textureAtlasSprite.getU((float)k / i), - textureAtlasSprite.getU((float)(k + o) / i), - textureAtlasSprite.getV((float)l / j), - textureAtlasSprite.getV((float)(l + p) / j), - q + renderTypeGetter, + sprite.atlasLocation(), + x, + x + uWidth, + y, + y + vHeight, + sprite.getU((float)uPosition / textureWidth), + sprite.getU((float)(uPosition + uWidth) / textureWidth), + sprite.getV((float)vPosition / textureHeight), + sprite.getV((float)(vPosition + vHeight) / textureHeight), + blitOffset ); } } private void blitNineSlicedSprite( - Function function, - TextureAtlasSprite textureAtlasSprite, + Function renderTypeGetter, + TextureAtlasSprite sprite, GuiSpriteScaling.NineSlice nineSlice, - int i, - int j, - int k, - int l, - int m + int x, + int y, + int blitOffset, + int width, + int height ) { Border border = nineSlice.border(); - int n = Math.min(border.left(), k / 2); - int o = Math.min(border.right(), k / 2); - int p = Math.min(border.top(), l / 2); - int q = Math.min(border.bottom(), l / 2); - if (k == nineSlice.width() && l == nineSlice.height()) { - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), 0, 0, i, j, k, l, m); - } else if (l == nineSlice.height()) { - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), 0, 0, i, j, n, l, m); + int i = Math.min(border.left(), blitOffset / 2); + int j = Math.min(border.right(), blitOffset / 2); + int k = Math.min(border.top(), width / 2); + int l = Math.min(border.bottom(), width / 2); + if (blitOffset == nineSlice.width() && width == nineSlice.height()) { + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), 0, 0, x, y, blitOffset, width, height); + } else if (width == nineSlice.height()) { + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), 0, 0, x, y, i, width, height); this.blitNineSliceInnerSegment( - function, + renderTypeGetter, nineSlice, - textureAtlasSprite, - i + n, - j, - k - o - n, - l, - n, - 0, - nineSlice.width() - o - n, - nineSlice.height(), - nineSlice.width(), - nineSlice.height(), - m - ); - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), nineSlice.width() - o, 0, i + k - o, j, o, l, m); - } else if (k == nineSlice.width()) { - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), 0, 0, i, j, k, p, m); - this.blitNineSliceInnerSegment( - function, - nineSlice, - textureAtlasSprite, + sprite, + x + i, + y, + blitOffset - j - i, + width, i, - j + p, - k, - l - q - p, 0, - p, - nineSlice.width(), - nineSlice.height() - q - p, + nineSlice.width() - j - i, + nineSlice.height(), nineSlice.width(), nineSlice.height(), - m + height ); - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), 0, nineSlice.height() - q, i, j + l - q, k, q, m); - } else { - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), 0, 0, i, j, n, p, m); + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), nineSlice.width() - j, 0, x + blitOffset - j, y, j, width, height); + } else if (blitOffset == nineSlice.width()) { + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), 0, 0, x, y, blitOffset, k, height); this.blitNineSliceInnerSegment( - function, nineSlice, textureAtlasSprite, i + n, j, k - o - n, p, n, 0, nineSlice.width() - o - n, p, nineSlice.width(), nineSlice.height(), m - ); - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), nineSlice.width() - o, 0, i + k - o, j, o, p, m); - this.blitSprite(function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), 0, nineSlice.height() - q, i, j + l - q, n, q, m); - this.blitNineSliceInnerSegment( - function, + renderTypeGetter, nineSlice, - textureAtlasSprite, - i + n, - j + l - q, - k - o - n, - q, - n, - nineSlice.height() - q, - nineSlice.width() - o - n, - q, + sprite, + x, + y + k, + blitOffset, + width - l - k, + 0, + k, + nineSlice.width(), + nineSlice.height() - l - k, nineSlice.width(), nineSlice.height(), - m + height + ); + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), 0, nineSlice.height() - l, x, y + width - l, blitOffset, l, height); + } else { + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), 0, 0, x, y, i, k, height); + this.blitNineSliceInnerSegment( + renderTypeGetter, nineSlice, sprite, x + i, y, blitOffset - j - i, k, i, 0, nineSlice.width() - j - i, k, nineSlice.width(), nineSlice.height(), height + ); + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), nineSlice.width() - j, 0, x + blitOffset - j, y, j, k, height); + this.blitSprite(renderTypeGetter, sprite, nineSlice.width(), nineSlice.height(), 0, nineSlice.height() - l, x, y + width - l, i, l, height); + this.blitNineSliceInnerSegment( + renderTypeGetter, + nineSlice, + sprite, + x + i, + y + width - l, + blitOffset - j - i, + l, + i, + nineSlice.height() - l, + nineSlice.width() - j - i, + l, + nineSlice.width(), + nineSlice.height(), + height ); this.blitSprite( - function, textureAtlasSprite, nineSlice.width(), nineSlice.height(), nineSlice.width() - o, nineSlice.height() - q, i + k - o, j + l - q, o, q, m - ); - this.blitNineSliceInnerSegment( - function, nineSlice, textureAtlasSprite, i, j + p, n, l - q - p, 0, p, n, nineSlice.height() - q - p, nineSlice.width(), nineSlice.height(), m - ); - this.blitNineSliceInnerSegment( - function, - nineSlice, - textureAtlasSprite, - i + n, - j + p, - k - o - n, - l - q - p, - n, - p, - nineSlice.width() - o - n, - nineSlice.height() - q - p, + renderTypeGetter, + sprite, nineSlice.width(), nineSlice.height(), - m + nineSlice.width() - j, + nineSlice.height() - l, + x + blitOffset - j, + y + width - l, + j, + l, + height ); this.blitNineSliceInnerSegment( - function, + renderTypeGetter, nineSlice, sprite, x, y + k, i, width - l - k, 0, k, i, nineSlice.height() - l - k, nineSlice.width(), nineSlice.height(), height + ); + this.blitNineSliceInnerSegment( + renderTypeGetter, nineSlice, - textureAtlasSprite, - i + k - o, - j + p, - n, - l - q - p, - nineSlice.width() - o, - p, - o, - nineSlice.height() - q - p, + sprite, + x + i, + y + k, + blitOffset - j - i, + width - l - k, + i, + k, + nineSlice.width() - j - i, + nineSlice.height() - l - k, nineSlice.width(), nineSlice.height(), - m + height + ); + this.blitNineSliceInnerSegment( + renderTypeGetter, + nineSlice, + sprite, + x + blitOffset - j, + y + k, + i, + width - l - k, + nineSlice.width() - j, + k, + j, + nineSlice.height() - l - k, + nineSlice.width(), + nineSlice.height(), + height ); } } private void blitNineSliceInnerSegment( - Function function, + Function renderTypeGetter, GuiSpriteScaling.NineSlice nineSlice, - TextureAtlasSprite textureAtlasSprite, - int i, - int j, - int k, - int l, - int m, - int n, - int o, - int p, - int q, - int r, - int s + TextureAtlasSprite sprite, + int x, + int y, + int width, + int height, + int uPosition, + int vPosition, + int spriteWidth, + int spriteHeight, + int nineSliceWidth, + int nineSliceHeight, + int blitOffset ) { - if (k > 0 && l > 0) { + if (width > 0 && height > 0) { if (nineSlice.stretchInner()) { this.innerBlit( - function, - textureAtlasSprite.atlasLocation(), - i, - i + k, - j, - j + l, - textureAtlasSprite.getU((float)m / q), - textureAtlasSprite.getU((float)(m + o) / q), - textureAtlasSprite.getV((float)n / r), - textureAtlasSprite.getV((float)(n + p) / r), - s + renderTypeGetter, + sprite.atlasLocation(), + x, + x + width, + y, + y + height, + sprite.getU((float)uPosition / nineSliceWidth), + sprite.getU((float)(uPosition + spriteWidth) / nineSliceWidth), + sprite.getV((float)vPosition / nineSliceHeight), + sprite.getV((float)(vPosition + spriteHeight) / nineSliceHeight), + blitOffset ); } else { - this.blitTiledSprite(function, textureAtlasSprite, i, j, k, l, m, n, o, p, q, r, s); + this.blitTiledSprite( + renderTypeGetter, sprite, x, y, width, height, uPosition, vPosition, spriteWidth, spriteHeight, nineSliceWidth, nineSliceHeight, blitOffset + ); } } } private void blitTiledSprite( - Function function, - TextureAtlasSprite textureAtlasSprite, - int i, - int j, - int k, - int l, - int m, - int n, - int o, - int p, - int q, - int r, - int s + Function renderTypeGetter, + TextureAtlasSprite sprite, + int x, + int y, + int width, + int height, + int uPosition, + int vPosition, + int spriteWidth, + int spriteHeight, + int nineSliceWidth, + int nineSliceHeight, + int blitOffset ) { - if (k > 0 && l > 0) { - if (o > 0 && p > 0) { - for (int t = 0; t < k; t += o) { - int u = Math.min(o, k - t); + if (width > 0 && height > 0) { + if (spriteWidth > 0 && spriteHeight > 0) { + for (int i = 0; i < width; i += spriteWidth) { + int j = Math.min(spriteWidth, width - i); - for (int v = 0; v < l; v += p) { - int w = Math.min(p, l - v); - this.blitSprite(function, textureAtlasSprite, q, r, m, n, i + t, j + v, u, w, s); + for (int k = 0; k < height; k += spriteHeight) { + int l = Math.min(spriteHeight, height - k); + this.blitSprite(renderTypeGetter, sprite, nineSliceWidth, nineSliceHeight, uPosition, vPosition, x + i, y + k, j, l, blitOffset); } } } else { - throw new IllegalArgumentException("Tiled sprite texture size must be positive, got " + o + "x" + p); + throw new IllegalArgumentException("Tiled sprite texture size must be positive, got " + spriteWidth + "x" + spriteHeight); } } } public void blit( - Function function, ResourceLocation resourceLocation, int i, int j, float f, float g, int k, int l, int m, int n, int o + Function renderTypeGetter, + ResourceLocation atlasLocation, + int x, + int y, + float uOffset, + float vOffset, + int uWidth, + int vHeight, + int textureWidth, + int textureHeight, + int color ) { - this.blit(function, resourceLocation, i, j, f, g, k, l, k, l, m, n, o); + this.blit(renderTypeGetter, atlasLocation, x, y, uOffset, vOffset, uWidth, vHeight, uWidth, vHeight, textureWidth, textureHeight, color); } public void blit( - Function function, ResourceLocation resourceLocation, int i, int j, float f, float g, int k, int l, int m, int n + Function renderTypeGetter, + ResourceLocation atlasLocation, + int x, + int y, + float uOffset, + float vOffset, + int uWidth, + int vHeight, + int textureWidth, + int textureHeight ) { - this.blit(function, resourceLocation, i, j, f, g, k, l, k, l, m, n); + this.blit(renderTypeGetter, atlasLocation, x, y, uOffset, vOffset, uWidth, vHeight, uWidth, vHeight, textureWidth, textureHeight); } public void blit( - Function function, ResourceLocation resourceLocation, int i, int j, float f, float g, int k, int l, int m, int n, int o, int p + Function renderTypeGetter, + ResourceLocation atlasLocation, + int x, + int y, + float uOffset, + float vOffset, + int uWidth, + int vHeight, + int width, + int height, + int textureWidth, + int textureHeight ) { - this.blit(function, resourceLocation, i, j, f, g, k, l, m, n, o, p, -1); + this.blit(renderTypeGetter, atlasLocation, x, y, uOffset, vOffset, uWidth, vHeight, width, height, textureWidth, textureHeight, -1); } public void blit( - Function function, - ResourceLocation resourceLocation, - int i, - int j, - float f, - float g, - int k, - int l, - int m, - int n, - int o, - int p, - int q + Function renderTypeGetter, + ResourceLocation atlasLocation, + int x, + int y, + float uOffset, + float vOffset, + int uWidth, + int vHeight, + int width, + int height, + int textureWidth, + int textureHeight, + int color ) { - this.innerBlit(function, resourceLocation, i, i + k, j, j + l, (f + 0.0F) / o, (f + m) / o, (g + 0.0F) / p, (g + n) / p, q); + this.innerBlit( + renderTypeGetter, + atlasLocation, + x, + x + uWidth, + y, + y + vHeight, + (uOffset + 0.0F) / textureWidth, + (uOffset + width) / textureWidth, + (vOffset + 0.0F) / textureHeight, + (vOffset + height) / textureHeight, + color + ); } private void innerBlit( - Function function, ResourceLocation resourceLocation, int i, int j, int k, int l, float f, float g, float h, float m, int n + Function renderTypeGetter, + ResourceLocation atlasLocation, + int x1, + int x2, + int y1, + int y2, + float minU, + float maxU, + float minV, + float maxV, + int color ) { - RenderType renderType = (RenderType)function.apply(resourceLocation); + RenderType renderType = (RenderType)renderTypeGetter.apply(atlasLocation); Matrix4f matrix4f = this.pose.last().pose(); VertexConsumer vertexConsumer = this.bufferSource.getBuffer(renderType); - vertexConsumer.addVertex(matrix4f, (float)i, (float)k, 0.0F).setUv(f, h).setColor(n); - vertexConsumer.addVertex(matrix4f, (float)i, (float)l, 0.0F).setUv(f, m).setColor(n); - vertexConsumer.addVertex(matrix4f, (float)j, (float)l, 0.0F).setUv(g, m).setColor(n); - vertexConsumer.addVertex(matrix4f, (float)j, (float)k, 0.0F).setUv(g, h).setColor(n); + vertexConsumer.addVertex(matrix4f, (float)x1, (float)y1, 0.0F).setUv(minU, minV).setColor(color); + vertexConsumer.addVertex(matrix4f, (float)x1, (float)y2, 0.0F).setUv(minU, maxV).setColor(color); + vertexConsumer.addVertex(matrix4f, (float)x2, (float)y2, 0.0F).setUv(maxU, maxV).setColor(color); + vertexConsumer.addVertex(matrix4f, (float)x2, (float)y1, 0.0F).setUv(maxU, minV).setColor(color); } /** @@ -1031,13 +1105,15 @@ public class GuiGraphics { this.renderTooltip(font, tooltipLines, visualTooltipComponent, mouseX, mouseY, null); } - public void renderTooltip(Font font, List list, Optional optional, int i, int j, @Nullable ResourceLocation resourceLocation) { - List list2 = (List)list.stream() + public void renderTooltip( + Font font, List tooltipLines, Optional visualTooltipComponent, int mouseX, int mouseY, @Nullable ResourceLocation sprite + ) { + List list = (List)tooltipLines.stream() .map(Component::getVisualOrderText) .map(ClientTooltipComponent::create) .collect(Util.toMutableList()); - optional.ifPresent(tooltipComponent -> list2.add(list2.isEmpty() ? 0 : 1, ClientTooltipComponent.create(tooltipComponent))); - this.renderTooltipInternal(font, list2, i, j, DefaultTooltipPositioner.INSTANCE, resourceLocation); + visualTooltipComponent.ifPresent(tooltipComponent -> list.add(list.isEmpty() ? 0 : 1, ClientTooltipComponent.create(tooltipComponent))); + this.renderTooltipInternal(font, list, mouseX, mouseY, DefaultTooltipPositioner.INSTANCE, sprite); } /** @@ -1052,8 +1128,8 @@ public class GuiGraphics { this.renderTooltip(font, text, mouseX, mouseY, null); } - public void renderTooltip(Font font, Component component, int i, int j, @Nullable ResourceLocation resourceLocation) { - this.renderTooltip(font, List.of(component.getVisualOrderText()), i, j, resourceLocation); + public void renderTooltip(Font font, Component text, int mouseX, int mouseY, @Nullable ResourceLocation sprite) { + this.renderTooltip(font, List.of(text.getVisualOrderText()), mouseX, mouseY, sprite); } /** @@ -1068,14 +1144,14 @@ public class GuiGraphics { this.renderComponentTooltip(font, tooltipLines, mouseX, mouseY, null); } - public void renderComponentTooltip(Font font, List list, int i, int j, @Nullable ResourceLocation resourceLocation) { + public void renderComponentTooltip(Font font, List tooltipLines, int mouseX, int mouseY, @Nullable ResourceLocation sprite) { this.renderTooltipInternal( font, - list.stream().map(Component::getVisualOrderText).map(ClientTooltipComponent::create).toList(), - i, - j, + tooltipLines.stream().map(Component::getVisualOrderText).map(ClientTooltipComponent::create).toList(), + mouseX, + mouseY, DefaultTooltipPositioner.INSTANCE, - resourceLocation + sprite ); } @@ -1091,14 +1167,14 @@ public class GuiGraphics { this.renderTooltip(font, tooltipLines, mouseX, mouseY, null); } - public void renderTooltip(Font font, List list, int i, int j, @Nullable ResourceLocation resourceLocation) { + public void renderTooltip(Font font, List tooltipLines, int mouseX, int mouseY, @Nullable ResourceLocation sprite) { this.renderTooltipInternal( font, - (List)list.stream().map(ClientTooltipComponent::create).collect(Collectors.toList()), - i, - j, + (List)tooltipLines.stream().map(ClientTooltipComponent::create).collect(Collectors.toList()), + mouseX, + mouseY, DefaultTooltipPositioner.INSTANCE, - resourceLocation + sprite ); } @@ -1123,78 +1199,78 @@ public class GuiGraphics { } private void renderTooltipInternal( - Font font, List list, int i, int j, ClientTooltipPositioner clientTooltipPositioner, @Nullable ResourceLocation resourceLocation + Font font, List tooltipLines, int mouseX, int mouseY, ClientTooltipPositioner tooltipPositioner, @Nullable ResourceLocation sprite ) { - if (!list.isEmpty()) { - int k = 0; - int l = list.size() == 1 ? -2 : 0; + if (!tooltipLines.isEmpty()) { + int i = 0; + int j = tooltipLines.size() == 1 ? -2 : 0; - for (ClientTooltipComponent clientTooltipComponent : list) { - int m = clientTooltipComponent.getWidth(font); - if (m > k) { - k = m; + for (ClientTooltipComponent clientTooltipComponent : tooltipLines) { + int k = clientTooltipComponent.getWidth(font); + if (k > i) { + i = k; } - l += clientTooltipComponent.getHeight(font); + j += clientTooltipComponent.getHeight(font); } - int n = k; - int o = l; - Vector2ic vector2ic = clientTooltipPositioner.positionTooltip(this.guiWidth(), this.guiHeight(), i, j, k, l); - int p = vector2ic.x(); - int q = vector2ic.y(); + int l = i; + int m = j; + Vector2ic vector2ic = tooltipPositioner.positionTooltip(this.guiWidth(), this.guiHeight(), mouseX, mouseY, i, j); + int n = vector2ic.x(); + int o = vector2ic.y(); this.pose.pushPose(); - int r = 400; - TooltipRenderUtil.renderTooltipBackground(this, p, q, k, l, 400, resourceLocation); + int p = 400; + TooltipRenderUtil.renderTooltipBackground(this, n, o, i, j, 400, sprite); this.pose.translate(0.0F, 0.0F, 400.0F); - int s = q; + int q = o; - for (int t = 0; t < list.size(); t++) { - ClientTooltipComponent clientTooltipComponent2 = (ClientTooltipComponent)list.get(t); - clientTooltipComponent2.renderText(font, p, s, this.pose.last().pose(), this.bufferSource); - s += clientTooltipComponent2.getHeight(font) + (t == 0 ? 2 : 0); + for (int r = 0; r < tooltipLines.size(); r++) { + ClientTooltipComponent clientTooltipComponent2 = (ClientTooltipComponent)tooltipLines.get(r); + clientTooltipComponent2.renderText(font, n, q, this.pose.last().pose(), this.bufferSource); + q += clientTooltipComponent2.getHeight(font) + (r == 0 ? 2 : 0); } - s = q; + q = o; - for (int t = 0; t < list.size(); t++) { - ClientTooltipComponent clientTooltipComponent2 = (ClientTooltipComponent)list.get(t); - clientTooltipComponent2.renderImage(font, p, s, n, o, this); - s += clientTooltipComponent2.getHeight(font) + (t == 0 ? 2 : 0); + for (int r = 0; r < tooltipLines.size(); r++) { + ClientTooltipComponent clientTooltipComponent2 = (ClientTooltipComponent)tooltipLines.get(r); + clientTooltipComponent2.renderImage(font, n, q, l, m, this); + q += clientTooltipComponent2.getHeight(font) + (r == 0 ? 2 : 0); } this.pose.popPose(); } } - private void renderItemBar(ItemStack itemStack, int i, int j) { - if (itemStack.isBarVisible()) { - int k = i + 2; - int l = j + 13; - this.fill(RenderType.gui(), k, l, k + 13, l + 2, 200, -16777216); - this.fill(RenderType.gui(), k, l, k + itemStack.getBarWidth(), l + 1, 200, ARGB.opaque(itemStack.getBarColor())); + private void renderItemBar(ItemStack stack, int x, int y) { + if (stack.isBarVisible()) { + int i = x + 2; + int j = y + 13; + this.fill(RenderType.gui(), i, j, i + 13, j + 2, 200, -16777216); + this.fill(RenderType.gui(), i, j, i + stack.getBarWidth(), j + 1, 200, ARGB.opaque(stack.getBarColor())); } } - private void renderItemCount(Font font, ItemStack itemStack, int i, int j, @Nullable String string) { - if (itemStack.getCount() != 1 || string != null) { - String string2 = string == null ? String.valueOf(itemStack.getCount()) : string; + private void renderItemCount(Font font, ItemStack stack, int x, int y, @Nullable String text) { + if (stack.getCount() != 1 || text != null) { + String string = text == null ? String.valueOf(stack.getCount()) : text; this.pose.pushPose(); this.pose.translate(0.0F, 0.0F, 200.0F); - this.drawString(font, string2, i + 19 - 2 - font.width(string2), j + 6 + 3, -1, true); + this.drawString(font, string, x + 19 - 2 - font.width(string), y + 6 + 3, -1, true); this.pose.popPose(); } } - private void renderItemCooldown(ItemStack itemStack, int i, int j) { + private void renderItemCooldown(ItemStack stack, int x, int y) { LocalPlayer localPlayer = this.minecraft.player; float f = localPlayer == null ? 0.0F - : localPlayer.getCooldowns().getCooldownPercent(itemStack, this.minecraft.getDeltaTracker().getGameTimeDeltaPartialTick(true)); + : localPlayer.getCooldowns().getCooldownPercent(stack, this.minecraft.getDeltaTracker().getGameTimeDeltaPartialTick(true)); if (f > 0.0F) { - int k = j + Mth.floor(16.0F * (1.0F - f)); - int l = k + Mth.ceil(16.0F * f); - this.fill(RenderType.gui(), i, k, i + 16, l, 200, Integer.MAX_VALUE); + int i = y + Mth.floor(16.0F * (1.0F - f)); + int j = i + Mth.ceil(16.0F * f); + this.fill(RenderType.gui(), x, i, x + 16, j, 200, Integer.MAX_VALUE); } } @@ -1228,8 +1304,8 @@ public class GuiGraphics { } } - public void drawSpecial(Consumer consumer) { - consumer.accept(this.bufferSource); + public void drawSpecial(Consumer drawer) { + drawer.accept(this.bufferSource); this.bufferSource.endBatch(); } diff --git a/net/minecraft/client/gui/ItemSlotMouseAction.java b/net/minecraft/client/gui/ItemSlotMouseAction.java index 822e17d8..995eef94 100644 --- a/net/minecraft/client/gui/ItemSlotMouseAction.java +++ b/net/minecraft/client/gui/ItemSlotMouseAction.java @@ -10,7 +10,7 @@ import net.minecraft.world.item.ItemStack; public interface ItemSlotMouseAction { boolean matches(Slot slot); - boolean onMouseScrolled(double d, double e, int i, ItemStack itemStack); + boolean onMouseScrolled(double xOffset, double yOffset, int hoveredSlotIndex, ItemStack hoveredSlotItem); void onStopHovering(Slot slot); diff --git a/net/minecraft/client/gui/components/AbstractSelectionList.java b/net/minecraft/client/gui/components/AbstractSelectionList.java index 9dc80c06..7449e9aa 100644 --- a/net/minecraft/client/gui/components/AbstractSelectionList.java +++ b/net/minecraft/client/gui/components/AbstractSelectionList.java @@ -64,11 +64,11 @@ public abstract class AbstractSelectionList list = this.narratables(); - Screen.NarratableSearchResult narratableSearchResult = Screen.findNarratableWidget(list, this.lastNarratable); + NarratableSearchResult narratableSearchResult = Screen.findNarratableWidget(list, this.lastNarratable); if (narratableSearchResult != null) { if (narratableSearchResult.priority.isTerminal()) { this.lastNarratable = narratableSearchResult.entry; diff --git a/net/minecraft/client/gui/components/PlayerFaceRenderer.java b/net/minecraft/client/gui/components/PlayerFaceRenderer.java index b034fc3c..2cd97c2c 100644 --- a/net/minecraft/client/gui/components/PlayerFaceRenderer.java +++ b/net/minecraft/client/gui/components/PlayerFaceRenderer.java @@ -24,22 +24,22 @@ public class PlayerFaceRenderer { draw(guiGraphics, skin, x, y, size, -1); } - public static void draw(GuiGraphics guiGraphics, PlayerSkin playerSkin, int i, int j, int k, int l) { - draw(guiGraphics, playerSkin.texture(), i, j, k, true, false, l); + public static void draw(GuiGraphics guiGraphics, PlayerSkin skin, int x, int y, int size, int color) { + draw(guiGraphics, skin.texture(), x, y, size, true, false, color); } - public static void draw(GuiGraphics guiGraphics, ResourceLocation resourceLocation, int i, int j, int k, boolean bl, boolean bl2, int l) { - int m = 8 + (bl2 ? 8 : 0); - int n = 8 * (bl2 ? -1 : 1); - guiGraphics.blit(RenderType::guiTextured, resourceLocation, i, j, 8.0F, m, k, k, 8, n, 64, 64, l); - if (bl) { - drawHat(guiGraphics, resourceLocation, i, j, k, bl2, l); + public static void draw(GuiGraphics guiGraphics, ResourceLocation skinTexture, int x, int y, int size, boolean drawHat, boolean upsideDown, int color) { + int i = 8 + (upsideDown ? 8 : 0); + int j = 8 * (upsideDown ? -1 : 1); + guiGraphics.blit(RenderType::guiTextured, skinTexture, x, y, 8.0F, i, size, size, 8, j, 64, 64, color); + if (drawHat) { + drawHat(guiGraphics, skinTexture, x, y, size, upsideDown, color); } } - private static void drawHat(GuiGraphics guiGraphics, ResourceLocation resourceLocation, int i, int j, int k, boolean bl, int l) { - int m = 8 + (bl ? 8 : 0); - int n = 8 * (bl ? -1 : 1); - guiGraphics.blit(RenderType::guiTextured, resourceLocation, i, j, 40.0F, m, k, k, 8, n, 64, 64, l); + private static void drawHat(GuiGraphics guiGraphics, ResourceLocation skinTexture, int x, int y, int size, boolean upsideDown, int color) { + int i = 8 + (upsideDown ? 8 : 0); + int j = 8 * (upsideDown ? -1 : 1); + guiGraphics.blit(RenderType::guiTextured, skinTexture, x, y, 40.0F, i, size, size, 8, j, 64, 64, color); } } diff --git a/net/minecraft/client/gui/components/debugchart/ProfilerPieChart.java b/net/minecraft/client/gui/components/debugchart/ProfilerPieChart.java index 10a487dc..6efa2d70 100644 --- a/net/minecraft/client/gui/components/debugchart/ProfilerPieChart.java +++ b/net/minecraft/client/gui/components/debugchart/ProfilerPieChart.java @@ -32,12 +32,12 @@ public class ProfilerPieChart { this.font = font; } - public void setPieChartResults(@Nullable ProfileResults profileResults) { - this.profilerPieChartResults = profileResults; + public void setPieChartResults(@Nullable ProfileResults pieChartResults) { + this.profilerPieChartResults = pieChartResults; } - public void setBottomOffset(int i) { - this.bottomOffset = i; + public void setBottomOffset(int bottomOffset) { + this.bottomOffset = bottomOffset; } public void render(GuiGraphics guiGraphics) { @@ -131,26 +131,26 @@ public class ProfilerPieChart { } } - public void profilerPieChartKeyPress(int i) { + public void profilerPieChartKeyPress(int index) { if (this.profilerPieChartResults != null) { List list = this.profilerPieChartResults.getTimes(this.profilerTreePath); if (!list.isEmpty()) { ResultField resultField = (ResultField)list.remove(0); - if (i == 0) { + if (index == 0) { if (!resultField.name.isEmpty()) { - int j = this.profilerTreePath.lastIndexOf(30); - if (j >= 0) { - this.profilerTreePath = this.profilerTreePath.substring(0, j); + int i = this.profilerTreePath.lastIndexOf(30); + if (i >= 0) { + this.profilerTreePath = this.profilerTreePath.substring(0, i); } } } else { - i--; - if (i < list.size() && !"unspecified".equals(((ResultField)list.get(i)).name)) { + index--; + if (index < list.size() && !"unspecified".equals(((ResultField)list.get(index)).name)) { if (!this.profilerTreePath.isEmpty()) { this.profilerTreePath = this.profilerTreePath + "\u001e"; } - this.profilerTreePath = this.profilerTreePath + ((ResultField)list.get(i)).name; + this.profilerTreePath = this.profilerTreePath + ((ResultField)list.get(index)).name; } } } diff --git a/net/minecraft/client/gui/components/toasts/AdvancementToast.java b/net/minecraft/client/gui/components/toasts/AdvancementToast.java index f8b2ffd3..0d82d302 100644 --- a/net/minecraft/client/gui/components/toasts/AdvancementToast.java +++ b/net/minecraft/client/gui/components/toasts/AdvancementToast.java @@ -33,24 +33,24 @@ public class AdvancementToast implements Toast { } @Override - public void update(ToastManager toastManager, long l) { + public void update(ToastManager toastManager, long visibilityTime) { DisplayInfo displayInfo = (DisplayInfo)this.advancement.value().display().orElse(null); if (displayInfo == null) { this.wantedVisibility = Toast.Visibility.HIDE; } else { - if (!this.playedSound && l > 0L) { + if (!this.playedSound && visibilityTime > 0L) { this.playedSound = true; if (displayInfo.getType() == AdvancementType.CHALLENGE) { toastManager.getMinecraft().getSoundManager().play(SimpleSoundInstance.forUI(SoundEvents.UI_TOAST_CHALLENGE_COMPLETE, 1.0F, 1.0F)); } } - this.wantedVisibility = l >= 5000.0 * toastManager.getNotificationDisplayTimeMultiplier() ? Toast.Visibility.HIDE : Toast.Visibility.SHOW; + this.wantedVisibility = visibilityTime >= 5000.0 * toastManager.getNotificationDisplayTimeMultiplier() ? Toast.Visibility.HIDE : Toast.Visibility.SHOW; } } @Override - public void render(GuiGraphics guiGraphics, Font font, long l) { + public void render(GuiGraphics guiGraphics, Font font, long visibilityTime) { DisplayInfo displayInfo = (DisplayInfo)this.advancement.value().display().orElse(null); guiGraphics.blitSprite(RenderType::guiTextured, BACKGROUND_SPRITE, 0, 0, this.width(), this.height()); if (displayInfo != null) { @@ -62,16 +62,16 @@ public class AdvancementToast implements Toast { } else { int j = 1500; float f = 300.0F; - if (l < 1500L) { - int k = Mth.floor(Mth.clamp((float)(1500L - l) / 300.0F, 0.0F, 1.0F) * 255.0F) << 24 | 67108864; + if (visibilityTime < 1500L) { + int k = Mth.floor(Mth.clamp((float)(1500L - visibilityTime) / 300.0F, 0.0F, 1.0F) * 255.0F) << 24 | 67108864; guiGraphics.drawString(font, displayInfo.getType().getDisplayName(), 30, 11, i | k, false); } else { - int k = Mth.floor(Mth.clamp((float)(l - 1500L) / 300.0F, 0.0F, 1.0F) * 252.0F) << 24 | 67108864; - int m = this.height() / 2 - list.size() * 9 / 2; + int k = Mth.floor(Mth.clamp((float)(visibilityTime - 1500L) / 300.0F, 0.0F, 1.0F) * 252.0F) << 24 | 67108864; + int l = this.height() / 2 - list.size() * 9 / 2; for (FormattedCharSequence formattedCharSequence : list) { - guiGraphics.drawString(font, formattedCharSequence, 30, m, 16777215 | k, false); - m += 9; + guiGraphics.drawString(font, formattedCharSequence, 30, l, 16777215 | k, false); + l += 9; } } } diff --git a/net/minecraft/client/gui/components/toasts/RecipeToast.java b/net/minecraft/client/gui/components/toasts/RecipeToast.java index 3ea5f8d7..c8acddd4 100644 --- a/net/minecraft/client/gui/components/toasts/RecipeToast.java +++ b/net/minecraft/client/gui/components/toasts/RecipeToast.java @@ -35,25 +35,27 @@ public class RecipeToast implements Toast { } @Override - public void update(ToastManager toastManager, long l) { + public void update(ToastManager toastManager, long visibilityTime) { if (this.changed) { - this.lastChanged = l; + this.lastChanged = visibilityTime; this.changed = false; } if (this.recipeItems.isEmpty()) { this.wantedVisibility = Toast.Visibility.HIDE; } else { - this.wantedVisibility = l - this.lastChanged >= 5000.0 * toastManager.getNotificationDisplayTimeMultiplier() ? Toast.Visibility.HIDE : Toast.Visibility.SHOW; + this.wantedVisibility = visibilityTime - this.lastChanged >= 5000.0 * toastManager.getNotificationDisplayTimeMultiplier() + ? Toast.Visibility.HIDE + : Toast.Visibility.SHOW; } this.displayedRecipeIndex = (int)( - l / Math.max(1.0, 5000.0 * toastManager.getNotificationDisplayTimeMultiplier() / this.recipeItems.size()) % this.recipeItems.size() + visibilityTime / Math.max(1.0, 5000.0 * toastManager.getNotificationDisplayTimeMultiplier() / this.recipeItems.size()) % this.recipeItems.size() ); } @Override - public void render(GuiGraphics guiGraphics, Font font, long l) { + public void render(GuiGraphics guiGraphics, Font font, long visibilityTime) { guiGraphics.blitSprite(RenderType::guiTextured, BACKGROUND_SPRITE, 0, 0, this.width(), this.height()); guiGraphics.drawString(font, TITLE_TEXT, 30, 7, -11534256, false); guiGraphics.drawString(font, DESCRIPTION_TEXT, 30, 18, -16777216, false); @@ -65,8 +67,8 @@ public class RecipeToast implements Toast { guiGraphics.renderFakeItem(entry.unlockedItem(), 8, 8); } - private void addItem(ItemStack itemStack, ItemStack itemStack2) { - this.recipeItems.add(new RecipeToast.Entry(itemStack, itemStack2)); + private void addItem(ItemStack categoryItem, ItemStack unlockedItem) { + this.recipeItems.add(new RecipeToast.Entry(categoryItem, unlockedItem)); this.changed = true; } diff --git a/net/minecraft/client/gui/components/toasts/SystemToast.java b/net/minecraft/client/gui/components/toasts/SystemToast.java index c7f1cb6c..b152e1ff 100644 --- a/net/minecraft/client/gui/components/toasts/SystemToast.java +++ b/net/minecraft/client/gui/components/toasts/SystemToast.java @@ -77,33 +77,33 @@ public class SystemToast implements Toast { } @Override - public void update(ToastManager toastManager, long l) { + public void update(ToastManager toastManager, long visibilityTime) { if (this.changed) { - this.lastChanged = l; + this.lastChanged = visibilityTime; this.changed = false; } double d = this.id.displayTime * toastManager.getNotificationDisplayTimeMultiplier(); - long m = l - this.lastChanged; - this.wantedVisibility = !this.forceHide && m < d ? Toast.Visibility.SHOW : Toast.Visibility.HIDE; + long l = visibilityTime - this.lastChanged; + this.wantedVisibility = !this.forceHide && l < d ? Toast.Visibility.SHOW : Toast.Visibility.HIDE; } @Override - public void render(GuiGraphics guiGraphics, Font font, long l) { + public void render(GuiGraphics guiGraphics, Font font, long visibilityTime) { int i = this.width(); if (i == 160 && this.messageLines.size() <= 1) { guiGraphics.blitSprite(RenderType::guiTextured, BACKGROUND_SPRITE, 0, 0, i, this.height()); } else { int j = this.height(); int k = 28; - int m = Math.min(4, j - 28); + int l = Math.min(4, j - 28); this.renderBackgroundRow(guiGraphics, i, 0, 0, 28); - for (int n = 28; n < j - m; n += 10) { - this.renderBackgroundRow(guiGraphics, i, 16, n, Math.min(16, j - n - m)); + for (int m = 28; m < j - l; m += 10) { + this.renderBackgroundRow(guiGraphics, i, 16, m, Math.min(16, j - m - l)); } - this.renderBackgroundRow(guiGraphics, i, 32 - m, j - m, m); + this.renderBackgroundRow(guiGraphics, i, 32 - l, j - l, l); } if (this.messageLines.isEmpty()) { @@ -140,21 +140,21 @@ public class SystemToast implements Toast { return this.id; } - public static void add(ToastManager toastManager, SystemToast.SystemToastId systemToastId, Component component, @Nullable Component component2) { - toastManager.addToast(new SystemToast(systemToastId, component, component2)); + public static void add(ToastManager toastManager, SystemToast.SystemToastId id, Component title, @Nullable Component message) { + toastManager.addToast(new SystemToast(id, title, message)); } - public static void addOrUpdate(ToastManager toastManager, SystemToast.SystemToastId systemToastId, Component component, @Nullable Component component2) { - SystemToast systemToast = toastManager.getToast(SystemToast.class, systemToastId); + public static void addOrUpdate(ToastManager toastManager, SystemToast.SystemToastId id, Component title, @Nullable Component message) { + SystemToast systemToast = toastManager.getToast(SystemToast.class, id); if (systemToast == null) { - add(toastManager, systemToastId, component, component2); + add(toastManager, id, title, message); } else { - systemToast.reset(component, component2); + systemToast.reset(title, message); } } - public static void forceHide(ToastManager toastManager, SystemToast.SystemToastId systemToastId) { - SystemToast systemToast = toastManager.getToast(SystemToast.class, systemToastId); + public static void forceHide(ToastManager toastManager, SystemToast.SystemToastId id) { + SystemToast systemToast = toastManager.getToast(SystemToast.class, id); if (systemToast != null) { systemToast.forceHide(); } diff --git a/net/minecraft/client/gui/components/toasts/Toast.java b/net/minecraft/client/gui/components/toasts/Toast.java index 63c3f7bf..1c7d8bed 100644 --- a/net/minecraft/client/gui/components/toasts/Toast.java +++ b/net/minecraft/client/gui/components/toasts/Toast.java @@ -18,9 +18,9 @@ public interface Toast { Toast.Visibility getWantedVisibility(); - void update(ToastManager toastManager, long l); + void update(ToastManager toastManager, long visibilityTime); - void render(GuiGraphics guiGraphics, Font font, long l); + void render(GuiGraphics guiGraphics, Font font, long visibilityTime); default Object getToken() { return NO_TOKEN; diff --git a/net/minecraft/client/gui/components/toasts/ToastManager.java b/net/minecraft/client/gui/components/toasts/ToastManager.java index e501d72b..7a49f07e 100644 --- a/net/minecraft/client/gui/components/toasts/ToastManager.java +++ b/net/minecraft/client/gui/components/toasts/ToastManager.java @@ -61,15 +61,15 @@ public class ToastManager { } } - private int findFreeSlotsIndex(int i) { - if (this.freeSlotCount() >= i) { - int j = 0; + private int findFreeSlotsIndex(int slots) { + if (this.freeSlotCount() >= slots) { + int i = 0; - for (int k = 0; k < 5; k++) { - if (this.occupiedSlots.get(k)) { - j = 0; - } else if (++j == i) { - return k + 1 - j; + for (int j = 0; j < 5; j++) { + if (this.occupiedSlots.get(j)) { + i = 0; + } else if (++i == slots) { + return j + 1 - i; } } } @@ -82,15 +82,15 @@ public class ToastManager { } @Nullable - public T getToast(Class class_, Object object) { + public T getToast(Class toastClass, Object token) { for (ToastManager.ToastInstance toastInstance : this.visibleToasts) { - if (toastInstance != null && class_.isAssignableFrom(toastInstance.getToast().getClass()) && toastInstance.getToast().getToken().equals(object)) { + if (toastInstance != null && toastClass.isAssignableFrom(toastInstance.getToast().getClass()) && toastInstance.getToast().getToken().equals(token)) { return (T)toastInstance.getToast(); } } for (Toast toast : this.queued) { - if (class_.isAssignableFrom(toast.getClass()) && toast.getToken().equals(object)) { + if (toastClass.isAssignableFrom(toast.getClass()) && toast.getToken().equals(token)) { return (T)toast; } } @@ -129,10 +129,10 @@ public class ToastManager { private float visiblePortion; private boolean hasFinishedRendering; - ToastInstance(final T toast, final int i, final int j) { + ToastInstance(final T toast, final int firstSlotIndex, final int occupiedSlotCount) { this.toast = toast; - this.firstSlotIndex = i; - this.occupiedSlotCount = j; + this.firstSlotIndex = firstSlotIndex; + this.occupiedSlotCount = occupiedSlotCount; } public T getToast() { @@ -143,8 +143,8 @@ public class ToastManager { return this.hasFinishedRendering; } - private void calculateVisiblePortion(long l) { - float f = Mth.clamp((float)(l - this.animationStartTime) / 600.0F, 0.0F, 1.0F); + private void calculateVisiblePortion(long visibilityTime) { + float f = Mth.clamp((float)(visibilityTime - this.animationStartTime) / 600.0F, 0.0F, 1.0F); f *= f; if (this.visibility == Toast.Visibility.HIDE) { this.visiblePortion = 1.0F - f; @@ -177,9 +177,9 @@ public class ToastManager { this.hasFinishedRendering = this.visibility == Toast.Visibility.HIDE && l - this.animationStartTime > 600L; } - public void render(GuiGraphics guiGraphics, int i) { + public void render(GuiGraphics guiGraphics, int guiWidth) { guiGraphics.pose().pushPose(); - guiGraphics.pose().translate(i - this.toast.width() * this.visiblePortion, (float)(this.firstSlotIndex * 32), 800.0F); + guiGraphics.pose().translate(guiWidth - this.toast.width() * this.visiblePortion, (float)(this.firstSlotIndex * 32), 800.0F); this.toast.render(guiGraphics, ToastManager.this.minecraft.font, this.fullyVisibleFor); guiGraphics.pose().popPose(); } diff --git a/net/minecraft/client/gui/components/toasts/TutorialToast.java b/net/minecraft/client/gui/components/toasts/TutorialToast.java index 7180ec23..8bf6e618 100644 --- a/net/minecraft/client/gui/components/toasts/TutorialToast.java +++ b/net/minecraft/client/gui/components/toasts/TutorialToast.java @@ -28,12 +28,12 @@ public class TutorialToast implements Toast { private final boolean progressable; private final int timeToDisplayMs; - public TutorialToast(TutorialToast.Icons icons, Component component, @Nullable Component component2, boolean bl, int i) { - this.icon = icons; - this.title = component; - this.message = component2; - this.progressable = bl; - this.timeToDisplayMs = i; + public TutorialToast(TutorialToast.Icons icon, Component title, @Nullable Component message, boolean progressable, int timeToDisplayMs) { + this.icon = icon; + this.title = title; + this.message = message; + this.progressable = progressable; + this.timeToDisplayMs = timeToDisplayMs; } public TutorialToast(TutorialToast.Icons icon, Component title, @Nullable Component message, boolean progressable) { @@ -46,22 +46,22 @@ public class TutorialToast implements Toast { } @Override - public void update(ToastManager toastManager, long l) { + public void update(ToastManager toastManager, long visibilityTime) { if (this.timeToDisplayMs > 0) { - this.progress = Math.min((float)l / this.timeToDisplayMs, 1.0F); + this.progress = Math.min((float)visibilityTime / this.timeToDisplayMs, 1.0F); this.smoothedProgress = this.progress; - this.lastSmoothingTime = l; - if (l > this.timeToDisplayMs) { + this.lastSmoothingTime = visibilityTime; + if (visibilityTime > this.timeToDisplayMs) { this.hide(); } } else if (this.progressable) { - this.smoothedProgress = Mth.clampedLerp(this.smoothedProgress, this.progress, (float)(l - this.lastSmoothingTime) / 100.0F); - this.lastSmoothingTime = l; + this.smoothedProgress = Mth.clampedLerp(this.smoothedProgress, this.progress, (float)(visibilityTime - this.lastSmoothingTime) / 100.0F); + this.lastSmoothingTime = visibilityTime; } } @Override - public void render(GuiGraphics guiGraphics, Font font, long l) { + public void render(GuiGraphics guiGraphics, Font font, long visibilityTime) { guiGraphics.blitSprite(RenderType::guiTextured, BACKGROUND_SPRITE, 0, 0, this.width(), this.height()); this.icon.render(guiGraphics, 6, 6); if (this.message == null) { diff --git a/net/minecraft/client/gui/font/CodepointMap.java b/net/minecraft/client/gui/font/CodepointMap.java index cb8ccf05..5ab980ac 100644 --- a/net/minecraft/client/gui/font/CodepointMap.java +++ b/net/minecraft/client/gui/font/CodepointMap.java @@ -74,15 +74,15 @@ public class CodepointMap { } @Nullable - public T remove(int i) { - int j = i >> 8; - int k = i & 0xFF; - T[] objects = this.blockMap[j]; + public T remove(int index) { + int i = index >> 8; + int j = index & 0xFF; + T[] objects = this.blockMap[i]; if (objects == this.empty) { return null; } else { - T object = objects[k]; - objects[k] = null; + T object = objects[j]; + objects[j] = null; return object; } } diff --git a/net/minecraft/client/gui/font/FontManager.java b/net/minecraft/client/gui/font/FontManager.java index 9048e780..3e44481e 100644 --- a/net/minecraft/client/gui/font/FontManager.java +++ b/net/minecraft/client/gui/font/FontManager.java @@ -76,11 +76,11 @@ public class FontManager implements PreparableReloadListener, AutoCloseable { @Override public CompletableFuture reload( - PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor executor, Executor executor2 + PreparableReloadListener.PreparationBarrier barrier, ResourceManager manager, Executor backgroundExecutor, Executor gameExecutor ) { - return this.prepare(resourceManager, executor) - .thenCompose(preparationBarrier::wait) - .thenAcceptAsync(preparation -> this.apply(preparation, Profiler.get()), executor2); + return this.prepare(manager, backgroundExecutor) + .thenCompose(barrier::wait) + .thenAcceptAsync(preparation -> this.apply(preparation, Profiler.get()), gameExecutor); } private CompletableFuture prepare(ResourceManager resourceManager, Executor executor) { diff --git a/net/minecraft/client/gui/font/glyphs/BakedGlyph.java b/net/minecraft/client/gui/font/glyphs/BakedGlyph.java index 14db93c2..efc62916 100644 --- a/net/minecraft/client/gui/font/glyphs/BakedGlyph.java +++ b/net/minecraft/client/gui/font/glyphs/BakedGlyph.java @@ -33,29 +33,29 @@ public class BakedGlyph { this.down = down; } - public void renderChar(BakedGlyph.GlyphInstance glyphInstance, Matrix4f matrix4f, VertexConsumer vertexConsumer, int i) { - Style style = glyphInstance.style(); + public void renderChar(BakedGlyph.GlyphInstance glyph, Matrix4f pose, VertexConsumer buffer, int packedLight) { + Style style = glyph.style(); boolean bl = style.isItalic(); - float f = glyphInstance.x(); - float g = glyphInstance.y(); - int j = glyphInstance.color(); - this.render(bl, f, g, matrix4f, vertexConsumer, j, i); + float f = glyph.x(); + float g = glyph.y(); + int i = glyph.color(); + this.render(bl, f, g, pose, buffer, i, packedLight); if (style.isBold()) { - this.render(bl, f + glyphInstance.boldOffset(), g, matrix4f, vertexConsumer, j, i); + this.render(bl, f + glyph.boldOffset(), g, pose, buffer, i, packedLight); } } - private void render(boolean bl, float f, float g, Matrix4f matrix4f, VertexConsumer vertexConsumer, int i, int j) { - float h = f + this.left; - float k = f + this.right; - float l = g + this.up; - float m = g + this.down; - float n = bl ? 1.0F - 0.25F * this.up : 0.0F; - float o = bl ? 1.0F - 0.25F * this.down : 0.0F; - vertexConsumer.addVertex(matrix4f, h + n, l, 0.0F).setColor(i).setUv(this.u0, this.v0).setLight(j); - vertexConsumer.addVertex(matrix4f, h + o, m, 0.0F).setColor(i).setUv(this.u0, this.v1).setLight(j); - vertexConsumer.addVertex(matrix4f, k + o, m, 0.0F).setColor(i).setUv(this.u1, this.v1).setLight(j); - vertexConsumer.addVertex(matrix4f, k + n, l, 0.0F).setColor(i).setUv(this.u1, this.v0).setLight(j); + private void render(boolean italic, float x, float y, Matrix4f pose, VertexConsumer buffer, int color, int packedLight) { + float f = x + this.left; + float g = x + this.right; + float h = y + this.up; + float i = y + this.down; + float j = italic ? 1.0F - 0.25F * this.up : 0.0F; + float k = italic ? 1.0F - 0.25F * this.down : 0.0F; + buffer.addVertex(pose, f + j, h, 0.0F).setColor(color).setUv(this.u0, this.v0).setLight(packedLight); + buffer.addVertex(pose, f + k, i, 0.0F).setColor(color).setUv(this.u0, this.v1).setLight(packedLight); + buffer.addVertex(pose, g + k, i, 0.0F).setColor(color).setUv(this.u1, this.v1).setLight(packedLight); + buffer.addVertex(pose, g + j, h, 0.0F).setColor(color).setUv(this.u1, this.v0).setLight(packedLight); } public void renderEffect(BakedGlyph.Effect effect, Matrix4f matrix, VertexConsumer buffer, int packedLight) { diff --git a/net/minecraft/client/gui/font/glyphs/EmptyGlyph.java b/net/minecraft/client/gui/font/glyphs/EmptyGlyph.java index 0ddb6f5f..f45ac022 100644 --- a/net/minecraft/client/gui/font/glyphs/EmptyGlyph.java +++ b/net/minecraft/client/gui/font/glyphs/EmptyGlyph.java @@ -16,6 +16,6 @@ public class EmptyGlyph extends BakedGlyph { } @Override - public void renderChar(BakedGlyph.GlyphInstance glyphInstance, Matrix4f matrix4f, VertexConsumer vertexConsumer, int i) { + public void renderChar(BakedGlyph.GlyphInstance glyph, Matrix4f pose, VertexConsumer buffer, int packedLight) { } } diff --git a/net/minecraft/client/gui/screens/BackupConfirmScreen.java b/net/minecraft/client/gui/screens/BackupConfirmScreen.java index e96975cc..551ca5c6 100644 --- a/net/minecraft/client/gui/screens/BackupConfirmScreen.java +++ b/net/minecraft/client/gui/screens/BackupConfirmScreen.java @@ -27,14 +27,14 @@ public class BackupConfirmScreen extends Screen { } public BackupConfirmScreen( - Runnable runnable, BackupConfirmScreen.Listener listener, Component component, Component component2, Component component3, boolean bl + Runnable onCancel, BackupConfirmScreen.Listener onProceed, Component title, Component description, Component confirmation, boolean promptForCacheErase ) { - super(component); - this.onCancel = runnable; - this.onProceed = listener; - this.description = component2; - this.promptForCacheErase = bl; - this.confirmation = component3; + super(title); + this.onCancel = onCancel; + this.onProceed = onProceed; + this.description = description; + this.promptForCacheErase = promptForCacheErase; + this.confirmation = confirmation; } @Override diff --git a/net/minecraft/client/gui/screens/LevelLoadingScreen.java b/net/minecraft/client/gui/screens/LevelLoadingScreen.java index 8b107b00..d6a76277 100644 --- a/net/minecraft/client/gui/screens/LevelLoadingScreen.java +++ b/net/minecraft/client/gui/screens/LevelLoadingScreen.java @@ -87,29 +87,29 @@ public class LevelLoadingScreen extends Screen { guiGraphics.drawCenteredString(this.font, this.getFormattedProgress(), i, j - k, 16777215); } - public static void renderChunks(GuiGraphics guiGraphics, StoringChunkProgressListener progressListener, int x, int y, int i, int j) { - int k = i + j; - int l = progressListener.getFullDiameter(); - int m = l * k - j; - int n = progressListener.getDiameter(); - int o = n * k - j; - int p = x - o / 2; - int q = y - o / 2; - int r = m / 2 + 1; - int s = -16772609; - if (j != 0) { - guiGraphics.fill(x - r, y - r, x - r + 1, y + r, -16772609); - guiGraphics.fill(x + r - 1, y - r, x + r, y + r, -16772609); - guiGraphics.fill(x - r, y - r, x + r, y - r + 1, -16772609); - guiGraphics.fill(x - r, y + r - 1, x + r, y + r, -16772609); + public static void renderChunks(GuiGraphics guiGraphics, StoringChunkProgressListener progressListener, int x, int y, int size, int spacing) { + int i = size + spacing; + int j = progressListener.getFullDiameter(); + int k = j * i - spacing; + int l = progressListener.getDiameter(); + int m = l * i - spacing; + int n = x - m / 2; + int o = y - m / 2; + int p = k / 2 + 1; + int q = -16772609; + if (spacing != 0) { + guiGraphics.fill(x - p, y - p, x - p + 1, y + p, -16772609); + guiGraphics.fill(x + p - 1, y - p, x + p, y + p, -16772609); + guiGraphics.fill(x - p, y - p, x + p, y - p + 1, -16772609); + guiGraphics.fill(x - p, y + p - 1, x + p, y + p, -16772609); } - for (int t = 0; t < n; t++) { - for (int u = 0; u < n; u++) { - ChunkStatus chunkStatus = progressListener.getStatus(t, u); - int v = p + t * k; - int w = q + u * k; - guiGraphics.fill(v, w, v + i, w + i, ARGB.opaque(COLORS.getInt(chunkStatus))); + for (int r = 0; r < l; r++) { + for (int s = 0; s < l; s++) { + ChunkStatus chunkStatus = progressListener.getStatus(r, s); + int t = n + r * i; + int u = o + s * i; + guiGraphics.fill(t, u, t + size, u + size, ARGB.opaque(COLORS.getInt(chunkStatus))); } } } diff --git a/net/minecraft/client/gui/screens/TitleScreen.java b/net/minecraft/client/gui/screens/TitleScreen.java index 2157ee44..6a1759c4 100644 --- a/net/minecraft/client/gui/screens/TitleScreen.java +++ b/net/minecraft/client/gui/screens/TitleScreen.java @@ -158,22 +158,22 @@ public class TitleScreen extends Screen { } } - private int createTestWorldButton(int i, int j) { + private int createTestWorldButton(int y, int rowHeight) { if (SharedConstants.IS_RUNNING_IN_IDE) { this.addRenderableWidget( Button.builder(Component.literal("Create Test World"), button -> CreateWorldScreen.testWorld(this.minecraft, this)) - .bounds(this.width / 2 - 100, i += j, 200, 20) + .bounds(this.width / 2 - 100, y += rowHeight, 200, 20) .build() ); } - return i; + return y; } - private int createNormalMenuOptions(int i, int j) { + private int createNormalMenuOptions(int y, int rowHeight) { this.addRenderableWidget( Button.builder(Component.translatable("menu.singleplayer"), button -> this.minecraft.setScreen(new SelectWorldScreen(this))) - .bounds(this.width / 2 - 100, i, 200, 20) + .bounds(this.width / 2 - 100, y, 200, 20) .build() ); Component component = this.getMultiplayerDisabledReason(); @@ -183,15 +183,15 @@ public class TitleScreen extends Screen { this.addRenderableWidget(Button.builder(Component.translatable("menu.multiplayer"), button -> { Screen screen = (Screen)(this.minecraft.options.skipMultiplayerWarning ? new JoinMultiplayerScreen(this) : new SafetyScreen(this)); this.minecraft.setScreen(screen); - }).bounds(this.width / 2 - 100, var6 = i + j, 200, 20).tooltip(tooltip).build()).active = bl; + }).bounds(this.width / 2 - 100, var6 = y + rowHeight, 200, 20).tooltip(tooltip).build()).active = bl; this.addRenderableWidget( Button.builder(Component.translatable("menu.online"), button -> this.minecraft.setScreen(new RealmsMainScreen(this))) - .bounds(this.width / 2 - 100, i = var6 + j, 200, 20) + .bounds(this.width / 2 - 100, y = var6 + rowHeight, 200, 20) .tooltip(tooltip) .build() ) .active = bl; - return i; + return y; } @Nullable @@ -212,7 +212,7 @@ public class TitleScreen extends Screen { } } - private int createDemoMenuOptions(int i, int j) { + private int createDemoMenuOptions(int y, int rowHeight) { boolean bl = this.checkDemoWorldPresence(); this.addRenderableWidget( Button.builder( @@ -227,7 +227,7 @@ public class TitleScreen extends Screen { } } ) - .bounds(this.width / 2 - 100, i, 200, 20) + .bounds(this.width / 2 - 100, y, 200, 20) .build() ); int var4; @@ -256,7 +256,7 @@ public class TitleScreen extends Screen { } } ) - .bounds(this.width / 2 - 100, var4 = i + j, 200, 20) + .bounds(this.width / 2 - 100, var4 = y + rowHeight, 200, 20) .build() ); this.resetDemoButton.active = bl; diff --git a/net/minecraft/client/gui/screens/inventory/AbstractContainerScreen.java b/net/minecraft/client/gui/screens/inventory/AbstractContainerScreen.java index b2e52353..2c1a9975 100644 --- a/net/minecraft/client/gui/screens/inventory/AbstractContainerScreen.java +++ b/net/minecraft/client/gui/screens/inventory/AbstractContainerScreen.java @@ -238,8 +238,8 @@ public abstract class AbstractContainerScreen e } } - private boolean showTooltipWithItemInHand(ItemStack itemStack) { - return (Boolean)itemStack.getTooltipImage().map(ClientTooltipComponent::create).map(ClientTooltipComponent::showTooltipWithItemInHand).orElse(false); + private boolean showTooltipWithItemInHand(ItemStack stack) { + return (Boolean)stack.getTooltipImage().map(ClientTooltipComponent::create).map(ClientTooltipComponent::showTooltipWithItemInHand).orElse(false); } protected List getTooltipFromContainerItem(ItemStack stack) { @@ -342,9 +342,9 @@ public abstract class AbstractContainerScreen e } @Nullable - private Slot getHoveredSlot(double d, double e) { + private Slot getHoveredSlot(double mouseX, double mouseY) { for (Slot slot : this.menu.slots) { - if (slot.isActive() && this.isHovering(slot, d, e)) { + if (slot.isActive() && this.isHovering(slot, mouseX, mouseY)) { return slot; } } @@ -645,11 +645,11 @@ public abstract class AbstractContainerScreen e this.minecraft.gameMode.handleInventoryMouseClick(this.menu.containerId, slotId, mouseButton, type, this.minecraft.player); } - void onMouseClickAction(@Nullable Slot slot, ClickType clickType) { + void onMouseClickAction(@Nullable Slot slot, ClickType type) { if (slot != null && slot.hasItem()) { for (ItemSlotMouseAction itemSlotMouseAction : this.itemSlotMouseActions) { if (itemSlotMouseAction.matches(slot)) { - itemSlotMouseAction.onSlotClicked(slot, clickType); + itemSlotMouseAction.onSlotClicked(slot, type); } } } diff --git a/net/minecraft/client/gui/screens/inventory/AbstractFurnaceScreen.java b/net/minecraft/client/gui/screens/inventory/AbstractFurnaceScreen.java index 7721f922..cc44ea20 100644 --- a/net/minecraft/client/gui/screens/inventory/AbstractFurnaceScreen.java +++ b/net/minecraft/client/gui/screens/inventory/AbstractFurnaceScreen.java @@ -21,19 +21,19 @@ public abstract class AbstractFurnaceScreen exten private final ResourceLocation burnProgressSprite; public AbstractFurnaceScreen( - T abstractFurnaceMenu, - Inventory inventory, - Component component, - Component component2, - ResourceLocation resourceLocation, - ResourceLocation resourceLocation2, - ResourceLocation resourceLocation3, - List list + T menu, + Inventory playerInventory, + Component title, + Component recipeFilterName, + ResourceLocation texture, + ResourceLocation litProgressSprite, + ResourceLocation burnProgressSprite, + List tabInfos ) { - super(abstractFurnaceMenu, new FurnaceRecipeBookComponent(abstractFurnaceMenu, component2, list), inventory, component); - this.texture = resourceLocation; - this.litProgressSprite = resourceLocation2; - this.burnProgressSprite = resourceLocation3; + super(menu, new FurnaceRecipeBookComponent(menu, recipeFilterName, tabInfos), playerInventory, title); + this.texture = texture; + this.litProgressSprite = litProgressSprite; + this.burnProgressSprite = burnProgressSprite; } @Override diff --git a/net/minecraft/client/gui/screens/inventory/AbstractRecipeBookScreen.java b/net/minecraft/client/gui/screens/inventory/AbstractRecipeBookScreen.java index cd6ea562..60c8486f 100644 --- a/net/minecraft/client/gui/screens/inventory/AbstractRecipeBookScreen.java +++ b/net/minecraft/client/gui/screens/inventory/AbstractRecipeBookScreen.java @@ -19,8 +19,8 @@ public abstract class AbstractRecipeBookScreen extends private final RecipeBookComponent recipeBookComponent; private boolean widthTooNarrow; - public AbstractRecipeBookScreen(T recipeBookMenu, RecipeBookComponent recipeBookComponent, Inventory inventory, Component component) { - super(recipeBookMenu, inventory, component); + public AbstractRecipeBookScreen(T menu, RecipeBookComponent recipeBookComponent, Inventory playerInventory, Component title) { + super(menu, playerInventory, title); this.recipeBookComponent = recipeBookComponent; } diff --git a/net/minecraft/client/gui/screens/inventory/BookEditScreen.java b/net/minecraft/client/gui/screens/inventory/BookEditScreen.java index d1b9e54c..4a524540 100644 --- a/net/minecraft/client/gui/screens/inventory/BookEditScreen.java +++ b/net/minecraft/client/gui/screens/inventory/BookEditScreen.java @@ -95,17 +95,17 @@ public class BookEditScreen extends Screen { private Component pageMsg = CommonComponents.EMPTY; private final Component ownerText; - public BookEditScreen(Player player, ItemStack itemStack, InteractionHand interactionHand, WritableBookContent writableBookContent) { + public BookEditScreen(Player owner, ItemStack book, InteractionHand hand, WritableBookContent content) { super(GameNarrator.NO_TITLE); - this.owner = player; - this.book = itemStack; - this.hand = interactionHand; - writableBookContent.getPages(Minecraft.getInstance().isTextFilteringEnabled()).forEach(this.pages::add); + this.owner = owner; + this.book = book; + this.hand = hand; + content.getPages(Minecraft.getInstance().isTextFilteringEnabled()).forEach(this.pages::add); if (this.pages.isEmpty()) { this.pages.add(""); } - this.ownerText = Component.translatable("book.byAuthor", player.getName()).withStyle(ChatFormatting.DARK_GRAY); + this.ownerText = Component.translatable("book.byAuthor", owner.getName()).withStyle(ChatFormatting.DARK_GRAY); } private void setClipboard(String clipboardValue) { diff --git a/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java b/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java index 2145ffbd..878b0503 100644 --- a/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java +++ b/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java @@ -25,9 +25,9 @@ import net.minecraft.client.player.inventory.Hotbar; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.searchtree.SearchTree; import net.minecraft.core.HolderLookup; -import net.minecraft.core.HolderSet; import net.minecraft.core.NonNullList; import net.minecraft.core.RegistryAccess; +import net.minecraft.core.HolderSet.Named; import net.minecraft.core.component.DataComponents; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.CommonComponents; @@ -480,7 +480,7 @@ public class CreativeModeInventoryScreen extends AbstractContainerScreen resourceLocation.getNamespace().contains(string) && resourceLocation.getPath().contains(string2); } - BuiltInRegistries.ITEM.getTags().map(HolderSet.Named::key).filter(tagKey -> predicate.test(tagKey.location())).forEach(this.visibleTags::add); + BuiltInRegistries.ITEM.getTags().map(Named::key).filter(tagKey -> predicate.test(tagKey.location())).forEach(this.visibleTags::add); } @Override diff --git a/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java b/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java index 869cbb9c..7b9c77e1 100644 --- a/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java +++ b/net/minecraft/client/gui/screens/inventory/EffectsInInventory.java @@ -27,13 +27,13 @@ public class EffectsInInventory { private final AbstractContainerScreen screen; private final Minecraft minecraft; - public EffectsInInventory(AbstractContainerScreen abstractContainerScreen) { - this.screen = abstractContainerScreen; + public EffectsInInventory(AbstractContainerScreen screen) { + this.screen = screen; this.minecraft = Minecraft.getInstance(); } - public void render(GuiGraphics guiGraphics, int i, int j, float f) { - this.renderEffects(guiGraphics, i, j); + public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) { + this.renderEffects(guiGraphics, mouseX, mouseY); } public boolean canSeeEffects() { @@ -42,86 +42,86 @@ public class EffectsInInventory { return j >= 32; } - private void renderEffects(GuiGraphics guiGraphics, int i, int j) { - int k = this.screen.leftPos + this.screen.imageWidth + 2; - int l = this.screen.width - k; + private void renderEffects(GuiGraphics guiGraphics, int mouseX, int mouseY) { + int i = this.screen.leftPos + this.screen.imageWidth + 2; + int j = this.screen.width - i; Collection collection = this.minecraft.player.getActiveEffects(); - if (!collection.isEmpty() && l >= 32) { - boolean bl = l >= 120; - int m = 33; + if (!collection.isEmpty() && j >= 32) { + boolean bl = j >= 120; + int k = 33; if (collection.size() > 5) { - m = 132 / (collection.size() - 1); + k = 132 / (collection.size() - 1); } Iterable iterable = Ordering.natural().sortedCopy(collection); - this.renderBackgrounds(guiGraphics, k, m, iterable, bl); - this.renderIcons(guiGraphics, k, m, iterable, bl); + this.renderBackgrounds(guiGraphics, i, k, iterable, bl); + this.renderIcons(guiGraphics, i, k, iterable, bl); if (bl) { - this.renderLabels(guiGraphics, k, m, iterable); - } else if (i >= k && i <= k + 33) { - int n = this.screen.topPos; + this.renderLabels(guiGraphics, i, k, iterable); + } else if (mouseX >= i && mouseX <= i + 33) { + int l = this.screen.topPos; MobEffectInstance mobEffectInstance = null; for (MobEffectInstance mobEffectInstance2 : iterable) { - if (j >= n && j <= n + m) { + if (mouseY >= l && mouseY <= l + k) { mobEffectInstance = mobEffectInstance2; } - n += m; + l += k; } if (mobEffectInstance != null) { List list = List.of( this.getEffectName(mobEffectInstance), MobEffectUtil.formatDuration(mobEffectInstance, 1.0F, this.minecraft.level.tickRateManager().tickrate()) ); - guiGraphics.renderTooltip(this.screen.getFont(), list, Optional.empty(), i, j); + guiGraphics.renderTooltip(this.screen.getFont(), list, Optional.empty(), mouseX, mouseY); } } } } - private void renderBackgrounds(GuiGraphics guiGraphics, int i, int j, Iterable iterable, boolean bl) { - int k = this.screen.topPos; + private void renderBackgrounds(GuiGraphics guiGraphics, int x, int y, Iterable activeEffects, boolean large) { + int i = this.screen.topPos; - for (MobEffectInstance mobEffectInstance : iterable) { - if (bl) { - guiGraphics.blitSprite(RenderType::guiTextured, EFFECT_BACKGROUND_LARGE_SPRITE, i, k, 120, 32); + for (MobEffectInstance mobEffectInstance : activeEffects) { + if (large) { + guiGraphics.blitSprite(RenderType::guiTextured, EFFECT_BACKGROUND_LARGE_SPRITE, x, i, 120, 32); } else { - guiGraphics.blitSprite(RenderType::guiTextured, EFFECT_BACKGROUND_SMALL_SPRITE, i, k, 32, 32); + guiGraphics.blitSprite(RenderType::guiTextured, EFFECT_BACKGROUND_SMALL_SPRITE, x, i, 32, 32); } - k += j; + i += y; } } - private void renderIcons(GuiGraphics guiGraphics, int i, int j, Iterable iterable, boolean bl) { + private void renderIcons(GuiGraphics guiGraphics, int x, int y, Iterable activeEffects, boolean large) { MobEffectTextureManager mobEffectTextureManager = this.minecraft.getMobEffectTextures(); - int k = this.screen.topPos; + int i = this.screen.topPos; - for (MobEffectInstance mobEffectInstance : iterable) { + for (MobEffectInstance mobEffectInstance : activeEffects) { Holder holder = mobEffectInstance.getEffect(); TextureAtlasSprite textureAtlasSprite = mobEffectTextureManager.get(holder); - guiGraphics.blitSprite(RenderType::guiTextured, textureAtlasSprite, i + (bl ? 6 : 7), k + 7, 18, 18); - k += j; + guiGraphics.blitSprite(RenderType::guiTextured, textureAtlasSprite, x + (large ? 6 : 7), i + 7, 18, 18); + i += y; } } - private void renderLabels(GuiGraphics guiGraphics, int i, int j, Iterable iterable) { - int k = this.screen.topPos; + private void renderLabels(GuiGraphics guiGraphics, int x, int y, Iterable activeEffects) { + int i = this.screen.topPos; - for (MobEffectInstance mobEffectInstance : iterable) { + for (MobEffectInstance mobEffectInstance : activeEffects) { Component component = this.getEffectName(mobEffectInstance); - guiGraphics.drawString(this.screen.getFont(), component, i + 10 + 18, k + 6, 16777215); + guiGraphics.drawString(this.screen.getFont(), component, x + 10 + 18, i + 6, 16777215); Component component2 = MobEffectUtil.formatDuration(mobEffectInstance, 1.0F, this.minecraft.level.tickRateManager().tickrate()); - guiGraphics.drawString(this.screen.getFont(), component2, i + 10 + 18, k + 6 + 10, 8355711); - k += j; + guiGraphics.drawString(this.screen.getFont(), component2, x + 10 + 18, i + 6 + 10, 8355711); + i += y; } } - private Component getEffectName(MobEffectInstance mobEffectInstance) { - MutableComponent mutableComponent = mobEffectInstance.getEffect().value().getDisplayName().copy(); - if (mobEffectInstance.getAmplifier() >= 1 && mobEffectInstance.getAmplifier() <= 9) { - mutableComponent.append(CommonComponents.SPACE).append(Component.translatable("enchantment.level." + (mobEffectInstance.getAmplifier() + 1))); + private Component getEffectName(MobEffectInstance effect) { + MutableComponent mutableComponent = effect.getEffect().value().getDisplayName().copy(); + if (effect.getAmplifier() >= 1 && effect.getAmplifier() <= 9) { + mutableComponent.append(CommonComponents.SPACE).append(Component.translatable("enchantment.level." + (effect.getAmplifier() + 1))); } return mutableComponent; diff --git a/net/minecraft/client/gui/screens/inventory/EnchantmentScreen.java b/net/minecraft/client/gui/screens/inventory/EnchantmentScreen.java index 9e653c49..c17464a0 100644 --- a/net/minecraft/client/gui/screens/inventory/EnchantmentScreen.java +++ b/net/minecraft/client/gui/screens/inventory/EnchantmentScreen.java @@ -15,6 +15,7 @@ import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.core.Holder; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.Registries; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; @@ -182,7 +183,7 @@ public class EnchantmentScreen extends AbstractContainerScreen for (int j = 0; j < 3; j++) { int k = this.menu.costs[j]; - Optional> optional = this.minecraft.level.registryAccess().lookupOrThrow(Registries.ENCHANTMENT).get(this.menu.enchantClue[j]); + Optional> optional = this.minecraft.level.registryAccess().lookupOrThrow(Registries.ENCHANTMENT).get(this.menu.enchantClue[j]); if (!optional.isEmpty()) { int l = this.menu.levelClue[j]; int m = j + 1; diff --git a/net/minecraft/client/gui/screens/inventory/MerchantScreen.java b/net/minecraft/client/gui/screens/inventory/MerchantScreen.java index 46b3d2af..3fd34aef 100644 --- a/net/minecraft/client/gui/screens/inventory/MerchantScreen.java +++ b/net/minecraft/client/gui/screens/inventory/MerchantScreen.java @@ -4,6 +4,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; +import net.minecraft.client.gui.components.Button.OnPress; import net.minecraft.client.renderer.RenderType; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; @@ -296,7 +297,7 @@ public class MerchantScreen extends AbstractContainerScreen { class TradeOfferButton extends Button { final int index; - public TradeOfferButton(final int x, final int y, final int index, final Button.OnPress onPress) { + public TradeOfferButton(final int x, final int y, final int index, final OnPress onPress) { super(x, y, 88, 20, CommonComponents.EMPTY, onPress, DEFAULT_NARRATION); this.index = index; this.visible = false; diff --git a/net/minecraft/client/gui/screens/inventory/tooltip/ClientActivePlayersTooltip.java b/net/minecraft/client/gui/screens/inventory/tooltip/ClientActivePlayersTooltip.java index 3da1768e..2f454199 100644 --- a/net/minecraft/client/gui/screens/inventory/tooltip/ClientActivePlayersTooltip.java +++ b/net/minecraft/client/gui/screens/inventory/tooltip/ClientActivePlayersTooltip.java @@ -40,12 +40,12 @@ public class ClientActivePlayersTooltip implements ClientTooltipComponent { } @Override - public void renderImage(Font font, int i, int j, int k, int l, GuiGraphics guiGraphics) { - for (int m = 0; m < this.activePlayers.size(); m++) { - ProfileResult profileResult = (ProfileResult)this.activePlayers.get(m); - int n = j + 2 + m * 12; - PlayerFaceRenderer.draw(guiGraphics, Minecraft.getInstance().getSkinManager().getInsecureSkin(profileResult.profile()), i + 2, n, 10); - guiGraphics.drawString(font, profileResult.profile().getName(), i + 10 + 4, n + 2, -1); + public void renderImage(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics) { + for (int i = 0; i < this.activePlayers.size(); i++) { + ProfileResult profileResult = (ProfileResult)this.activePlayers.get(i); + int j = y + 2 + i * 12; + PlayerFaceRenderer.draw(guiGraphics, Minecraft.getInstance().getSkinManager().getInsecureSkin(profileResult.profile()), x + 2, j, 10); + guiGraphics.drawString(font, profileResult.profile().getName(), x + 10 + 4, j + 2, -1); } } diff --git a/net/minecraft/client/gui/screens/inventory/tooltip/ClientBundleTooltip.java b/net/minecraft/client/gui/screens/inventory/tooltip/ClientBundleTooltip.java index 3aa631b6..5e7111c8 100644 --- a/net/minecraft/client/gui/screens/inventory/tooltip/ClientBundleTooltip.java +++ b/net/minecraft/client/gui/screens/inventory/tooltip/ClientBundleTooltip.java @@ -67,8 +67,8 @@ public class ClientBundleTooltip implements ClientTooltipComponent { return this.gridSizeY() * 24; } - private int getContentXOffset(int i) { - return (i - 96) / 2; + private int getContentXOffset(int width) { + return (width - 96) / 2; } private int gridSizeY() { @@ -80,102 +80,102 @@ public class ClientBundleTooltip implements ClientTooltipComponent { } @Override - public void renderImage(Font font, int i, int j, int k, int l, GuiGraphics guiGraphics) { + public void renderImage(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics) { if (this.contents.isEmpty()) { - this.renderEmptyBundleTooltip(font, i, j, k, l, guiGraphics); + this.renderEmptyBundleTooltip(font, x, y, width, height, guiGraphics); } else { - this.renderBundleWithItemsTooltip(font, i, j, k, l, guiGraphics); + this.renderBundleWithItemsTooltip(font, x, y, width, height, guiGraphics); } } - private void renderEmptyBundleTooltip(Font font, int i, int j, int k, int l, GuiGraphics guiGraphics) { - drawEmptyBundleDescriptionText(i + this.getContentXOffset(k), j, font, guiGraphics); - this.drawProgressbar(i + this.getContentXOffset(k), j + getEmptyBundleDescriptionTextHeight(font) + 4, font, guiGraphics); + private void renderEmptyBundleTooltip(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics) { + drawEmptyBundleDescriptionText(x + this.getContentXOffset(width), y, font, guiGraphics); + this.drawProgressbar(x + this.getContentXOffset(width), y + getEmptyBundleDescriptionTextHeight(font) + 4, font, guiGraphics); } - private void renderBundleWithItemsTooltip(Font font, int i, int j, int k, int l, GuiGraphics guiGraphics) { + private void renderBundleWithItemsTooltip(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics) { boolean bl = this.contents.size() > 12; List list = this.getShownItems(this.contents.getNumberOfItemsToShow()); - int m = i + this.getContentXOffset(k) + 96; - int n = j + this.gridSizeY() * 24; - int o = 1; + int i = x + this.getContentXOffset(width) + 96; + int j = y + this.gridSizeY() * 24; + int k = 1; - for (int p = 1; p <= this.gridSizeY(); p++) { - for (int q = 1; q <= 4; q++) { - int r = m - q * 24; - int s = n - p * 24; - if (shouldRenderSurplusText(bl, q, p)) { - renderCount(r, s, this.getAmountOfHiddenItems(list), font, guiGraphics); - } else if (shouldRenderItemSlot(list, o)) { - this.renderSlot(o, r, s, list, o, font, guiGraphics); - o++; + for (int l = 1; l <= this.gridSizeY(); l++) { + for (int m = 1; m <= 4; m++) { + int n = i - m * 24; + int o = j - l * 24; + if (shouldRenderSurplusText(bl, m, l)) { + renderCount(n, o, this.getAmountOfHiddenItems(list), font, guiGraphics); + } else if (shouldRenderItemSlot(list, k)) { + this.renderSlot(k, n, o, list, k, font, guiGraphics); + k++; } } } - this.drawSelectedItemTooltip(font, guiGraphics, i, j, k); - this.drawProgressbar(i + this.getContentXOffset(k), j + this.itemGridHeight() + 4, font, guiGraphics); + this.drawSelectedItemTooltip(font, guiGraphics, x, y, width); + this.drawProgressbar(x + this.getContentXOffset(width), y + this.itemGridHeight() + 4, font, guiGraphics); } - private List getShownItems(int i) { - int j = Math.min(this.contents.size(), i); - return this.contents.itemCopyStream().toList().subList(0, j); + private List getShownItems(int itemsToShow) { + int i = Math.min(this.contents.size(), itemsToShow); + return this.contents.itemCopyStream().toList().subList(0, i); } - private static boolean shouldRenderSurplusText(boolean bl, int i, int j) { - return bl && i * j == 1; + private static boolean shouldRenderSurplusText(boolean hasEnoughItems, int cellX, int cellY) { + return hasEnoughItems && cellX * cellY == 1; } - private static boolean shouldRenderItemSlot(List list, int i) { - return list.size() >= i; + private static boolean shouldRenderItemSlot(List shownItems, int slotIndex) { + return shownItems.size() >= slotIndex; } - private int getAmountOfHiddenItems(List list) { - return this.contents.itemCopyStream().skip(list.size()).mapToInt(ItemStack::getCount).sum(); + private int getAmountOfHiddenItems(List shownItems) { + return this.contents.itemCopyStream().skip(shownItems.size()).mapToInt(ItemStack::getCount).sum(); } - private void renderSlot(int i, int j, int k, List list, int l, Font font, GuiGraphics guiGraphics) { - int m = list.size() - i; - boolean bl = m == this.contents.getSelectedItem(); - ItemStack itemStack = (ItemStack)list.get(m); + private void renderSlot(int slotIndex, int x, int y, List shownItems, int seed, Font font, GuiGraphics guiGraphics) { + int i = shownItems.size() - slotIndex; + boolean bl = i == this.contents.getSelectedItem(); + ItemStack itemStack = (ItemStack)shownItems.get(i); if (bl) { - guiGraphics.blitSprite(RenderType::guiTextured, SLOT_HIGHLIGHT_BACK_SPRITE, j, k, 24, 24); + guiGraphics.blitSprite(RenderType::guiTextured, SLOT_HIGHLIGHT_BACK_SPRITE, x, y, 24, 24); } else { - guiGraphics.blitSprite(RenderType::guiTextured, SLOT_BACKGROUND_SPRITE, j, k, 24, 24); + guiGraphics.blitSprite(RenderType::guiTextured, SLOT_BACKGROUND_SPRITE, x, y, 24, 24); } - guiGraphics.renderItem(itemStack, j + 4, k + 4, l); - guiGraphics.renderItemDecorations(font, itemStack, j + 4, k + 4); + guiGraphics.renderItem(itemStack, x + 4, y + 4, seed); + guiGraphics.renderItemDecorations(font, itemStack, x + 4, y + 4); if (bl) { - guiGraphics.blitSprite(RenderType::guiTexturedOverlay, SLOT_HIGHLIGHT_FRONT_SPRITE, j, k, 24, 24); + guiGraphics.blitSprite(RenderType::guiTexturedOverlay, SLOT_HIGHLIGHT_FRONT_SPRITE, x, y, 24, 24); } } - private static void renderCount(int i, int j, int k, Font font, GuiGraphics guiGraphics) { - guiGraphics.drawCenteredString(font, "+" + k, i + 12, j + 10, 16777215); + private static void renderCount(int slotX, int slotY, int count, Font font, GuiGraphics guiGraphics) { + guiGraphics.drawCenteredString(font, "+" + count, slotX + 12, slotY + 10, 16777215); } - private void drawSelectedItemTooltip(Font font, GuiGraphics guiGraphics, int i, int j, int k) { + private void drawSelectedItemTooltip(Font font, GuiGraphics guiGraphics, int x, int y, int width) { if (this.contents.hasSelectedItem()) { ItemStack itemStack = this.contents.getItemUnsafe(this.contents.getSelectedItem()); Component component = itemStack.getStyledHoverName(); - int l = font.width(component.getVisualOrderText()); - int m = i + k / 2 - 12; - guiGraphics.renderTooltip(font, component, m - l / 2, j - 15, itemStack.get(DataComponents.TOOLTIP_STYLE)); + int i = font.width(component.getVisualOrderText()); + int j = x + width / 2 - 12; + guiGraphics.renderTooltip(font, component, j - i / 2, y - 15, itemStack.get(DataComponents.TOOLTIP_STYLE)); } } - private void drawProgressbar(int i, int j, Font font, GuiGraphics guiGraphics) { - guiGraphics.blitSprite(RenderType::guiTextured, this.getProgressBarTexture(), i + 1, j, this.getProgressBarFill(), 13); - guiGraphics.blitSprite(RenderType::guiTextured, PROGRESSBAR_BORDER_SPRITE, i, j, 96, 13); + private void drawProgressbar(int x, int y, Font font, GuiGraphics guiGraphics) { + guiGraphics.blitSprite(RenderType::guiTextured, this.getProgressBarTexture(), x + 1, y, this.getProgressBarFill(), 13); + guiGraphics.blitSprite(RenderType::guiTextured, PROGRESSBAR_BORDER_SPRITE, x, y, 96, 13); Component component = this.getProgressBarFillText(); if (component != null) { - guiGraphics.drawCenteredString(font, component, i + 48, j + 3, 16777215); + guiGraphics.drawCenteredString(font, component, x + 48, y + 3, 16777215); } } - private static void drawEmptyBundleDescriptionText(int i, int j, Font font, GuiGraphics guiGraphics) { - guiGraphics.drawWordWrap(font, BUNDLE_EMPTY_DESCRIPTION, i, j, 96, 11184810); + private static void drawEmptyBundleDescriptionText(int x, int y, Font font, GuiGraphics guiGraphics) { + guiGraphics.drawWordWrap(font, BUNDLE_EMPTY_DESCRIPTION, x, y, 96, 11184810); } private static int getEmptyBundleDescriptionTextHeight(Font font) { diff --git a/net/minecraft/client/gui/screens/inventory/tooltip/ClientTextTooltip.java b/net/minecraft/client/gui/screens/inventory/tooltip/ClientTextTooltip.java index 7ca1ba41..e23bcce8 100644 --- a/net/minecraft/client/gui/screens/inventory/tooltip/ClientTextTooltip.java +++ b/net/minecraft/client/gui/screens/inventory/tooltip/ClientTextTooltip.java @@ -3,7 +3,7 @@ package net.minecraft.client.gui.screens.inventory.tooltip; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.Font; -import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.util.FormattedCharSequence; import org.joml.Matrix4f; @@ -26,7 +26,7 @@ public class ClientTextTooltip implements ClientTooltipComponent { } @Override - public void renderText(Font font, int mouseX, int mouseY, Matrix4f matrix, MultiBufferSource.BufferSource bufferSource) { + public void renderText(Font font, int mouseX, int mouseY, Matrix4f matrix, BufferSource bufferSource) { font.drawInBatch(this.text, (float)mouseX, (float)mouseY, -1, true, matrix, bufferSource, Font.DisplayMode.NORMAL, 0, 15728880); } } diff --git a/net/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipComponent.java b/net/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipComponent.java index f49f2581..ab659fd5 100644 --- a/net/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipComponent.java +++ b/net/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipComponent.java @@ -4,7 +4,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.gui.Font; import net.minecraft.client.gui.GuiGraphics; -import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.util.FormattedCharSequence; import net.minecraft.world.inventory.tooltip.BundleTooltip; import net.minecraft.world.inventory.tooltip.TooltipComponent; @@ -32,9 +32,9 @@ public interface ClientTooltipComponent { return false; } - default void renderText(Font font, int mouseX, int mouseY, Matrix4f matrix, MultiBufferSource.BufferSource bufferSource) { + default void renderText(Font font, int mouseX, int mouseY, Matrix4f matrix, BufferSource bufferSource) { } - default void renderImage(Font font, int i, int j, int k, int l, GuiGraphics guiGraphics) { + default void renderImage(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics) { } } diff --git a/net/minecraft/client/gui/screens/inventory/tooltip/TooltipRenderUtil.java b/net/minecraft/client/gui/screens/inventory/tooltip/TooltipRenderUtil.java index ed79e697..087b6bf1 100644 --- a/net/minecraft/client/gui/screens/inventory/tooltip/TooltipRenderUtil.java +++ b/net/minecraft/client/gui/screens/inventory/tooltip/TooltipRenderUtil.java @@ -20,23 +20,23 @@ public class TooltipRenderUtil { public static final int PADDING_BOTTOM = 3; private static final int MARGIN = 9; - public static void renderTooltipBackground(GuiGraphics guiGraphics, int i, int j, int k, int l, int m, @Nullable ResourceLocation resourceLocation) { - int n = i - 3 - 9; - int o = j - 3 - 9; - int p = k + 3 + 3 + 18; - int q = l + 3 + 3 + 18; + public static void renderTooltipBackground(GuiGraphics guiGraphics, int x, int y, int width, int height, int z, @Nullable ResourceLocation sprite) { + int i = x - 3 - 9; + int j = y - 3 - 9; + int k = width + 3 + 3 + 18; + int l = height + 3 + 3 + 18; guiGraphics.pose().pushPose(); - guiGraphics.pose().translate(0.0F, 0.0F, (float)m); - guiGraphics.blitSprite(RenderType::guiTextured, getBackgroundSprite(resourceLocation), n, o, p, q); - guiGraphics.blitSprite(RenderType::guiTextured, getFrameSprite(resourceLocation), n, o, p, q); + guiGraphics.pose().translate(0.0F, 0.0F, (float)z); + guiGraphics.blitSprite(RenderType::guiTextured, getBackgroundSprite(sprite), i, j, k, l); + guiGraphics.blitSprite(RenderType::guiTextured, getFrameSprite(sprite), i, j, k, l); guiGraphics.pose().popPose(); } - private static ResourceLocation getBackgroundSprite(@Nullable ResourceLocation resourceLocation) { - return resourceLocation == null ? BACKGROUND_SPRITE : resourceLocation.withPath((UnaryOperator)(string -> "tooltip/" + string + "_background")); + private static ResourceLocation getBackgroundSprite(@Nullable ResourceLocation name) { + return name == null ? BACKGROUND_SPRITE : name.withPath((UnaryOperator)(string -> "tooltip/" + string + "_background")); } - private static ResourceLocation getFrameSprite(@Nullable ResourceLocation resourceLocation) { - return resourceLocation == null ? FRAME_SPRITE : resourceLocation.withPath((UnaryOperator)(string -> "tooltip/" + string + "_frame")); + private static ResourceLocation getFrameSprite(@Nullable ResourceLocation name) { + return name == null ? FRAME_SPRITE : name.withPath((UnaryOperator)(string -> "tooltip/" + string + "_frame")); } } diff --git a/net/minecraft/client/gui/screens/recipebook/CraftingRecipeBookComponent.java b/net/minecraft/client/gui/screens/recipebook/CraftingRecipeBookComponent.java index b7050919..839937ce 100644 --- a/net/minecraft/client/gui/screens/recipebook/CraftingRecipeBookComponent.java +++ b/net/minecraft/client/gui/screens/recipebook/CraftingRecipeBookComponent.java @@ -35,8 +35,8 @@ public class CraftingRecipeBookComponent extends RecipeBookComponent list) { - super(abstractFurnaceMenu, list); - this.recipeFilterName = component; + public FurnaceRecipeBookComponent(AbstractFurnaceMenu menu, Component recipeFilterName, List tabInfos) { + super(menu, tabInfos); + this.recipeFilterName = recipeFilterName; } @Override @@ -59,7 +59,7 @@ public class FurnaceRecipeBookComponent extends RecipeBookComponent recipeDisplay instanceof FurnaceRecipeDisplay); + protected void selectMatchingRecipes(RecipeCollection possibleRecipes, StackedItemContents stackedItemContents) { + possibleRecipes.selectRecipes(stackedItemContents, recipeDisplay -> recipeDisplay instanceof FurnaceRecipeDisplay); } } diff --git a/net/minecraft/client/gui/screens/recipebook/GhostSlots.java b/net/minecraft/client/gui/screens/recipebook/GhostSlots.java index a4c713ef..ab656d52 100644 --- a/net/minecraft/client/gui/screens/recipebook/GhostSlots.java +++ b/net/minecraft/client/gui/screens/recipebook/GhostSlots.java @@ -29,10 +29,10 @@ public class GhostSlots { this.ingredients.clear(); } - private void setSlot(Slot slot, ContextMap contextMap, SlotDisplay slotDisplay, boolean bl) { + private void setSlot(Slot slot, ContextMap contextMap, SlotDisplay slotDisplay, boolean isResultSlot) { List list = slotDisplay.resolveForStacks(contextMap); if (!list.isEmpty()) { - this.ingredients.put(slot, new GhostSlots.GhostSlot(list, bl)); + this.ingredients.put(slot, new GhostSlots.GhostSlot(list, isResultSlot)); } } @@ -44,11 +44,11 @@ public class GhostSlots { this.setSlot(slot, contextMap, slotDisplay, true); } - public void render(GuiGraphics guiGraphics, Minecraft minecraft, boolean bl) { + public void render(GuiGraphics guiGraphics, Minecraft minecraft, boolean isBiggerResultSlot) { this.ingredients.forEach((slot, ghostSlot) -> { int i = slot.x; int j = slot.y; - if (ghostSlot.isResultSlot && bl) { + if (ghostSlot.isResultSlot && isBiggerResultSlot) { guiGraphics.fill(i - 4, j - 4, i + 20, j + 20, 822018048); } else { guiGraphics.fill(i, j, i + 16, j + 16, 822018048); @@ -63,12 +63,14 @@ public class GhostSlots { }); } - public void renderTooltip(GuiGraphics guiGraphics, Minecraft minecraft, int i, int j, @Nullable Slot slot) { + public void renderTooltip(GuiGraphics guiGraphics, Minecraft minecraft, int mouseX, int mouseY, @Nullable Slot slot) { if (slot != null) { GhostSlots.GhostSlot ghostSlot = this.ingredients.get(slot); if (ghostSlot != null) { ItemStack itemStack = ghostSlot.getItem(this.slotSelectTime.currentIndex()); - guiGraphics.renderComponentTooltip(minecraft.font, Screen.getTooltipFromItem(minecraft, itemStack), i, j, itemStack.get(DataComponents.TOOLTIP_STYLE)); + guiGraphics.renderComponentTooltip( + minecraft.font, Screen.getTooltipFromItem(minecraft, itemStack), mouseX, mouseY, itemStack.get(DataComponents.TOOLTIP_STYLE) + ); } } } @@ -76,9 +78,9 @@ public class GhostSlots { @Environment(EnvType.CLIENT) record GhostSlot(List items, boolean isResultSlot) { - public ItemStack getItem(int i) { - int j = this.items.size(); - return j == 0 ? ItemStack.EMPTY : (ItemStack)this.items.get(i % j); + public ItemStack getItem(int index) { + int i = this.items.size(); + return i == 0 ? ItemStack.EMPTY : (ItemStack)this.items.get(index % i); } } } diff --git a/net/minecraft/client/gui/screens/recipebook/OverlayRecipeComponent.java b/net/minecraft/client/gui/screens/recipebook/OverlayRecipeComponent.java index 0d3fde2a..8f185826 100644 --- a/net/minecraft/client/gui/screens/recipebook/OverlayRecipeComponent.java +++ b/net/minecraft/client/gui/screens/recipebook/OverlayRecipeComponent.java @@ -45,53 +45,51 @@ public class OverlayRecipeComponent implements Renderable, GuiEventListener { final SlotSelectTime slotSelectTime; private final boolean isFurnaceMenu; - public OverlayRecipeComponent(SlotSelectTime slotSelectTime, boolean bl) { + public OverlayRecipeComponent(SlotSelectTime slotSelectTime, boolean isFurnaceMenu) { this.slotSelectTime = slotSelectTime; - this.isFurnaceMenu = bl; + this.isFurnaceMenu = isFurnaceMenu; } - public void init(RecipeCollection recipeCollection, ContextMap contextMap, boolean bl, int i, int j, int k, int l, float f) { - this.collection = recipeCollection; - List list = recipeCollection.getSelectedRecipes(RecipeCollection.CraftableStatus.CRAFTABLE); - List list2 = bl ? Collections.emptyList() : recipeCollection.getSelectedRecipes(RecipeCollection.CraftableStatus.NOT_CRAFTABLE); - int m = list.size(); - int n = m + list2.size(); - int o = n <= 16 ? 4 : 5; - int p = (int)Math.ceil((float)n / o); - this.x = i; - this.y = j; - float g = this.x + Math.min(n, o) * 25; - float h = k + 50; - if (g > h) { - this.x = (int)(this.x - f * (int)((g - h) / f)); + public void init(RecipeCollection collection, ContextMap contextMap, boolean isFiltering, int x, int y, int overlayX, int overlayY, float width) { + this.collection = collection; + List list = collection.getSelectedRecipes(RecipeCollection.CraftableStatus.CRAFTABLE); + List list2 = isFiltering ? Collections.emptyList() : collection.getSelectedRecipes(RecipeCollection.CraftableStatus.NOT_CRAFTABLE); + int i = list.size(); + int j = i + list2.size(); + int k = j <= 16 ? 4 : 5; + int l = (int)Math.ceil((float)j / k); + this.x = x; + this.y = y; + float f = this.x + Math.min(j, k) * 25; + float g = overlayX + 50; + if (f > g) { + this.x = (int)(this.x - width * (int)((f - g) / width)); } - float q = this.y + p * 25; - float r = l + 50; - if (q > r) { - this.y = (int)(this.y - f * Mth.ceil((q - r) / f)); + float h = this.y + l * 25; + float m = overlayY + 50; + if (h > m) { + this.y = (int)(this.y - width * Mth.ceil((h - m) / width)); } - float s = this.y; - float t = l - 100; - if (s < t) { - this.y = (int)(this.y - f * Mth.ceil((s - t) / f)); + float n = this.y; + float o = overlayY - 100; + if (n < o) { + this.y = (int)(this.y - width * Mth.ceil((n - o) / width)); } this.isVisible = true; this.recipeButtons.clear(); - for (int u = 0; u < n; u++) { - boolean bl2 = u < m; - RecipeDisplayEntry recipeDisplayEntry = bl2 ? (RecipeDisplayEntry)list.get(u) : (RecipeDisplayEntry)list2.get(u - m); - int v = this.x + 4 + 25 * (u % o); - int w = this.y + 5 + 25 * (u / o); + for (int p = 0; p < j; p++) { + boolean bl = p < i; + RecipeDisplayEntry recipeDisplayEntry = bl ? (RecipeDisplayEntry)list.get(p) : (RecipeDisplayEntry)list2.get(p - i); + int q = this.x + 4 + 25 * (p % k); + int r = this.y + 5 + 25 * (p / k); if (this.isFurnaceMenu) { - this.recipeButtons - .add(new OverlayRecipeComponent.OverlaySmeltingRecipeButton(v, w, recipeDisplayEntry.id(), recipeDisplayEntry.display(), contextMap, bl2)); + this.recipeButtons.add(new OverlayRecipeComponent.OverlaySmeltingRecipeButton(q, r, recipeDisplayEntry.id(), recipeDisplayEntry.display(), contextMap, bl)); } else { - this.recipeButtons - .add(new OverlayRecipeComponent.OverlayCraftingRecipeButton(v, w, recipeDisplayEntry.id(), recipeDisplayEntry.display(), contextMap, bl2)); + this.recipeButtons.add(new OverlayRecipeComponent.OverlayCraftingRecipeButton(q, r, recipeDisplayEntry.id(), recipeDisplayEntry.display(), contextMap, bl)); } } @@ -174,9 +172,9 @@ public class OverlayRecipeComponent implements Renderable, GuiEventListener { private static final int GRID_HEIGHT = 3; public OverlayCraftingRecipeButton( - final int i, final int j, final RecipeDisplayId recipeDisplayId, final RecipeDisplay recipeDisplay, final ContextMap contextMap, final boolean bl + final int x, final int y, final RecipeDisplayId recipe, final RecipeDisplay recipeDisplay, final ContextMap contextMap, final boolean isCraftable ) { - super(i, j, recipeDisplayId, bl, calculateIngredientsPositions(recipeDisplay, contextMap)); + super(x, y, recipe, isCraftable, calculateIngredientsPositions(recipeDisplay, contextMap)); } private static List calculateIngredientsPositions(RecipeDisplay recipeDisplay, ContextMap contextMap) { @@ -211,8 +209,8 @@ public class OverlayRecipeComponent implements Renderable, GuiEventListener { } @Override - protected ResourceLocation getSprite(boolean bl) { - if (bl) { + protected ResourceLocation getSprite(boolean enabled) { + if (enabled) { return this.isHoveredOrFocused() ? HIGHLIGHTED_ENABLED_SPRITE : ENABLED_SPRITE; } else { return this.isHoveredOrFocused() ? HIGHLIGHTED_DISABLED_SPRITE : DISABLED_SPRITE; @@ -226,18 +224,18 @@ public class OverlayRecipeComponent implements Renderable, GuiEventListener { private final boolean isCraftable; private final List slots; - public OverlayRecipeButton(final int i, final int j, final RecipeDisplayId recipeDisplayId, final boolean bl, final List list) { - super(i, j, 24, 24, CommonComponents.EMPTY); - this.slots = list; - this.recipe = recipeDisplayId; - this.isCraftable = bl; + public OverlayRecipeButton(final int x, final int y, final RecipeDisplayId recipe, final boolean isCraftable, final List slots) { + super(x, y, 24, 24, CommonComponents.EMPTY); + this.slots = slots; + this.recipe = recipe; + this.isCraftable = isCraftable; } - protected static Pos createGridPos(int i, int j, List list) { - return new Pos(3 + i * 7, 3 + j * 7, list); + protected static Pos createGridPos(int x, int y, List possibleItems) { + return new Pos(3 + x * 7, 3 + y * 7, possibleItems); } - protected abstract ResourceLocation getSprite(boolean bl); + protected abstract ResourceLocation getSprite(boolean enabled); @Override public void updateWidgetNarration(NarrationElementOutput narrationElementOutput) { @@ -270,9 +268,9 @@ public class OverlayRecipeComponent implements Renderable, GuiEventListener { private static final ResourceLocation HIGHLIGHTED_DISABLED_SPRITE = ResourceLocation.withDefaultNamespace("recipe_book/furnace_overlay_disabled_highlighted"); public OverlaySmeltingRecipeButton( - final int i, final int j, final RecipeDisplayId recipeDisplayId, final RecipeDisplay recipeDisplay, final ContextMap contextMap, final boolean bl + final int x, final int y, final RecipeDisplayId recipe, final RecipeDisplay recipeDisplay, final ContextMap contextMap, final boolean isCraftable ) { - super(i, j, recipeDisplayId, bl, calculateIngredientsPositions(recipeDisplay, contextMap)); + super(x, y, recipe, isCraftable, calculateIngredientsPositions(recipeDisplay, contextMap)); } private static List calculateIngredientsPositions(RecipeDisplay recipeDisplay, ContextMap contextMap) { @@ -287,8 +285,8 @@ public class OverlayRecipeComponent implements Renderable, GuiEventListener { } @Override - protected ResourceLocation getSprite(boolean bl) { - if (bl) { + protected ResourceLocation getSprite(boolean enabled) { + if (enabled) { return this.isHoveredOrFocused() ? HIGHLIGHTED_ENABLED_SPRITE : ENABLED_SPRITE; } else { return this.isHoveredOrFocused() ? HIGHLIGHTED_DISABLED_SPRITE : DISABLED_SPRITE; diff --git a/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java b/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java index 9e9f577f..87db9b35 100644 --- a/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java +++ b/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java @@ -27,6 +27,7 @@ import net.minecraft.client.gui.navigation.CommonInputs; import net.minecraft.client.gui.navigation.ScreenAxis; import net.minecraft.client.gui.navigation.ScreenRectangle; import net.minecraft.client.gui.screens.Screen; +import net.minecraft.client.gui.screens.Screen.NarratableSearchResult; import net.minecraft.client.multiplayer.ClientPacketListener; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.resources.language.LanguageInfo; @@ -100,19 +101,19 @@ public abstract class RecipeBookComponent implements R @Nullable private ScreenRectangle magnifierIconPlacement; - public RecipeBookComponent(T recipeBookMenu, List list) { - this.menu = recipeBookMenu; - this.tabInfos = list; + public RecipeBookComponent(T menu, List tabInfos) { + this.menu = menu; + this.tabInfos = tabInfos; SlotSelectTime slotSelectTime = () -> Mth.floor(this.time / 30.0F); this.ghostSlots = new GhostSlots(slotSelectTime); - this.recipeBookPage = new RecipeBookPage(this, slotSelectTime, recipeBookMenu instanceof AbstractFurnaceMenu); + this.recipeBookPage = new RecipeBookPage(this, slotSelectTime, menu instanceof AbstractFurnaceMenu); } - public void init(int i, int j, Minecraft minecraft, boolean bl) { + public void init(int width, int height, Minecraft minecraft, boolean widthTooNarrow) { this.minecraft = minecraft; - this.width = i; - this.height = j; - this.widthTooNarrow = bl; + this.width = width; + this.height = height; + this.widthTooNarrow = widthTooNarrow; this.book = minecraft.player.getRecipeBook(); this.timesInventoryChanged = minecraft.player.getInventory().getTimesChanged(); this.visible = this.isVisibleAccordingToBookData(); @@ -238,9 +239,9 @@ public abstract class RecipeBookComponent implements R } } - protected abstract void selectMatchingRecipes(RecipeCollection recipeCollection, StackedItemContents stackedItemContents); + protected abstract void selectMatchingRecipes(RecipeCollection possibleRecipes, StackedItemContents stackedItemContents); - private void updateCollections(boolean bl, boolean bl2) { + private void updateCollections(boolean resetPageNumber, boolean isFiltering) { List list = this.book.getCollection(this.selectedTab.getCategory()); List list2 = Lists.newArrayList(list); list2.removeIf(recipeCollection -> !recipeCollection.hasAnySelected()); @@ -253,14 +254,14 @@ public abstract class RecipeBookComponent implements R } } - if (bl2) { + if (isFiltering) { list2.removeIf(recipeCollection -> !recipeCollection.hasCraftable()); } - this.recipeBookPage.updateCollections(list2, bl, bl2); + this.recipeBookPage.updateCollections(list2, resetPageNumber, isFiltering); } - private void updateTabs(boolean bl) { + private void updateTabs(boolean isFiltering) { int i = (this.width - 147) / 2 - this.xOffset - 30; int j = (this.height - 166) / 2 + 3; int k = 27; @@ -273,7 +274,7 @@ public abstract class RecipeBookComponent implements R recipeBookTabButton.setPosition(i, j + 27 * l++); } else if (recipeBookTabButton.updateVisibility(this.book)) { recipeBookTabButton.setPosition(i, j + 27 * l++); - recipeBookTabButton.startAnimation(this.book, bl); + recipeBookTabButton.startAnimation(this.book, isFiltering); } } } @@ -328,17 +329,17 @@ public abstract class RecipeBookComponent implements R } } - public void renderTooltip(GuiGraphics guiGraphics, int i, int j, @Nullable Slot slot) { + public void renderTooltip(GuiGraphics guiGraphics, int mouseX, int mouseY, @Nullable Slot slot) { if (this.isVisible()) { - this.recipeBookPage.renderTooltip(guiGraphics, i, j); - this.ghostSlots.renderTooltip(guiGraphics, this.minecraft, i, j, slot); + this.recipeBookPage.renderTooltip(guiGraphics, mouseX, mouseY); + this.ghostSlots.renderTooltip(guiGraphics, this.minecraft, mouseX, mouseY, slot); } } protected abstract Component getRecipeFilterName(); - public void renderGhostRecipe(GuiGraphics guiGraphics, boolean bl) { - this.ghostSlots.render(guiGraphics, this.minecraft, bl); + public void renderGhostRecipe(GuiGraphics guiGraphics, boolean isBiggerResultSlot) { + this.ghostSlots.render(guiGraphics, this.minecraft, isBiggerResultSlot); } @Override @@ -403,13 +404,13 @@ public abstract class RecipeBookComponent implements R } } - private boolean tryPlaceRecipe(RecipeCollection recipeCollection, RecipeDisplayId recipeDisplayId) { - if (!recipeCollection.isCraftable(recipeDisplayId) && recipeDisplayId.equals(this.lastPlacedRecipe)) { + private boolean tryPlaceRecipe(RecipeCollection recipeCollection, RecipeDisplayId recipe) { + if (!recipeCollection.isCraftable(recipe) && recipe.equals(this.lastPlacedRecipe)) { return false; } else { - this.lastPlacedRecipe = recipeDisplayId; + this.lastPlacedRecipe = recipe; this.ghostSlots.clear(); - this.minecraft.gameMode.handlePlaceRecipe(this.minecraft.player.containerMenu.containerId, recipeDisplayId, Screen.hasShiftDown()); + this.minecraft.gameMode.handlePlaceRecipe(this.minecraft.player.containerMenu.containerId, recipe, Screen.hasShiftDown()); return true; } } @@ -421,7 +422,7 @@ public abstract class RecipeBookComponent implements R return bl; } - public boolean hasClickedOutside(double mouseX, double mouseY, int x, int y, int width, int height, int i) { + public boolean hasClickedOutside(double mouseX, double mouseY, int x, int y, int width, int height, int mouseButton) { if (!this.isVisible()) { return true; } else { @@ -530,8 +531,8 @@ public abstract class RecipeBookComponent implements R } } - public void recipeShown(RecipeDisplayId recipeDisplayId) { - this.minecraft.player.removeRecipeHighlight(recipeDisplayId); + public void recipeShown(RecipeDisplayId recipe) { + this.minecraft.player.removeRecipeHighlight(recipe); } public void fillGhostRecipe(RecipeDisplay recipeDisplay) { @@ -567,7 +568,7 @@ public abstract class RecipeBookComponent implements R list.add(this.searchBox); list.add(this.filterButton); list.addAll(this.tabButtons); - Screen.NarratableSearchResult narratableSearchResult = Screen.findNarratableWidget(list, null); + NarratableSearchResult narratableSearchResult = Screen.findNarratableWidget(list, null); if (narratableSearchResult != null) { narratableSearchResult.entry.updateNarration(narrationElementOutput.nest()); } @@ -575,16 +576,16 @@ public abstract class RecipeBookComponent implements R @Environment(EnvType.CLIENT) public record TabInfo(ItemStack primaryIcon, Optional secondaryIcon, ExtendedRecipeBookCategory category) { - public TabInfo(SearchRecipeBookCategory searchRecipeBookCategory) { - this(new ItemStack(Items.COMPASS), Optional.empty(), searchRecipeBookCategory); + public TabInfo(SearchRecipeBookCategory category) { + this(new ItemStack(Items.COMPASS), Optional.empty(), category); } - public TabInfo(Item item, RecipeBookCategory recipeBookCategory) { - this(new ItemStack(item), Optional.empty(), recipeBookCategory); + public TabInfo(Item primaryIcon, RecipeBookCategory category) { + this(new ItemStack(primaryIcon), Optional.empty(), category); } - public TabInfo(Item item, Item item2, RecipeBookCategory recipeBookCategory) { - this(new ItemStack(item), Optional.of(new ItemStack(item2)), recipeBookCategory); + public TabInfo(Item primaryIcon, Item secondaryIcon, RecipeBookCategory category) { + this(new ItemStack(primaryIcon), Optional.of(new ItemStack(secondaryIcon)), category); } } } diff --git a/net/minecraft/client/gui/screens/recipebook/RecipeBookPage.java b/net/minecraft/client/gui/screens/recipebook/RecipeBookPage.java index de1849c0..98752a12 100644 --- a/net/minecraft/client/gui/screens/recipebook/RecipeBookPage.java +++ b/net/minecraft/client/gui/screens/recipebook/RecipeBookPage.java @@ -48,9 +48,9 @@ public class RecipeBookPage { private RecipeCollection lastClickedRecipeCollection; private boolean isFiltering; - public RecipeBookPage(RecipeBookComponent recipeBookComponent, SlotSelectTime slotSelectTime, boolean bl) { - this.parent = recipeBookComponent; - this.overlay = new OverlayRecipeComponent(slotSelectTime, bl); + public RecipeBookPage(RecipeBookComponent parent, SlotSelectTime slotSelectTime, boolean isFurnaceMenu) { + this.parent = parent; + this.overlay = new OverlayRecipeComponent(slotSelectTime, isFurnaceMenu); for (int i = 0; i < 20; i++) { this.buttons.add(new RecipeButton(slotSelectTime)); @@ -71,11 +71,11 @@ public class RecipeBookPage { this.backButton.initTextureValues(PAGE_BACKWARD_SPRITES); } - public void updateCollections(List list, boolean bl, boolean bl2) { - this.recipeCollections = list; - this.isFiltering = bl2; - this.totalPages = (int)Math.ceil(list.size() / 20.0); - if (this.totalPages <= this.currentPage || bl) { + public void updateCollections(List recipeCollections, boolean resetPageNumber, boolean isFiltering) { + this.recipeCollections = recipeCollections; + this.isFiltering = isFiltering; + this.totalPages = (int)Math.ceil(recipeCollections.size() / 20.0); + if (this.totalPages <= this.currentPage || resetPageNumber) { this.currentPage = 0; } @@ -148,7 +148,7 @@ public class RecipeBookPage { this.overlay.setVisible(false); } - public boolean mouseClicked(double mouseX, double mouseY, int button, int i, int j, int k, int l) { + public boolean mouseClicked(double mouseX, double mouseY, int button, int x, int y, int width, int height) { this.lastClickedRecipe = null; this.lastClickedRecipeCollection = null; if (this.overlay.isVisible()) { @@ -184,8 +184,8 @@ public class RecipeBookPage { this.isFiltering, recipeButton.getX(), recipeButton.getY(), - i + k / 2, - j + 13 + l / 2, + x + width / 2, + y + 13 + height / 2, recipeButton.getWidth() ); } @@ -198,8 +198,8 @@ public class RecipeBookPage { } } - public void recipeShown(RecipeDisplayId recipeDisplayId) { - this.parent.recipeShown(recipeDisplayId); + public void recipeShown(RecipeDisplayId recipe) { + this.parent.recipeShown(recipe); } public ClientRecipeBook getRecipeBook() { diff --git a/net/minecraft/client/gui/screens/recipebook/RecipeBookTabButton.java b/net/minecraft/client/gui/screens/recipebook/RecipeBookTabButton.java index 8829b607..1d233ce5 100644 --- a/net/minecraft/client/gui/screens/recipebook/RecipeBookTabButton.java +++ b/net/minecraft/client/gui/screens/recipebook/RecipeBookTabButton.java @@ -28,12 +28,12 @@ public class RecipeBookTabButton extends StateSwitchingButton { this.initTextureValues(SPRITES); } - public void startAnimation(ClientRecipeBook clientRecipeBook, boolean bl) { - RecipeCollection.CraftableStatus craftableStatus = bl ? RecipeCollection.CraftableStatus.CRAFTABLE : RecipeCollection.CraftableStatus.ANY; + public void startAnimation(ClientRecipeBook recipeBook, boolean isFiltering) { + RecipeCollection.CraftableStatus craftableStatus = isFiltering ? RecipeCollection.CraftableStatus.CRAFTABLE : RecipeCollection.CraftableStatus.ANY; - for (RecipeCollection recipeCollection : clientRecipeBook.getCollection(this.tabInfo.category())) { + for (RecipeCollection recipeCollection : recipeBook.getCollection(this.tabInfo.category())) { for (RecipeDisplayEntry recipeDisplayEntry : recipeCollection.getSelectedRecipes(craftableStatus)) { - if (clientRecipeBook.willHighlight(recipeDisplayEntry.id())) { + if (recipeBook.willHighlight(recipeDisplayEntry.id())) { this.animationTime = 15.0F; return; } diff --git a/net/minecraft/client/gui/screens/recipebook/RecipeButton.java b/net/minecraft/client/gui/screens/recipebook/RecipeButton.java index d5d244e8..e40d8f8a 100644 --- a/net/minecraft/client/gui/screens/recipebook/RecipeButton.java +++ b/net/minecraft/client/gui/screens/recipebook/RecipeButton.java @@ -38,15 +38,15 @@ public class RecipeButton extends AbstractWidget { this.slotSelectTime = slotSelectTime; } - public void init(RecipeCollection recipeCollection, boolean bl, RecipeBookPage recipeBookPage, ContextMap contextMap) { - this.collection = recipeCollection; - List list = recipeCollection.getSelectedRecipes(bl ? RecipeCollection.CraftableStatus.CRAFTABLE : RecipeCollection.CraftableStatus.ANY); + public void init(RecipeCollection collection, boolean isFiltering, RecipeBookPage page, ContextMap contextMap) { + this.collection = collection; + List list = collection.getSelectedRecipes(isFiltering ? RecipeCollection.CraftableStatus.CRAFTABLE : RecipeCollection.CraftableStatus.ANY); this.selectedEntries = list.stream() .map(recipeDisplayEntry -> new RecipeButton.ResolvedEntry(recipeDisplayEntry.id(), recipeDisplayEntry.resultItems(contextMap))) .toList(); - List list2 = list.stream().map(RecipeDisplayEntry::id).filter(recipeBookPage.getRecipeBook()::willHighlight).toList(); + List list2 = list.stream().map(RecipeDisplayEntry::id).filter(page.getRecipeBook()::willHighlight).toList(); if (!list2.isEmpty()) { - list2.forEach(recipeBookPage::recipeShown); + list2.forEach(page::recipeShown); this.animationTime = 15.0F; } } @@ -115,8 +115,8 @@ public class RecipeButton extends AbstractWidget { return ((RecipeButton.ResolvedEntry)this.selectedEntries.get(l)).selectItem(k); } - public List getTooltipText(ItemStack itemStack) { - List list = new ArrayList(Screen.getTooltipFromItem(Minecraft.getInstance(), itemStack)); + public List getTooltipText(ItemStack stack) { + List list = new ArrayList(Screen.getTooltipFromItem(Minecraft.getInstance(), stack)); if (this.hasMultipleRecipes()) { list.add(MORE_RECIPES_TOOLTIP); } @@ -149,12 +149,12 @@ public class RecipeButton extends AbstractWidget { @Environment(EnvType.CLIENT) record ResolvedEntry(RecipeDisplayId id, List displayItems) { - public ItemStack selectItem(int i) { + public ItemStack selectItem(int index) { if (this.displayItems.isEmpty()) { return ItemStack.EMPTY; } else { - int j = i % this.displayItems.size(); - return (ItemStack)this.displayItems.get(j); + int i = index % this.displayItems.size(); + return (ItemStack)this.displayItems.get(i); } } } diff --git a/net/minecraft/client/gui/screens/recipebook/RecipeCollection.java b/net/minecraft/client/gui/screens/recipebook/RecipeCollection.java index dad3941b..6428fac6 100644 --- a/net/minecraft/client/gui/screens/recipebook/RecipeCollection.java +++ b/net/minecraft/client/gui/screens/recipebook/RecipeCollection.java @@ -20,21 +20,21 @@ public class RecipeCollection { private final Set craftable = new HashSet(); private final Set selected = new HashSet(); - public RecipeCollection(List list) { - this.entries = list; - if (list.size() <= 1) { + public RecipeCollection(List entries) { + this.entries = entries; + if (entries.size() <= 1) { this.singleResultItem = true; } else { this.singleResultItem = allRecipesHaveSameResult(this.entries); } } - private static boolean allRecipesHaveSameResult(List list) { - int i = list.size(); - SlotDisplay slotDisplay = ((RecipeDisplayEntry)list.getFirst()).display().result(); + private static boolean allRecipesHaveSameResult(List recipes) { + int i = recipes.size(); + SlotDisplay slotDisplay = ((RecipeDisplayEntry)recipes.getFirst()).display().result(); for (int j = 1; j < i; j++) { - SlotDisplay slotDisplay2 = ((RecipeDisplayEntry)list.get(j)).display().result(); + SlotDisplay slotDisplay2 = ((RecipeDisplayEntry)recipes.get(j)).display().result(); if (!slotDisplay2.equals(slotDisplay)) { return false; } @@ -43,9 +43,9 @@ public class RecipeCollection { return true; } - public void selectRecipes(StackedItemContents stackedItemContents, Predicate predicate) { + public void selectRecipes(StackedItemContents stackedItemContents, Predicate filter) { for (RecipeDisplayEntry recipeDisplayEntry : this.entries) { - boolean bl = predicate.test(recipeDisplayEntry.display()); + boolean bl = filter.test(recipeDisplayEntry.display()); if (bl) { this.selected.add(recipeDisplayEntry.id()); } else { @@ -60,8 +60,8 @@ public class RecipeCollection { } } - public boolean isCraftable(RecipeDisplayId recipeDisplayId) { - return this.craftable.contains(recipeDisplayId); + public boolean isCraftable(RecipeDisplayId recipe) { + return this.craftable.contains(recipe); } public boolean hasCraftable() { diff --git a/net/minecraft/client/gui/screens/recipebook/SearchRecipeBookCategory.java b/net/minecraft/client/gui/screens/recipebook/SearchRecipeBookCategory.java index dd34ae4d..f2eb86fb 100644 --- a/net/minecraft/client/gui/screens/recipebook/SearchRecipeBookCategory.java +++ b/net/minecraft/client/gui/screens/recipebook/SearchRecipeBookCategory.java @@ -21,8 +21,8 @@ public enum SearchRecipeBookCategory implements ExtendedRecipeBookCategory { private final List includedCategories; - private SearchRecipeBookCategory(final RecipeBookCategory... recipeBookCategorys) { - this.includedCategories = List.of(recipeBookCategorys); + private SearchRecipeBookCategory(final RecipeBookCategory... includedCategories) { + this.includedCategories = List.of(includedCategories); } public List includedCategories() { diff --git a/net/minecraft/client/gui/screens/reporting/ReportReasonSelectionScreen.java b/net/minecraft/client/gui/screens/reporting/ReportReasonSelectionScreen.java index 42190354..59f3afb2 100644 --- a/net/minecraft/client/gui/screens/reporting/ReportReasonSelectionScreen.java +++ b/net/minecraft/client/gui/screens/reporting/ReportReasonSelectionScreen.java @@ -40,11 +40,13 @@ public class ReportReasonSelectionScreen extends Screen { final HeaderAndFooterLayout layout = new HeaderAndFooterLayout(this); final ReportType reportType; - public ReportReasonSelectionScreen(@Nullable Screen screen, @Nullable ReportReason reportReason, ReportType reportType, Consumer consumer) { + public ReportReasonSelectionScreen( + @Nullable Screen lastScreen, @Nullable ReportReason currentlySelectedReason, ReportType reportType, Consumer onSelectedReason + ) { super(REASON_TITLE); - this.lastScreen = screen; - this.currentlySelectedReason = reportReason; - this.onSelectedReason = consumer; + this.lastScreen = lastScreen; + this.currentlySelectedReason = currentlySelectedReason; + this.onSelectedReason = onSelectedReason; this.reportType = reportType; } diff --git a/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java b/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java index 12835789..7336a280 100644 --- a/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java @@ -35,6 +35,7 @@ import net.minecraft.client.gui.components.CycleButton; import net.minecraft.client.gui.components.EditBox; import net.minecraft.client.gui.components.Renderable; import net.minecraft.client.gui.components.Tooltip; +import net.minecraft.client.gui.components.CycleButton.ValueListSupplier; import net.minecraft.client.gui.components.events.GuiEventListener; import net.minecraft.client.gui.components.tabs.GridLayoutTab; import net.minecraft.client.gui.components.tabs.TabManager; @@ -54,8 +55,10 @@ import net.minecraft.client.gui.screens.packs.PackSelectionScreen; import net.minecraft.client.gui.screens.worldselection.CreateWorldScreen.WorldTab.1; import net.minecraft.client.gui.screens.worldselection.CreateWorldScreen.WorldTab.2; import net.minecraft.client.gui.screens.worldselection.SwitchGrid.Builder; +import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState.SelectedGameMode; +import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState.WorldTypeEntry; import net.minecraft.client.renderer.RenderType; -import net.minecraft.commands.Commands; +import net.minecraft.commands.Commands.CommandSelection; import net.minecraft.core.LayeredRegistryAccess; import net.minecraft.core.registries.Registries; import net.minecraft.network.chat.CommonComponents; @@ -65,6 +68,10 @@ import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.RegistryLayer; import net.minecraft.server.WorldLoader; +import net.minecraft.server.WorldLoader.DataLoadContext; +import net.minecraft.server.WorldLoader.DataLoadOutput; +import net.minecraft.server.WorldLoader.InitConfig; +import net.minecraft.server.WorldLoader.PackConfig; import net.minecraft.server.packs.repository.PackRepository; import net.minecraft.server.packs.repository.ServerPacksSource; import net.minecraft.world.Difficulty; @@ -85,6 +92,7 @@ import net.minecraft.world.level.storage.LevelResource; import net.minecraft.world.level.storage.LevelStorageSource; import net.minecraft.world.level.storage.PrimaryLevelData; import net.minecraft.world.level.storage.WorldData; +import net.minecraft.world.level.storage.PrimaryLevelData.SpecialWorldProperty; import net.minecraft.world.level.validation.DirectoryValidator; import org.apache.commons.lang3.mutable.MutableObject; import org.jetbrains.annotations.Nullable; @@ -127,17 +135,17 @@ public class CreateWorldScreen extends Screen { ); } - public static void openFresh(Minecraft minecraft, @Nullable Screen screen, CreateWorldCallback createWorldCallback) { + public static void openFresh(Minecraft minecraft, @Nullable Screen lastScreen, CreateWorldCallback callback) { WorldCreationContextMapper worldCreationContextMapper = (reloadableServerResources, layeredRegistryAccess, dataPackReloadCookie) -> new WorldCreationContext( dataPackReloadCookie.worldGenSettings(), layeredRegistryAccess, reloadableServerResources, dataPackReloadCookie.dataConfiguration() ); - Function function = dataLoadContext -> new WorldGenSettings( + Function function = dataLoadContext -> new WorldGenSettings( WorldOptions.defaultWithRandomSeed(), WorldPresets.createNormalWorldDimensions(dataLoadContext.datapackWorldgen()) ); - openCreateWorldScreen(minecraft, screen, function, worldCreationContextMapper, WorldPresets.NORMAL, createWorldCallback); + openCreateWorldScreen(minecraft, lastScreen, function, worldCreationContextMapper, WorldPresets.NORMAL, callback); } - public static void testWorld(Minecraft minecraft, @Nullable Screen screen) { + public static void testWorld(Minecraft minecraft, @Nullable Screen lastScreen) { WorldCreationContextMapper worldCreationContextMapper = (reloadableServerResources, layeredRegistryAccess, dataPackReloadCookie) -> new WorldCreationContext( dataPackReloadCookie.worldGenSettings().options(), dataPackReloadCookie.worldGenSettings().dimensions(), @@ -145,17 +153,17 @@ public class CreateWorldScreen extends Screen { reloadableServerResources, dataPackReloadCookie.dataConfiguration(), new InitialWorldCreationOptions( - WorldCreationUiState.SelectedGameMode.CREATIVE, + SelectedGameMode.CREATIVE, Set.of(GameRules.RULE_DAYLIGHT, GameRules.RULE_WEATHER_CYCLE, GameRules.RULE_DOMOBSPAWNING), FlatLevelGeneratorPresets.REDSTONE_READY ) ); - Function function = dataLoadContext -> new WorldGenSettings( + Function function = dataLoadContext -> new WorldGenSettings( WorldOptions.testWorldWithRandomSeed(), WorldPresets.createFlatWorldDimensions(dataLoadContext.datapackWorldgen()) ); openCreateWorldScreen( minecraft, - screen, + lastScreen, function, worldCreationContextMapper, WorldPresets.FLAT, @@ -165,42 +173,43 @@ public class CreateWorldScreen extends Screen { private static void openCreateWorldScreen( Minecraft minecraft, - @Nullable Screen screen, - Function function, - WorldCreationContextMapper worldCreationContextMapper, - ResourceKey resourceKey, + @Nullable Screen lastScreen, + Function worldGenSettingsGetter, + WorldCreationContextMapper creationContextMapper, + ResourceKey preset, CreateWorldCallback createWorldCallback ) { queueLoadScreen(minecraft, PREPARING_WORLD_DATA); PackRepository packRepository = new PackRepository(new ServerPacksSource(minecraft.directoryValidator())); - WorldLoader.InitConfig initConfig = createDefaultLoadConfig(packRepository, WorldDataConfiguration.DEFAULT); + InitConfig initConfig = createDefaultLoadConfig(packRepository, WorldDataConfiguration.DEFAULT); CompletableFuture completableFuture = WorldLoader.load( initConfig, - dataLoadContext -> new WorldLoader.DataLoadOutput<>( - new DataPackReloadCookie((WorldGenSettings)function.apply(dataLoadContext), dataLoadContext.dataConfiguration()), dataLoadContext.datapackDimensions() + dataLoadContext -> new DataLoadOutput<>( + new DataPackReloadCookie((WorldGenSettings)worldGenSettingsGetter.apply(dataLoadContext), dataLoadContext.dataConfiguration()), + dataLoadContext.datapackDimensions() ), (closeableResourceManager, reloadableServerResources, layeredRegistryAccess, dataPackReloadCookie) -> { closeableResourceManager.close(); - return worldCreationContextMapper.apply(reloadableServerResources, layeredRegistryAccess, dataPackReloadCookie); + return creationContextMapper.apply(reloadableServerResources, layeredRegistryAccess, dataPackReloadCookie); }, Util.backgroundExecutor(), minecraft ); minecraft.managedBlock(completableFuture::isDone); minecraft.setScreen( - new CreateWorldScreen(minecraft, screen, (WorldCreationContext)completableFuture.join(), Optional.of(resourceKey), OptionalLong.empty(), createWorldCallback) + new CreateWorldScreen(minecraft, lastScreen, (WorldCreationContext)completableFuture.join(), Optional.of(preset), OptionalLong.empty(), createWorldCallback) ); } public static CreateWorldScreen createFromExisting( - Minecraft minecraft, @Nullable Screen lastScreen, LevelSettings levelSettings, WorldCreationContext settings, @Nullable Path tempDataPackDir + Minecraft minecraft, @Nullable Screen lastScreen, LevelSettings levelSettings, WorldCreationContext context, @Nullable Path tempDataPackDir ) { CreateWorldScreen createWorldScreen = new CreateWorldScreen( minecraft, lastScreen, - settings, - WorldPresets.fromSettings(settings.selectedDimensions()), - OptionalLong.of(settings.options().seed()), + context, + WorldPresets.fromSettings(context.selectedDimensions()), + OptionalLong.of(context.options().seed()), (createWorldScreenx, layeredRegistryAccess, primaryLevelData, path) -> createWorldScreenx.createNewWorld(layeredRegistryAccess, primaryLevelData) ); createWorldScreen.recreated = true; @@ -209,11 +218,11 @@ public class CreateWorldScreen extends Screen { createWorldScreen.uiState.setDifficulty(levelSettings.difficulty()); createWorldScreen.uiState.getGameRules().assignFrom(levelSettings.gameRules(), null); if (levelSettings.hardcore()) { - createWorldScreen.uiState.setGameMode(WorldCreationUiState.SelectedGameMode.HARDCORE); + createWorldScreen.uiState.setGameMode(SelectedGameMode.HARDCORE); } else if (levelSettings.gameType().isSurvival()) { - createWorldScreen.uiState.setGameMode(WorldCreationUiState.SelectedGameMode.SURVIVAL); + createWorldScreen.uiState.setGameMode(SelectedGameMode.SURVIVAL); } else if (levelSettings.gameType().isCreative()) { - createWorldScreen.uiState.setGameMode(WorldCreationUiState.SelectedGameMode.CREATIVE); + createWorldScreen.uiState.setGameMode(SelectedGameMode.CREATIVE); } createWorldScreen.tempDataPackDir = tempDataPackDir; @@ -222,17 +231,17 @@ public class CreateWorldScreen extends Screen { private CreateWorldScreen( Minecraft minecraft, - @Nullable Screen screen, - WorldCreationContext worldCreationContext, - Optional> optional, - OptionalLong optionalLong, + @Nullable Screen lastScreen, + WorldCreationContext context, + Optional> preset, + OptionalLong seed, CreateWorldCallback createWorldCallback ) { super(Component.translatable("selectWorld.create")); - this.lastScreen = screen; + this.lastScreen = lastScreen; this.packValidator = minecraft.directoryValidator(); this.createWorldCallback = createWorldCallback; - this.uiState = new WorldCreationUiState(minecraft.getLevelSource().getBaseDir(), worldCreationContext, optional, optionalLong); + this.uiState = new WorldCreationUiState(minecraft.getLevelSource().getBaseDir(), context, preset, seed); } public WorldCreationUiState getUiState() { @@ -287,20 +296,20 @@ public class CreateWorldScreen extends Screen { Lifecycle lifecycle2 = layeredRegistryAccess.compositeAccess().allRegistriesLifecycle(); Lifecycle lifecycle3 = lifecycle2.add(lifecycle); boolean bl = !this.recreated && lifecycle2 == Lifecycle.stable(); - LevelSettings levelSettings = this.createLevelSettings(complete.specialWorldProperty() == PrimaryLevelData.SpecialWorldProperty.DEBUG); + LevelSettings levelSettings = this.createLevelSettings(complete.specialWorldProperty() == SpecialWorldProperty.DEBUG); PrimaryLevelData primaryLevelData = new PrimaryLevelData(levelSettings, this.uiState.getSettings().options(), complete.specialWorldProperty(), lifecycle3); WorldOpenFlows.confirmWorldCreation(this.minecraft, this, lifecycle3, () -> this.createWorldAndCleanup(layeredRegistryAccess, primaryLevelData), bl); } - private void createWorldAndCleanup(LayeredRegistryAccess layeredRegistryAccess, PrimaryLevelData primaryLevelData) { - boolean bl = this.createWorldCallback.create(this, layeredRegistryAccess, primaryLevelData, this.tempDataPackDir); + private void createWorldAndCleanup(LayeredRegistryAccess registryAccess, PrimaryLevelData levelData) { + boolean bl = this.createWorldCallback.create(this, registryAccess, levelData, this.tempDataPackDir); this.removeTempDataPackDir(); if (!bl) { this.popScreen(); } } - private boolean createNewWorld(LayeredRegistryAccess layeredRegistryAccess, WorldData worldData) { + private boolean createNewWorld(LayeredRegistryAccess registryAccess, WorldData worldData) { String string = this.uiState.getTargetFolder(); WorldCreationContext worldCreationContext = this.uiState.getSettings(); queueLoadScreen(this.minecraft, PREPARING_WORLD_DATA); @@ -311,9 +320,7 @@ public class CreateWorldScreen extends Screen { } else { this.minecraft .createWorldOpenFlows() - .createLevelFromExistingSettings( - (LevelStorageSource.LevelStorageAccess)optional.get(), worldCreationContext.dataPackResources(), layeredRegistryAccess, worldData - ); + .createLevelFromExistingSettings((LevelStorageSource.LevelStorageAccess)optional.get(), worldCreationContext.dataPackResources(), registryAccess, worldData); return true; } } @@ -421,7 +428,7 @@ public class CreateWorldScreen extends Screen { } } - private void tryApplyNewDataPacks(PackRepository packRepository, boolean shouldConfirm, Consumer consumer) { + private void tryApplyNewDataPacks(PackRepository packRepository, boolean shouldConfirm, Consumer callback) { List list = ImmutableList.copyOf(packRepository.getSelectedIds()); List list2 = (List)packRepository.getAvailableIds() .stream() @@ -437,20 +444,20 @@ public class CreateWorldScreen extends Screen { if (FeatureFlags.isExperimental(featureFlagSet) && shouldConfirm) { this.minecraft.setScreen(new ConfirmExperimentalFeaturesScreen(packRepository.getSelectedPacks(), bl -> { if (bl) { - this.applyNewPackConfig(packRepository, worldDataConfiguration, consumer); + this.applyNewPackConfig(packRepository, worldDataConfiguration, callback); } else { - consumer.accept(this.uiState.getSettings().dataConfiguration()); + callback.accept(this.uiState.getSettings().dataConfiguration()); } })); } else { - this.applyNewPackConfig(packRepository, worldDataConfiguration, consumer); + this.applyNewPackConfig(packRepository, worldDataConfiguration, callback); } } } - private void applyNewPackConfig(PackRepository packRepository, WorldDataConfiguration worldDataConfiguration, Consumer consumer) { + private void applyNewPackConfig(PackRepository packRepository, WorldDataConfiguration worldDataConfiguration, Consumer callback) { this.minecraft.forceSetScreen(new GenericMessageScreen(Component.translatable("dataPack.validation.working"))); - WorldLoader.InitConfig initConfig = createDefaultLoadConfig(packRepository, worldDataConfiguration); + InitConfig initConfig = createDefaultLoadConfig(packRepository, worldDataConfiguration); WorldLoader.load( initConfig, dataLoadContext -> { @@ -466,9 +473,7 @@ public class CreateWorldScreen extends Screen { DynamicOps dynamicOps2 = dataLoadContext.datapackWorldgen().createSerializationContext(JsonOps.INSTANCE); WorldGenSettings worldGenSettings = dataResult.flatMap(jsonElement -> WorldGenSettings.CODEC.parse(dynamicOps2, jsonElement)) .getOrThrow(string -> new IllegalStateException("Error parsing worldgen settings after loading data packs: " + string)); - return new WorldLoader.DataLoadOutput<>( - new DataPackReloadCookie(worldGenSettings, dataLoadContext.dataConfiguration()), dataLoadContext.datapackDimensions() - ); + return new DataLoadOutput<>(new DataPackReloadCookie(worldGenSettings, dataLoadContext.dataConfiguration()), dataLoadContext.datapackDimensions()); } }, (closeableResourceManager, reloadableServerResources, layeredRegistryAccess, dataPackReloadCookie) -> { @@ -494,9 +499,9 @@ public class CreateWorldScreen extends Screen { new ConfirmScreen( bl -> { if (bl) { - consumer.accept(this.uiState.getSettings().dataConfiguration()); + callback.accept(this.uiState.getSettings().dataConfiguration()); } else { - consumer.accept(WorldDataConfiguration.DEFAULT); + callback.accept(WorldDataConfiguration.DEFAULT); } }, Component.translatable("dataPack.validation.failed"), @@ -515,9 +520,9 @@ public class CreateWorldScreen extends Screen { ); } - private static WorldLoader.InitConfig createDefaultLoadConfig(PackRepository packRepository, WorldDataConfiguration initialDataConfig) { - WorldLoader.PackConfig packConfig = new WorldLoader.PackConfig(packRepository, initialDataConfig, false, true); - return new WorldLoader.InitConfig(packConfig, Commands.CommandSelection.INTEGRATED, 2); + private static InitConfig createDefaultLoadConfig(PackRepository packRepository, WorldDataConfiguration initialDataConfig) { + PackConfig packConfig = new PackConfig(packRepository, initialDataConfig, false, true); + return new InitConfig(packConfig, CommandSelection.INTEGRATED, 2); } private void removeTempDataPackDir() { @@ -565,21 +570,21 @@ public class CreateWorldScreen extends Screen { } } - private static Optional createNewWorldDirectory(Minecraft minecraft, String string, @Nullable Path path) { + private static Optional createNewWorldDirectory(Minecraft minecraft, String saveName, @Nullable Path tempDataPackDir) { try { - LevelStorageSource.LevelStorageAccess levelStorageAccess = minecraft.getLevelSource().createAccess(string); - if (path == null) { + LevelStorageSource.LevelStorageAccess levelStorageAccess = minecraft.getLevelSource().createAccess(saveName); + if (tempDataPackDir == null) { return Optional.of(levelStorageAccess); } try { - Stream stream = Files.walk(path); + Stream stream = Files.walk(tempDataPackDir); Optional var6; try { - Path path2 = levelStorageAccess.getLevelPath(LevelResource.DATAPACK_DIR); - FileUtil.createDirectoriesSafe(path2); - stream.filter(path2x -> !path2x.equals(path)).forEach(path3 -> copyBetweenDirs(path, path2, path3)); + Path path = levelStorageAccess.getLevelPath(LevelResource.DATAPACK_DIR); + FileUtil.createDirectoriesSafe(path); + stream.filter(path2 -> !path2.equals(tempDataPackDir)).forEach(path3 -> copyBetweenDirs(tempDataPackDir, path, path3)); var6 = Optional.of(levelStorageAccess); } catch (Throwable var8) { if (stream != null) { @@ -599,11 +604,11 @@ public class CreateWorldScreen extends Screen { return var6; } catch (UncheckedIOException | IOException var9) { - LOGGER.warn("Failed to copy datapacks to world {}", string, var9); + LOGGER.warn("Failed to copy datapacks to world {}", saveName, var9); levelStorageAccess.close(); } } catch (UncheckedIOException | IOException var10) { - LOGGER.warn("Failed to create access for {}", string, var10); + LOGGER.warn("Failed to create access for {}", saveName, var10); } return Optional.empty(); @@ -699,9 +704,9 @@ public class CreateWorldScreen extends Screen { CommonLayouts.labeledElement(CreateWorldScreen.this.font, this.nameEdit, CreateWorldScreen.NAME_LABEL), rowHelper.newCellSettings().alignHorizontallyCenter() ); - CycleButton cycleButton = rowHelper.addChild( - CycleButton.builder(selectedGameMode -> selectedGameMode.displayName) - .withValues(WorldCreationUiState.SelectedGameMode.SURVIVAL, WorldCreationUiState.SelectedGameMode.HARDCORE, WorldCreationUiState.SelectedGameMode.CREATIVE) + CycleButton cycleButton = rowHelper.addChild( + CycleButton.builder(selectedGameMode -> selectedGameMode.displayName) + .withValues(SelectedGameMode.SURVIVAL, SelectedGameMode.HARDCORE, SelectedGameMode.CREATIVE) .create( 0, 0, 210, 20, CreateWorldScreen.GAME_MODEL_LABEL, (cycleButtonx, selectedGameMode) -> CreateWorldScreen.this.uiState.setGameMode(selectedGameMode) ), @@ -803,8 +808,8 @@ public class CreateWorldScreen extends Screen { WorldTab() { super(TITLE); RowHelper rowHelper = this.layout.columnSpacing(10).rowSpacing(8).createRowHelper(2); - CycleButton cycleButton = rowHelper.addChild( - CycleButton.builder(WorldCreationUiState.WorldTypeEntry::describePreset) + CycleButton cycleButton = rowHelper.addChild( + CycleButton.builder(WorldTypeEntry::describePreset) .withValues(this.createWorldTypeValueSupplier()) .withCustomNarration(CreateWorldScreen.WorldTab::createTypeButtonNarration) .create( @@ -818,7 +823,7 @@ public class CreateWorldScreen extends Screen { ); cycleButton.setValue(CreateWorldScreen.this.uiState.getWorldType()); CreateWorldScreen.this.uiState.addListener(worldCreationUiState -> { - WorldCreationUiState.WorldTypeEntry worldTypeEntry = worldCreationUiState.getWorldType(); + WorldTypeEntry worldTypeEntry = worldCreationUiState.getWorldType(); cycleButton.setValue(worldTypeEntry); if (worldTypeEntry.isAmplified()) { cycleButton.setTooltip(Tooltip.create(AMPLIFIED_HELP_TEXT)); @@ -853,11 +858,11 @@ public class CreateWorldScreen extends Screen { } } - private CycleButton.ValueListSupplier createWorldTypeValueSupplier() { + private ValueListSupplier createWorldTypeValueSupplier() { return new 2(this); } - private static MutableComponent createTypeButtonNarration(CycleButton button) { + private static MutableComponent createTypeButtonNarration(CycleButton button) { return button.getValue().isAmplified() ? CommonComponents.joinForNarration(button.createDefaultNarrationMessage(), AMPLIFIED_HELP_TEXT) : button.createDefaultNarrationMessage(); diff --git a/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java b/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java index f71e0f04..61a92f6e 100644 --- a/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java @@ -97,11 +97,11 @@ public class EditGameRulesScreen extends Screen { public class BooleanRuleEntry extends EditGameRulesScreen.GameRuleEntry { private final CycleButton checkbox; - public BooleanRuleEntry(final Component label, final List tooltip, final String string, final GameRules.BooleanValue value) { + public BooleanRuleEntry(final Component label, final List tooltip, final String description, final GameRules.BooleanValue value) { super(tooltip, label); this.checkbox = CycleButton.onOffBuilder(value.get()) .displayOnlyValue() - .withCustomNarration(cycleButton -> cycleButton.createDefaultNarrationMessage().append("\n").append(string)) + .withCustomNarration(cycleButton -> cycleButton.createDefaultNarrationMessage().append("\n").append(description)) .create(10, 5, 44, 20, label, (cycleButton, boolean_) -> value.set(boolean_, null)); this.children.add(this.checkbox); } @@ -180,12 +180,12 @@ public class EditGameRulesScreen extends Screen { public class IntegerRuleEntry extends EditGameRulesScreen.GameRuleEntry { private final EditBox input; - public IntegerRuleEntry(final Component label, final List tooltip, final String string, final GameRules.IntegerValue value) { + public IntegerRuleEntry(final Component label, final List tooltip, final String description, final GameRules.IntegerValue value) { super(tooltip, label); - this.input = new EditBox(EditGameRulesScreen.this.minecraft.font, 10, 5, 44, 20, label.copy().append("\n").append(string).append("\n")); + this.input = new EditBox(EditGameRulesScreen.this.minecraft.font, 10, 5, 44, 20, label.copy().append("\n").append(description).append("\n")); this.input.setValue(Integer.toString(value.get())); - this.input.setResponder(stringx -> { - if (value.tryDeserialize(stringx)) { + this.input.setResponder(string -> { + if (value.tryDeserialize(string)) { this.input.setTextColor(14737632); EditGameRulesScreen.this.clearInvalid(this); } else { diff --git a/net/minecraft/client/gui/screens/worldselection/WorldCreationContext.java b/net/minecraft/client/gui/screens/worldselection/WorldCreationContext.java index 866c8b7b..3dbcb498 100644 --- a/net/minecraft/client/gui/screens/worldselection/WorldCreationContext.java +++ b/net/minecraft/client/gui/screens/worldselection/WorldCreationContext.java @@ -5,6 +5,7 @@ import java.util.function.BiFunction; import java.util.function.UnaryOperator; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState.SelectedGameMode; import net.minecraft.core.LayeredRegistryAccess; import net.minecraft.core.Registry; import net.minecraft.core.RegistryAccess; @@ -39,25 +40,25 @@ public record WorldCreationContext( worldGenRegistries, dataPackResources, dataConfiguration, - new InitialWorldCreationOptions(WorldCreationUiState.SelectedGameMode.SURVIVAL, Set.of(), null) + new InitialWorldCreationOptions(SelectedGameMode.SURVIVAL, Set.of(), null) ); } public WorldCreationContext( WorldOptions worldOptions, WorldDimensions worldDimensions, - LayeredRegistryAccess layeredRegistryAccess, - ReloadableServerResources reloadableServerResources, - WorldDataConfiguration worldDataConfiguration, + LayeredRegistryAccess worldGenRegistries, + ReloadableServerResources dataPackResources, + WorldDataConfiguration dataConfiguration, InitialWorldCreationOptions initialWorldCreationOptions ) { this( worldOptions, - layeredRegistryAccess.getLayer(RegistryLayer.DIMENSIONS).lookupOrThrow(Registries.LEVEL_STEM), + worldGenRegistries.getLayer(RegistryLayer.DIMENSIONS).lookupOrThrow(Registries.LEVEL_STEM), worldDimensions, - layeredRegistryAccess.replaceFrom(RegistryLayer.DIMENSIONS), - reloadableServerResources, - worldDataConfiguration, + worldGenRegistries.replaceFrom(RegistryLayer.DIMENSIONS), + dataPackResources, + dataConfiguration, initialWorldCreationOptions ); } diff --git a/net/minecraft/client/gui/spectator/PlayerMenuItem.java b/net/minecraft/client/gui/spectator/PlayerMenuItem.java index fa13374e..344c93c9 100644 --- a/net/minecraft/client/gui/spectator/PlayerMenuItem.java +++ b/net/minecraft/client/gui/spectator/PlayerMenuItem.java @@ -35,8 +35,8 @@ public class PlayerMenuItem implements SpectatorMenuItem { } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { - PlayerFaceRenderer.draw(guiGraphics, (PlayerSkin)this.skin.get(), 2, 2, 12, ARGB.white(g)); + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { + PlayerFaceRenderer.draw(guiGraphics, (PlayerSkin)this.skin.get(), 2, 2, 12, ARGB.white(alpha)); } @Override diff --git a/net/minecraft/client/gui/spectator/SpectatorMenu.java b/net/minecraft/client/gui/spectator/SpectatorMenu.java index b3e75afa..c5460afe 100644 --- a/net/minecraft/client/gui/spectator/SpectatorMenu.java +++ b/net/minecraft/client/gui/spectator/SpectatorMenu.java @@ -37,7 +37,7 @@ public class SpectatorMenu { } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { } @Override @@ -128,8 +128,8 @@ public class SpectatorMenu { } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { - guiGraphics.blitSprite(RenderType::guiTextured, SpectatorMenu.CLOSE_SPRITE, 0, 0, 16, 16, ARGB.colorFromFloat(g, f, f, f)); + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { + guiGraphics.blitSprite(RenderType::guiTextured, SpectatorMenu.CLOSE_SPRITE, 0, 0, 16, 16, ARGB.colorFromFloat(alpha, brightness, brightness, brightness)); } @Override @@ -159,8 +159,8 @@ public class SpectatorMenu { } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { - int i = ARGB.colorFromFloat(g, f, f, f); + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { + int i = ARGB.colorFromFloat(alpha, brightness, brightness, brightness); if (this.direction < 0) { guiGraphics.blitSprite(RenderType::guiTextured, SpectatorMenu.SCROLL_LEFT_SPRITE, 0, 0, 16, 16, i); } else { diff --git a/net/minecraft/client/gui/spectator/SpectatorMenuItem.java b/net/minecraft/client/gui/spectator/SpectatorMenuItem.java index 6c1a5467..18c2ade9 100644 --- a/net/minecraft/client/gui/spectator/SpectatorMenuItem.java +++ b/net/minecraft/client/gui/spectator/SpectatorMenuItem.java @@ -11,7 +11,7 @@ public interface SpectatorMenuItem { Component getName(); - void renderIcon(GuiGraphics guiGraphics, float f, float g); + void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha); boolean isEnabled(); } diff --git a/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java b/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java index dd9404a1..5e3adb01 100644 --- a/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java +++ b/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java @@ -59,8 +59,8 @@ public class TeleportToPlayerMenuCategory implements SpectatorMenuCategory, Spec } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { - guiGraphics.blitSprite(RenderType::guiTextured, TELEPORT_TO_PLAYER_SPRITE, 0, 0, 16, 16, ARGB.colorFromFloat(g, f, f, f)); + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { + guiGraphics.blitSprite(RenderType::guiTextured, TELEPORT_TO_PLAYER_SPRITE, 0, 0, 16, 16, ARGB.colorFromFloat(alpha, brightness, brightness, brightness)); } @Override diff --git a/net/minecraft/client/gui/spectator/categories/TeleportToTeamMenuCategory.java b/net/minecraft/client/gui/spectator/categories/TeleportToTeamMenuCategory.java index d5849a05..0f59e874 100644 --- a/net/minecraft/client/gui/spectator/categories/TeleportToTeamMenuCategory.java +++ b/net/minecraft/client/gui/spectator/categories/TeleportToTeamMenuCategory.java @@ -64,8 +64,8 @@ public class TeleportToTeamMenuCategory implements SpectatorMenuCategory, Specta } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { - guiGraphics.blitSprite(RenderType::guiTextured, TELEPORT_TO_TEAM_SPRITE, 0, 0, 16, 16, ARGB.colorFromFloat(g, f, f, f)); + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { + guiGraphics.blitSprite(RenderType::guiTextured, TELEPORT_TO_TEAM_SPRITE, 0, 0, 16, 16, ARGB.colorFromFloat(alpha, brightness, brightness, brightness)); } @Override @@ -115,16 +115,16 @@ public class TeleportToTeamMenuCategory implements SpectatorMenuCategory, Specta } @Override - public void renderIcon(GuiGraphics guiGraphics, float f, float g) { + public void renderIcon(GuiGraphics guiGraphics, float brightness, float alpha) { Integer integer = this.team.getColor().getColor(); if (integer != null) { - float h = (integer >> 16 & 0xFF) / 255.0F; - float i = (integer >> 8 & 0xFF) / 255.0F; - float j = (integer & 0xFF) / 255.0F; - guiGraphics.fill(1, 1, 15, 15, ARGB.colorFromFloat(g, h * f, i * f, j * f)); + float f = (integer >> 16 & 0xFF) / 255.0F; + float g = (integer >> 8 & 0xFF) / 255.0F; + float h = (integer & 0xFF) / 255.0F; + guiGraphics.fill(1, 1, 15, 15, ARGB.colorFromFloat(alpha, f * brightness, g * brightness, h * brightness)); } - PlayerFaceRenderer.draw(guiGraphics, (PlayerSkin)this.iconSkin.get(), 2, 2, 12, ARGB.colorFromFloat(g, f, f, f)); + PlayerFaceRenderer.draw(guiGraphics, (PlayerSkin)this.iconSkin.get(), 2, 2, 12, ARGB.colorFromFloat(alpha, brightness, brightness, brightness)); } @Override diff --git a/net/minecraft/client/main/GameConfig.java b/net/minecraft/client/main/GameConfig.java index 4a0d0f03..9db47100 100644 --- a/net/minecraft/client/main/GameConfig.java +++ b/net/minecraft/client/main/GameConfig.java @@ -57,13 +57,13 @@ public class GameConfig { public final boolean disableChat; public final boolean captureTracyImages; - public GameData(boolean bl, String string, String string2, boolean bl2, boolean bl3, boolean bl4) { - this.demo = bl; - this.launchVersion = string; - this.versionType = string2; - this.disableMultiplayer = bl2; - this.disableChat = bl3; - this.captureTracyImages = bl4; + public GameData(boolean demo, String launchVersion, String versionType, boolean disableMultiplayer, boolean disableChat, boolean captureTracyImages) { + this.demo = demo; + this.launchVersion = launchVersion; + this.versionType = versionType; + this.disableMultiplayer = disableMultiplayer; + this.disableChat = disableChat; + this.captureTracyImages = captureTracyImages; } } diff --git a/net/minecraft/client/main/Main.java b/net/minecraft/client/main/Main.java index 80307a53..bb5f0034 100644 --- a/net/minecraft/client/main/Main.java +++ b/net/minecraft/client/main/Main.java @@ -283,16 +283,16 @@ public class Main { return str != null && !str.isEmpty(); } - private static boolean hasValidUuid(OptionSpec optionSpec, OptionSet optionSet, Logger logger) { - return optionSet.has(optionSpec) && isUuidValid(optionSpec, optionSet, logger); + private static boolean hasValidUuid(OptionSpec uuidOption, OptionSet options, Logger logger) { + return options.has(uuidOption) && isUuidValid(uuidOption, options, logger); } - private static boolean isUuidValid(OptionSpec optionSpec, OptionSet optionSet, Logger logger) { + private static boolean isUuidValid(OptionSpec uuidOption, OptionSet optionSet, Logger logger) { try { - UndashedUuid.fromStringLenient(optionSpec.value(optionSet)); + UndashedUuid.fromStringLenient(uuidOption.value(optionSet)); return true; } catch (IllegalArgumentException var4) { - logger.warn("Invalid UUID: '{}", optionSpec.value(optionSet)); + logger.warn("Invalid UUID: '{}", uuidOption.value(optionSet)); return false; } } diff --git a/net/minecraft/client/model/AbstractBoatModel.java b/net/minecraft/client/model/AbstractBoatModel.java index 3c66d351..d7afc835 100644 --- a/net/minecraft/client/model/AbstractBoatModel.java +++ b/net/minecraft/client/model/AbstractBoatModel.java @@ -11,23 +11,23 @@ public abstract class AbstractBoatModel extends EntityModel { private final ModelPart leftPaddle; private final ModelPart rightPaddle; - public AbstractBoatModel(ModelPart modelPart) { - super(modelPart); - this.leftPaddle = modelPart.getChild("left_paddle"); - this.rightPaddle = modelPart.getChild("right_paddle"); + public AbstractBoatModel(ModelPart root) { + super(root); + this.leftPaddle = root.getChild("left_paddle"); + this.rightPaddle = root.getChild("right_paddle"); } - public void setupAnim(BoatRenderState boatRenderState) { - super.setupAnim(boatRenderState); - animatePaddle(boatRenderState.rowingTimeLeft, 0, this.leftPaddle); - animatePaddle(boatRenderState.rowingTimeRight, 1, this.rightPaddle); + public void setupAnim(BoatRenderState renderState) { + super.setupAnim(renderState); + animatePaddle(renderState.rowingTimeLeft, 0, this.leftPaddle); + animatePaddle(renderState.rowingTimeRight, 1, this.rightPaddle); } - private static void animatePaddle(float f, int i, ModelPart modelPart) { - modelPart.xRot = Mth.clampedLerp((float) (-Math.PI / 3), (float) (-Math.PI / 12), (Mth.sin(-f) + 1.0F) / 2.0F); - modelPart.yRot = Mth.clampedLerp((float) (-Math.PI / 4), (float) (Math.PI / 4), (Mth.sin(-f + 1.0F) + 1.0F) / 2.0F); - if (i == 1) { - modelPart.yRot = (float) Math.PI - modelPart.yRot; + private static void animatePaddle(float rowingTime, int side, ModelPart part) { + part.xRot = Mth.clampedLerp((float) (-Math.PI / 3), (float) (-Math.PI / 12), (Mth.sin(-rowingTime) + 1.0F) / 2.0F); + part.yRot = Mth.clampedLerp((float) (-Math.PI / 4), (float) (Math.PI / 4), (Mth.sin(-rowingTime + 1.0F) + 1.0F) / 2.0F); + if (side == 1) { + part.yRot = (float) Math.PI - part.yRot; } } } diff --git a/net/minecraft/client/model/AbstractEquineModel.java b/net/minecraft/client/model/AbstractEquineModel.java index b73688ef..25df78e4 100644 --- a/net/minecraft/client/model/AbstractEquineModel.java +++ b/net/minecraft/client/model/AbstractEquineModel.java @@ -39,24 +39,24 @@ public abstract class AbstractEquineModel extends E private final ModelPart[] saddleParts; private final ModelPart[] ridingParts; - public AbstractEquineModel(ModelPart modelPart) { - super(modelPart); - this.body = modelPart.getChild("body"); - this.headParts = modelPart.getChild("head_parts"); - this.rightHindLeg = modelPart.getChild("right_hind_leg"); - this.leftHindLeg = modelPart.getChild("left_hind_leg"); - this.rightFrontLeg = modelPart.getChild("right_front_leg"); - this.leftFrontLeg = modelPart.getChild("left_front_leg"); + public AbstractEquineModel(ModelPart root) { + super(root); + this.body = root.getChild("body"); + this.headParts = root.getChild("head_parts"); + this.rightHindLeg = root.getChild("right_hind_leg"); + this.leftHindLeg = root.getChild("left_hind_leg"); + this.rightFrontLeg = root.getChild("right_front_leg"); + this.leftFrontLeg = root.getChild("left_front_leg"); this.tail = this.body.getChild("tail"); - ModelPart modelPart2 = this.body.getChild("saddle"); - ModelPart modelPart3 = this.headParts.getChild("left_saddle_mouth"); - ModelPart modelPart4 = this.headParts.getChild("right_saddle_mouth"); - ModelPart modelPart5 = this.headParts.getChild("left_saddle_line"); - ModelPart modelPart6 = this.headParts.getChild("right_saddle_line"); - ModelPart modelPart7 = this.headParts.getChild("head_saddle"); - ModelPart modelPart8 = this.headParts.getChild("mouth_saddle_wrap"); - this.saddleParts = new ModelPart[]{modelPart2, modelPart3, modelPart4, modelPart7, modelPart8}; - this.ridingParts = new ModelPart[]{modelPart5, modelPart6}; + ModelPart modelPart = this.body.getChild("saddle"); + ModelPart modelPart2 = this.headParts.getChild("left_saddle_mouth"); + ModelPart modelPart3 = this.headParts.getChild("right_saddle_mouth"); + ModelPart modelPart4 = this.headParts.getChild("left_saddle_line"); + ModelPart modelPart5 = this.headParts.getChild("right_saddle_line"); + ModelPart modelPart6 = this.headParts.getChild("head_saddle"); + ModelPart modelPart7 = this.headParts.getChild("mouth_saddle_wrap"); + this.saddleParts = new ModelPart[]{modelPart, modelPart2, modelPart3, modelPart6, modelPart7}; + this.ridingParts = new ModelPart[]{modelPart4, modelPart5}; } public static MeshDefinition createBodyMesh(CubeDeformation cubeDeformation) { @@ -171,44 +171,44 @@ public abstract class AbstractEquineModel extends E return meshDefinition; } - public void setupAnim(T equineRenderState) { - super.setupAnim(equineRenderState); + public void setupAnim(T renderState) { + super.setupAnim(renderState); for (ModelPart modelPart : this.saddleParts) { - modelPart.visible = equineRenderState.isSaddled; + modelPart.visible = renderState.isSaddled; } for (ModelPart modelPart : this.ridingParts) { - modelPart.visible = equineRenderState.isRidden && equineRenderState.isSaddled; + modelPart.visible = renderState.isRidden && renderState.isSaddled; } - float f = Mth.clamp(equineRenderState.yRot, -20.0F, 20.0F); - float g = equineRenderState.xRot * (float) (Math.PI / 180.0); - float h = equineRenderState.walkAnimationSpeed; - float i = equineRenderState.walkAnimationPos; + float f = Mth.clamp(renderState.yRot, -20.0F, 20.0F); + float g = renderState.xRot * (float) (Math.PI / 180.0); + float h = renderState.walkAnimationSpeed; + float i = renderState.walkAnimationPos; if (h > 0.2F) { g += Mth.cos(i * 0.8F) * 0.15F * h; } - float j = equineRenderState.eatAnimation; - float k = equineRenderState.standAnimation; + float j = renderState.eatAnimation; + float k = renderState.standAnimation; float l = 1.0F - k; - float m = equineRenderState.feedingAnimation; - boolean bl = equineRenderState.animateTail; + float m = renderState.feedingAnimation; + boolean bl = renderState.animateTail; this.headParts.xRot = (float) (Math.PI / 6) + g; this.headParts.yRot = f * (float) (Math.PI / 180.0); - float n = equineRenderState.isInWater ? 0.2F : 1.0F; + float n = renderState.isInWater ? 0.2F : 1.0F; float o = Mth.cos(n * i * 0.6662F + (float) Math.PI); float p = o * 0.8F * h; - float q = (1.0F - Math.max(k, j)) * ((float) (Math.PI / 6) + g + m * Mth.sin(equineRenderState.ageInTicks) * 0.05F); - this.headParts.xRot = k * ((float) (Math.PI / 12) + g) + j * (2.1816616F + Mth.sin(equineRenderState.ageInTicks) * 0.05F) + q; + float q = (1.0F - Math.max(k, j)) * ((float) (Math.PI / 6) + g + m * Mth.sin(renderState.ageInTicks) * 0.05F); + this.headParts.xRot = k * ((float) (Math.PI / 12) + g) + j * (2.1816616F + Mth.sin(renderState.ageInTicks) * 0.05F) + q; this.headParts.yRot = k * f * (float) (Math.PI / 180.0) + (1.0F - Math.max(k, j)) * this.headParts.yRot; - float r = equineRenderState.ageScale; + float r = renderState.ageScale; this.headParts.y = this.headParts.y + Mth.lerp(j, Mth.lerp(k, 0.0F, -8.0F * r), 7.0F * r); this.headParts.z = Mth.lerp(k, this.headParts.z, -4.0F * r); this.body.xRot = k * (float) (-Math.PI / 4) + l * this.body.xRot; float s = (float) (Math.PI / 12) * k; - float t = Mth.cos(equineRenderState.ageInTicks * 0.6F + (float) Math.PI); + float t = Mth.cos(renderState.ageInTicks * 0.6F + (float) Math.PI); this.leftFrontLeg.y -= 12.0F * r * k; this.leftFrontLeg.z += 4.0F * r * k; this.rightFrontLeg.y = this.leftFrontLeg.y; @@ -223,7 +223,7 @@ public abstract class AbstractEquineModel extends E this.tail.y += h * r; this.tail.z += h * 2.0F * r; if (bl) { - this.tail.yRot = Mth.cos(equineRenderState.ageInTicks * 0.7F); + this.tail.yRot = Mth.cos(renderState.ageInTicks * 0.7F); } else { this.tail.yRot = 0.0F; } diff --git a/net/minecraft/client/model/AbstractPiglinModel.java b/net/minecraft/client/model/AbstractPiglinModel.java index bb345a6c..3978eb46 100644 --- a/net/minecraft/client/model/AbstractPiglinModel.java +++ b/net/minecraft/client/model/AbstractPiglinModel.java @@ -26,8 +26,8 @@ public class AbstractPiglinModel extends Humanoid public final ModelPart rightEar = this.head.getChild("right_ear"); public final ModelPart leftEar = this.head.getChild("left_ear"); - public AbstractPiglinModel(ModelPart modelPart) { - super(modelPart, RenderType::entityTranslucent); + public AbstractPiglinModel(ModelPart root) { + super(root, RenderType::entityTranslucent); } public static MeshDefinition createMesh(CubeDeformation cubeDeformation) { @@ -41,8 +41,8 @@ public class AbstractPiglinModel extends Humanoid return meshDefinition; } - public static PartDefinition addHead(CubeDeformation cubeDeformation, MeshDefinition meshDefinition) { - PartDefinition partDefinition = meshDefinition.getRoot(); + public static PartDefinition addHead(CubeDeformation cubeDeformation, MeshDefinition mesh) { + PartDefinition partDefinition = mesh.getRoot(); PartDefinition partDefinition2 = partDefinition.addOrReplaceChild( "head", CubeListBuilder.create() @@ -70,12 +70,12 @@ public class AbstractPiglinModel extends Humanoid } @Override - public void setupAnim(S humanoidRenderState) { - super.setupAnim(humanoidRenderState); - float f = humanoidRenderState.walkAnimationPos; - float g = humanoidRenderState.walkAnimationSpeed; + public void setupAnim(S renderState) { + super.setupAnim(renderState); + float f = renderState.walkAnimationPos; + float g = renderState.walkAnimationSpeed; float h = (float) (Math.PI / 6); - float i = humanoidRenderState.ageInTicks * 0.1F + f * 0.5F; + float i = renderState.ageInTicks * 0.1F + f * 0.5F; float j = 0.08F + g * 0.4F; this.leftEar.zRot = (float) (-Math.PI / 6) - Mth.cos(i * 1.2F) * j; this.rightEar.zRot = (float) (Math.PI / 6) + Mth.cos(i) * j; diff --git a/net/minecraft/client/model/AbstractZombieModel.java b/net/minecraft/client/model/AbstractZombieModel.java index 588c9d0e..29a07202 100644 --- a/net/minecraft/client/model/AbstractZombieModel.java +++ b/net/minecraft/client/model/AbstractZombieModel.java @@ -7,8 +7,8 @@ import net.minecraft.client.renderer.entity.state.ZombieRenderState; @Environment(EnvType.CLIENT) public abstract class AbstractZombieModel extends HumanoidModel { - protected AbstractZombieModel(ModelPart root) { - super(root); + protected AbstractZombieModel(ModelPart modelPart) { + super(modelPart); } public void setupAnim(S zombieRenderState) { diff --git a/net/minecraft/client/model/AllayModel.java b/net/minecraft/client/model/AllayModel.java index 6010943f..d8bdaf9f 100644 --- a/net/minecraft/client/model/AllayModel.java +++ b/net/minecraft/client/model/AllayModel.java @@ -71,29 +71,29 @@ public class AllayModel extends EntityModel implements ArmedMo return LayerDefinition.create(meshDefinition, 32, 32); } - public void setupAnim(AllayRenderState allayRenderState) { - super.setupAnim(allayRenderState); - float f = allayRenderState.walkAnimationSpeed; - float g = allayRenderState.walkAnimationPos; - float h = allayRenderState.ageInTicks * 20.0F * (float) (Math.PI / 180.0) + g; + public void setupAnim(AllayRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.walkAnimationSpeed; + float g = renderState.walkAnimationPos; + float h = renderState.ageInTicks * 20.0F * (float) (Math.PI / 180.0) + g; float i = Mth.cos(h) * (float) Math.PI * 0.15F + f; - float j = allayRenderState.ageInTicks * 9.0F * (float) (Math.PI / 180.0); + float j = renderState.ageInTicks * 9.0F * (float) (Math.PI / 180.0); float k = Math.min(f / 0.3F, 1.0F); float l = 1.0F - k; - float m = allayRenderState.holdingAnimationProgress; - if (allayRenderState.isDancing) { - float n = allayRenderState.ageInTicks * 8.0F * (float) (Math.PI / 180.0) + f; + float m = renderState.holdingAnimationProgress; + if (renderState.isDancing) { + float n = renderState.ageInTicks * 8.0F * (float) (Math.PI / 180.0) + f; float o = Mth.cos(n) * 16.0F * (float) (Math.PI / 180.0); - float p = allayRenderState.spinningProgress; + float p = renderState.spinningProgress; float q = Mth.cos(n) * 14.0F * (float) (Math.PI / 180.0); float r = Mth.cos(n) * 30.0F * (float) (Math.PI / 180.0); - this.root.yRot = allayRenderState.isSpinning ? (float) (Math.PI * 4) * p : this.root.yRot; + this.root.yRot = renderState.isSpinning ? (float) (Math.PI * 4) * p : this.root.yRot; this.root.zRot = o * (1.0F - p); this.head.yRot = r * (1.0F - p); this.head.zRot = q * (1.0F - p); } else { - this.head.xRot = allayRenderState.xRot * (float) (Math.PI / 180.0); - this.head.yRot = allayRenderState.yRot * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); } this.right_wing.xRot = 0.43633232F * (1.0F - k); diff --git a/net/minecraft/client/model/AnimationUtils.java b/net/minecraft/client/model/AnimationUtils.java index eb6685cb..1e2477e7 100644 --- a/net/minecraft/client/model/AnimationUtils.java +++ b/net/minecraft/client/model/AnimationUtils.java @@ -17,38 +17,38 @@ public class AnimationUtils { modelPart2.xRot = -1.5F + head.xRot; } - public static void animateCrossbowCharge(ModelPart modelPart, ModelPart modelPart2, float f, int i, boolean bl) { - ModelPart modelPart3 = bl ? modelPart : modelPart2; - ModelPart modelPart4 = bl ? modelPart2 : modelPart; - modelPart3.yRot = bl ? -0.8F : 0.8F; - modelPart3.xRot = -0.97079635F; - modelPart4.xRot = modelPart3.xRot; - float g = Mth.clamp((float)i, 0.0F, f); - float h = g / f; - modelPart4.yRot = Mth.lerp(h, 0.4F, 0.85F) * (bl ? 1 : -1); - modelPart4.xRot = Mth.lerp(h, modelPart4.xRot, (float) (-Math.PI / 2)); + public static void animateCrossbowCharge(ModelPart rightArm, ModelPart leftArm, float maxCrossbowChargeDuration, int ticksUsingItem, boolean isRightHand) { + ModelPart modelPart = isRightHand ? rightArm : leftArm; + ModelPart modelPart2 = isRightHand ? leftArm : rightArm; + modelPart.yRot = isRightHand ? -0.8F : 0.8F; + modelPart.xRot = -0.97079635F; + modelPart2.xRot = modelPart.xRot; + float f = Mth.clamp((float)ticksUsingItem, 0.0F, maxCrossbowChargeDuration); + float g = f / maxCrossbowChargeDuration; + modelPart2.yRot = Mth.lerp(g, 0.4F, 0.85F) * (isRightHand ? 1 : -1); + modelPart2.xRot = Mth.lerp(g, modelPart2.xRot, (float) (-Math.PI / 2)); } - public static void swingWeaponDown(ModelPart modelPart, ModelPart modelPart2, HumanoidArm humanoidArm, float f, float g) { - float h = Mth.sin(f * (float) Math.PI); - float i = Mth.sin((1.0F - (1.0F - f) * (1.0F - f)) * (float) Math.PI); - modelPart.zRot = 0.0F; - modelPart2.zRot = 0.0F; - modelPart.yRot = (float) (Math.PI / 20); - modelPart2.yRot = (float) (-Math.PI / 20); - if (humanoidArm == HumanoidArm.RIGHT) { - modelPart.xRot = -1.8849558F + Mth.cos(g * 0.09F) * 0.15F; - modelPart2.xRot = -0.0F + Mth.cos(g * 0.19F) * 0.5F; - modelPart.xRot += h * 2.2F - i * 0.4F; - modelPart2.xRot += h * 1.2F - i * 0.4F; + public static void swingWeaponDown(ModelPart rightArm, ModelPart leftArm, HumanoidArm mainArm, float attackTime, float ageInTicks) { + float f = Mth.sin(attackTime * (float) Math.PI); + float g = Mth.sin((1.0F - (1.0F - attackTime) * (1.0F - attackTime)) * (float) Math.PI); + rightArm.zRot = 0.0F; + leftArm.zRot = 0.0F; + rightArm.yRot = (float) (Math.PI / 20); + leftArm.yRot = (float) (-Math.PI / 20); + if (mainArm == HumanoidArm.RIGHT) { + rightArm.xRot = -1.8849558F + Mth.cos(ageInTicks * 0.09F) * 0.15F; + leftArm.xRot = -0.0F + Mth.cos(ageInTicks * 0.19F) * 0.5F; + rightArm.xRot += f * 2.2F - g * 0.4F; + leftArm.xRot += f * 1.2F - g * 0.4F; } else { - modelPart.xRot = -0.0F + Mth.cos(g * 0.19F) * 0.5F; - modelPart2.xRot = -1.8849558F + Mth.cos(g * 0.09F) * 0.15F; - modelPart.xRot += h * 1.2F - i * 0.4F; - modelPart2.xRot += h * 2.2F - i * 0.4F; + rightArm.xRot = -0.0F + Mth.cos(ageInTicks * 0.19F) * 0.5F; + leftArm.xRot = -1.8849558F + Mth.cos(ageInTicks * 0.09F) * 0.15F; + rightArm.xRot += f * 1.2F - g * 0.4F; + leftArm.xRot += f * 2.2F - g * 0.4F; } - bobArms(modelPart, modelPart2, g); + bobArms(rightArm, leftArm, ageInTicks); } public static void bobModelPart(ModelPart modelPart, float ageInTicks, float multiplier) { diff --git a/net/minecraft/client/model/ArmadilloModel.java b/net/minecraft/client/model/ArmadilloModel.java index ccef1e56..0ed0faaa 100644 --- a/net/minecraft/client/model/ArmadilloModel.java +++ b/net/minecraft/client/model/ArmadilloModel.java @@ -104,9 +104,9 @@ public class ArmadilloModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(ArmadilloRenderState armadilloRenderState) { - super.setupAnim(armadilloRenderState); - if (armadilloRenderState.isHidingInShell) { + public void setupAnim(ArmadilloRenderState renderState) { + super.setupAnim(renderState); + if (renderState.isHidingInShell) { this.body.skipDraw = true; this.leftHindLeg.visible = false; this.rightHindLeg.visible = false; @@ -118,13 +118,13 @@ public class ArmadilloModel extends EntityModel { this.rightHindLeg.visible = true; this.tail.visible = true; this.cube.visible = false; - this.head.xRot = Mth.clamp(armadilloRenderState.xRot, -22.5F, 25.0F) * (float) (Math.PI / 180.0); - this.head.yRot = Mth.clamp(armadilloRenderState.yRot, -32.5F, 32.5F) * (float) (Math.PI / 180.0); + this.head.xRot = Mth.clamp(renderState.xRot, -22.5F, 25.0F) * (float) (Math.PI / 180.0); + this.head.yRot = Mth.clamp(renderState.yRot, -32.5F, 32.5F) * (float) (Math.PI / 180.0); } - this.animateWalk(ArmadilloAnimation.ARMADILLO_WALK, armadilloRenderState.walkAnimationPos, armadilloRenderState.walkAnimationSpeed, 16.5F, 2.5F); - this.animate(armadilloRenderState.rollOutAnimationState, ArmadilloAnimation.ARMADILLO_ROLL_OUT, armadilloRenderState.ageInTicks, 1.0F); - this.animate(armadilloRenderState.rollUpAnimationState, ArmadilloAnimation.ARMADILLO_ROLL_UP, armadilloRenderState.ageInTicks, 1.0F); - this.animate(armadilloRenderState.peekAnimationState, ArmadilloAnimation.ARMADILLO_PEEK, armadilloRenderState.ageInTicks, 1.0F); + this.animateWalk(ArmadilloAnimation.ARMADILLO_WALK, renderState.walkAnimationPos, renderState.walkAnimationSpeed, 16.5F, 2.5F); + this.animate(renderState.rollOutAnimationState, ArmadilloAnimation.ARMADILLO_ROLL_OUT, renderState.ageInTicks, 1.0F); + this.animate(renderState.rollUpAnimationState, ArmadilloAnimation.ARMADILLO_ROLL_UP, renderState.ageInTicks, 1.0F); + this.animate(renderState.peekAnimationState, ArmadilloAnimation.ARMADILLO_PEEK, renderState.ageInTicks, 1.0F); } } diff --git a/net/minecraft/client/model/ArmorStandArmorModel.java b/net/minecraft/client/model/ArmorStandArmorModel.java index edc0ab44..cdfc630c 100644 --- a/net/minecraft/client/model/ArmorStandArmorModel.java +++ b/net/minecraft/client/model/ArmorStandArmorModel.java @@ -39,25 +39,25 @@ public class ArmorStandArmorModel extends HumanoidModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(ArmorStandRenderState armorStandRenderState) { - super.setupAnim(armorStandRenderState); - this.head.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.headPose.getX(); - this.head.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.headPose.getY(); - this.head.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.headPose.getZ(); - this.body.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getX(); - this.body.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getY(); - this.body.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getZ(); - this.leftArm.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftArmPose.getX(); - this.leftArm.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftArmPose.getY(); - this.leftArm.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftArmPose.getZ(); - this.rightArm.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightArmPose.getX(); - this.rightArm.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightArmPose.getY(); - this.rightArm.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightArmPose.getZ(); - this.leftLeg.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftLegPose.getX(); - this.leftLeg.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftLegPose.getY(); - this.leftLeg.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.leftLegPose.getZ(); - this.rightLeg.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightLegPose.getX(); - this.rightLeg.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightLegPose.getY(); - this.rightLeg.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.rightLegPose.getZ(); + public void setupAnim(ArmorStandRenderState renderState) { + super.setupAnim(renderState); + this.head.xRot = (float) (Math.PI / 180.0) * renderState.headPose.getX(); + this.head.yRot = (float) (Math.PI / 180.0) * renderState.headPose.getY(); + this.head.zRot = (float) (Math.PI / 180.0) * renderState.headPose.getZ(); + this.body.xRot = (float) (Math.PI / 180.0) * renderState.bodyPose.getX(); + this.body.yRot = (float) (Math.PI / 180.0) * renderState.bodyPose.getY(); + this.body.zRot = (float) (Math.PI / 180.0) * renderState.bodyPose.getZ(); + this.leftArm.xRot = (float) (Math.PI / 180.0) * renderState.leftArmPose.getX(); + this.leftArm.yRot = (float) (Math.PI / 180.0) * renderState.leftArmPose.getY(); + this.leftArm.zRot = (float) (Math.PI / 180.0) * renderState.leftArmPose.getZ(); + this.rightArm.xRot = (float) (Math.PI / 180.0) * renderState.rightArmPose.getX(); + this.rightArm.yRot = (float) (Math.PI / 180.0) * renderState.rightArmPose.getY(); + this.rightArm.zRot = (float) (Math.PI / 180.0) * renderState.rightArmPose.getZ(); + this.leftLeg.xRot = (float) (Math.PI / 180.0) * renderState.leftLegPose.getX(); + this.leftLeg.yRot = (float) (Math.PI / 180.0) * renderState.leftLegPose.getY(); + this.leftLeg.zRot = (float) (Math.PI / 180.0) * renderState.leftLegPose.getZ(); + this.rightLeg.xRot = (float) (Math.PI / 180.0) * renderState.rightLegPose.getX(); + this.rightLeg.yRot = (float) (Math.PI / 180.0) * renderState.rightLegPose.getY(); + this.rightLeg.zRot = (float) (Math.PI / 180.0) * renderState.rightLegPose.getZ(); } } diff --git a/net/minecraft/client/model/ArmorStandModel.java b/net/minecraft/client/model/ArmorStandModel.java index 8266450a..e0c9c6d7 100644 --- a/net/minecraft/client/model/ArmorStandModel.java +++ b/net/minecraft/client/model/ArmorStandModel.java @@ -62,21 +62,21 @@ public class ArmorStandModel extends ArmorStandArmorModel { } @Override - public void setupAnim(ArmorStandRenderState armorStandRenderState) { - super.setupAnim(armorStandRenderState); - this.basePlate.yRot = (float) (Math.PI / 180.0) * -armorStandRenderState.yRot; - this.leftArm.visible = armorStandRenderState.showArms; - this.rightArm.visible = armorStandRenderState.showArms; - this.basePlate.visible = armorStandRenderState.showBasePlate; - this.rightBodyStick.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getX(); - this.rightBodyStick.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getY(); - this.rightBodyStick.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getZ(); - this.leftBodyStick.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getX(); - this.leftBodyStick.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getY(); - this.leftBodyStick.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getZ(); - this.shoulderStick.xRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getX(); - this.shoulderStick.yRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getY(); - this.shoulderStick.zRot = (float) (Math.PI / 180.0) * armorStandRenderState.bodyPose.getZ(); + public void setupAnim(ArmorStandRenderState renderState) { + super.setupAnim(renderState); + this.basePlate.yRot = (float) (Math.PI / 180.0) * -renderState.yRot; + this.leftArm.visible = renderState.showArms; + this.rightArm.visible = renderState.showArms; + this.basePlate.visible = renderState.showBasePlate; + this.rightBodyStick.xRot = (float) (Math.PI / 180.0) * renderState.bodyPose.getX(); + this.rightBodyStick.yRot = (float) (Math.PI / 180.0) * renderState.bodyPose.getY(); + this.rightBodyStick.zRot = (float) (Math.PI / 180.0) * renderState.bodyPose.getZ(); + this.leftBodyStick.xRot = (float) (Math.PI / 180.0) * renderState.bodyPose.getX(); + this.leftBodyStick.yRot = (float) (Math.PI / 180.0) * renderState.bodyPose.getY(); + this.leftBodyStick.zRot = (float) (Math.PI / 180.0) * renderState.bodyPose.getZ(); + this.shoulderStick.xRot = (float) (Math.PI / 180.0) * renderState.bodyPose.getX(); + this.shoulderStick.yRot = (float) (Math.PI / 180.0) * renderState.bodyPose.getY(); + this.shoulderStick.zRot = (float) (Math.PI / 180.0) * renderState.bodyPose.getZ(); } @Override diff --git a/net/minecraft/client/model/ArrowModel.java b/net/minecraft/client/model/ArrowModel.java index 7343ca7f..89c495ea 100644 --- a/net/minecraft/client/model/ArrowModel.java +++ b/net/minecraft/client/model/ArrowModel.java @@ -15,8 +15,8 @@ import net.minecraft.util.Mth; @Environment(EnvType.CLIENT) public class ArrowModel extends EntityModel { - public ArrowModel(ModelPart modelPart) { - super(modelPart, RenderType::entityCutout); + public ArrowModel(ModelPart root) { + super(root, RenderType::entityCutout); } public static LayerDefinition createBodyLayer() { @@ -33,10 +33,10 @@ public class ArrowModel extends EntityModel { return LayerDefinition.create(meshDefinition.transformed(partPose -> partPose.scaled(0.9F)), 32, 32); } - public void setupAnim(ArrowRenderState arrowRenderState) { - super.setupAnim(arrowRenderState); - if (arrowRenderState.shake > 0.0F) { - float f = -Mth.sin(arrowRenderState.shake * 3.0F) * arrowRenderState.shake; + public void setupAnim(ArrowRenderState renderState) { + super.setupAnim(renderState); + if (renderState.shake > 0.0F) { + float f = -Mth.sin(renderState.shake * 3.0F) * renderState.shake; this.root.zRot += f * (float) (Math.PI / 180.0); } } diff --git a/net/minecraft/client/model/AxolotlModel.java b/net/minecraft/client/model/AxolotlModel.java index cbab8fca..3e505e6a 100644 --- a/net/minecraft/client/model/AxolotlModel.java +++ b/net/minecraft/client/model/AxolotlModel.java @@ -72,19 +72,19 @@ public class AxolotlModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(AxolotlRenderState axolotlRenderState) { - super.setupAnim(axolotlRenderState); - float f = axolotlRenderState.playingDeadFactor; - float g = axolotlRenderState.inWaterFactor; - float h = axolotlRenderState.onGroundFactor; - float i = axolotlRenderState.movingFactor; + public void setupAnim(AxolotlRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.playingDeadFactor; + float g = renderState.inWaterFactor; + float h = renderState.onGroundFactor; + float i = renderState.movingFactor; float j = 1.0F - i; float k = 1.0F - Math.min(h, i); - this.body.yRot = this.body.yRot + axolotlRenderState.yRot * (float) (Math.PI / 180.0); - this.setupSwimmingAnimation(axolotlRenderState.ageInTicks, axolotlRenderState.xRot, Math.min(i, g)); - this.setupWaterHoveringAnimation(axolotlRenderState.ageInTicks, Math.min(j, g)); - this.setupGroundCrawlingAnimation(axolotlRenderState.ageInTicks, Math.min(i, h)); - this.setupLayStillOnGroundAnimation(axolotlRenderState.ageInTicks, Math.min(j, h)); + this.body.yRot = this.body.yRot + renderState.yRot * (float) (Math.PI / 180.0); + this.setupSwimmingAnimation(renderState.ageInTicks, renderState.xRot, Math.min(i, g)); + this.setupWaterHoveringAnimation(renderState.ageInTicks, Math.min(j, g)); + this.setupGroundCrawlingAnimation(renderState.ageInTicks, Math.min(i, h)); + this.setupLayStillOnGroundAnimation(renderState.ageInTicks, Math.min(j, h)); this.setupPlayDeadAnimation(f); this.applyMirrorLegRotations(k); } @@ -138,75 +138,75 @@ public class AxolotlModel extends EntityModel { } } - private void setupWaterHoveringAnimation(float f, float g) { - if (!(g <= 1.0E-5F)) { - float h = f * 0.075F; - float i = Mth.cos(h); - float j = Mth.sin(h) * 0.15F; - float k = (-0.15F + 0.075F * i) * g; - this.body.xRot += k; - this.body.y -= j * g; - this.head.xRot -= k; - this.topGills.xRot += 0.2F * i * g; - float l = (-0.3F * i - 0.19F) * g; - this.leftGills.yRot += l; - this.rightGills.yRot -= l; - this.leftHindLeg.xRot += ((float) (Math.PI * 3.0 / 4.0) - i * 0.11F) * g; - this.leftHindLeg.yRot += 0.47123894F * g; - this.leftHindLeg.zRot += 1.7278761F * g; - this.leftFrontLeg.xRot += ((float) (Math.PI / 4) - i * 0.2F) * g; - this.leftFrontLeg.yRot += 2.042035F * g; - this.tail.yRot += 0.5F * i * g; + private void setupWaterHoveringAnimation(float ageInTicks, float swimmingFactor) { + if (!(swimmingFactor <= 1.0E-5F)) { + float f = ageInTicks * 0.075F; + float g = Mth.cos(f); + float h = Mth.sin(f) * 0.15F; + float i = (-0.15F + 0.075F * g) * swimmingFactor; + this.body.xRot += i; + this.body.y -= h * swimmingFactor; + this.head.xRot -= i; + this.topGills.xRot += 0.2F * g * swimmingFactor; + float j = (-0.3F * g - 0.19F) * swimmingFactor; + this.leftGills.yRot += j; + this.rightGills.yRot -= j; + this.leftHindLeg.xRot += ((float) (Math.PI * 3.0 / 4.0) - g * 0.11F) * swimmingFactor; + this.leftHindLeg.yRot += 0.47123894F * swimmingFactor; + this.leftHindLeg.zRot += 1.7278761F * swimmingFactor; + this.leftFrontLeg.xRot += ((float) (Math.PI / 4) - g * 0.2F) * swimmingFactor; + this.leftFrontLeg.yRot += 2.042035F * swimmingFactor; + this.tail.yRot += 0.5F * g * swimmingFactor; } } - private void setupSwimmingAnimation(float f, float g, float h) { - if (!(h <= 1.0E-5F)) { - float i = f * 0.33F; - float j = Mth.sin(i); - float k = Mth.cos(i); - float l = 0.13F * j; - this.body.xRot += (g * (float) (Math.PI / 180.0) + l) * h; - this.head.xRot -= l * 1.8F * h; - this.body.y -= 0.45F * k * h; - this.topGills.xRot += (-0.5F * j - 0.8F) * h; - float m = (0.3F * j + 0.9F) * h; - this.leftGills.yRot += m; - this.rightGills.yRot -= m; - this.tail.yRot = this.tail.yRot + 0.3F * Mth.cos(i * 0.9F) * h; - this.leftHindLeg.xRot += 1.8849558F * h; - this.leftHindLeg.yRot += -0.4F * j * h; - this.leftHindLeg.zRot += (float) (Math.PI / 2) * h; - this.leftFrontLeg.xRot += 1.8849558F * h; - this.leftFrontLeg.yRot += (-0.2F * k - 0.1F) * h; - this.leftFrontLeg.zRot += (float) (Math.PI / 2) * h; + private void setupSwimmingAnimation(float ageInTicks, float xRot, float movingFactor) { + if (!(movingFactor <= 1.0E-5F)) { + float f = ageInTicks * 0.33F; + float g = Mth.sin(f); + float h = Mth.cos(f); + float i = 0.13F * g; + this.body.xRot += (xRot * (float) (Math.PI / 180.0) + i) * movingFactor; + this.head.xRot -= i * 1.8F * movingFactor; + this.body.y -= 0.45F * h * movingFactor; + this.topGills.xRot += (-0.5F * g - 0.8F) * movingFactor; + float j = (0.3F * g + 0.9F) * movingFactor; + this.leftGills.yRot += j; + this.rightGills.yRot -= j; + this.tail.yRot = this.tail.yRot + 0.3F * Mth.cos(f * 0.9F) * movingFactor; + this.leftHindLeg.xRot += 1.8849558F * movingFactor; + this.leftHindLeg.yRot += -0.4F * g * movingFactor; + this.leftHindLeg.zRot += (float) (Math.PI / 2) * movingFactor; + this.leftFrontLeg.xRot += 1.8849558F * movingFactor; + this.leftFrontLeg.yRot += (-0.2F * h - 0.1F) * movingFactor; + this.leftFrontLeg.zRot += (float) (Math.PI / 2) * movingFactor; } } - private void setupPlayDeadAnimation(float netHeadYaw) { - if (!(netHeadYaw <= 1.0E-5F)) { - this.leftHindLeg.xRot += 1.4137167F * netHeadYaw; - this.leftHindLeg.yRot += 1.0995574F * netHeadYaw; - this.leftHindLeg.zRot += (float) (Math.PI / 4) * netHeadYaw; - this.leftFrontLeg.xRot += (float) (Math.PI / 4) * netHeadYaw; - this.leftFrontLeg.yRot += 2.042035F * netHeadYaw; - this.body.xRot += -0.15F * netHeadYaw; - this.body.zRot += 0.35F * netHeadYaw; + private void setupPlayDeadAnimation(float playingDeadFactor) { + if (!(playingDeadFactor <= 1.0E-5F)) { + this.leftHindLeg.xRot += 1.4137167F * playingDeadFactor; + this.leftHindLeg.yRot += 1.0995574F * playingDeadFactor; + this.leftHindLeg.zRot += (float) (Math.PI / 4) * playingDeadFactor; + this.leftFrontLeg.xRot += (float) (Math.PI / 4) * playingDeadFactor; + this.leftFrontLeg.yRot += 2.042035F * playingDeadFactor; + this.body.xRot += -0.15F * playingDeadFactor; + this.body.zRot += 0.35F * playingDeadFactor; } } - private void applyMirrorLegRotations(float f) { - if (!(f <= 1.0E-5F)) { - this.rightHindLeg.xRot = this.rightHindLeg.xRot + this.leftHindLeg.xRot * f; + private void applyMirrorLegRotations(float factor) { + if (!(factor <= 1.0E-5F)) { + this.rightHindLeg.xRot = this.rightHindLeg.xRot + this.leftHindLeg.xRot * factor; ModelPart var2 = this.rightHindLeg; - var2.yRot = var2.yRot + -this.leftHindLeg.yRot * f; + var2.yRot = var2.yRot + -this.leftHindLeg.yRot * factor; var2 = this.rightHindLeg; - var2.zRot = var2.zRot + -this.leftHindLeg.zRot * f; - this.rightFrontLeg.xRot = this.rightFrontLeg.xRot + this.leftFrontLeg.xRot * f; + var2.zRot = var2.zRot + -this.leftHindLeg.zRot * factor; + this.rightFrontLeg.xRot = this.rightFrontLeg.xRot + this.leftFrontLeg.xRot * factor; var2 = this.rightFrontLeg; - var2.yRot = var2.yRot + -this.leftFrontLeg.yRot * f; + var2.yRot = var2.yRot + -this.leftFrontLeg.yRot * factor; var2 = this.rightFrontLeg; - var2.zRot = var2.zRot + -this.leftFrontLeg.zRot * f; + var2.zRot = var2.zRot + -this.leftFrontLeg.zRot * factor; } } } diff --git a/net/minecraft/client/model/BabyModelTransform.java b/net/minecraft/client/model/BabyModelTransform.java index 6e31eb30..33629067 100644 --- a/net/minecraft/client/model/BabyModelTransform.java +++ b/net/minecraft/client/model/BabyModelTransform.java @@ -14,12 +14,12 @@ import net.minecraft.client.model.geom.builders.PartDefinition; public record BabyModelTransform( boolean scaleHead, float babyYHeadOffset, float babyZHeadOffset, float babyHeadScale, float babyBodyScale, float bodyYOffset, Set headParts ) implements MeshTransformer { - public BabyModelTransform(Set set) { - this(false, 5.0F, 2.0F, set); + public BabyModelTransform(Set headParts) { + this(false, 5.0F, 2.0F, headParts); } - public BabyModelTransform(boolean bl, float f, float g, Set set) { - this(bl, f, g, 2.0F, 2.0F, 24.0F, set); + public BabyModelTransform(boolean scaleHead, float babyYHeadOffset, float babyZHeadOffset, Set headParts) { + this(scaleHead, babyYHeadOffset, babyZHeadOffset, 2.0F, 2.0F, 24.0F, headParts); } @Override diff --git a/net/minecraft/client/model/BatModel.java b/net/minecraft/client/model/BatModel.java index 733f3a67..9d90cbf3 100644 --- a/net/minecraft/client/model/BatModel.java +++ b/net/minecraft/client/model/BatModel.java @@ -66,14 +66,14 @@ public class BatModel extends EntityModel { return LayerDefinition.create(meshDefinition, 32, 32); } - public void setupAnim(BatRenderState batRenderState) { - super.setupAnim(batRenderState); - if (batRenderState.isResting) { - this.applyHeadRotation(batRenderState.yRot); + public void setupAnim(BatRenderState renderState) { + super.setupAnim(renderState); + if (renderState.isResting) { + this.applyHeadRotation(renderState.yRot); } - this.animate(batRenderState.flyAnimationState, BatAnimation.BAT_FLYING, batRenderState.ageInTicks, 1.0F); - this.animate(batRenderState.restAnimationState, BatAnimation.BAT_RESTING, batRenderState.ageInTicks, 1.0F); + this.animate(renderState.flyAnimationState, BatAnimation.BAT_FLYING, renderState.ageInTicks, 1.0F); + this.animate(renderState.restAnimationState, BatAnimation.BAT_RESTING, renderState.ageInTicks, 1.0F); } private void applyHeadRotation(float headRotation) { diff --git a/net/minecraft/client/model/BeeModel.java b/net/minecraft/client/model/BeeModel.java index df8d8e9e..2ec2e5a6 100644 --- a/net/minecraft/client/model/BeeModel.java +++ b/net/minecraft/client/model/BeeModel.java @@ -85,12 +85,12 @@ public class BeeModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(BeeRenderState beeRenderState) { - super.setupAnim(beeRenderState); - this.rollAmount = beeRenderState.rollAmount; - this.stinger.visible = beeRenderState.hasStinger; - if (!beeRenderState.isOnGround) { - float f = beeRenderState.ageInTicks * 120.32113F * (float) (Math.PI / 180.0); + public void setupAnim(BeeRenderState renderState) { + super.setupAnim(renderState); + this.rollAmount = renderState.rollAmount; + this.stinger.visible = renderState.hasStinger; + if (!renderState.isOnGround) { + float f = renderState.ageInTicks * 120.32113F * (float) (Math.PI / 180.0); this.rightWing.yRot = 0.0F; this.rightWing.zRot = Mth.cos(f) * (float) Math.PI * 0.15F; this.leftWing.xRot = this.rightWing.xRot; @@ -101,14 +101,14 @@ public class BeeModel extends EntityModel { this.backLeg.xRot = (float) (Math.PI / 4); } - if (!beeRenderState.isAngry && !beeRenderState.isOnGround) { - float f = Mth.cos(beeRenderState.ageInTicks * 0.18F); + if (!renderState.isAngry && !renderState.isOnGround) { + float f = Mth.cos(renderState.ageInTicks * 0.18F); this.bone.xRot = 0.1F + f * (float) Math.PI * 0.025F; this.leftAntenna.xRot = f * (float) Math.PI * 0.03F; this.rightAntenna.xRot = f * (float) Math.PI * 0.03F; this.frontLeg.xRot = -f * (float) Math.PI * 0.1F + (float) (Math.PI / 8); this.backLeg.xRot = -f * (float) Math.PI * 0.05F + (float) (Math.PI / 4); - this.bone.y = this.bone.y - Mth.cos(beeRenderState.ageInTicks * 0.18F) * 0.9F; + this.bone.y = this.bone.y - Mth.cos(renderState.ageInTicks * 0.18F) * 0.9F; } if (this.rollAmount > 0.0F) { diff --git a/net/minecraft/client/model/BeeStingerModel.java b/net/minecraft/client/model/BeeStingerModel.java index 4f9fdb1e..1ffdc92e 100644 --- a/net/minecraft/client/model/BeeStingerModel.java +++ b/net/minecraft/client/model/BeeStingerModel.java @@ -12,8 +12,8 @@ import net.minecraft.client.renderer.RenderType; @Environment(EnvType.CLIENT) public class BeeStingerModel extends Model { - public BeeStingerModel(ModelPart modelPart) { - super(modelPart, RenderType::entityCutout); + public BeeStingerModel(ModelPart root) { + super(root, RenderType::entityCutout); } public static LayerDefinition createBodyLayer() { diff --git a/net/minecraft/client/model/BellModel.java b/net/minecraft/client/model/BellModel.java index ed131256..e5df8578 100644 --- a/net/minecraft/client/model/BellModel.java +++ b/net/minecraft/client/model/BellModel.java @@ -18,9 +18,9 @@ public class BellModel extends Model { private static final String BELL_BODY = "bell_body"; private final ModelPart bellBody; - public BellModel(ModelPart modelPart) { - super(modelPart, RenderType::entitySolid); - this.bellBody = modelPart.getChild("bell_body"); + public BellModel(ModelPart root) { + super(root, RenderType::entitySolid); + this.bellBody = root.getChild("bell_body"); } public static LayerDefinition createBodyLayer() { @@ -35,24 +35,24 @@ public class BellModel extends Model { return LayerDefinition.create(meshDefinition, 32, 32); } - public void setupAnim(BellBlockEntity bellBlockEntity, float f) { - float g = bellBlockEntity.ticks + f; + public void setupAnim(BellBlockEntity bell, float partialTick) { + float f = bell.ticks + partialTick; + float g = 0.0F; float h = 0.0F; - float i = 0.0F; - if (bellBlockEntity.shaking) { - float j = Mth.sin(g / (float) Math.PI) / (4.0F + g / 3.0F); - if (bellBlockEntity.clickDirection == Direction.NORTH) { - h = -j; - } else if (bellBlockEntity.clickDirection == Direction.SOUTH) { - h = j; - } else if (bellBlockEntity.clickDirection == Direction.EAST) { - i = -j; - } else if (bellBlockEntity.clickDirection == Direction.WEST) { - i = j; + if (bell.shaking) { + float i = Mth.sin(f / (float) Math.PI) / (4.0F + f / 3.0F); + if (bell.clickDirection == Direction.NORTH) { + g = -i; + } else if (bell.clickDirection == Direction.SOUTH) { + g = i; + } else if (bell.clickDirection == Direction.EAST) { + h = -i; + } else if (bell.clickDirection == Direction.WEST) { + h = i; } } - this.bellBody.xRot = h; - this.bellBody.zRot = i; + this.bellBody.xRot = g; + this.bellBody.zRot = h; } } diff --git a/net/minecraft/client/model/BlazeModel.java b/net/minecraft/client/model/BlazeModel.java index 84494796..3ed5d29a 100644 --- a/net/minecraft/client/model/BlazeModel.java +++ b/net/minecraft/client/model/BlazeModel.java @@ -66,36 +66,36 @@ public class BlazeModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(LivingEntityRenderState livingEntityRenderState) { - super.setupAnim(livingEntityRenderState); - float f = livingEntityRenderState.ageInTicks * (float) Math.PI * -0.1F; + public void setupAnim(LivingEntityRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.ageInTicks * (float) Math.PI * -0.1F; for (int i = 0; i < 4; i++) { - this.upperBodyParts[i].y = -2.0F + Mth.cos((i * 2 + livingEntityRenderState.ageInTicks) * 0.25F); + this.upperBodyParts[i].y = -2.0F + Mth.cos((i * 2 + renderState.ageInTicks) * 0.25F); this.upperBodyParts[i].x = Mth.cos(f) * 9.0F; this.upperBodyParts[i].z = Mth.sin(f) * 9.0F; f++; } - f = (float) (Math.PI / 4) + livingEntityRenderState.ageInTicks * (float) Math.PI * 0.03F; + f = (float) (Math.PI / 4) + renderState.ageInTicks * (float) Math.PI * 0.03F; for (int i = 4; i < 8; i++) { - this.upperBodyParts[i].y = 2.0F + Mth.cos((i * 2 + livingEntityRenderState.ageInTicks) * 0.25F); + this.upperBodyParts[i].y = 2.0F + Mth.cos((i * 2 + renderState.ageInTicks) * 0.25F); this.upperBodyParts[i].x = Mth.cos(f) * 7.0F; this.upperBodyParts[i].z = Mth.sin(f) * 7.0F; f++; } - f = 0.47123894F + livingEntityRenderState.ageInTicks * (float) Math.PI * -0.05F; + f = 0.47123894F + renderState.ageInTicks * (float) Math.PI * -0.05F; for (int i = 8; i < 12; i++) { - this.upperBodyParts[i].y = 11.0F + Mth.cos((i * 1.5F + livingEntityRenderState.ageInTicks) * 0.5F); + this.upperBodyParts[i].y = 11.0F + Mth.cos((i * 1.5F + renderState.ageInTicks) * 0.5F); this.upperBodyParts[i].x = Mth.cos(f) * 5.0F; this.upperBodyParts[i].z = Mth.sin(f) * 5.0F; f++; } - this.head.yRot = livingEntityRenderState.yRot * (float) (Math.PI / 180.0); - this.head.xRot = livingEntityRenderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); } } diff --git a/net/minecraft/client/model/BreezeModel.java b/net/minecraft/client/model/BreezeModel.java index f6c939eb..4ae2b18c 100644 --- a/net/minecraft/client/model/BreezeModel.java +++ b/net/minecraft/client/model/BreezeModel.java @@ -106,14 +106,14 @@ public class BreezeModel extends EntityModel { return LayerDefinition.create(meshDefinition, width, height); } - public void setupAnim(BreezeRenderState breezeRenderState) { - super.setupAnim(breezeRenderState); - this.animate(breezeRenderState.idle, BreezeAnimation.IDLE, breezeRenderState.ageInTicks); - this.animate(breezeRenderState.shoot, BreezeAnimation.SHOOT, breezeRenderState.ageInTicks); - this.animate(breezeRenderState.slide, BreezeAnimation.SLIDE, breezeRenderState.ageInTicks); - this.animate(breezeRenderState.slideBack, BreezeAnimation.SLIDE_BACK, breezeRenderState.ageInTicks); - this.animate(breezeRenderState.inhale, BreezeAnimation.INHALE, breezeRenderState.ageInTicks); - this.animate(breezeRenderState.longJump, BreezeAnimation.JUMP, breezeRenderState.ageInTicks); + public void setupAnim(BreezeRenderState renderState) { + super.setupAnim(renderState); + this.animate(renderState.idle, BreezeAnimation.IDLE, renderState.ageInTicks); + this.animate(renderState.shoot, BreezeAnimation.SHOOT, renderState.ageInTicks); + this.animate(renderState.slide, BreezeAnimation.SLIDE, renderState.ageInTicks); + this.animate(renderState.slideBack, BreezeAnimation.SLIDE_BACK, renderState.ageInTicks); + this.animate(renderState.inhale, BreezeAnimation.INHALE, renderState.ageInTicks); + this.animate(renderState.longJump, BreezeAnimation.JUMP, renderState.ageInTicks); } public ModelPart head() { diff --git a/net/minecraft/client/model/CamelModel.java b/net/minecraft/client/model/CamelModel.java index 71f4806e..2f94e3ff 100644 --- a/net/minecraft/client/model/CamelModel.java +++ b/net/minecraft/client/model/CamelModel.java @@ -117,33 +117,33 @@ public class CamelModel extends EntityModel { return LayerDefinition.create(meshDefinition, 128, 128); } - public void setupAnim(CamelRenderState camelRenderState) { - super.setupAnim(camelRenderState); - this.applyHeadRotation(camelRenderState, camelRenderState.yRot, camelRenderState.xRot); - this.toggleInvisibleParts(camelRenderState); - this.animateWalk(CamelAnimation.CAMEL_WALK, camelRenderState.walkAnimationPos, camelRenderState.walkAnimationSpeed, 2.0F, 2.5F); - this.animate(camelRenderState.sitAnimationState, CamelAnimation.CAMEL_SIT, camelRenderState.ageInTicks, 1.0F); - this.animate(camelRenderState.sitPoseAnimationState, CamelAnimation.CAMEL_SIT_POSE, camelRenderState.ageInTicks, 1.0F); - this.animate(camelRenderState.sitUpAnimationState, CamelAnimation.CAMEL_STANDUP, camelRenderState.ageInTicks, 1.0F); - this.animate(camelRenderState.idleAnimationState, CamelAnimation.CAMEL_IDLE, camelRenderState.ageInTicks, 1.0F); - this.animate(camelRenderState.dashAnimationState, CamelAnimation.CAMEL_DASH, camelRenderState.ageInTicks, 1.0F); + public void setupAnim(CamelRenderState renderState) { + super.setupAnim(renderState); + this.applyHeadRotation(renderState, renderState.yRot, renderState.xRot); + this.toggleInvisibleParts(renderState); + this.animateWalk(CamelAnimation.CAMEL_WALK, renderState.walkAnimationPos, renderState.walkAnimationSpeed, 2.0F, 2.5F); + this.animate(renderState.sitAnimationState, CamelAnimation.CAMEL_SIT, renderState.ageInTicks, 1.0F); + this.animate(renderState.sitPoseAnimationState, CamelAnimation.CAMEL_SIT_POSE, renderState.ageInTicks, 1.0F); + this.animate(renderState.sitUpAnimationState, CamelAnimation.CAMEL_STANDUP, renderState.ageInTicks, 1.0F); + this.animate(renderState.idleAnimationState, CamelAnimation.CAMEL_IDLE, renderState.ageInTicks, 1.0F); + this.animate(renderState.dashAnimationState, CamelAnimation.CAMEL_DASH, renderState.ageInTicks, 1.0F); } - private void applyHeadRotation(CamelRenderState camelRenderState, float f, float g) { - f = Mth.clamp(f, -30.0F, 30.0F); - g = Mth.clamp(g, -25.0F, 45.0F); - if (camelRenderState.jumpCooldown > 0.0F) { - float h = 45.0F * camelRenderState.jumpCooldown / 55.0F; - g = Mth.clamp(g + h, -25.0F, 70.0F); + private void applyHeadRotation(CamelRenderState renderState, float yRot, float xRot) { + yRot = Mth.clamp(yRot, -30.0F, 30.0F); + xRot = Mth.clamp(xRot, -25.0F, 45.0F); + if (renderState.jumpCooldown > 0.0F) { + float f = 45.0F * renderState.jumpCooldown / 55.0F; + xRot = Mth.clamp(xRot + f, -25.0F, 70.0F); } - this.head.yRot = f * (float) (Math.PI / 180.0); - this.head.xRot = g * (float) (Math.PI / 180.0); + this.head.yRot = yRot * (float) (Math.PI / 180.0); + this.head.xRot = xRot * (float) (Math.PI / 180.0); } - private void toggleInvisibleParts(CamelRenderState camelRenderState) { - boolean bl = camelRenderState.isSaddled; - boolean bl2 = camelRenderState.isRidden; + private void toggleInvisibleParts(CamelRenderState renderState) { + boolean bl = renderState.isSaddled; + boolean bl2 = renderState.isRidden; for (ModelPart modelPart : this.saddleParts) { modelPart.visible = bl; diff --git a/net/minecraft/client/model/CatModel.java b/net/minecraft/client/model/CatModel.java index 2b014eff..ec2ac53c 100644 --- a/net/minecraft/client/model/CatModel.java +++ b/net/minecraft/client/model/CatModel.java @@ -10,7 +10,7 @@ import net.minecraft.client.renderer.entity.state.CatRenderState; public class CatModel extends FelineModel { public static final MeshTransformer CAT_TRANSFORMER = MeshTransformer.scaling(0.8F); - public CatModel(ModelPart root) { - super(root); + public CatModel(ModelPart modelPart) { + super(modelPart); } } diff --git a/net/minecraft/client/model/ChestModel.java b/net/minecraft/client/model/ChestModel.java index b3679847..3c180924 100644 --- a/net/minecraft/client/model/ChestModel.java +++ b/net/minecraft/client/model/ChestModel.java @@ -18,10 +18,10 @@ public class ChestModel extends Model { private final ModelPart lid; private final ModelPart lock; - public ChestModel(ModelPart modelPart) { - super(modelPart, RenderType::entitySolid); - this.lid = modelPart.getChild("lid"); - this.lock = modelPart.getChild("lock"); + public ChestModel(ModelPart root) { + super(root, RenderType::entitySolid); + this.lid = root.getChild("lid"); + this.lock = root.getChild("lock"); } public static LayerDefinition createSingleBodyLayer() { @@ -63,8 +63,8 @@ public class ChestModel extends Model { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(float f) { - this.lid.xRot = -(f * (float) (Math.PI / 2)); + public void setupAnim(float openness) { + this.lid.xRot = -(openness * (float) (Math.PI / 2)); this.lock.xRot = this.lid.xRot; } } diff --git a/net/minecraft/client/model/ChickenModel.java b/net/minecraft/client/model/ChickenModel.java index cc893f70..18a6dda7 100644 --- a/net/minecraft/client/model/ChickenModel.java +++ b/net/minecraft/client/model/ChickenModel.java @@ -66,17 +66,17 @@ public class ChickenModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(ChickenRenderState chickenRenderState) { - super.setupAnim(chickenRenderState); - float f = (Mth.sin(chickenRenderState.flap) + 1.0F) * chickenRenderState.flapSpeed; - this.head.xRot = chickenRenderState.xRot * (float) (Math.PI / 180.0); - this.head.yRot = chickenRenderState.yRot * (float) (Math.PI / 180.0); + public void setupAnim(ChickenRenderState renderState) { + super.setupAnim(renderState); + float f = (Mth.sin(renderState.flap) + 1.0F) * renderState.flapSpeed; + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); this.beak.xRot = this.head.xRot; this.beak.yRot = this.head.yRot; this.redThing.xRot = this.head.xRot; this.redThing.yRot = this.head.yRot; - float g = chickenRenderState.walkAnimationSpeed; - float h = chickenRenderState.walkAnimationPos; + float g = renderState.walkAnimationSpeed; + float h = renderState.walkAnimationPos; this.rightLeg.xRot = Mth.cos(h * 0.6662F) * 1.4F * g; this.leftLeg.xRot = Mth.cos(h * 0.6662F + (float) Math.PI) * 1.4F * g; this.rightWing.zRot = f; diff --git a/net/minecraft/client/model/CodModel.java b/net/minecraft/client/model/CodModel.java index 0cfbd9fd..ba22a54f 100644 --- a/net/minecraft/client/model/CodModel.java +++ b/net/minecraft/client/model/CodModel.java @@ -52,9 +52,9 @@ public class CodModel extends EntityModel { return LayerDefinition.create(meshDefinition, 32, 32); } - public void setupAnim(LivingEntityRenderState livingEntityRenderState) { - super.setupAnim(livingEntityRenderState); - float f = livingEntityRenderState.isInWater ? 1.0F : 1.5F; - this.tailFin.yRot = -f * 0.45F * Mth.sin(0.6F * livingEntityRenderState.ageInTicks); + public void setupAnim(LivingEntityRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.isInWater ? 1.0F : 1.5F; + this.tailFin.yRot = -f * 0.45F * Mth.sin(0.6F * renderState.ageInTicks); } } diff --git a/net/minecraft/client/model/CreakingModel.java b/net/minecraft/client/model/CreakingModel.java index 3774eed6..2541adff 100644 --- a/net/minecraft/client/model/CreakingModel.java +++ b/net/minecraft/client/model/CreakingModel.java @@ -18,11 +18,11 @@ public class CreakingModel extends EntityModel { private final ModelPart head; private final List headParts; - public CreakingModel(ModelPart modelPart) { - super(modelPart); - ModelPart modelPart2 = modelPart.getChild("root"); - ModelPart modelPart3 = modelPart2.getChild("upper_body"); - this.head = modelPart3.getChild("head"); + public CreakingModel(ModelPart root) { + super(root); + ModelPart modelPart = root.getChild("root"); + ModelPart modelPart2 = modelPart.getChild("upper_body"); + this.head = modelPart2.getChild("head"); this.headParts = List.of(this.head); } @@ -89,17 +89,17 @@ public class CreakingModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(CreakingRenderState creakingRenderState) { + public void setupAnim(CreakingRenderState renderState) { this.root().getAllParts().forEach(ModelPart::resetPose); - if (creakingRenderState.canMove) { - this.animateWalk(CreakingAnimation.CREAKING_WALK, creakingRenderState.walkAnimationPos, creakingRenderState.walkAnimationSpeed, 5.5F, 3.0F); + if (renderState.canMove) { + this.animateWalk(CreakingAnimation.CREAKING_WALK, renderState.walkAnimationPos, renderState.walkAnimationSpeed, 5.5F, 3.0F); } - this.animate(creakingRenderState.attackAnimationState, CreakingAnimation.CREAKING_ATTACK, creakingRenderState.ageInTicks); - this.animate(creakingRenderState.invulnerabilityAnimationState, CreakingAnimation.CREAKING_INVULNERABLE, creakingRenderState.ageInTicks); + this.animate(renderState.attackAnimationState, CreakingAnimation.CREAKING_ATTACK, renderState.ageInTicks); + this.animate(renderState.invulnerabilityAnimationState, CreakingAnimation.CREAKING_INVULNERABLE, renderState.ageInTicks); } - public List getHeadModelParts(CreakingRenderState creakingRenderState) { - return !creakingRenderState.isActive ? NO_PARTS : this.headParts; + public List getHeadModelParts(CreakingRenderState renderState) { + return !renderState.isActive ? NO_PARTS : this.headParts; } } diff --git a/net/minecraft/client/model/CreeperModel.java b/net/minecraft/client/model/CreeperModel.java index 72b6e5b7..32d7920e 100644 --- a/net/minecraft/client/model/CreeperModel.java +++ b/net/minecraft/client/model/CreeperModel.java @@ -47,12 +47,12 @@ public class CreeperModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(CreeperRenderState creeperRenderState) { - super.setupAnim(creeperRenderState); - this.head.yRot = creeperRenderState.yRot * (float) (Math.PI / 180.0); - this.head.xRot = creeperRenderState.xRot * (float) (Math.PI / 180.0); - float f = creeperRenderState.walkAnimationSpeed; - float g = creeperRenderState.walkAnimationPos; + public void setupAnim(CreeperRenderState renderState) { + super.setupAnim(renderState); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + float f = renderState.walkAnimationSpeed; + float g = renderState.walkAnimationPos; this.rightHindLeg.xRot = Mth.cos(g * 0.6662F) * 1.4F * f; this.leftHindLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * 1.4F * f; this.rightFrontLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * 1.4F * f; diff --git a/net/minecraft/client/model/DolphinModel.java b/net/minecraft/client/model/DolphinModel.java index c54c890d..b482f8d9 100644 --- a/net/minecraft/client/model/DolphinModel.java +++ b/net/minecraft/client/model/DolphinModel.java @@ -62,14 +62,14 @@ public class DolphinModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(DolphinRenderState dolphinRenderState) { - super.setupAnim(dolphinRenderState); - this.body.xRot = dolphinRenderState.xRot * (float) (Math.PI / 180.0); - this.body.yRot = dolphinRenderState.yRot * (float) (Math.PI / 180.0); - if (dolphinRenderState.isMoving) { - this.body.xRot = this.body.xRot + (-0.05F - 0.05F * Mth.cos(dolphinRenderState.ageInTicks * 0.3F)); - this.tail.xRot = -0.1F * Mth.cos(dolphinRenderState.ageInTicks * 0.3F); - this.tailFin.xRot = -0.2F * Mth.cos(dolphinRenderState.ageInTicks * 0.3F); + public void setupAnim(DolphinRenderState renderState) { + super.setupAnim(renderState); + this.body.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.body.yRot = renderState.yRot * (float) (Math.PI / 180.0); + if (renderState.isMoving) { + this.body.xRot = this.body.xRot + (-0.05F - 0.05F * Mth.cos(renderState.ageInTicks * 0.3F)); + this.tail.xRot = -0.1F * Mth.cos(renderState.ageInTicks * 0.3F); + this.tailFin.xRot = -0.2F * Mth.cos(renderState.ageInTicks * 0.3F); } } } diff --git a/net/minecraft/client/model/DonkeyModel.java b/net/minecraft/client/model/DonkeyModel.java index 24fa0c94..5a0c68af 100644 --- a/net/minecraft/client/model/DonkeyModel.java +++ b/net/minecraft/client/model/DonkeyModel.java @@ -16,8 +16,8 @@ public class DonkeyModel extends AbstractEquineModel { private final ModelPart leftChest = this.body.getChild("left_chest"); private final ModelPart rightChest = this.body.getChild("right_chest"); - public DonkeyModel(ModelPart modelPart) { - super(modelPart); + public DonkeyModel(ModelPart root) { + super(root); } public static LayerDefinition createBodyLayer() { @@ -47,9 +47,9 @@ public class DonkeyModel extends AbstractEquineModel { ); } - public void setupAnim(DonkeyRenderState donkeyRenderState) { - super.setupAnim(donkeyRenderState); - this.leftChest.visible = donkeyRenderState.hasChest; - this.rightChest.visible = donkeyRenderState.hasChest; + public void setupAnim(DonkeyRenderState renderState) { + super.setupAnim(renderState); + this.leftChest.visible = renderState.hasChest; + this.rightChest.visible = renderState.hasChest; } } diff --git a/net/minecraft/client/model/DrownedModel.java b/net/minecraft/client/model/DrownedModel.java index 2c47b3a1..c9caa3af 100644 --- a/net/minecraft/client/model/DrownedModel.java +++ b/net/minecraft/client/model/DrownedModel.java @@ -33,9 +33,9 @@ public class DrownedModel extends ZombieModel { return LayerDefinition.create(meshDefinition, 64, 64); } - protected HumanoidModel.ArmPose getArmPose(ZombieRenderState zombieRenderState, HumanoidArm humanoidArm) { - ItemStack itemStack = humanoidArm == HumanoidArm.RIGHT ? zombieRenderState.rightHandItem : zombieRenderState.leftHandItem; - return itemStack.is(Items.TRIDENT) && zombieRenderState.isAggressive && zombieRenderState.mainArm == humanoidArm + protected HumanoidModel.ArmPose getArmPose(ZombieRenderState renderState, HumanoidArm arm) { + ItemStack itemStack = arm == HumanoidArm.RIGHT ? renderState.rightHandItem : renderState.leftHandItem; + return itemStack.is(Items.TRIDENT) && renderState.isAggressive && renderState.mainArm == arm ? HumanoidModel.ArmPose.THROW_SPEAR : HumanoidModel.ArmPose.EMPTY; } diff --git a/net/minecraft/client/model/ElytraModel.java b/net/minecraft/client/model/ElytraModel.java index 8056e012..b6f9ee99 100644 --- a/net/minecraft/client/model/ElytraModel.java +++ b/net/minecraft/client/model/ElytraModel.java @@ -41,12 +41,12 @@ public class ElytraModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(HumanoidRenderState humanoidRenderState) { - super.setupAnim(humanoidRenderState); - this.leftWing.y = humanoidRenderState.isCrouching ? 3.0F : 0.0F; - this.leftWing.xRot = humanoidRenderState.elytraRotX; - this.leftWing.zRot = humanoidRenderState.elytraRotZ; - this.leftWing.yRot = humanoidRenderState.elytraRotY; + public void setupAnim(HumanoidRenderState renderState) { + super.setupAnim(renderState); + this.leftWing.y = renderState.isCrouching ? 3.0F : 0.0F; + this.leftWing.xRot = renderState.elytraRotX; + this.leftWing.zRot = renderState.elytraRotZ; + this.leftWing.yRot = renderState.elytraRotY; this.rightWing.yRot = -this.leftWing.yRot; this.rightWing.y = this.leftWing.y; this.rightWing.xRot = this.leftWing.xRot; diff --git a/net/minecraft/client/model/EndCrystalModel.java b/net/minecraft/client/model/EndCrystalModel.java index ff0e39d6..8acceb75 100644 --- a/net/minecraft/client/model/EndCrystalModel.java +++ b/net/minecraft/client/model/EndCrystalModel.java @@ -24,10 +24,10 @@ public class EndCrystalModel extends EntityModel { public final ModelPart innerGlass; public final ModelPart cube; - public EndCrystalModel(ModelPart modelPart) { - super(modelPart); - this.base = modelPart.getChild("base"); - this.outerGlass = modelPart.getChild("outer_glass"); + public EndCrystalModel(ModelPart root) { + super(root); + this.base = root.getChild("base"); + this.outerGlass = root.getChild("outer_glass"); this.innerGlass = this.outerGlass.getChild("inner_glass"); this.cube = this.innerGlass.getChild("cube"); } @@ -46,11 +46,11 @@ public class EndCrystalModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(EndCrystalRenderState endCrystalRenderState) { - super.setupAnim(endCrystalRenderState); - this.base.visible = endCrystalRenderState.showsBottom; - float f = endCrystalRenderState.ageInTicks * 3.0F; - float g = EndCrystalRenderer.getY(endCrystalRenderState.ageInTicks) * 16.0F; + public void setupAnim(EndCrystalRenderState renderState) { + super.setupAnim(renderState); + this.base.visible = renderState.showsBottom; + float f = renderState.ageInTicks * 3.0F; + float g = EndCrystalRenderer.getY(renderState.ageInTicks) * 16.0F; this.outerGlass.y += g / 2.0F; this.outerGlass.rotateBy(Axis.YP.rotationDegrees(f).rotateAxis((float) (Math.PI / 3), SIN_45, 0.0F, SIN_45)); this.innerGlass.rotateBy(new Quaternionf().setAngleAxis((float) (Math.PI / 3), SIN_45, 0.0F, SIN_45).rotateY(f * (float) (Math.PI / 180.0))); diff --git a/net/minecraft/client/model/EndermanModel.java b/net/minecraft/client/model/EndermanModel.java index be7bb210..c5d40fd7 100644 --- a/net/minecraft/client/model/EndermanModel.java +++ b/net/minecraft/client/model/EndermanModel.java @@ -14,8 +14,8 @@ import net.minecraft.util.Mth; @Environment(EnvType.CLIENT) public class EndermanModel extends HumanoidModel { - public EndermanModel(ModelPart root) { - super(root); + public EndermanModel(ModelPart modelPart) { + super(modelPart); } public static LayerDefinition createBodyLayer() { diff --git a/net/minecraft/client/model/EndermiteModel.java b/net/minecraft/client/model/EndermiteModel.java index 42032934..ced152d9 100644 --- a/net/minecraft/client/model/EndermiteModel.java +++ b/net/minecraft/client/model/EndermiteModel.java @@ -52,12 +52,12 @@ public class EndermiteModel extends EntityModel { } @Override - public void setupAnim(EntityRenderState entityRenderState) { - super.setupAnim(entityRenderState); + public void setupAnim(EntityRenderState renderState) { + super.setupAnim(renderState); for (int i = 0; i < this.bodyParts.length; i++) { - this.bodyParts[i].yRot = Mth.cos(entityRenderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.01F * (1 + Math.abs(i - 2)); - this.bodyParts[i].x = Mth.sin(entityRenderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.1F * Math.abs(i - 2); + this.bodyParts[i].yRot = Mth.cos(renderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.01F * (1 + Math.abs(i - 2)); + this.bodyParts[i].x = Mth.sin(renderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.1F * Math.abs(i - 2); } } } diff --git a/net/minecraft/client/model/EntityModel.java b/net/minecraft/client/model/EntityModel.java index bd4f44e1..b5b85483 100644 --- a/net/minecraft/client/model/EntityModel.java +++ b/net/minecraft/client/model/EntityModel.java @@ -12,15 +12,15 @@ import net.minecraft.resources.ResourceLocation; public abstract class EntityModel extends Model { public static final float MODEL_Y_OFFSET = -1.501F; - protected EntityModel(ModelPart modelPart) { - this(modelPart, RenderType::entityCutoutNoCull); + protected EntityModel(ModelPart root) { + this(root, RenderType::entityCutoutNoCull); } - protected EntityModel(ModelPart modelPart, Function function) { - super(modelPart, function); + protected EntityModel(ModelPart root, Function renderType) { + super(root, renderType); } - public void setupAnim(T entityRenderState) { + public void setupAnim(T renderState) { this.resetPose(); } } diff --git a/net/minecraft/client/model/EvokerFangsModel.java b/net/minecraft/client/model/EvokerFangsModel.java index 2af41715..bd6c9af2 100644 --- a/net/minecraft/client/model/EvokerFangsModel.java +++ b/net/minecraft/client/model/EvokerFangsModel.java @@ -39,9 +39,9 @@ public class EvokerFangsModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(EvokerFangsRenderState evokerFangsRenderState) { - super.setupAnim(evokerFangsRenderState); - float f = evokerFangsRenderState.biteProgress; + public void setupAnim(EvokerFangsRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.biteProgress; float g = Math.min(f * 2.0F, 1.0F); g = 1.0F - g * g * g; this.upperJaw.zRot = (float) Math.PI - g * 0.35F * (float) Math.PI; diff --git a/net/minecraft/client/model/FelineModel.java b/net/minecraft/client/model/FelineModel.java index c925f93c..fcb27fef 100644 --- a/net/minecraft/client/model/FelineModel.java +++ b/net/minecraft/client/model/FelineModel.java @@ -35,16 +35,16 @@ public class FelineModel extends EntityModel { protected final ModelPart head; protected final ModelPart body; - public FelineModel(ModelPart modelPart) { - super(modelPart); - this.head = modelPart.getChild("head"); - this.body = modelPart.getChild("body"); - this.tail1 = modelPart.getChild("tail1"); - this.tail2 = modelPart.getChild("tail2"); - this.leftHindLeg = modelPart.getChild("left_hind_leg"); - this.rightHindLeg = modelPart.getChild("right_hind_leg"); - this.leftFrontLeg = modelPart.getChild("left_front_leg"); - this.rightFrontLeg = modelPart.getChild("right_front_leg"); + public FelineModel(ModelPart root) { + super(root); + this.head = root.getChild("head"); + this.body = root.getChild("body"); + this.tail1 = root.getChild("tail1"); + this.tail2 = root.getChild("tail2"); + this.leftHindLeg = root.getChild("left_hind_leg"); + this.rightHindLeg = root.getChild("right_hind_leg"); + this.leftFrontLeg = root.getChild("left_front_leg"); + this.rightFrontLeg = root.getChild("right_front_leg"); } public static MeshDefinition createBodyMesh(CubeDeformation cubeDeformation) { @@ -82,9 +82,9 @@ public class FelineModel extends EntityModel { return meshDefinition; } - public void setupAnim(T felineRenderState) { - super.setupAnim(felineRenderState); - if (felineRenderState.isCrouching) { + public void setupAnim(T renderState) { + super.setupAnim(renderState); + if (renderState.isCrouching) { this.body.y++; this.head.y += 2.0F; this.tail1.y++; @@ -92,20 +92,20 @@ public class FelineModel extends EntityModel { this.tail2.z += 2.0F; this.tail1.xRot = (float) (Math.PI / 2); this.tail2.xRot = (float) (Math.PI / 2); - } else if (felineRenderState.isSprinting) { + } else if (renderState.isSprinting) { this.tail2.y = this.tail1.y; this.tail2.z += 2.0F; this.tail1.xRot = (float) (Math.PI / 2); this.tail2.xRot = (float) (Math.PI / 2); } - this.head.xRot = felineRenderState.xRot * (float) (Math.PI / 180.0); - this.head.yRot = felineRenderState.yRot * (float) (Math.PI / 180.0); - if (!felineRenderState.isSitting) { + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + if (!renderState.isSitting) { this.body.xRot = (float) (Math.PI / 2); - float f = felineRenderState.walkAnimationSpeed; - float g = felineRenderState.walkAnimationPos; - if (felineRenderState.isSprinting) { + float f = renderState.walkAnimationSpeed; + float g = renderState.walkAnimationPos; + if (renderState.isSprinting) { this.leftHindLeg.xRot = Mth.cos(g * 0.6662F) * f; this.rightHindLeg.xRot = Mth.cos(g * 0.6662F + 0.3F) * f; this.leftFrontLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI + 0.3F) * f; @@ -116,7 +116,7 @@ public class FelineModel extends EntityModel { this.rightHindLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * f; this.leftFrontLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * f; this.rightFrontLeg.xRot = Mth.cos(g * 0.6662F) * f; - if (!felineRenderState.isCrouching) { + if (!renderState.isCrouching) { this.tail2.xRot = 1.7278761F + (float) (Math.PI / 4) * Mth.cos(g) * f; } else { this.tail2.xRot = 1.7278761F + 0.47123894F * Mth.cos(g) * f; @@ -124,8 +124,8 @@ public class FelineModel extends EntityModel { } } - float f = felineRenderState.ageScale; - if (felineRenderState.isSitting) { + float f = renderState.ageScale; + if (renderState.isSitting) { this.body.xRot = (float) (Math.PI / 4); this.body.y += -4.0F * f; this.body.z += 5.0F * f; @@ -151,9 +151,9 @@ public class FelineModel extends EntityModel { this.rightHindLeg.z -= 4.0F * f; } - if (felineRenderState.lieDownAmount > 0.0F) { - this.head.zRot = Mth.rotLerp(felineRenderState.lieDownAmount, this.head.zRot, -1.2707963F); - this.head.yRot = Mth.rotLerp(felineRenderState.lieDownAmount, this.head.yRot, 1.2707963F); + if (renderState.lieDownAmount > 0.0F) { + this.head.zRot = Mth.rotLerp(renderState.lieDownAmount, this.head.zRot, -1.2707963F); + this.head.yRot = Mth.rotLerp(renderState.lieDownAmount, this.head.yRot, 1.2707963F); this.leftFrontLeg.xRot = -1.2707963F; this.rightFrontLeg.xRot = -0.47079635F; this.rightFrontLeg.zRot = -0.2F; @@ -163,12 +163,12 @@ public class FelineModel extends EntityModel { this.rightHindLeg.zRot = -0.5F; this.rightHindLeg.x += 0.8F * f; this.rightHindLeg.y += 2.0F * f; - this.tail1.xRot = Mth.rotLerp(felineRenderState.lieDownAmountTail, this.tail1.xRot, 0.8F); - this.tail2.xRot = Mth.rotLerp(felineRenderState.lieDownAmountTail, this.tail2.xRot, -0.4F); + this.tail1.xRot = Mth.rotLerp(renderState.lieDownAmountTail, this.tail1.xRot, 0.8F); + this.tail2.xRot = Mth.rotLerp(renderState.lieDownAmountTail, this.tail2.xRot, -0.4F); } - if (felineRenderState.relaxStateOneAmount > 0.0F) { - this.head.xRot = Mth.rotLerp(felineRenderState.relaxStateOneAmount, this.head.xRot, -0.58177644F); + if (renderState.relaxStateOneAmount > 0.0F) { + this.head.xRot = Mth.rotLerp(renderState.relaxStateOneAmount, this.head.xRot, -0.58177644F); } } } diff --git a/net/minecraft/client/model/FoxModel.java b/net/minecraft/client/model/FoxModel.java index a08f423c..c0c10ecf 100644 --- a/net/minecraft/client/model/FoxModel.java +++ b/net/minecraft/client/model/FoxModel.java @@ -69,30 +69,30 @@ public class FoxModel extends EntityModel { return LayerDefinition.create(meshDefinition, 48, 32); } - public void setupAnim(FoxRenderState foxRenderState) { - super.setupAnim(foxRenderState); - float f = foxRenderState.walkAnimationSpeed; - float g = foxRenderState.walkAnimationPos; + public void setupAnim(FoxRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.walkAnimationSpeed; + float g = renderState.walkAnimationPos; this.rightHindLeg.xRot = Mth.cos(g * 0.6662F) * 1.4F * f; this.leftHindLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * 1.4F * f; this.rightFrontLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * 1.4F * f; this.leftFrontLeg.xRot = Mth.cos(g * 0.6662F) * 1.4F * f; - this.head.zRot = foxRenderState.headRollAngle; + this.head.zRot = renderState.headRollAngle; this.rightHindLeg.visible = true; this.leftHindLeg.visible = true; this.rightFrontLeg.visible = true; this.leftFrontLeg.visible = true; - float h = foxRenderState.ageScale; - if (foxRenderState.isCrouching) { + float h = renderState.ageScale; + if (renderState.isCrouching) { this.body.xRot += 0.10471976F; - float i = foxRenderState.crouchAmount; + float i = renderState.crouchAmount; this.body.y += i * h; this.head.y += i * h; - } else if (foxRenderState.isSleeping) { + } else if (renderState.isSleeping) { this.body.zRot = (float) (-Math.PI / 2); this.body.y += 5.0F * h; this.tail.xRot = (float) (-Math.PI * 5.0 / 6.0); - if (foxRenderState.isBaby) { + if (renderState.isBaby) { this.tail.xRot = -2.1816616F; this.body.z += 2.0F; } @@ -105,7 +105,7 @@ public class FoxModel extends EntityModel { this.leftHindLeg.visible = false; this.rightFrontLeg.visible = false; this.leftFrontLeg.visible = false; - } else if (foxRenderState.isSitting) { + } else if (renderState.isSitting) { this.body.xRot = (float) (Math.PI / 6); this.body.y -= 7.0F * h; this.body.z += 3.0F * h; @@ -113,7 +113,7 @@ public class FoxModel extends EntityModel { this.tail.z -= 1.0F * h; this.head.xRot = 0.0F; this.head.yRot = 0.0F; - if (foxRenderState.isBaby) { + if (renderState.isBaby) { this.head.y--; this.head.z -= 0.375F; } else { @@ -131,19 +131,19 @@ public class FoxModel extends EntityModel { this.leftFrontLeg.xRot = (float) (-Math.PI / 12); } - if (!foxRenderState.isSleeping && !foxRenderState.isFaceplanted && !foxRenderState.isCrouching) { - this.head.xRot = foxRenderState.xRot * (float) (Math.PI / 180.0); - this.head.yRot = foxRenderState.yRot * (float) (Math.PI / 180.0); + if (!renderState.isSleeping && !renderState.isFaceplanted && !renderState.isCrouching) { + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); } - if (foxRenderState.isSleeping) { + if (renderState.isSleeping) { this.head.xRot = 0.0F; this.head.yRot = (float) (-Math.PI * 2.0 / 3.0); - this.head.zRot = Mth.cos(foxRenderState.ageInTicks * 0.027F) / 22.0F; + this.head.zRot = Mth.cos(renderState.ageInTicks * 0.027F) / 22.0F; } - if (foxRenderState.isCrouching) { - float i = Mth.cos(foxRenderState.ageInTicks) * 0.01F; + if (renderState.isCrouching) { + float i = Mth.cos(renderState.ageInTicks) * 0.01F; this.body.yRot = i; this.rightHindLeg.zRot = i; this.leftHindLeg.zRot = i; @@ -151,7 +151,7 @@ public class FoxModel extends EntityModel { this.leftFrontLeg.zRot = i / 2.0F; } - if (foxRenderState.isFaceplanted) { + if (renderState.isFaceplanted) { float i = 0.1F; this.legMotionPos += 0.67F; this.rightHindLeg.xRot = Mth.cos(this.legMotionPos * 0.4662F) * 0.1F; diff --git a/net/minecraft/client/model/FrogModel.java b/net/minecraft/client/model/FrogModel.java index 2eb65f82..8d2effc4 100644 --- a/net/minecraft/client/model/FrogModel.java +++ b/net/minecraft/client/model/FrogModel.java @@ -87,18 +87,18 @@ public class FrogModel extends EntityModel { return LayerDefinition.create(meshDefinition, 48, 48); } - public void setupAnim(FrogRenderState frogRenderState) { - super.setupAnim(frogRenderState); - this.animate(frogRenderState.jumpAnimationState, FrogAnimation.FROG_JUMP, frogRenderState.ageInTicks); - this.animate(frogRenderState.croakAnimationState, FrogAnimation.FROG_CROAK, frogRenderState.ageInTicks); - this.animate(frogRenderState.tongueAnimationState, FrogAnimation.FROG_TONGUE, frogRenderState.ageInTicks); - if (frogRenderState.isSwimming) { - this.animateWalk(FrogAnimation.FROG_SWIM, frogRenderState.walkAnimationPos, frogRenderState.walkAnimationSpeed, 1.0F, 2.5F); + public void setupAnim(FrogRenderState renderState) { + super.setupAnim(renderState); + this.animate(renderState.jumpAnimationState, FrogAnimation.FROG_JUMP, renderState.ageInTicks); + this.animate(renderState.croakAnimationState, FrogAnimation.FROG_CROAK, renderState.ageInTicks); + this.animate(renderState.tongueAnimationState, FrogAnimation.FROG_TONGUE, renderState.ageInTicks); + if (renderState.isSwimming) { + this.animateWalk(FrogAnimation.FROG_SWIM, renderState.walkAnimationPos, renderState.walkAnimationSpeed, 1.0F, 2.5F); } else { - this.animateWalk(FrogAnimation.FROG_WALK, frogRenderState.walkAnimationPos, frogRenderState.walkAnimationSpeed, 1.5F, 2.5F); + this.animateWalk(FrogAnimation.FROG_WALK, renderState.walkAnimationPos, renderState.walkAnimationSpeed, 1.5F, 2.5F); } - this.animate(frogRenderState.swimIdleAnimationState, FrogAnimation.FROG_IDLE_WATER, frogRenderState.ageInTicks); - this.croakingBody.visible = frogRenderState.croakAnimationState.isStarted(); + this.animate(renderState.swimIdleAnimationState, FrogAnimation.FROG_IDLE_WATER, renderState.ageInTicks); + this.croakingBody.visible = renderState.croakAnimationState.isStarted(); } } diff --git a/net/minecraft/client/model/GhastModel.java b/net/minecraft/client/model/GhastModel.java index f6984a13..c23bc581 100644 --- a/net/minecraft/client/model/GhastModel.java +++ b/net/minecraft/client/model/GhastModel.java @@ -49,11 +49,11 @@ public class GhastModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 32).apply(MeshTransformer.scaling(4.5F)); } - public void setupAnim(GhastRenderState ghastRenderState) { - super.setupAnim(ghastRenderState); + public void setupAnim(GhastRenderState renderState) { + super.setupAnim(renderState); for (int i = 0; i < this.tentacles.length; i++) { - this.tentacles[i].xRot = 0.2F * Mth.sin(ghastRenderState.ageInTicks * 0.3F + i) + 0.4F; + this.tentacles[i].xRot = 0.2F * Mth.sin(renderState.ageInTicks * 0.3F + i) + 0.4F; } } } diff --git a/net/minecraft/client/model/GiantZombieModel.java b/net/minecraft/client/model/GiantZombieModel.java index 5db8714f..1478bf00 100644 --- a/net/minecraft/client/model/GiantZombieModel.java +++ b/net/minecraft/client/model/GiantZombieModel.java @@ -7,7 +7,7 @@ import net.minecraft.client.renderer.entity.state.ZombieRenderState; @Environment(EnvType.CLIENT) public class GiantZombieModel extends AbstractZombieModel { - public GiantZombieModel(ModelPart root) { - super(root); + public GiantZombieModel(ModelPart modelPart) { + super(modelPart); } } diff --git a/net/minecraft/client/model/GoatModel.java b/net/minecraft/client/model/GoatModel.java index 86c3bd51..17e92408 100644 --- a/net/minecraft/client/model/GoatModel.java +++ b/net/minecraft/client/model/GoatModel.java @@ -66,12 +66,12 @@ public class GoatModel extends QuadrupedModel { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(GoatRenderState goatRenderState) { - super.setupAnim(goatRenderState); - this.head.getChild("left_horn").visible = goatRenderState.hasLeftHorn; - this.head.getChild("right_horn").visible = goatRenderState.hasRightHorn; - if (goatRenderState.rammingXHeadRot != 0.0F) { - this.head.xRot = goatRenderState.rammingXHeadRot; + public void setupAnim(GoatRenderState renderState) { + super.setupAnim(renderState); + this.head.getChild("left_horn").visible = renderState.hasLeftHorn; + this.head.getChild("right_horn").visible = renderState.hasRightHorn; + if (renderState.rammingXHeadRot != 0.0F) { + this.head.xRot = renderState.rammingXHeadRot; } } } diff --git a/net/minecraft/client/model/GuardianModel.java b/net/minecraft/client/model/GuardianModel.java index 89f0b5f4..9cb3097d 100644 --- a/net/minecraft/client/model/GuardianModel.java +++ b/net/minecraft/client/model/GuardianModel.java @@ -101,25 +101,23 @@ public class GuardianModel extends EntityModel { return createBodyLayer().apply(ELDER_GUARDIAN_SCALE); } - public void setupAnim(GuardianRenderState guardianRenderState) { - super.setupAnim(guardianRenderState); - this.head.yRot = guardianRenderState.yRot * (float) (Math.PI / 180.0); - this.head.xRot = guardianRenderState.xRot * (float) (Math.PI / 180.0); - float f = (1.0F - guardianRenderState.spikesAnimation) * 0.55F; - this.setupSpikes(guardianRenderState.ageInTicks, f); - if (guardianRenderState.lookAtPosition != null && guardianRenderState.lookDirection != null) { - double d = guardianRenderState.lookAtPosition.y - guardianRenderState.eyePosition.y; + public void setupAnim(GuardianRenderState renderState) { + super.setupAnim(renderState); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + float f = (1.0F - renderState.spikesAnimation) * 0.55F; + this.setupSpikes(renderState.ageInTicks, f); + if (renderState.lookAtPosition != null && renderState.lookDirection != null) { + double d = renderState.lookAtPosition.y - renderState.eyePosition.y; if (d > 0.0) { this.eye.y = 0.0F; } else { this.eye.y = 1.0F; } - Vec3 vec3 = guardianRenderState.lookDirection; + Vec3 vec3 = renderState.lookDirection; vec3 = new Vec3(vec3.x, 0.0, vec3.z); - Vec3 vec32 = new Vec3( - guardianRenderState.eyePosition.x - guardianRenderState.lookAtPosition.x, 0.0, guardianRenderState.eyePosition.z - guardianRenderState.lookAtPosition.z - ) + Vec3 vec32 = new Vec3(renderState.eyePosition.x - renderState.lookAtPosition.x, 0.0, renderState.eyePosition.z - renderState.lookAtPosition.z) .normalize() .yRot((float) (Math.PI / 2)); double e = vec3.dot(vec32); @@ -127,33 +125,33 @@ public class GuardianModel extends EntityModel { } this.eye.visible = true; - float g = guardianRenderState.tailAnimation; + float g = renderState.tailAnimation; this.tailParts[0].yRot = Mth.sin(g) * (float) Math.PI * 0.05F; this.tailParts[1].yRot = Mth.sin(g) * (float) Math.PI * 0.1F; this.tailParts[2].yRot = Mth.sin(g) * (float) Math.PI * 0.15F; } - private void setupSpikes(float ageInTicks, float f) { + private void setupSpikes(float ageInTicks, float spikeAnimation) { for (int i = 0; i < 12; i++) { - this.spikeParts[i].x = getSpikeX(i, ageInTicks, f); - this.spikeParts[i].y = getSpikeY(i, ageInTicks, f); - this.spikeParts[i].z = getSpikeZ(i, ageInTicks, f); + this.spikeParts[i].x = getSpikeX(i, ageInTicks, spikeAnimation); + this.spikeParts[i].y = getSpikeY(i, ageInTicks, spikeAnimation); + this.spikeParts[i].z = getSpikeZ(i, ageInTicks, spikeAnimation); } } - private static float getSpikeOffset(int index, float ageInTicks, float f) { - return 1.0F + Mth.cos(ageInTicks * 1.5F + index) * 0.01F - f; + private static float getSpikeOffset(int index, float ageInTicks, float spikeAnimation) { + return 1.0F + Mth.cos(ageInTicks * 1.5F + index) * 0.01F - spikeAnimation; } - private static float getSpikeX(int index, float ageInTicks, float f) { - return SPIKE_X[index] * getSpikeOffset(index, ageInTicks, f); + private static float getSpikeX(int index, float ageInTicks, float spikeAnimation) { + return SPIKE_X[index] * getSpikeOffset(index, ageInTicks, spikeAnimation); } - private static float getSpikeY(int index, float ageInTicks, float f) { - return 16.0F + SPIKE_Y[index] * getSpikeOffset(index, ageInTicks, f); + private static float getSpikeY(int index, float ageInTicks, float spikeAnimation) { + return 16.0F + SPIKE_Y[index] * getSpikeOffset(index, ageInTicks, spikeAnimation); } - private static float getSpikeZ(int index, float ageInTicks, float f) { - return SPIKE_Z[index] * getSpikeOffset(index, ageInTicks, f); + private static float getSpikeZ(int index, float ageInTicks, float spikeAnimation) { + return SPIKE_Z[index] * getSpikeOffset(index, ageInTicks, spikeAnimation); } } diff --git a/net/minecraft/client/model/HoglinModel.java b/net/minecraft/client/model/HoglinModel.java index 05f08ecd..32120da1 100644 --- a/net/minecraft/client/model/HoglinModel.java +++ b/net/minecraft/client/model/HoglinModel.java @@ -107,16 +107,16 @@ public class HoglinModel extends EntityModel { return LayerDefinition.create(meshDefinition, 128, 64).apply(BABY_TRANSFORMER); } - public void setupAnim(HoglinRenderState hoglinRenderState) { - super.setupAnim(hoglinRenderState); - float f = hoglinRenderState.walkAnimationSpeed; - float g = hoglinRenderState.walkAnimationPos; + public void setupAnim(HoglinRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.walkAnimationSpeed; + float g = renderState.walkAnimationPos; this.rightEar.zRot = (float) (-Math.PI * 2.0 / 9.0) - f * Mth.sin(g); this.leftEar.zRot = (float) (Math.PI * 2.0 / 9.0) + f * Mth.sin(g); - this.head.yRot = hoglinRenderState.yRot * (float) (Math.PI / 180.0); - float h = 1.0F - Mth.abs(10 - 2 * hoglinRenderState.attackAnimationRemainingTicks) / 10.0F; + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + float h = 1.0F - Mth.abs(10 - 2 * renderState.attackAnimationRemainingTicks) / 10.0F; this.head.xRot = Mth.lerp(h, 0.87266463F, (float) (-Math.PI / 9)); - if (hoglinRenderState.isBaby) { + if (renderState.isBaby) { this.head.y += h * 2.5F; } diff --git a/net/minecraft/client/model/HumanoidModel.java b/net/minecraft/client/model/HumanoidModel.java index 05bfcd94..52dcda9b 100644 --- a/net/minecraft/client/model/HumanoidModel.java +++ b/net/minecraft/client/model/HumanoidModel.java @@ -107,35 +107,35 @@ public class HumanoidModel extends EntityModel return meshDefinition; } - protected HumanoidModel.ArmPose getArmPose(T humanoidRenderState, HumanoidArm humanoidArm) { + protected HumanoidModel.ArmPose getArmPose(T renderState, HumanoidArm arm) { return HumanoidModel.ArmPose.EMPTY; } - public void setupAnim(T humanoidRenderState) { - super.setupAnim(humanoidRenderState); - HumanoidModel.ArmPose armPose = this.getArmPose(humanoidRenderState, HumanoidArm.LEFT); - HumanoidModel.ArmPose armPose2 = this.getArmPose(humanoidRenderState, HumanoidArm.RIGHT); - float f = humanoidRenderState.swimAmount; - boolean bl = humanoidRenderState.isFallFlying; - this.head.xRot = humanoidRenderState.xRot * (float) (Math.PI / 180.0); - this.head.yRot = humanoidRenderState.yRot * (float) (Math.PI / 180.0); + public void setupAnim(T renderState) { + super.setupAnim(renderState); + HumanoidModel.ArmPose armPose = this.getArmPose(renderState, HumanoidArm.LEFT); + HumanoidModel.ArmPose armPose2 = this.getArmPose(renderState, HumanoidArm.RIGHT); + float f = renderState.swimAmount; + boolean bl = renderState.isFallFlying; + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); if (bl) { this.head.xRot = (float) (-Math.PI / 4); } else if (f > 0.0F) { this.head.xRot = Mth.rotLerpRad(f, this.head.xRot, (float) (-Math.PI / 4)); } - float g = humanoidRenderState.walkAnimationPos; - float h = humanoidRenderState.walkAnimationSpeed; - this.rightArm.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * 2.0F * h * 0.5F / humanoidRenderState.speedValue; - this.leftArm.xRot = Mth.cos(g * 0.6662F) * 2.0F * h * 0.5F / humanoidRenderState.speedValue; - this.rightLeg.xRot = Mth.cos(g * 0.6662F) * 1.4F * h / humanoidRenderState.speedValue; - this.leftLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * 1.4F * h / humanoidRenderState.speedValue; + float g = renderState.walkAnimationPos; + float h = renderState.walkAnimationSpeed; + this.rightArm.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * 2.0F * h * 0.5F / renderState.speedValue; + this.leftArm.xRot = Mth.cos(g * 0.6662F) * 2.0F * h * 0.5F / renderState.speedValue; + this.rightLeg.xRot = Mth.cos(g * 0.6662F) * 1.4F * h / renderState.speedValue; + this.leftLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * 1.4F * h / renderState.speedValue; this.rightLeg.yRot = 0.005F; this.leftLeg.yRot = -0.005F; this.rightLeg.zRot = 0.005F; this.leftLeg.zRot = -0.005F; - if (humanoidRenderState.isPassenger) { + if (renderState.isPassenger) { this.rightArm.xRot += (float) (-Math.PI / 5); this.leftArm.xRot += (float) (-Math.PI / 5); this.rightLeg.xRot = -1.4137167F; @@ -146,27 +146,27 @@ public class HumanoidModel extends EntityModel this.leftLeg.zRot = -0.07853982F; } - boolean bl2 = humanoidRenderState.mainArm == HumanoidArm.RIGHT; - if (humanoidRenderState.isUsingItem) { - boolean bl3 = humanoidRenderState.useItemHand == InteractionHand.MAIN_HAND; + boolean bl2 = renderState.mainArm == HumanoidArm.RIGHT; + if (renderState.isUsingItem) { + boolean bl3 = renderState.useItemHand == InteractionHand.MAIN_HAND; if (bl3 == bl2) { - this.poseRightArm(humanoidRenderState, armPose2); + this.poseRightArm(renderState, armPose2); } else { - this.poseLeftArm(humanoidRenderState, armPose); + this.poseLeftArm(renderState, armPose); } } else { boolean bl3 = bl2 ? armPose.isTwoHanded() : armPose2.isTwoHanded(); if (bl2 != bl3) { - this.poseLeftArm(humanoidRenderState, armPose); - this.poseRightArm(humanoidRenderState, armPose2); + this.poseLeftArm(renderState, armPose); + this.poseRightArm(renderState, armPose2); } else { - this.poseRightArm(humanoidRenderState, armPose2); - this.poseLeftArm(humanoidRenderState, armPose); + this.poseRightArm(renderState, armPose2); + this.poseLeftArm(renderState, armPose); } } - this.setupAttackAnimation(humanoidRenderState, humanoidRenderState.ageInTicks); - if (humanoidRenderState.isCrouching) { + this.setupAttackAnimation(renderState, renderState.ageInTicks); + if (renderState.isCrouching) { this.body.xRot = 0.5F; this.rightArm.xRot += 0.4F; this.leftArm.xRot += 0.4F; @@ -179,19 +179,19 @@ public class HumanoidModel extends EntityModel } if (armPose2 != HumanoidModel.ArmPose.SPYGLASS) { - AnimationUtils.bobModelPart(this.rightArm, humanoidRenderState.ageInTicks, 1.0F); + AnimationUtils.bobModelPart(this.rightArm, renderState.ageInTicks, 1.0F); } if (armPose != HumanoidModel.ArmPose.SPYGLASS) { - AnimationUtils.bobModelPart(this.leftArm, humanoidRenderState.ageInTicks, -1.0F); + AnimationUtils.bobModelPart(this.leftArm, renderState.ageInTicks, -1.0F); } if (f > 0.0F) { float i = g % 26.0F; - HumanoidArm humanoidArm = humanoidRenderState.attackArm; - float j = humanoidArm == HumanoidArm.RIGHT && humanoidRenderState.attackTime > 0.0F ? 0.0F : f; - float k = humanoidArm == HumanoidArm.LEFT && humanoidRenderState.attackTime > 0.0F ? 0.0F : f; - if (!humanoidRenderState.isUsingItem) { + HumanoidArm humanoidArm = renderState.attackArm; + float j = humanoidArm == HumanoidArm.RIGHT && renderState.attackTime > 0.0F ? 0.0F : f; + float k = humanoidArm == HumanoidArm.LEFT && renderState.attackTime > 0.0F ? 0.0F : f; + if (!renderState.isUsingItem) { if (i < 14.0F) { this.leftArm.xRot = Mth.rotLerpRad(k, this.leftArm.xRot, 0.0F); this.rightArm.xRot = Mth.lerp(j, this.rightArm.xRot, 0.0F); @@ -225,8 +225,8 @@ public class HumanoidModel extends EntityModel } } - private void poseRightArm(T humanoidRenderState, HumanoidModel.ArmPose armPose) { - switch (armPose) { + private void poseRightArm(T renderState, HumanoidModel.ArmPose pose) { + switch (pose) { case EMPTY: this.rightArm.yRot = 0.0F; break; @@ -248,13 +248,13 @@ public class HumanoidModel extends EntityModel this.rightArm.yRot = 0.0F; break; case CROSSBOW_CHARGE: - AnimationUtils.animateCrossbowCharge(this.rightArm, this.leftArm, humanoidRenderState.maxCrossbowChargeDuration, humanoidRenderState.ticksUsingItem, true); + AnimationUtils.animateCrossbowCharge(this.rightArm, this.leftArm, renderState.maxCrossbowChargeDuration, renderState.ticksUsingItem, true); break; case CROSSBOW_HOLD: AnimationUtils.animateCrossbowHold(this.rightArm, this.leftArm, this.head, true); break; case SPYGLASS: - this.rightArm.xRot = Mth.clamp(this.head.xRot - 1.9198622F - (humanoidRenderState.isCrouching ? (float) (Math.PI / 12) : 0.0F), -2.4F, 3.3F); + this.rightArm.xRot = Mth.clamp(this.head.xRot - 1.9198622F - (renderState.isCrouching ? (float) (Math.PI / 12) : 0.0F), -2.4F, 3.3F); this.rightArm.yRot = this.head.yRot - (float) (Math.PI / 12); break; case TOOT_HORN: @@ -267,8 +267,8 @@ public class HumanoidModel extends EntityModel } } - private void poseLeftArm(T humanoidRenderState, HumanoidModel.ArmPose armPose) { - switch (armPose) { + private void poseLeftArm(T renderState, HumanoidModel.ArmPose pose) { + switch (pose) { case EMPTY: this.leftArm.yRot = 0.0F; break; @@ -290,13 +290,13 @@ public class HumanoidModel extends EntityModel this.leftArm.yRot = 0.0F; break; case CROSSBOW_CHARGE: - AnimationUtils.animateCrossbowCharge(this.rightArm, this.leftArm, humanoidRenderState.maxCrossbowChargeDuration, humanoidRenderState.ticksUsingItem, false); + AnimationUtils.animateCrossbowCharge(this.rightArm, this.leftArm, renderState.maxCrossbowChargeDuration, renderState.ticksUsingItem, false); break; case CROSSBOW_HOLD: AnimationUtils.animateCrossbowHold(this.rightArm, this.leftArm, this.head, false); break; case SPYGLASS: - this.leftArm.xRot = Mth.clamp(this.head.xRot - 1.9198622F - (humanoidRenderState.isCrouching ? (float) (Math.PI / 12) : 0.0F), -2.4F, 3.3F); + this.leftArm.xRot = Mth.clamp(this.head.xRot - 1.9198622F - (renderState.isCrouching ? (float) (Math.PI / 12) : 0.0F), -2.4F, 3.3F); this.leftArm.yRot = this.head.yRot + (float) (Math.PI / 12); break; case TOOT_HORN: @@ -314,33 +314,33 @@ public class HumanoidModel extends EntityModel arm.yRot = (isRightArm ? -30.0F : 30.0F) * (float) (Math.PI / 180.0) + Mth.clamp(this.head.yRot, (float) (-Math.PI / 6), (float) (Math.PI / 6)); } - protected void setupAttackAnimation(T humanoidRenderState, float f) { - float g = humanoidRenderState.attackTime; - if (!(g <= 0.0F)) { - HumanoidArm humanoidArm = humanoidRenderState.attackArm; + protected void setupAttackAnimation(T renderState, float ageInTicks) { + float f = renderState.attackTime; + if (!(f <= 0.0F)) { + HumanoidArm humanoidArm = renderState.attackArm; ModelPart modelPart = this.getArm(humanoidArm); - this.body.yRot = Mth.sin(Mth.sqrt(g) * (float) (Math.PI * 2)) * 0.2F; + this.body.yRot = Mth.sin(Mth.sqrt(f) * (float) (Math.PI * 2)) * 0.2F; if (humanoidArm == HumanoidArm.LEFT) { this.body.yRot *= -1.0F; } - float i = humanoidRenderState.ageScale; - this.rightArm.z = Mth.sin(this.body.yRot) * 5.0F * i; - this.rightArm.x = -Mth.cos(this.body.yRot) * 5.0F * i; - this.leftArm.z = -Mth.sin(this.body.yRot) * 5.0F * i; - this.leftArm.x = Mth.cos(this.body.yRot) * 5.0F * i; + float h = renderState.ageScale; + this.rightArm.z = Mth.sin(this.body.yRot) * 5.0F * h; + this.rightArm.x = -Mth.cos(this.body.yRot) * 5.0F * h; + this.leftArm.z = -Mth.sin(this.body.yRot) * 5.0F * h; + this.leftArm.x = Mth.cos(this.body.yRot) * 5.0F * h; this.rightArm.yRot = this.rightArm.yRot + this.body.yRot; this.leftArm.yRot = this.leftArm.yRot + this.body.yRot; this.leftArm.xRot = this.leftArm.xRot + this.body.yRot; - float h = 1.0F - g; - h *= h; - h *= h; - h = 1.0F - h; - float j = Mth.sin(h * (float) Math.PI); - float k = Mth.sin(g * (float) Math.PI) * -(this.head.xRot - 0.7F) * 0.75F; - modelPart.xRot -= j * 1.2F + k; + float g = 1.0F - f; + g *= g; + g *= g; + g = 1.0F - g; + float i = Mth.sin(g * (float) Math.PI); + float j = Mth.sin(f * (float) Math.PI) * -(this.head.xRot - 0.7F) * 0.75F; + modelPart.xRot -= i * 1.2F + j; modelPart.yRot = modelPart.yRot + this.body.yRot * 2.0F; - modelPart.zRot = modelPart.zRot + Mth.sin(g * (float) Math.PI) * -0.4F; + modelPart.zRot = modelPart.zRot + Mth.sin(f * (float) Math.PI) * -0.4F; } } diff --git a/net/minecraft/client/model/IllagerModel.java b/net/minecraft/client/model/IllagerModel.java index 5955cb24..652ecf51 100644 --- a/net/minecraft/client/model/IllagerModel.java +++ b/net/minecraft/client/model/IllagerModel.java @@ -81,11 +81,11 @@ public class IllagerModel extends EntityModel i return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(S illagerRenderState) { - super.setupAnim(illagerRenderState); - this.head.yRot = illagerRenderState.yRot * (float) (Math.PI / 180.0); - this.head.xRot = illagerRenderState.xRot * (float) (Math.PI / 180.0); - if (illagerRenderState.isRiding) { + public void setupAnim(S renderState) { + super.setupAnim(renderState); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + if (renderState.isRiding) { this.rightArm.xRot = (float) (-Math.PI / 5); this.rightArm.yRot = 0.0F; this.rightArm.zRot = 0.0F; @@ -99,8 +99,8 @@ public class IllagerModel extends EntityModel i this.leftLeg.yRot = (float) (-Math.PI / 10); this.leftLeg.zRot = -0.07853982F; } else { - float f = illagerRenderState.walkAnimationSpeed; - float g = illagerRenderState.walkAnimationPos; + float f = renderState.walkAnimationSpeed; + float g = renderState.walkAnimationPos; this.rightArm.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * 2.0F * f * 0.5F; this.rightArm.yRot = 0.0F; this.rightArm.zRot = 0.0F; @@ -115,20 +115,20 @@ public class IllagerModel extends EntityModel i this.leftLeg.zRot = 0.0F; } - AbstractIllager.IllagerArmPose illagerArmPose = illagerRenderState.armPose; + AbstractIllager.IllagerArmPose illagerArmPose = renderState.armPose; if (illagerArmPose == AbstractIllager.IllagerArmPose.ATTACKING) { - if (illagerRenderState.getMainHandItem().isEmpty()) { - AnimationUtils.animateZombieArms(this.leftArm, this.rightArm, true, illagerRenderState.attackAnim, illagerRenderState.ageInTicks); + if (renderState.getMainHandItem().isEmpty()) { + AnimationUtils.animateZombieArms(this.leftArm, this.rightArm, true, renderState.attackAnim, renderState.ageInTicks); } else { - AnimationUtils.swingWeaponDown(this.rightArm, this.leftArm, illagerRenderState.mainArm, illagerRenderState.attackAnim, illagerRenderState.ageInTicks); + AnimationUtils.swingWeaponDown(this.rightArm, this.leftArm, renderState.mainArm, renderState.attackAnim, renderState.ageInTicks); } } else if (illagerArmPose == AbstractIllager.IllagerArmPose.SPELLCASTING) { this.rightArm.z = 0.0F; this.rightArm.x = -5.0F; this.leftArm.z = 0.0F; this.leftArm.x = 5.0F; - this.rightArm.xRot = Mth.cos(illagerRenderState.ageInTicks * 0.6662F) * 0.25F; - this.leftArm.xRot = Mth.cos(illagerRenderState.ageInTicks * 0.6662F) * 0.25F; + this.rightArm.xRot = Mth.cos(renderState.ageInTicks * 0.6662F) * 0.25F; + this.leftArm.xRot = Mth.cos(renderState.ageInTicks * 0.6662F) * 0.25F; this.rightArm.zRot = (float) (Math.PI * 3.0 / 4.0); this.leftArm.zRot = (float) (-Math.PI * 3.0 / 4.0); this.rightArm.yRot = 0.0F; @@ -142,16 +142,16 @@ public class IllagerModel extends EntityModel i } else if (illagerArmPose == AbstractIllager.IllagerArmPose.CROSSBOW_HOLD) { AnimationUtils.animateCrossbowHold(this.rightArm, this.leftArm, this.head, true); } else if (illagerArmPose == AbstractIllager.IllagerArmPose.CROSSBOW_CHARGE) { - AnimationUtils.animateCrossbowCharge(this.rightArm, this.leftArm, illagerRenderState.maxCrossbowChargeDuration, illagerRenderState.ticksUsingItem, true); + AnimationUtils.animateCrossbowCharge(this.rightArm, this.leftArm, renderState.maxCrossbowChargeDuration, renderState.ticksUsingItem, true); } else if (illagerArmPose == AbstractIllager.IllagerArmPose.CELEBRATING) { this.rightArm.z = 0.0F; this.rightArm.x = -5.0F; - this.rightArm.xRot = Mth.cos(illagerRenderState.ageInTicks * 0.6662F) * 0.05F; + this.rightArm.xRot = Mth.cos(renderState.ageInTicks * 0.6662F) * 0.05F; this.rightArm.zRot = 2.670354F; this.rightArm.yRot = 0.0F; this.leftArm.z = 0.0F; this.leftArm.x = 5.0F; - this.leftArm.xRot = Mth.cos(illagerRenderState.ageInTicks * 0.6662F) * 0.05F; + this.leftArm.xRot = Mth.cos(renderState.ageInTicks * 0.6662F) * 0.05F; this.leftArm.zRot = (float) (-Math.PI * 3.0 / 4.0); this.leftArm.yRot = 0.0F; } diff --git a/net/minecraft/client/model/IronGolemModel.java b/net/minecraft/client/model/IronGolemModel.java index 055049e7..88f3c2de 100644 --- a/net/minecraft/client/model/IronGolemModel.java +++ b/net/minecraft/client/model/IronGolemModel.java @@ -61,16 +61,16 @@ public class IronGolemModel extends EntityModel { return LayerDefinition.create(meshDefinition, 128, 128); } - public void setupAnim(IronGolemRenderState ironGolemRenderState) { - super.setupAnim(ironGolemRenderState); - float f = ironGolemRenderState.attackTicksRemaining; - float g = ironGolemRenderState.walkAnimationSpeed; - float h = ironGolemRenderState.walkAnimationPos; + public void setupAnim(IronGolemRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.attackTicksRemaining; + float g = renderState.walkAnimationSpeed; + float h = renderState.walkAnimationPos; if (f > 0.0F) { this.rightArm.xRot = -2.0F + 1.5F * Mth.triangleWave(f, 10.0F); this.leftArm.xRot = -2.0F + 1.5F * Mth.triangleWave(f, 10.0F); } else { - int i = ironGolemRenderState.offerFlowerTick; + int i = renderState.offerFlowerTick; if (i > 0) { this.rightArm.xRot = -0.8F + 0.025F * Mth.triangleWave(i, 70.0F); this.leftArm.xRot = 0.0F; @@ -80,8 +80,8 @@ public class IronGolemModel extends EntityModel { } } - this.head.yRot = ironGolemRenderState.yRot * (float) (Math.PI / 180.0); - this.head.xRot = ironGolemRenderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); this.rightLeg.xRot = -1.5F * Mth.triangleWave(h, 13.0F) * g; this.leftLeg.xRot = 1.5F * Mth.triangleWave(h, 13.0F) * g; this.rightLeg.yRot = 0.0F; diff --git a/net/minecraft/client/model/LavaSlimeModel.java b/net/minecraft/client/model/LavaSlimeModel.java index 82333009..ca1b08dd 100644 --- a/net/minecraft/client/model/LavaSlimeModel.java +++ b/net/minecraft/client/model/LavaSlimeModel.java @@ -47,9 +47,9 @@ public class LavaSlimeModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(SlimeRenderState slimeRenderState) { - super.setupAnim(slimeRenderState); - float f = Math.max(0.0F, slimeRenderState.squish); + public void setupAnim(SlimeRenderState renderState) { + super.setupAnim(renderState); + float f = Math.max(0.0F, renderState.squish); for (int i = 0; i < this.bodyCubes.length; i++) { this.bodyCubes[i].y = -(4 - i) * f * 1.7F; diff --git a/net/minecraft/client/model/LlamaModel.java b/net/minecraft/client/model/LlamaModel.java index 9af7e318..733a3efb 100644 --- a/net/minecraft/client/model/LlamaModel.java +++ b/net/minecraft/client/model/LlamaModel.java @@ -78,16 +78,16 @@ public class LlamaModel extends EntityModel { return LayerDefinition.create(meshDefinition, 128, 64); } - private static MeshDefinition transformToBaby(MeshDefinition meshDefinition) { + private static MeshDefinition transformToBaby(MeshDefinition mesh) { float f = 2.0F; float g = 0.7F; float h = 1.1F; UnaryOperator unaryOperator = partPose -> partPose.translated(0.0F, 21.0F, 3.52F).scaled(0.71428573F, 0.64935064F, 0.7936508F); UnaryOperator unaryOperator2 = partPose -> partPose.translated(0.0F, 33.0F, 0.0F).scaled(0.625F, 0.45454544F, 0.45454544F); UnaryOperator unaryOperator3 = partPose -> partPose.translated(0.0F, 33.0F, 0.0F).scaled(0.45454544F, 0.41322312F, 0.45454544F); - MeshDefinition meshDefinition2 = new MeshDefinition(); + MeshDefinition meshDefinition = new MeshDefinition(); - for (Entry entry : meshDefinition.getRoot().getChildren()) { + for (Entry entry : mesh.getRoot().getChildren()) { String string = (String)entry.getKey(); PartDefinition partDefinition = (PartDefinition)entry.getValue(); @@ -96,23 +96,23 @@ public class LlamaModel extends EntityModel { case "body" -> unaryOperator2; default -> unaryOperator3; }; - meshDefinition2.getRoot().addOrReplaceChild(string, partDefinition.transformed(unaryOperator4)); + meshDefinition.getRoot().addOrReplaceChild(string, partDefinition.transformed(unaryOperator4)); } - return meshDefinition2; + return meshDefinition; } - public void setupAnim(LlamaRenderState llamaRenderState) { - super.setupAnim(llamaRenderState); - this.head.xRot = llamaRenderState.xRot * (float) (Math.PI / 180.0); - this.head.yRot = llamaRenderState.yRot * (float) (Math.PI / 180.0); - float f = llamaRenderState.walkAnimationSpeed; - float g = llamaRenderState.walkAnimationPos; + public void setupAnim(LlamaRenderState renderState) { + super.setupAnim(renderState); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + float f = renderState.walkAnimationSpeed; + float g = renderState.walkAnimationPos; this.rightHindLeg.xRot = Mth.cos(g * 0.6662F) * 1.4F * f; this.leftHindLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * 1.4F * f; this.rightFrontLeg.xRot = Mth.cos(g * 0.6662F + (float) Math.PI) * 1.4F * f; this.leftFrontLeg.xRot = Mth.cos(g * 0.6662F) * 1.4F * f; - this.rightChest.visible = llamaRenderState.hasChest; - this.leftChest.visible = llamaRenderState.hasChest; + this.rightChest.visible = renderState.hasChest; + this.leftChest.visible = renderState.hasChest; } } diff --git a/net/minecraft/client/model/Model.java b/net/minecraft/client/model/Model.java index ba674e45..a633acde 100644 --- a/net/minecraft/client/model/Model.java +++ b/net/minecraft/client/model/Model.java @@ -22,10 +22,10 @@ public abstract class Model { protected final Function renderType; private final List allParts; - public Model(ModelPart modelPart, Function function) { - this.root = modelPart; - this.renderType = function; - this.allParts = modelPart.getAllParts().toList(); + public Model(ModelPart root, Function renderType) { + this.root = root; + this.renderType = renderType; + this.allParts = root.getAllParts().toList(); } public final RenderType renderType(ResourceLocation location) { @@ -36,18 +36,18 @@ public abstract class Model { this.root().render(poseStack, buffer, packedLight, packedOverlay, color); } - public final void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay) { - this.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay, -1); + public final void renderToBuffer(PoseStack poseStack, VertexConsumer buffer, int packedLight, int packedOverlay) { + this.renderToBuffer(poseStack, buffer, packedLight, packedOverlay, -1); } public final ModelPart root() { return this.root; } - public Optional getAnyDescendantWithName(String string) { - return string.equals("root") + public Optional getAnyDescendantWithName(String name) { + return name.equals("root") ? Optional.of(this.root()) - : this.root().getAllParts().filter(modelPart -> modelPart.hasChild(string)).findFirst().map(modelPart -> modelPart.getChild(string)); + : this.root().getAllParts().filter(modelPart -> modelPart.hasChild(name)).findFirst().map(modelPart -> modelPart.getChild(name)); } public final List allParts() { @@ -60,19 +60,21 @@ public abstract class Model { } } - protected void animate(AnimationState animationState, AnimationDefinition animationDefinition, float f) { - this.animate(animationState, animationDefinition, f, 1.0F); + protected void animate(AnimationState state, AnimationDefinition definition, float ageInTicks) { + this.animate(state, definition, ageInTicks, 1.0F); } - protected void animateWalk(AnimationDefinition animationDefinition, float f, float g, float h, float i) { - long l = (long)(f * 50.0F * h); - float j = Math.min(g * i, 1.0F); - KeyframeAnimations.animate(this, animationDefinition, l, j, ANIMATION_VECTOR_CACHE); + protected void animateWalk(AnimationDefinition definition, float walkAnimationPos, float walkAnimationSpeed, float timeMultiplier, float speedMultiplier) { + long l = (long)(walkAnimationPos * 50.0F * timeMultiplier); + float f = Math.min(walkAnimationSpeed * speedMultiplier, 1.0F); + KeyframeAnimations.animate(this, definition, l, f, ANIMATION_VECTOR_CACHE); } - protected void animate(AnimationState animationState, AnimationDefinition animationDefinition, float f, float g) { - animationState.ifStarted( - animationStatex -> KeyframeAnimations.animate(this, animationDefinition, (long)((float)animationStatex.getTimeInMillis(f) * g), 1.0F, ANIMATION_VECTOR_CACHE) + protected void animate(AnimationState state, AnimationDefinition definition, float ageInTicks, float speed) { + state.ifStarted( + animationState -> KeyframeAnimations.animate( + this, definition, (long)((float)animationState.getTimeInMillis(ageInTicks) * speed), 1.0F, ANIMATION_VECTOR_CACHE + ) ); } @@ -82,8 +84,8 @@ public abstract class Model { @Environment(EnvType.CLIENT) public static class Simple extends Model { - public Simple(ModelPart modelPart, Function function) { - super(modelPart, function); + public Simple(ModelPart root, Function renderType) { + super(root, renderType); } } } diff --git a/net/minecraft/client/model/PandaModel.java b/net/minecraft/client/model/PandaModel.java index bdc20651..380524fa 100644 --- a/net/minecraft/client/model/PandaModel.java +++ b/net/minecraft/client/model/PandaModel.java @@ -52,40 +52,40 @@ public class PandaModel extends QuadrupedModel { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(PandaRenderState pandaRenderState) { - super.setupAnim(pandaRenderState); - if (pandaRenderState.isUnhappy) { - this.head.yRot = 0.35F * Mth.sin(0.6F * pandaRenderState.ageInTicks); - this.head.zRot = 0.35F * Mth.sin(0.6F * pandaRenderState.ageInTicks); - this.rightFrontLeg.xRot = -0.75F * Mth.sin(0.3F * pandaRenderState.ageInTicks); - this.leftFrontLeg.xRot = 0.75F * Mth.sin(0.3F * pandaRenderState.ageInTicks); + public void setupAnim(PandaRenderState renderState) { + super.setupAnim(renderState); + if (renderState.isUnhappy) { + this.head.yRot = 0.35F * Mth.sin(0.6F * renderState.ageInTicks); + this.head.zRot = 0.35F * Mth.sin(0.6F * renderState.ageInTicks); + this.rightFrontLeg.xRot = -0.75F * Mth.sin(0.3F * renderState.ageInTicks); + this.leftFrontLeg.xRot = 0.75F * Mth.sin(0.3F * renderState.ageInTicks); } else { this.head.zRot = 0.0F; } - if (pandaRenderState.isSneezing) { - if (pandaRenderState.sneezeTime < 15) { - this.head.xRot = (float) (-Math.PI / 4) * pandaRenderState.sneezeTime / 14.0F; - } else if (pandaRenderState.sneezeTime < 20) { - float f = (pandaRenderState.sneezeTime - 15) / 5; + if (renderState.isSneezing) { + if (renderState.sneezeTime < 15) { + this.head.xRot = (float) (-Math.PI / 4) * renderState.sneezeTime / 14.0F; + } else if (renderState.sneezeTime < 20) { + float f = (renderState.sneezeTime - 15) / 5; this.head.xRot = (float) (-Math.PI / 4) + (float) (Math.PI / 4) * f; } } - if (pandaRenderState.sitAmount > 0.0F) { - this.body.xRot = Mth.rotLerpRad(pandaRenderState.sitAmount, this.body.xRot, 1.7407963F); - this.head.xRot = Mth.rotLerpRad(pandaRenderState.sitAmount, this.head.xRot, (float) (Math.PI / 2)); + if (renderState.sitAmount > 0.0F) { + this.body.xRot = Mth.rotLerpRad(renderState.sitAmount, this.body.xRot, 1.7407963F); + this.head.xRot = Mth.rotLerpRad(renderState.sitAmount, this.head.xRot, (float) (Math.PI / 2)); this.rightFrontLeg.zRot = -0.27079642F; this.leftFrontLeg.zRot = 0.27079642F; this.rightHindLeg.zRot = 0.5707964F; this.leftHindLeg.zRot = -0.5707964F; - if (pandaRenderState.isEating) { - this.head.xRot = (float) (Math.PI / 2) + 0.2F * Mth.sin(pandaRenderState.ageInTicks * 0.6F); - this.rightFrontLeg.xRot = -0.4F - 0.2F * Mth.sin(pandaRenderState.ageInTicks * 0.6F); - this.leftFrontLeg.xRot = -0.4F - 0.2F * Mth.sin(pandaRenderState.ageInTicks * 0.6F); + if (renderState.isEating) { + this.head.xRot = (float) (Math.PI / 2) + 0.2F * Mth.sin(renderState.ageInTicks * 0.6F); + this.rightFrontLeg.xRot = -0.4F - 0.2F * Mth.sin(renderState.ageInTicks * 0.6F); + this.leftFrontLeg.xRot = -0.4F - 0.2F * Mth.sin(renderState.ageInTicks * 0.6F); } - if (pandaRenderState.isScared) { + if (renderState.isScared) { this.head.xRot = 2.1707964F; this.rightFrontLeg.xRot = -0.9F; this.leftFrontLeg.xRot = -0.9F; @@ -97,20 +97,20 @@ public class PandaModel extends QuadrupedModel { this.leftFrontLeg.zRot = 0.0F; } - if (pandaRenderState.lieOnBackAmount > 0.0F) { - this.rightHindLeg.xRot = -0.6F * Mth.sin(pandaRenderState.ageInTicks * 0.15F); - this.leftHindLeg.xRot = 0.6F * Mth.sin(pandaRenderState.ageInTicks * 0.15F); - this.rightFrontLeg.xRot = 0.3F * Mth.sin(pandaRenderState.ageInTicks * 0.25F); - this.leftFrontLeg.xRot = -0.3F * Mth.sin(pandaRenderState.ageInTicks * 0.25F); - this.head.xRot = Mth.rotLerpRad(pandaRenderState.lieOnBackAmount, this.head.xRot, (float) (Math.PI / 2)); + if (renderState.lieOnBackAmount > 0.0F) { + this.rightHindLeg.xRot = -0.6F * Mth.sin(renderState.ageInTicks * 0.15F); + this.leftHindLeg.xRot = 0.6F * Mth.sin(renderState.ageInTicks * 0.15F); + this.rightFrontLeg.xRot = 0.3F * Mth.sin(renderState.ageInTicks * 0.25F); + this.leftFrontLeg.xRot = -0.3F * Mth.sin(renderState.ageInTicks * 0.25F); + this.head.xRot = Mth.rotLerpRad(renderState.lieOnBackAmount, this.head.xRot, (float) (Math.PI / 2)); } - if (pandaRenderState.rollAmount > 0.0F) { - this.head.xRot = Mth.rotLerpRad(pandaRenderState.rollAmount, this.head.xRot, 2.0561945F); - this.rightHindLeg.xRot = -0.5F * Mth.sin(pandaRenderState.ageInTicks * 0.5F); - this.leftHindLeg.xRot = 0.5F * Mth.sin(pandaRenderState.ageInTicks * 0.5F); - this.rightFrontLeg.xRot = 0.5F * Mth.sin(pandaRenderState.ageInTicks * 0.5F); - this.leftFrontLeg.xRot = -0.5F * Mth.sin(pandaRenderState.ageInTicks * 0.5F); + if (renderState.rollAmount > 0.0F) { + this.head.xRot = Mth.rotLerpRad(renderState.rollAmount, this.head.xRot, 2.0561945F); + this.rightHindLeg.xRot = -0.5F * Mth.sin(renderState.ageInTicks * 0.5F); + this.leftHindLeg.xRot = 0.5F * Mth.sin(renderState.ageInTicks * 0.5F); + this.rightFrontLeg.xRot = 0.5F * Mth.sin(renderState.ageInTicks * 0.5F); + this.leftFrontLeg.xRot = -0.5F * Mth.sin(renderState.ageInTicks * 0.5F); } } } diff --git a/net/minecraft/client/model/ParrotModel.java b/net/minecraft/client/model/ParrotModel.java index aada500e..d537f8b5 100644 --- a/net/minecraft/client/model/ParrotModel.java +++ b/net/minecraft/client/model/ParrotModel.java @@ -80,46 +80,45 @@ public class ParrotModel extends EntityModel { return LayerDefinition.create(meshDefinition, 32, 32); } - public void setupAnim(ParrotRenderState parrotRenderState) { - super.setupAnim(parrotRenderState); - this.prepare(parrotRenderState.pose); - this.head.xRot = parrotRenderState.xRot * (float) (Math.PI / 180.0); - this.head.yRot = parrotRenderState.yRot * (float) (Math.PI / 180.0); - switch (parrotRenderState.pose) { + public void setupAnim(ParrotRenderState renderState) { + super.setupAnim(renderState); + this.prepare(renderState.pose); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + switch (renderState.pose) { case STANDING: - this.leftLeg.xRot = this.leftLeg.xRot + Mth.cos(parrotRenderState.walkAnimationPos * 0.6662F) * 1.4F * parrotRenderState.walkAnimationSpeed; - this.rightLeg.xRot = this.rightLeg.xRot - + Mth.cos(parrotRenderState.walkAnimationPos * 0.6662F + (float) Math.PI) * 1.4F * parrotRenderState.walkAnimationSpeed; + this.leftLeg.xRot = this.leftLeg.xRot + Mth.cos(renderState.walkAnimationPos * 0.6662F) * 1.4F * renderState.walkAnimationSpeed; + this.rightLeg.xRot = this.rightLeg.xRot + Mth.cos(renderState.walkAnimationPos * 0.6662F + (float) Math.PI) * 1.4F * renderState.walkAnimationSpeed; case FLYING: case ON_SHOULDER: default: - float h = parrotRenderState.flapAngle * 0.3F; + float h = renderState.flapAngle * 0.3F; this.head.y += h; - this.tail.xRot = this.tail.xRot + Mth.cos(parrotRenderState.walkAnimationPos * 0.6662F) * 0.3F * parrotRenderState.walkAnimationSpeed; + this.tail.xRot = this.tail.xRot + Mth.cos(renderState.walkAnimationPos * 0.6662F) * 0.3F * renderState.walkAnimationSpeed; this.tail.y += h; this.body.y += h; - this.leftWing.zRot = -0.0873F - parrotRenderState.flapAngle; + this.leftWing.zRot = -0.0873F - renderState.flapAngle; this.leftWing.y += h; - this.rightWing.zRot = 0.0873F + parrotRenderState.flapAngle; + this.rightWing.zRot = 0.0873F + renderState.flapAngle; this.rightWing.y += h; this.leftLeg.y += h; this.rightLeg.y += h; case SITTING: break; case PARTY: - float f = Mth.cos(parrotRenderState.ageInTicks); - float g = Mth.sin(parrotRenderState.ageInTicks); + float f = Mth.cos(renderState.ageInTicks); + float g = Mth.sin(renderState.ageInTicks); this.head.x += f; this.head.y += g; this.head.xRot = 0.0F; this.head.yRot = 0.0F; - this.head.zRot = Mth.sin(parrotRenderState.ageInTicks) * 0.4F; + this.head.zRot = Mth.sin(renderState.ageInTicks) * 0.4F; this.body.x += f; this.body.y += g; - this.leftWing.zRot = -0.0873F - parrotRenderState.flapAngle; + this.leftWing.zRot = -0.0873F - renderState.flapAngle; this.leftWing.x += f; this.leftWing.y += g; - this.rightWing.zRot = 0.0873F + parrotRenderState.flapAngle; + this.rightWing.zRot = 0.0873F + renderState.flapAngle; this.rightWing.x += f; this.rightWing.y += g; this.tail.x += f; diff --git a/net/minecraft/client/model/PhantomModel.java b/net/minecraft/client/model/PhantomModel.java index f4485473..1f9b8223 100644 --- a/net/minecraft/client/model/PhantomModel.java +++ b/net/minecraft/client/model/PhantomModel.java @@ -73,9 +73,9 @@ public class PhantomModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(PhantomRenderState phantomRenderState) { - super.setupAnim(phantomRenderState); - float f = phantomRenderState.flapTime * 7.448451F * (float) (Math.PI / 180.0); + public void setupAnim(PhantomRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.flapTime * 7.448451F * (float) (Math.PI / 180.0); float g = 16.0F; this.leftWingBase.zRot = Mth.cos(f) * 16.0F * (float) (Math.PI / 180.0); this.leftWingTip.zRot = Mth.cos(f) * 16.0F * (float) (Math.PI / 180.0); diff --git a/net/minecraft/client/model/PiglinModel.java b/net/minecraft/client/model/PiglinModel.java index 659ea170..30ce107c 100644 --- a/net/minecraft/client/model/PiglinModel.java +++ b/net/minecraft/client/model/PiglinModel.java @@ -10,17 +10,17 @@ import net.minecraft.world.entity.monster.piglin.PiglinArmPose; @Environment(EnvType.CLIENT) public class PiglinModel extends AbstractPiglinModel { - public PiglinModel(ModelPart modelPart) { - super(modelPart); + public PiglinModel(ModelPart root) { + super(root); } - public void setupAnim(PiglinRenderState piglinRenderState) { - super.setupAnim(piglinRenderState); + public void setupAnim(PiglinRenderState renderState) { + super.setupAnim(renderState); float f = (float) (Math.PI / 6); - float g = piglinRenderState.attackTime; - PiglinArmPose piglinArmPose = piglinRenderState.armPose; + float g = renderState.attackTime; + PiglinArmPose piglinArmPose = renderState.armPose; if (piglinArmPose == PiglinArmPose.DANCING) { - float h = piglinRenderState.ageInTicks / 60.0F; + float h = renderState.ageInTicks / 60.0F; this.rightEar.zRot = (float) (Math.PI / 6) + (float) (Math.PI / 180.0) * Mth.sin(h * 30.0F) * 10.0F; this.leftEar.zRot = (float) (-Math.PI / 6) - (float) (Math.PI / 180.0) * Mth.cos(h * 30.0F) * 10.0F; this.head.x = this.head.x + Mth.sin(h * 10.0F); @@ -31,17 +31,17 @@ public class PiglinModel extends AbstractPiglinModel { this.leftArm.y = this.leftArm.y + (Mth.sin(h * 40.0F) * 0.5F + 0.5F); this.body.y = this.body.y + Mth.sin(h * 40.0F) * 0.35F; } else if (piglinArmPose == PiglinArmPose.ATTACKING_WITH_MELEE_WEAPON && g == 0.0F) { - this.holdWeaponHigh(piglinRenderState); + this.holdWeaponHigh(renderState); } else if (piglinArmPose == PiglinArmPose.CROSSBOW_HOLD) { - AnimationUtils.animateCrossbowHold(this.rightArm, this.leftArm, this.head, piglinRenderState.mainArm == HumanoidArm.RIGHT); + AnimationUtils.animateCrossbowHold(this.rightArm, this.leftArm, this.head, renderState.mainArm == HumanoidArm.RIGHT); } else if (piglinArmPose == PiglinArmPose.CROSSBOW_CHARGE) { AnimationUtils.animateCrossbowCharge( - this.rightArm, this.leftArm, piglinRenderState.maxCrossbowChageDuration, piglinRenderState.ticksUsingItem, piglinRenderState.mainArm == HumanoidArm.RIGHT + this.rightArm, this.leftArm, renderState.maxCrossbowChageDuration, renderState.ticksUsingItem, renderState.mainArm == HumanoidArm.RIGHT ); } else if (piglinArmPose == PiglinArmPose.ADMIRING_ITEM) { this.head.xRot = 0.5F; this.head.yRot = 0.0F; - if (piglinRenderState.mainArm == HumanoidArm.LEFT) { + if (renderState.mainArm == HumanoidArm.LEFT) { this.rightArm.yRot = -0.5F; this.rightArm.xRot = -0.9F; } else { @@ -51,17 +51,17 @@ public class PiglinModel extends AbstractPiglinModel { } } - protected void setupAttackAnimation(PiglinRenderState piglinRenderState, float f) { - float g = piglinRenderState.attackTime; - if (g > 0.0F && piglinRenderState.armPose == PiglinArmPose.ATTACKING_WITH_MELEE_WEAPON) { - AnimationUtils.swingWeaponDown(this.rightArm, this.leftArm, piglinRenderState.mainArm, g, piglinRenderState.ageInTicks); + protected void setupAttackAnimation(PiglinRenderState renderState, float ageInTicks) { + float f = renderState.attackTime; + if (f > 0.0F && renderState.armPose == PiglinArmPose.ATTACKING_WITH_MELEE_WEAPON) { + AnimationUtils.swingWeaponDown(this.rightArm, this.leftArm, renderState.mainArm, f, renderState.ageInTicks); } else { - super.setupAttackAnimation(piglinRenderState, f); + super.setupAttackAnimation(renderState, ageInTicks); } } - private void holdWeaponHigh(PiglinRenderState piglinRenderState) { - if (piglinRenderState.mainArm == HumanoidArm.LEFT) { + private void holdWeaponHigh(PiglinRenderState renderState) { + if (renderState.mainArm == HumanoidArm.LEFT) { this.leftArm.xRot = -1.8F; } else { this.rightArm.xRot = -1.8F; diff --git a/net/minecraft/client/model/PlayerModel.java b/net/minecraft/client/model/PlayerModel.java index 06018491..6daf8d2d 100644 --- a/net/minecraft/client/model/PlayerModel.java +++ b/net/minecraft/client/model/PlayerModel.java @@ -89,20 +89,20 @@ public class PlayerModel extends HumanoidModel { return meshDefinition; } - public void setupAnim(PlayerRenderState playerRenderState) { - boolean bl = !playerRenderState.isSpectator; + public void setupAnim(PlayerRenderState renderState) { + boolean bl = !renderState.isSpectator; this.body.visible = bl; this.rightArm.visible = bl; this.leftArm.visible = bl; this.rightLeg.visible = bl; this.leftLeg.visible = bl; - this.hat.visible = playerRenderState.showHat; - this.jacket.visible = playerRenderState.showJacket; - this.leftPants.visible = playerRenderState.showLeftPants; - this.rightPants.visible = playerRenderState.showRightPants; - this.leftSleeve.visible = playerRenderState.showLeftSleeve; - this.rightSleeve.visible = playerRenderState.showRightSleeve; - super.setupAnim(playerRenderState); + this.hat.visible = renderState.showHat; + this.jacket.visible = renderState.showJacket; + this.leftPants.visible = renderState.showLeftPants; + this.rightPants.visible = renderState.showRightPants; + this.leftSleeve.visible = renderState.showLeftSleeve; + this.rightSleeve.visible = renderState.showRightSleeve; + super.setupAnim(renderState); } @Override @@ -129,11 +129,11 @@ public class PlayerModel extends HumanoidModel { } } - public ModelPart getRandomBodyPart(RandomSource randomSource) { - return Util.getRandom(this.bodyParts, randomSource); + public ModelPart getRandomBodyPart(RandomSource random) { + return Util.getRandom(this.bodyParts, random); } - protected HumanoidModel.ArmPose getArmPose(PlayerRenderState playerRenderState, HumanoidArm humanoidArm) { - return PlayerRenderer.getArmPose(playerRenderState, humanoidArm); + protected HumanoidModel.ArmPose getArmPose(PlayerRenderState renderState, HumanoidArm arm) { + return PlayerRenderer.getArmPose(renderState, arm); } } diff --git a/net/minecraft/client/model/PolarBearModel.java b/net/minecraft/client/model/PolarBearModel.java index 7677c108..477703f2 100644 --- a/net/minecraft/client/model/PolarBearModel.java +++ b/net/minecraft/client/model/PolarBearModel.java @@ -53,11 +53,11 @@ public class PolarBearModel extends QuadrupedModel { return LayerDefinition.create(meshDefinition, 128, 64).apply(MeshTransformer.scaling(1.2F)); } - public void setupAnim(PolarBearRenderState polarBearRenderState) { - super.setupAnim(polarBearRenderState); - float f = polarBearRenderState.standScale * polarBearRenderState.standScale; - float g = polarBearRenderState.ageScale; - float h = polarBearRenderState.isBaby ? 0.44444445F : 1.0F; + public void setupAnim(PolarBearRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.standScale * renderState.standScale; + float g = renderState.ageScale; + float h = renderState.isBaby ? 0.44444445F : 1.0F; this.body.xRot -= f * (float) Math.PI * 0.35F; this.body.y += f * g * 2.0F; this.rightFrontLeg.y -= f * g * 20.0F; diff --git a/net/minecraft/client/model/PufferfishBigModel.java b/net/minecraft/client/model/PufferfishBigModel.java index 6445f09a..d2b61a36 100644 --- a/net/minecraft/client/model/PufferfishBigModel.java +++ b/net/minecraft/client/model/PufferfishBigModel.java @@ -85,9 +85,9 @@ public class PufferfishBigModel extends EntityModel { } @Override - public void setupAnim(EntityRenderState entityRenderState) { - super.setupAnim(entityRenderState); - this.rightBlueFin.zRot = -0.2F + 0.4F * Mth.sin(entityRenderState.ageInTicks * 0.2F); - this.leftBlueFin.zRot = 0.2F - 0.4F * Mth.sin(entityRenderState.ageInTicks * 0.2F); + public void setupAnim(EntityRenderState renderState) { + super.setupAnim(renderState); + this.rightBlueFin.zRot = -0.2F + 0.4F * Mth.sin(renderState.ageInTicks * 0.2F); + this.leftBlueFin.zRot = 0.2F - 0.4F * Mth.sin(renderState.ageInTicks * 0.2F); } } diff --git a/net/minecraft/client/model/PufferfishMidModel.java b/net/minecraft/client/model/PufferfishMidModel.java index ac17dd90..4a752d8f 100644 --- a/net/minecraft/client/model/PufferfishMidModel.java +++ b/net/minecraft/client/model/PufferfishMidModel.java @@ -79,9 +79,9 @@ public class PufferfishMidModel extends EntityModel { } @Override - public void setupAnim(EntityRenderState entityRenderState) { - super.setupAnim(entityRenderState); - this.rightBlueFin.zRot = -0.2F + 0.4F * Mth.sin(entityRenderState.ageInTicks * 0.2F); - this.leftBlueFin.zRot = 0.2F - 0.4F * Mth.sin(entityRenderState.ageInTicks * 0.2F); + public void setupAnim(EntityRenderState renderState) { + super.setupAnim(renderState); + this.rightBlueFin.zRot = -0.2F + 0.4F * Mth.sin(renderState.ageInTicks * 0.2F); + this.leftBlueFin.zRot = 0.2F - 0.4F * Mth.sin(renderState.ageInTicks * 0.2F); } } diff --git a/net/minecraft/client/model/PufferfishSmallModel.java b/net/minecraft/client/model/PufferfishSmallModel.java index c8db6195..d595d494 100644 --- a/net/minecraft/client/model/PufferfishSmallModel.java +++ b/net/minecraft/client/model/PufferfishSmallModel.java @@ -48,9 +48,9 @@ public class PufferfishSmallModel extends EntityModel { } @Override - public void setupAnim(EntityRenderState entityRenderState) { - super.setupAnim(entityRenderState); - this.rightFin.zRot = -0.2F + 0.4F * Mth.sin(entityRenderState.ageInTicks * 0.2F); - this.leftFin.zRot = 0.2F - 0.4F * Mth.sin(entityRenderState.ageInTicks * 0.2F); + public void setupAnim(EntityRenderState renderState) { + super.setupAnim(renderState); + this.rightFin.zRot = -0.2F + 0.4F * Mth.sin(renderState.ageInTicks * 0.2F); + this.leftFin.zRot = 0.2F - 0.4F * Mth.sin(renderState.ageInTicks * 0.2F); } } diff --git a/net/minecraft/client/model/QuadrupedModel.java b/net/minecraft/client/model/QuadrupedModel.java index 53a65ed1..ea681c60 100644 --- a/net/minecraft/client/model/QuadrupedModel.java +++ b/net/minecraft/client/model/QuadrupedModel.java @@ -20,14 +20,14 @@ public class QuadrupedModel extends EntityMod protected final ModelPart rightFrontLeg; protected final ModelPart leftFrontLeg; - protected QuadrupedModel(ModelPart modelPart) { - super(modelPart); - this.head = modelPart.getChild("head"); - this.body = modelPart.getChild("body"); - this.rightHindLeg = modelPart.getChild("right_hind_leg"); - this.leftHindLeg = modelPart.getChild("left_hind_leg"); - this.rightFrontLeg = modelPart.getChild("right_front_leg"); - this.leftFrontLeg = modelPart.getChild("left_front_leg"); + protected QuadrupedModel(ModelPart root) { + super(root); + this.head = root.getChild("head"); + this.body = root.getChild("body"); + this.rightHindLeg = root.getChild("right_hind_leg"); + this.leftHindLeg = root.getChild("left_hind_leg"); + this.rightFrontLeg = root.getChild("right_front_leg"); + this.leftFrontLeg = root.getChild("left_front_leg"); } public static MeshDefinition createBodyMesh(int yOffset, CubeDeformation cubeDeformation) { @@ -49,12 +49,12 @@ public class QuadrupedModel extends EntityMod return meshDefinition; } - public void setupAnim(T livingEntityRenderState) { - super.setupAnim(livingEntityRenderState); - this.head.xRot = livingEntityRenderState.xRot * (float) (Math.PI / 180.0); - this.head.yRot = livingEntityRenderState.yRot * (float) (Math.PI / 180.0); - float f = livingEntityRenderState.walkAnimationPos; - float g = livingEntityRenderState.walkAnimationSpeed; + public void setupAnim(T renderState) { + super.setupAnim(renderState); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + float f = renderState.walkAnimationPos; + float g = renderState.walkAnimationSpeed; this.rightHindLeg.xRot = Mth.cos(f * 0.6662F) * 1.4F * g; this.leftHindLeg.xRot = Mth.cos(f * 0.6662F + (float) Math.PI) * 1.4F * g; this.rightFrontLeg.xRot = Mth.cos(f * 0.6662F + (float) Math.PI) * 1.4F * g; diff --git a/net/minecraft/client/model/RabbitModel.java b/net/minecraft/client/model/RabbitModel.java index a3ab586f..44a9f1f4 100644 --- a/net/minecraft/client/model/RabbitModel.java +++ b/net/minecraft/client/model/RabbitModel.java @@ -55,7 +55,7 @@ public class RabbitModel extends EntityModel { this.nose = root.getChild("nose"); } - public static LayerDefinition createBodyLayer(boolean bl) { + public static LayerDefinition createBodyLayer(boolean baby) { MeshDefinition meshDefinition = new MeshDefinition(); PartDefinition partDefinition = meshDefinition.getRoot(); partDefinition.addOrReplaceChild( @@ -110,20 +110,20 @@ public class RabbitModel extends EntityModel { partDefinition.addOrReplaceChild( "nose", CubeListBuilder.create().texOffs(32, 9).addBox(-0.5F, -2.5F, -5.5F, 1.0F, 1.0F, 1.0F), PartPose.offset(0.0F, 16.0F, -1.0F) ); - return LayerDefinition.create(meshDefinition, 64, 32).apply(bl ? BABY_TRANSFORMER : ADULT_TRANSFORMER); + return LayerDefinition.create(meshDefinition, 64, 32).apply(baby ? BABY_TRANSFORMER : ADULT_TRANSFORMER); } - public void setupAnim(RabbitRenderState rabbitRenderState) { - super.setupAnim(rabbitRenderState); - this.nose.xRot = rabbitRenderState.xRot * (float) (Math.PI / 180.0); - this.head.xRot = rabbitRenderState.xRot * (float) (Math.PI / 180.0); - this.rightEar.xRot = rabbitRenderState.xRot * (float) (Math.PI / 180.0); - this.leftEar.xRot = rabbitRenderState.xRot * (float) (Math.PI / 180.0); - this.nose.yRot = rabbitRenderState.yRot * (float) (Math.PI / 180.0); - this.head.yRot = rabbitRenderState.yRot * (float) (Math.PI / 180.0); + public void setupAnim(RabbitRenderState renderState) { + super.setupAnim(renderState); + this.nose.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.rightEar.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.leftEar.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.nose.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); this.rightEar.yRot = this.nose.yRot - (float) (Math.PI / 12); this.leftEar.yRot = this.nose.yRot + (float) (Math.PI / 12); - float f = Mth.sin(rabbitRenderState.jumpCompletion * (float) Math.PI); + float f = Mth.sin(renderState.jumpCompletion * (float) Math.PI); this.leftHaunch.xRot = (f * 50.0F - 21.0F) * (float) (Math.PI / 180.0); this.rightHaunch.xRot = (f * 50.0F - 21.0F) * (float) (Math.PI / 180.0); this.leftRearFoot.xRot = f * 50.0F * (float) (Math.PI / 180.0); diff --git a/net/minecraft/client/model/RavagerModel.java b/net/minecraft/client/model/RavagerModel.java index e4ce4137..5f95dcf6 100644 --- a/net/minecraft/client/model/RavagerModel.java +++ b/net/minecraft/client/model/RavagerModel.java @@ -77,10 +77,10 @@ public class RavagerModel extends EntityModel { return LayerDefinition.create(meshDefinition, 128, 128); } - public void setupAnim(RavagerRenderState ravagerRenderState) { - super.setupAnim(ravagerRenderState); - float f = ravagerRenderState.stunnedTicksRemaining; - float g = ravagerRenderState.attackTicksRemaining; + public void setupAnim(RavagerRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.stunnedTicksRemaining; + float g = renderState.attackTicksRemaining; int i = 10; if (g > 0.0F) { float h = Mth.triangleWave(g, 10.0F); @@ -106,16 +106,16 @@ public class RavagerModel extends EntityModel { if (bl) { double d = f / 40.0; this.neck.x = (float)Math.sin(d * 10.0) * 3.0F; - } else if (ravagerRenderState.roarAnimation > 0.0) { - float l = Mth.sin(ravagerRenderState.roarAnimation * (float) Math.PI * 0.25F); + } else if (renderState.roarAnimation > 0.0) { + float l = Mth.sin(renderState.roarAnimation * (float) Math.PI * 0.25F); this.mouth.xRot = (float) (Math.PI / 2) * l; } } - this.head.xRot = ravagerRenderState.xRot * (float) (Math.PI / 180.0); - this.head.yRot = ravagerRenderState.yRot * (float) (Math.PI / 180.0); - float hx = ravagerRenderState.walkAnimationPos; - float jx = 0.4F * ravagerRenderState.walkAnimationSpeed; + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + float hx = renderState.walkAnimationPos; + float jx = 0.4F * renderState.walkAnimationSpeed; this.rightHindLeg.xRot = Mth.cos(hx * 0.6662F) * jx; this.leftHindLeg.xRot = Mth.cos(hx * 0.6662F + (float) Math.PI) * jx; this.rightFrontLeg.xRot = Mth.cos(hx * 0.6662F + (float) Math.PI) * jx; diff --git a/net/minecraft/client/model/SalmonModel.java b/net/minecraft/client/model/SalmonModel.java index a386c5dd..6ee97571 100644 --- a/net/minecraft/client/model/SalmonModel.java +++ b/net/minecraft/client/model/SalmonModel.java @@ -61,15 +61,15 @@ public class SalmonModel extends EntityModel { return LayerDefinition.create(meshDefinition, 32, 32); } - public void setupAnim(SalmonRenderState salmonRenderState) { - super.setupAnim(salmonRenderState); + public void setupAnim(SalmonRenderState renderState) { + super.setupAnim(renderState); float f = 1.0F; float g = 1.0F; - if (!salmonRenderState.isInWater) { + if (!renderState.isInWater) { f = 1.3F; g = 1.7F; } - this.bodyBack.yRot = -f * 0.25F * Mth.sin(g * 0.6F * salmonRenderState.ageInTicks); + this.bodyBack.yRot = -f * 0.25F * Mth.sin(g * 0.6F * renderState.ageInTicks); } } diff --git a/net/minecraft/client/model/SheepFurModel.java b/net/minecraft/client/model/SheepFurModel.java index 0343bf3c..22d51b83 100644 --- a/net/minecraft/client/model/SheepFurModel.java +++ b/net/minecraft/client/model/SheepFurModel.java @@ -36,9 +36,9 @@ public class SheepFurModel extends QuadrupedModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(SheepRenderState sheepRenderState) { - super.setupAnim(sheepRenderState); - this.head.y = this.head.y + sheepRenderState.headEatPositionScale * 9.0F * sheepRenderState.ageScale; - this.head.xRot = sheepRenderState.headEatAngleScale; + public void setupAnim(SheepRenderState renderState) { + super.setupAnim(renderState); + this.head.y = this.head.y + renderState.headEatPositionScale * 9.0F * renderState.ageScale; + this.head.xRot = renderState.headEatAngleScale; } } diff --git a/net/minecraft/client/model/SheepModel.java b/net/minecraft/client/model/SheepModel.java index 14569fd9..964089e3 100644 --- a/net/minecraft/client/model/SheepModel.java +++ b/net/minecraft/client/model/SheepModel.java @@ -35,9 +35,9 @@ public class SheepModel extends QuadrupedModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(SheepRenderState sheepRenderState) { - super.setupAnim(sheepRenderState); - this.head.y = this.head.y + sheepRenderState.headEatPositionScale * 9.0F * sheepRenderState.ageScale; - this.head.xRot = sheepRenderState.headEatAngleScale; + public void setupAnim(SheepRenderState renderState) { + super.setupAnim(renderState); + this.head.y = this.head.y + renderState.headEatPositionScale * 9.0F * renderState.ageScale; + this.head.xRot = renderState.headEatAngleScale; } } diff --git a/net/minecraft/client/model/ShulkerBulletModel.java b/net/minecraft/client/model/ShulkerBulletModel.java index 64c25ccb..ad0860ff 100644 --- a/net/minecraft/client/model/ShulkerBulletModel.java +++ b/net/minecraft/client/model/ShulkerBulletModel.java @@ -37,9 +37,9 @@ public class ShulkerBulletModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(ShulkerBulletRenderState shulkerBulletRenderState) { - super.setupAnim(shulkerBulletRenderState); - this.main.yRot = shulkerBulletRenderState.yRot * (float) (Math.PI / 180.0); - this.main.xRot = shulkerBulletRenderState.xRot * (float) (Math.PI / 180.0); + public void setupAnim(ShulkerBulletRenderState renderState) { + super.setupAnim(renderState); + this.main.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.main.xRot = renderState.xRot * (float) (Math.PI / 180.0); } } diff --git a/net/minecraft/client/model/ShulkerModel.java b/net/minecraft/client/model/ShulkerModel.java index 234fa567..4342ffe4 100644 --- a/net/minecraft/client/model/ShulkerModel.java +++ b/net/minecraft/client/model/ShulkerModel.java @@ -49,23 +49,23 @@ public class ShulkerModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(ShulkerRenderState shulkerRenderState) { - super.setupAnim(shulkerRenderState); - float f = (0.5F + shulkerRenderState.peekAmount) * (float) Math.PI; + public void setupAnim(ShulkerRenderState renderState) { + super.setupAnim(renderState); + float f = (0.5F + renderState.peekAmount) * (float) Math.PI; float g = -1.0F + Mth.sin(f); float h = 0.0F; if (f > (float) Math.PI) { - h = Mth.sin(shulkerRenderState.ageInTicks * 0.1F) * 0.7F; + h = Mth.sin(renderState.ageInTicks * 0.1F) * 0.7F; } this.lid.setPos(0.0F, 16.0F + Mth.sin(f) * 8.0F + h, 0.0F); - if (shulkerRenderState.peekAmount > 0.3F) { + if (renderState.peekAmount > 0.3F) { this.lid.yRot = g * g * g * g * (float) Math.PI * 0.125F; } else { this.lid.yRot = 0.0F; } - this.head.xRot = shulkerRenderState.xRot * (float) (Math.PI / 180.0); - this.head.yRot = (shulkerRenderState.yHeadRot - 180.0F - shulkerRenderState.yBodyRot) * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = (renderState.yHeadRot - 180.0F - renderState.yBodyRot) * (float) (Math.PI / 180.0); } } diff --git a/net/minecraft/client/model/SilverfishModel.java b/net/minecraft/client/model/SilverfishModel.java index 3c11b9f6..27f0f524 100644 --- a/net/minecraft/client/model/SilverfishModel.java +++ b/net/minecraft/client/model/SilverfishModel.java @@ -73,12 +73,12 @@ public class SilverfishModel extends EntityModel { } @Override - public void setupAnim(EntityRenderState entityRenderState) { - super.setupAnim(entityRenderState); + public void setupAnim(EntityRenderState renderState) { + super.setupAnim(renderState); for (int i = 0; i < this.bodyParts.length; i++) { - this.bodyParts[i].yRot = Mth.cos(entityRenderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.05F * (1 + Math.abs(i - 2)); - this.bodyParts[i].x = Mth.sin(entityRenderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.2F * Math.abs(i - 2); + this.bodyParts[i].yRot = Mth.cos(renderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.05F * (1 + Math.abs(i - 2)); + this.bodyParts[i].x = Mth.sin(renderState.ageInTicks * 0.9F + i * 0.15F * (float) Math.PI) * (float) Math.PI * 0.2F * Math.abs(i - 2); } this.bodyLayers[0].yRot = this.bodyParts[2].yRot; diff --git a/net/minecraft/client/model/SkeletonModel.java b/net/minecraft/client/model/SkeletonModel.java index c06d3640..cb15b8ec 100644 --- a/net/minecraft/client/model/SkeletonModel.java +++ b/net/minecraft/client/model/SkeletonModel.java @@ -44,17 +44,17 @@ public class SkeletonModel extends HumanoidModel< ); } - protected HumanoidModel.ArmPose getArmPose(S skeletonRenderState, HumanoidArm humanoidArm) { - return skeletonRenderState.getMainHandItem().is(Items.BOW) && skeletonRenderState.isAggressive && skeletonRenderState.mainArm == humanoidArm + protected HumanoidModel.ArmPose getArmPose(S renderState, HumanoidArm arm) { + return renderState.getMainHandItem().is(Items.BOW) && renderState.isAggressive && renderState.mainArm == arm ? HumanoidModel.ArmPose.BOW_AND_ARROW : HumanoidModel.ArmPose.EMPTY; } - public void setupAnim(S skeletonRenderState) { - super.setupAnim(skeletonRenderState); - ItemStack itemStack = skeletonRenderState.getMainHandItem(); - if (skeletonRenderState.isAggressive && !itemStack.is(Items.BOW)) { - float f = skeletonRenderState.attackTime; + public void setupAnim(S renderState) { + super.setupAnim(renderState); + ItemStack itemStack = renderState.getMainHandItem(); + if (renderState.isAggressive && !itemStack.is(Items.BOW)) { + float f = renderState.attackTime; float g = Mth.sin(f * (float) Math.PI); float h = Mth.sin((1.0F - (1.0F - f) * (1.0F - f)) * (float) Math.PI); this.rightArm.zRot = 0.0F; @@ -65,7 +65,7 @@ public class SkeletonModel extends HumanoidModel< this.leftArm.xRot = (float) (-Math.PI / 2); this.rightArm.xRot -= g * 1.2F - h * 0.4F; this.leftArm.xRot -= g * 1.2F - h * 0.4F; - AnimationUtils.bobArms(this.rightArm, this.leftArm, skeletonRenderState.ageInTicks); + AnimationUtils.bobArms(this.rightArm, this.leftArm, renderState.ageInTicks); } } diff --git a/net/minecraft/client/model/SkullModelBase.java b/net/minecraft/client/model/SkullModelBase.java index 732a3544..ba62fb6d 100644 --- a/net/minecraft/client/model/SkullModelBase.java +++ b/net/minecraft/client/model/SkullModelBase.java @@ -7,8 +7,8 @@ import net.minecraft.client.renderer.RenderType; @Environment(EnvType.CLIENT) public abstract class SkullModelBase extends Model { - public SkullModelBase(ModelPart modelPart) { - super(modelPart, RenderType::entityTranslucent); + public SkullModelBase(ModelPart root) { + super(root, RenderType::entityTranslucent); } public abstract void setupAnim(float mouthAnimation, float yRot, float xRot); diff --git a/net/minecraft/client/model/SnifferModel.java b/net/minecraft/client/model/SnifferModel.java index d1088359..8f7ca241 100644 --- a/net/minecraft/client/model/SnifferModel.java +++ b/net/minecraft/client/model/SnifferModel.java @@ -102,22 +102,22 @@ public class SnifferModel extends EntityModel { return LayerDefinition.create(meshDefinition, 192, 192); } - public void setupAnim(SnifferRenderState snifferRenderState) { - super.setupAnim(snifferRenderState); - this.head.xRot = snifferRenderState.xRot * (float) (Math.PI / 180.0); - this.head.yRot = snifferRenderState.yRot * (float) (Math.PI / 180.0); - if (snifferRenderState.isSearching) { - this.animateWalk(SnifferAnimation.SNIFFER_SNIFF_SEARCH, snifferRenderState.walkAnimationPos, snifferRenderState.walkAnimationSpeed, 9.0F, 100.0F); + public void setupAnim(SnifferRenderState renderState) { + super.setupAnim(renderState); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + if (renderState.isSearching) { + this.animateWalk(SnifferAnimation.SNIFFER_SNIFF_SEARCH, renderState.walkAnimationPos, renderState.walkAnimationSpeed, 9.0F, 100.0F); } else { - this.animateWalk(SnifferAnimation.SNIFFER_WALK, snifferRenderState.walkAnimationPos, snifferRenderState.walkAnimationSpeed, 9.0F, 100.0F); + this.animateWalk(SnifferAnimation.SNIFFER_WALK, renderState.walkAnimationPos, renderState.walkAnimationSpeed, 9.0F, 100.0F); } - this.animate(snifferRenderState.diggingAnimationState, SnifferAnimation.SNIFFER_DIG, snifferRenderState.ageInTicks); - this.animate(snifferRenderState.sniffingAnimationState, SnifferAnimation.SNIFFER_LONGSNIFF, snifferRenderState.ageInTicks); - this.animate(snifferRenderState.risingAnimationState, SnifferAnimation.SNIFFER_STAND_UP, snifferRenderState.ageInTicks); - this.animate(snifferRenderState.feelingHappyAnimationState, SnifferAnimation.SNIFFER_HAPPY, snifferRenderState.ageInTicks); - this.animate(snifferRenderState.scentingAnimationState, SnifferAnimation.SNIFFER_SNIFFSNIFF, snifferRenderState.ageInTicks); - if (snifferRenderState.isBaby) { + this.animate(renderState.diggingAnimationState, SnifferAnimation.SNIFFER_DIG, renderState.ageInTicks); + this.animate(renderState.sniffingAnimationState, SnifferAnimation.SNIFFER_LONGSNIFF, renderState.ageInTicks); + this.animate(renderState.risingAnimationState, SnifferAnimation.SNIFFER_STAND_UP, renderState.ageInTicks); + this.animate(renderState.feelingHappyAnimationState, SnifferAnimation.SNIFFER_HAPPY, renderState.ageInTicks); + this.animate(renderState.scentingAnimationState, SnifferAnimation.SNIFFER_SNIFFSNIFF, renderState.ageInTicks); + if (renderState.isBaby) { this.applyStatic(SnifferAnimation.BABY_TRANSFORM); } } diff --git a/net/minecraft/client/model/SnowGolemModel.java b/net/minecraft/client/model/SnowGolemModel.java index cf459cc0..3e04852a 100644 --- a/net/minecraft/client/model/SnowGolemModel.java +++ b/net/minecraft/client/model/SnowGolemModel.java @@ -48,11 +48,11 @@ public class SnowGolemModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(LivingEntityRenderState livingEntityRenderState) { - super.setupAnim(livingEntityRenderState); - this.head.yRot = livingEntityRenderState.yRot * (float) (Math.PI / 180.0); - this.head.xRot = livingEntityRenderState.xRot * (float) (Math.PI / 180.0); - this.upperBody.yRot = livingEntityRenderState.yRot * (float) (Math.PI / 180.0) * 0.25F; + public void setupAnim(LivingEntityRenderState renderState) { + super.setupAnim(renderState); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.upperBody.yRot = renderState.yRot * (float) (Math.PI / 180.0) * 0.25F; float f = Mth.sin(this.upperBody.yRot); float g = Mth.cos(this.upperBody.yRot); this.leftArm.yRot = this.upperBody.yRot; diff --git a/net/minecraft/client/model/SpiderModel.java b/net/minecraft/client/model/SpiderModel.java index c659d70a..050cd796 100644 --- a/net/minecraft/client/model/SpiderModel.java +++ b/net/minecraft/client/model/SpiderModel.java @@ -86,12 +86,12 @@ public class SpiderModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(LivingEntityRenderState livingEntityRenderState) { - super.setupAnim(livingEntityRenderState); - this.head.yRot = livingEntityRenderState.yRot * (float) (Math.PI / 180.0); - this.head.xRot = livingEntityRenderState.xRot * (float) (Math.PI / 180.0); - float f = livingEntityRenderState.walkAnimationPos * 0.6662F; - float g = livingEntityRenderState.walkAnimationSpeed; + public void setupAnim(LivingEntityRenderState renderState) { + super.setupAnim(renderState); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + float f = renderState.walkAnimationPos * 0.6662F; + float g = renderState.walkAnimationSpeed; float h = -(Mth.cos(f * 2.0F + 0.0F) * 0.4F) * g; float i = -(Mth.cos(f * 2.0F + (float) Math.PI) * 0.4F) * g; float j = -(Mth.cos(f * 2.0F + (float) (Math.PI / 2)) * 0.4F) * g; diff --git a/net/minecraft/client/model/SpinAttackEffectModel.java b/net/minecraft/client/model/SpinAttackEffectModel.java index efcd7780..550036b5 100644 --- a/net/minecraft/client/model/SpinAttackEffectModel.java +++ b/net/minecraft/client/model/SpinAttackEffectModel.java @@ -16,16 +16,16 @@ public class SpinAttackEffectModel extends EntityModel { private static final int BOX_COUNT = 2; private final ModelPart[] boxes = new ModelPart[2]; - public SpinAttackEffectModel(ModelPart modelPart) { - super(modelPart); + public SpinAttackEffectModel(ModelPart root) { + super(root); for (int i = 0; i < 2; i++) { - this.boxes[i] = modelPart.getChild(boxName(i)); + this.boxes[i] = root.getChild(boxName(i)); } } - private static String boxName(int i) { - return "box" + i; + private static String boxName(int index) { + return "box" + index; } public static LayerDefinition createLayer() { @@ -43,11 +43,11 @@ public class SpinAttackEffectModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(PlayerRenderState playerRenderState) { - super.setupAnim(playerRenderState); + public void setupAnim(PlayerRenderState renderState) { + super.setupAnim(renderState); for (int i = 0; i < this.boxes.length; i++) { - float f = playerRenderState.ageInTicks * -(45 + (i + 1) * 5); + float f = renderState.ageInTicks * -(45 + (i + 1) * 5); this.boxes[i].yRot = Mth.wrapDegrees(f) * (float) (Math.PI / 180.0); } } diff --git a/net/minecraft/client/model/SquidModel.java b/net/minecraft/client/model/SquidModel.java index e4bba421..f930229c 100644 --- a/net/minecraft/client/model/SquidModel.java +++ b/net/minecraft/client/model/SquidModel.java @@ -51,11 +51,11 @@ public class SquidModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(SquidRenderState squidRenderState) { - super.setupAnim(squidRenderState); + public void setupAnim(SquidRenderState renderState) { + super.setupAnim(renderState); for (ModelPart modelPart : this.tentacles) { - modelPart.xRot = squidRenderState.tentacleAngle; + modelPart.xRot = renderState.tentacleAngle; } } } diff --git a/net/minecraft/client/model/StriderModel.java b/net/minecraft/client/model/StriderModel.java index a274122a..8534a147 100644 --- a/net/minecraft/client/model/StriderModel.java +++ b/net/minecraft/client/model/StriderModel.java @@ -87,13 +87,13 @@ public class StriderModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 128); } - public void setupAnim(StriderRenderState striderRenderState) { - super.setupAnim(striderRenderState); - float f = striderRenderState.walkAnimationPos; - float g = Math.min(striderRenderState.walkAnimationSpeed, 0.25F); - if (!striderRenderState.isRidden) { - this.body.xRot = striderRenderState.xRot * (float) (Math.PI / 180.0); - this.body.yRot = striderRenderState.yRot * (float) (Math.PI / 180.0); + public void setupAnim(StriderRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.walkAnimationPos; + float g = Math.min(renderState.walkAnimationSpeed, 0.25F); + if (!renderState.isRidden) { + this.body.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.body.yRot = renderState.yRot * (float) (Math.PI / 180.0); } else { this.body.xRot = 0.0F; this.body.yRot = 0.0F; @@ -124,11 +124,11 @@ public class StriderModel extends EntityModel { this.leftBottomBristle.zRot += i * 1.3F; float j = 1.0F; float k = 1.0F; - this.rightBottomBristle.zRot = this.rightBottomBristle.zRot + 0.05F * Mth.sin(striderRenderState.ageInTicks * 1.0F * -0.4F); - this.rightMiddleBristle.zRot = this.rightMiddleBristle.zRot + 0.1F * Mth.sin(striderRenderState.ageInTicks * 1.0F * 0.2F); - this.rightTopBristle.zRot = this.rightTopBristle.zRot + 0.1F * Mth.sin(striderRenderState.ageInTicks * 1.0F * 0.4F); - this.leftTopBristle.zRot = this.leftTopBristle.zRot + 0.1F * Mth.sin(striderRenderState.ageInTicks * 1.0F * 0.4F); - this.leftMiddleBristle.zRot = this.leftMiddleBristle.zRot + 0.1F * Mth.sin(striderRenderState.ageInTicks * 1.0F * 0.2F); - this.leftBottomBristle.zRot = this.leftBottomBristle.zRot + 0.05F * Mth.sin(striderRenderState.ageInTicks * 1.0F * -0.4F); + this.rightBottomBristle.zRot = this.rightBottomBristle.zRot + 0.05F * Mth.sin(renderState.ageInTicks * 1.0F * -0.4F); + this.rightMiddleBristle.zRot = this.rightMiddleBristle.zRot + 0.1F * Mth.sin(renderState.ageInTicks * 1.0F * 0.2F); + this.rightTopBristle.zRot = this.rightTopBristle.zRot + 0.1F * Mth.sin(renderState.ageInTicks * 1.0F * 0.4F); + this.leftTopBristle.zRot = this.leftTopBristle.zRot + 0.1F * Mth.sin(renderState.ageInTicks * 1.0F * 0.4F); + this.leftMiddleBristle.zRot = this.leftMiddleBristle.zRot + 0.1F * Mth.sin(renderState.ageInTicks * 1.0F * 0.2F); + this.leftBottomBristle.zRot = this.leftBottomBristle.zRot + 0.05F * Mth.sin(renderState.ageInTicks * 1.0F * -0.4F); } } diff --git a/net/minecraft/client/model/TadpoleModel.java b/net/minecraft/client/model/TadpoleModel.java index c429808e..fcaff258 100644 --- a/net/minecraft/client/model/TadpoleModel.java +++ b/net/minecraft/client/model/TadpoleModel.java @@ -36,9 +36,9 @@ public class TadpoleModel extends EntityModel { return LayerDefinition.create(meshDefinition, 16, 16); } - public void setupAnim(LivingEntityRenderState livingEntityRenderState) { - super.setupAnim(livingEntityRenderState); - float f = livingEntityRenderState.isInWater ? 1.0F : 1.5F; - this.tail.yRot = -f * 0.25F * Mth.sin(0.3F * livingEntityRenderState.ageInTicks); + public void setupAnim(LivingEntityRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.isInWater ? 1.0F : 1.5F; + this.tail.yRot = -f * 0.25F * Mth.sin(0.3F * renderState.ageInTicks); } } diff --git a/net/minecraft/client/model/TropicalFishModelA.java b/net/minecraft/client/model/TropicalFishModelA.java index e43252be..0c0a7d59 100644 --- a/net/minecraft/client/model/TropicalFishModelA.java +++ b/net/minecraft/client/model/TropicalFishModelA.java @@ -47,9 +47,9 @@ public class TropicalFishModelA extends EntityModel { return LayerDefinition.create(meshDefinition, 32, 32); } - public void setupAnim(TropicalFishRenderState tropicalFishRenderState) { - super.setupAnim(tropicalFishRenderState); - float f = tropicalFishRenderState.isInWater ? 1.0F : 1.5F; - this.tail.yRot = -f * 0.45F * Mth.sin(0.6F * tropicalFishRenderState.ageInTicks); + public void setupAnim(TropicalFishRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.isInWater ? 1.0F : 1.5F; + this.tail.yRot = -f * 0.45F * Mth.sin(0.6F * renderState.ageInTicks); } } diff --git a/net/minecraft/client/model/TropicalFishModelB.java b/net/minecraft/client/model/TropicalFishModelB.java index 6e5f0ea2..996fc8bd 100644 --- a/net/minecraft/client/model/TropicalFishModelB.java +++ b/net/minecraft/client/model/TropicalFishModelB.java @@ -50,9 +50,9 @@ public class TropicalFishModelB extends EntityModel { return LayerDefinition.create(meshDefinition, 32, 32); } - public void setupAnim(TropicalFishRenderState tropicalFishRenderState) { - super.setupAnim(tropicalFishRenderState); - float f = tropicalFishRenderState.isInWater ? 1.0F : 1.5F; - this.tail.yRot = -f * 0.45F * Mth.sin(0.6F * tropicalFishRenderState.ageInTicks); + public void setupAnim(TropicalFishRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.isInWater ? 1.0F : 1.5F; + this.tail.yRot = -f * 0.45F * Mth.sin(0.6F * renderState.ageInTicks); } } diff --git a/net/minecraft/client/model/TurtleModel.java b/net/minecraft/client/model/TurtleModel.java index 7c471f7f..bf5b5660 100644 --- a/net/minecraft/client/model/TurtleModel.java +++ b/net/minecraft/client/model/TurtleModel.java @@ -60,13 +60,13 @@ public class TurtleModel extends QuadrupedModel { return LayerDefinition.create(meshDefinition, 128, 64); } - public void setupAnim(TurtleRenderState turtleRenderState) { - super.setupAnim(turtleRenderState); - float f = turtleRenderState.walkAnimationPos; - float g = turtleRenderState.walkAnimationSpeed; - if (turtleRenderState.isOnLand) { - float h = turtleRenderState.isLayingEgg ? 4.0F : 1.0F; - float i = turtleRenderState.isLayingEgg ? 2.0F : 1.0F; + public void setupAnim(TurtleRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.walkAnimationPos; + float g = renderState.walkAnimationSpeed; + if (renderState.isOnLand) { + float h = renderState.isLayingEgg ? 4.0F : 1.0F; + float i = renderState.isLayingEgg ? 2.0F : 1.0F; float j = f * 5.0F; float k = Mth.cos(h * j); float l = Mth.cos(j); @@ -83,7 +83,7 @@ public class TurtleModel extends QuadrupedModel { this.leftFrontLeg.zRot = i; } - this.eggBelly.visible = turtleRenderState.hasEgg; + this.eggBelly.visible = renderState.hasEgg; if (this.eggBelly.visible) { this.root.y--; } diff --git a/net/minecraft/client/model/VexModel.java b/net/minecraft/client/model/VexModel.java index 6b21d7eb..ecdbe877 100644 --- a/net/minecraft/client/model/VexModel.java +++ b/net/minecraft/client/model/VexModel.java @@ -67,21 +67,21 @@ public class VexModel extends EntityModel implements ArmedModel return LayerDefinition.create(meshDefinition, 32, 32); } - public void setupAnim(VexRenderState vexRenderState) { - super.setupAnim(vexRenderState); - this.head.yRot = vexRenderState.yRot * (float) (Math.PI / 180.0); - this.head.xRot = vexRenderState.xRot * (float) (Math.PI / 180.0); - float f = Mth.cos(vexRenderState.ageInTicks * 5.5F * (float) (Math.PI / 180.0)) * 0.1F; + public void setupAnim(VexRenderState renderState) { + super.setupAnim(renderState); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + float f = Mth.cos(renderState.ageInTicks * 5.5F * (float) (Math.PI / 180.0)) * 0.1F; this.rightArm.zRot = (float) (Math.PI / 5) + f; this.leftArm.zRot = -((float) (Math.PI / 5) + f); - if (vexRenderState.isCharging) { + if (renderState.isCharging) { this.body.xRot = 0.0F; - this.setArmsCharging(!vexRenderState.rightHandItem.isEmpty(), !vexRenderState.leftHandItem.isEmpty(), f); + this.setArmsCharging(!renderState.rightHandItem.isEmpty(), !renderState.leftHandItem.isEmpty(), f); } else { this.body.xRot = (float) (Math.PI / 20); } - this.leftWing.yRot = 1.0995574F + Mth.cos(vexRenderState.ageInTicks * 45.836624F * (float) (Math.PI / 180.0)) * (float) (Math.PI / 180.0) * 16.2F; + this.leftWing.yRot = 1.0995574F + Mth.cos(renderState.ageInTicks * 45.836624F * (float) (Math.PI / 180.0)) * (float) (Math.PI / 180.0) * 16.2F; this.rightWing.yRot = -this.leftWing.yRot; this.leftWing.xRot = 0.47123888F; this.leftWing.zRot = -0.47123888F; @@ -89,25 +89,25 @@ public class VexModel extends EntityModel implements ArmedModel this.rightWing.zRot = 0.47123888F; } - private void setArmsCharging(boolean bl, boolean bl2, float f) { - if (!bl && !bl2) { + private void setArmsCharging(boolean rightArm, boolean leftArm, float chargeAmount) { + if (!rightArm && !leftArm) { this.rightArm.xRot = -1.2217305F; this.rightArm.yRot = (float) (Math.PI / 12); - this.rightArm.zRot = -0.47123888F - f; + this.rightArm.zRot = -0.47123888F - chargeAmount; this.leftArm.xRot = -1.2217305F; this.leftArm.yRot = (float) (-Math.PI / 12); - this.leftArm.zRot = 0.47123888F + f; + this.leftArm.zRot = 0.47123888F + chargeAmount; } else { - if (bl) { + if (rightArm) { this.rightArm.xRot = (float) (Math.PI * 7.0 / 6.0); this.rightArm.yRot = (float) (Math.PI / 12); - this.rightArm.zRot = -0.47123888F - f; + this.rightArm.zRot = -0.47123888F - chargeAmount; } - if (bl2) { + if (leftArm) { this.leftArm.xRot = (float) (Math.PI * 7.0 / 6.0); this.leftArm.yRot = (float) (-Math.PI / 12); - this.leftArm.zRot = 0.47123888F + f; + this.leftArm.zRot = 0.47123888F + chargeAmount; } } } diff --git a/net/minecraft/client/model/VillagerModel.java b/net/minecraft/client/model/VillagerModel.java index cbc4d305..276bf999 100644 --- a/net/minecraft/client/model/VillagerModel.java +++ b/net/minecraft/client/model/VillagerModel.java @@ -70,19 +70,19 @@ public class VillagerModel extends EntityModel implements H return meshDefinition; } - public void setupAnim(VillagerRenderState villagerRenderState) { - super.setupAnim(villagerRenderState); - this.head.yRot = villagerRenderState.yRot * (float) (Math.PI / 180.0); - this.head.xRot = villagerRenderState.xRot * (float) (Math.PI / 180.0); - if (villagerRenderState.isUnhappy) { - this.head.zRot = 0.3F * Mth.sin(0.45F * villagerRenderState.ageInTicks); + public void setupAnim(VillagerRenderState renderState) { + super.setupAnim(renderState); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + if (renderState.isUnhappy) { + this.head.zRot = 0.3F * Mth.sin(0.45F * renderState.ageInTicks); this.head.xRot = 0.4F; } else { this.head.zRot = 0.0F; } - this.rightLeg.xRot = Mth.cos(villagerRenderState.walkAnimationPos * 0.6662F) * 1.4F * villagerRenderState.walkAnimationSpeed * 0.5F; - this.leftLeg.xRot = Mth.cos(villagerRenderState.walkAnimationPos * 0.6662F + (float) Math.PI) * 1.4F * villagerRenderState.walkAnimationSpeed * 0.5F; + this.rightLeg.xRot = Mth.cos(renderState.walkAnimationPos * 0.6662F) * 1.4F * renderState.walkAnimationSpeed * 0.5F; + this.leftLeg.xRot = Mth.cos(renderState.walkAnimationPos * 0.6662F + (float) Math.PI) * 1.4F * renderState.walkAnimationSpeed * 0.5F; this.rightLeg.yRot = 0.0F; this.leftLeg.yRot = 0.0F; } diff --git a/net/minecraft/client/model/WardenModel.java b/net/minecraft/client/model/WardenModel.java index 90dd0da2..67548aa0 100644 --- a/net/minecraft/client/model/WardenModel.java +++ b/net/minecraft/client/model/WardenModel.java @@ -93,18 +93,18 @@ public class WardenModel extends EntityModel { return LayerDefinition.create(meshDefinition, 128, 128); } - public void setupAnim(WardenRenderState wardenRenderState) { - super.setupAnim(wardenRenderState); - this.animateHeadLookTarget(wardenRenderState.yRot, wardenRenderState.xRot); - this.animateWalk(wardenRenderState.walkAnimationPos, wardenRenderState.walkAnimationSpeed); - this.animateIdlePose(wardenRenderState.ageInTicks); - this.animateTendrils(wardenRenderState, wardenRenderState.ageInTicks); - this.animate(wardenRenderState.attackAnimationState, WardenAnimation.WARDEN_ATTACK, wardenRenderState.ageInTicks); - this.animate(wardenRenderState.sonicBoomAnimationState, WardenAnimation.WARDEN_SONIC_BOOM, wardenRenderState.ageInTicks); - this.animate(wardenRenderState.diggingAnimationState, WardenAnimation.WARDEN_DIG, wardenRenderState.ageInTicks); - this.animate(wardenRenderState.emergeAnimationState, WardenAnimation.WARDEN_EMERGE, wardenRenderState.ageInTicks); - this.animate(wardenRenderState.roarAnimationState, WardenAnimation.WARDEN_ROAR, wardenRenderState.ageInTicks); - this.animate(wardenRenderState.sniffAnimationState, WardenAnimation.WARDEN_SNIFF, wardenRenderState.ageInTicks); + public void setupAnim(WardenRenderState renderState) { + super.setupAnim(renderState); + this.animateHeadLookTarget(renderState.yRot, renderState.xRot); + this.animateWalk(renderState.walkAnimationPos, renderState.walkAnimationSpeed); + this.animateIdlePose(renderState.ageInTicks); + this.animateTendrils(renderState, renderState.ageInTicks); + this.animate(renderState.attackAnimationState, WardenAnimation.WARDEN_ATTACK, renderState.ageInTicks); + this.animate(renderState.sonicBoomAnimationState, WardenAnimation.WARDEN_SONIC_BOOM, renderState.ageInTicks); + this.animate(renderState.diggingAnimationState, WardenAnimation.WARDEN_DIG, renderState.ageInTicks); + this.animate(renderState.emergeAnimationState, WardenAnimation.WARDEN_EMERGE, renderState.ageInTicks); + this.animate(renderState.roarAnimationState, WardenAnimation.WARDEN_ROAR, renderState.ageInTicks); + this.animate(renderState.sniffAnimationState, WardenAnimation.WARDEN_SNIFF, renderState.ageInTicks); } private void animateHeadLookTarget(float yaw, float pitch) { @@ -152,25 +152,25 @@ public class WardenModel extends EntityModel { this.rightArm.y = -13.0F; } - private void animateTendrils(WardenRenderState wardenRenderState, float f) { - float g = wardenRenderState.tendrilAnimation * (float)(Math.cos(f * 2.25) * Math.PI * 0.1F); - this.leftTendril.xRot = g; - this.rightTendril.xRot = -g; + private void animateTendrils(WardenRenderState renderState, float ageInTicks) { + float f = renderState.tendrilAnimation * (float)(Math.cos(ageInTicks * 2.25) * Math.PI * 0.1F); + this.leftTendril.xRot = f; + this.rightTendril.xRot = -f; } - public List getTendrilsLayerModelParts(WardenRenderState wardenRenderState) { + public List getTendrilsLayerModelParts(WardenRenderState renderState) { return this.tendrilsLayerModelParts; } - public List getHeartLayerModelParts(WardenRenderState wardenRenderState) { + public List getHeartLayerModelParts(WardenRenderState renderState) { return this.heartLayerModelParts; } - public List getBioluminescentLayerModelParts(WardenRenderState wardenRenderState) { + public List getBioluminescentLayerModelParts(WardenRenderState renderState) { return this.bioluminescentLayerModelParts; } - public List getPulsatingSpotsLayerModelParts(WardenRenderState wardenRenderState) { + public List getPulsatingSpotsLayerModelParts(WardenRenderState renderState) { return this.pulsatingSpotsLayerModelParts; } } diff --git a/net/minecraft/client/model/WindChargeModel.java b/net/minecraft/client/model/WindChargeModel.java index 4bf7bfb4..4e0b0bbf 100644 --- a/net/minecraft/client/model/WindChargeModel.java +++ b/net/minecraft/client/model/WindChargeModel.java @@ -48,9 +48,9 @@ public class WindChargeModel extends EntityModel { } @Override - public void setupAnim(EntityRenderState entityRenderState) { - super.setupAnim(entityRenderState); - this.windCharge.yRot = -entityRenderState.ageInTicks * 16.0F * (float) (Math.PI / 180.0); - this.wind.yRot = entityRenderState.ageInTicks * 16.0F * (float) (Math.PI / 180.0); + public void setupAnim(EntityRenderState renderState) { + super.setupAnim(renderState); + this.windCharge.yRot = -renderState.ageInTicks * 16.0F * (float) (Math.PI / 180.0); + this.wind.yRot = renderState.ageInTicks * 16.0F * (float) (Math.PI / 180.0); } } diff --git a/net/minecraft/client/model/WitchModel.java b/net/minecraft/client/model/WitchModel.java index 7ec16d47..d58a2a11 100644 --- a/net/minecraft/client/model/WitchModel.java +++ b/net/minecraft/client/model/WitchModel.java @@ -62,16 +62,16 @@ public class WitchModel extends EntityModel implements HeadedM return LayerDefinition.create(meshDefinition, 64, 128); } - public void setupAnim(WitchRenderState witchRenderState) { - super.setupAnim(witchRenderState); - this.head.yRot = witchRenderState.yRot * (float) (Math.PI / 180.0); - this.head.xRot = witchRenderState.xRot * (float) (Math.PI / 180.0); - this.rightLeg.xRot = Mth.cos(witchRenderState.walkAnimationPos * 0.6662F) * 1.4F * witchRenderState.walkAnimationSpeed * 0.5F; - this.leftLeg.xRot = Mth.cos(witchRenderState.walkAnimationPos * 0.6662F + (float) Math.PI) * 1.4F * witchRenderState.walkAnimationSpeed * 0.5F; - float f = 0.01F * (witchRenderState.entityId % 10); - this.nose.xRot = Mth.sin(witchRenderState.ageInTicks * f) * 4.5F * (float) (Math.PI / 180.0); - this.nose.zRot = Mth.cos(witchRenderState.ageInTicks * f) * 2.5F * (float) (Math.PI / 180.0); - if (witchRenderState.isHoldingItem) { + public void setupAnim(WitchRenderState renderState) { + super.setupAnim(renderState); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.rightLeg.xRot = Mth.cos(renderState.walkAnimationPos * 0.6662F) * 1.4F * renderState.walkAnimationSpeed * 0.5F; + this.leftLeg.xRot = Mth.cos(renderState.walkAnimationPos * 0.6662F + (float) Math.PI) * 1.4F * renderState.walkAnimationSpeed * 0.5F; + float f = 0.01F * (renderState.entityId % 10); + this.nose.xRot = Mth.sin(renderState.ageInTicks * f) * 4.5F * (float) (Math.PI / 180.0); + this.nose.zRot = Mth.cos(renderState.ageInTicks * f) * 2.5F * (float) (Math.PI / 180.0); + if (renderState.isHoldingItem) { this.nose.setPos(0.0F, 1.0F, -1.5F); this.nose.xRot = -0.9F; } diff --git a/net/minecraft/client/model/WitherBossModel.java b/net/minecraft/client/model/WitherBossModel.java index f2b4e795..ad5e5b97 100644 --- a/net/minecraft/client/model/WitherBossModel.java +++ b/net/minecraft/client/model/WitherBossModel.java @@ -69,20 +69,20 @@ public class WitherBossModel extends EntityModel { return LayerDefinition.create(meshDefinition, 64, 64); } - public void setupAnim(WitherRenderState witherRenderState) { - super.setupAnim(witherRenderState); - setupHeadRotation(witherRenderState, this.rightHead, 0); - setupHeadRotation(witherRenderState, this.leftHead, 1); - float f = Mth.cos(witherRenderState.ageInTicks * 0.1F); + public void setupAnim(WitherRenderState renderState) { + super.setupAnim(renderState); + setupHeadRotation(renderState, this.rightHead, 0); + setupHeadRotation(renderState, this.leftHead, 1); + float f = Mth.cos(renderState.ageInTicks * 0.1F); this.ribcage.xRot = (0.065F + 0.05F * f) * (float) Math.PI; this.tail.setPos(-2.0F, 6.9F + Mth.cos(this.ribcage.xRot) * 10.0F, -0.5F + Mth.sin(this.ribcage.xRot) * 10.0F); this.tail.xRot = (0.265F + 0.1F * f) * (float) Math.PI; - this.centerHead.yRot = witherRenderState.yRot * (float) (Math.PI / 180.0); - this.centerHead.xRot = witherRenderState.xRot * (float) (Math.PI / 180.0); + this.centerHead.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.centerHead.xRot = renderState.xRot * (float) (Math.PI / 180.0); } - private static void setupHeadRotation(WitherRenderState witherRenderState, ModelPart modelPart, int i) { - modelPart.yRot = (witherRenderState.yHeadRots[i] - witherRenderState.bodyRot) * (float) (Math.PI / 180.0); - modelPart.xRot = witherRenderState.xHeadRots[i] * (float) (Math.PI / 180.0); + private static void setupHeadRotation(WitherRenderState renderState, ModelPart head, int headIndex) { + head.yRot = (renderState.yHeadRots[headIndex] - renderState.bodyRot) * (float) (Math.PI / 180.0); + head.xRot = renderState.xHeadRots[headIndex] * (float) (Math.PI / 180.0); } } diff --git a/net/minecraft/client/model/WolfModel.java b/net/minecraft/client/model/WolfModel.java index eafed47e..f150ec29 100644 --- a/net/minecraft/client/model/WolfModel.java +++ b/net/minecraft/client/model/WolfModel.java @@ -93,18 +93,18 @@ public class WolfModel extends EntityModel { return meshDefinition; } - public void setupAnim(WolfRenderState wolfRenderState) { - super.setupAnim(wolfRenderState); - float f = wolfRenderState.walkAnimationPos; - float g = wolfRenderState.walkAnimationSpeed; - if (wolfRenderState.isAngry) { + public void setupAnim(WolfRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.walkAnimationPos; + float g = renderState.walkAnimationSpeed; + if (renderState.isAngry) { this.tail.yRot = 0.0F; } else { this.tail.yRot = Mth.cos(f * 0.6662F) * 1.4F * g; } - if (wolfRenderState.isSitting) { - float h = wolfRenderState.ageScale; + if (renderState.isSitting) { + float h = renderState.ageScale; this.upperBody.y += 2.0F * h; this.upperBody.xRot = (float) (Math.PI * 2.0 / 5.0); this.upperBody.yRot = 0.0F; @@ -132,12 +132,12 @@ public class WolfModel extends EntityModel { this.leftFrontLeg.xRot = Mth.cos(f * 0.6662F) * 1.4F * g; } - this.realHead.zRot = wolfRenderState.headRollAngle + wolfRenderState.getBodyRollAngle(0.0F); - this.upperBody.zRot = wolfRenderState.getBodyRollAngle(-0.08F); - this.body.zRot = wolfRenderState.getBodyRollAngle(-0.16F); - this.realTail.zRot = wolfRenderState.getBodyRollAngle(-0.2F); - this.head.xRot = wolfRenderState.xRot * (float) (Math.PI / 180.0); - this.head.yRot = wolfRenderState.yRot * (float) (Math.PI / 180.0); - this.tail.xRot = wolfRenderState.tailAngle; + this.realHead.zRot = renderState.headRollAngle + renderState.getBodyRollAngle(0.0F); + this.upperBody.zRot = renderState.getBodyRollAngle(-0.08F); + this.body.zRot = renderState.getBodyRollAngle(-0.16F); + this.realTail.zRot = renderState.getBodyRollAngle(-0.2F); + this.head.xRot = renderState.xRot * (float) (Math.PI / 180.0); + this.head.yRot = renderState.yRot * (float) (Math.PI / 180.0); + this.tail.xRot = renderState.tailAngle; } } diff --git a/net/minecraft/client/model/ZombieModel.java b/net/minecraft/client/model/ZombieModel.java index 3eb67567..dc5d65c9 100644 --- a/net/minecraft/client/model/ZombieModel.java +++ b/net/minecraft/client/model/ZombieModel.java @@ -7,7 +7,7 @@ import net.minecraft.client.renderer.entity.state.ZombieRenderState; @Environment(EnvType.CLIENT) public class ZombieModel extends AbstractZombieModel { - public ZombieModel(ModelPart root) { - super(root); + public ZombieModel(ModelPart modelPart) { + super(modelPart); } } diff --git a/net/minecraft/client/model/ZombieVillagerModel.java b/net/minecraft/client/model/ZombieVillagerModel.java index 426272c2..5f8bf72f 100644 --- a/net/minecraft/client/model/ZombieVillagerModel.java +++ b/net/minecraft/client/model/ZombieVillagerModel.java @@ -80,10 +80,10 @@ public class ZombieVillagerModel extends Hu return LayerDefinition.create(meshDefinition, 64, 32); } - public void setupAnim(S zombieVillagerRenderState) { - super.setupAnim(zombieVillagerRenderState); - float f = zombieVillagerRenderState.attackTime; - AnimationUtils.animateZombieArms(this.leftArm, this.rightArm, zombieVillagerRenderState.isAggressive, f, zombieVillagerRenderState.ageInTicks); + public void setupAnim(S renderState) { + super.setupAnim(renderState); + float f = renderState.attackTime; + AnimationUtils.animateZombieArms(this.leftArm, this.rightArm, renderState.isAggressive, f, renderState.ageInTicks); } @Override diff --git a/net/minecraft/client/model/dragon/EnderDragonModel.java b/net/minecraft/client/model/dragon/EnderDragonModel.java index 10b0bb7b..9f8c1366 100644 --- a/net/minecraft/client/model/dragon/EnderDragonModel.java +++ b/net/minecraft/client/model/dragon/EnderDragonModel.java @@ -39,28 +39,28 @@ public class EnderDragonModel extends EntityModel { private final ModelPart rightRearLegTip; private final ModelPart rightRearFoot; - private static String neckName(int i) { - return "neck" + i; + private static String neckName(int index) { + return "neck" + index; } - private static String tailName(int i) { - return "tail" + i; + private static String tailName(int index) { + return "tail" + index; } - public EnderDragonModel(ModelPart modelPart) { - super(modelPart); - this.head = modelPart.getChild("head"); + public EnderDragonModel(ModelPart root) { + super(root); + this.head = root.getChild("head"); this.jaw = this.head.getChild("jaw"); for (int i = 0; i < this.neckParts.length; i++) { - this.neckParts[i] = modelPart.getChild(neckName(i)); + this.neckParts[i] = root.getChild(neckName(i)); } for (int i = 0; i < this.tailParts.length; i++) { - this.tailParts[i] = modelPart.getChild(tailName(i)); + this.tailParts[i] = root.getChild(tailName(i)); } - this.body = modelPart.getChild("body"); + this.body = root.getChild("body"); this.leftWing = this.body.getChild("left_wing"); this.leftWingTip = this.leftWing.getChild("left_wing_tip"); this.leftFrontLeg = this.body.getChild("left_front_leg"); @@ -201,9 +201,9 @@ public class EnderDragonModel extends EntityModel { return LayerDefinition.create(meshDefinition, 256, 256); } - public void setupAnim(EnderDragonRenderState enderDragonRenderState) { - super.setupAnim(enderDragonRenderState); - float f = enderDragonRenderState.flapTime * (float) (Math.PI * 2); + public void setupAnim(EnderDragonRenderState renderState) { + super.setupAnim(renderState); + float f = renderState.flapTime * (float) (Math.PI * 2); this.jaw.xRot = (Mth.sin(f) + 1.0F) * 0.2F; float g = Mth.sin(f - 1.0F) + 1.0F; g = (g * g + g * 2.0F) * 0.05F; @@ -214,16 +214,16 @@ public class EnderDragonModel extends EntityModel { float i = this.neckParts[0].y; float j = this.neckParts[0].z; float k = 1.5F; - DragonFlightHistory.Sample sample = enderDragonRenderState.getHistoricalPos(6); - float l = Mth.wrapDegrees(enderDragonRenderState.getHistoricalPos(5).yRot() - enderDragonRenderState.getHistoricalPos(10).yRot()); - float m = Mth.wrapDegrees(enderDragonRenderState.getHistoricalPos(5).yRot() + l / 2.0F); + DragonFlightHistory.Sample sample = renderState.getHistoricalPos(6); + float l = Mth.wrapDegrees(renderState.getHistoricalPos(5).yRot() - renderState.getHistoricalPos(10).yRot()); + float m = Mth.wrapDegrees(renderState.getHistoricalPos(5).yRot() + l / 2.0F); for (int n = 0; n < 5; n++) { ModelPart modelPart = this.neckParts[n]; - DragonFlightHistory.Sample sample2 = enderDragonRenderState.getHistoricalPos(5 - n); + DragonFlightHistory.Sample sample2 = renderState.getHistoricalPos(5 - n); float o = Mth.cos(n * 0.45F + f) * 0.15F; modelPart.yRot = Mth.wrapDegrees(sample2.yRot() - sample.yRot()) * (float) (Math.PI / 180.0) * 1.5F; - modelPart.xRot = o + enderDragonRenderState.getHeadPartYOffset(n, sample, sample2) * (float) (Math.PI / 180.0) * 1.5F * 5.0F; + modelPart.xRot = o + renderState.getHeadPartYOffset(n, sample, sample2) * (float) (Math.PI / 180.0) * 1.5F * 5.0F; modelPart.zRot = -Mth.wrapDegrees(sample2.yRot() - m) * (float) (Math.PI / 180.0) * 1.5F; modelPart.y = i; modelPart.z = j; @@ -236,9 +236,9 @@ public class EnderDragonModel extends EntityModel { this.head.y = i; this.head.z = j; this.head.x = h; - DragonFlightHistory.Sample sample3 = enderDragonRenderState.getHistoricalPos(0); + DragonFlightHistory.Sample sample3 = renderState.getHistoricalPos(0); this.head.yRot = Mth.wrapDegrees(sample3.yRot() - sample.yRot()) * (float) (Math.PI / 180.0); - this.head.xRot = Mth.wrapDegrees(enderDragonRenderState.getHeadPartYOffset(6, sample, sample3)) * (float) (Math.PI / 180.0) * 1.5F * 5.0F; + this.head.xRot = Mth.wrapDegrees(renderState.getHeadPartYOffset(6, sample, sample3)) * (float) (Math.PI / 180.0) * 1.5F * 5.0F; this.head.zRot = -Mth.wrapDegrees(sample3.yRot() - m) * (float) (Math.PI / 180.0); this.body.zRot = -l * 1.5F * (float) (Math.PI / 180.0); this.leftWing.xRot = 0.125F - Mth.cos(f) * 0.2F; @@ -255,10 +255,10 @@ public class EnderDragonModel extends EntityModel { i = this.tailParts[0].y; j = this.tailParts[0].z; h = this.tailParts[0].x; - sample = enderDragonRenderState.getHistoricalPos(11); + sample = renderState.getHistoricalPos(11); for (int q = 0; q < 12; q++) { - DragonFlightHistory.Sample sample4 = enderDragonRenderState.getHistoricalPos(12 + q); + DragonFlightHistory.Sample sample4 = renderState.getHistoricalPos(12 + q); p += Mth.sin(q * 0.45F + f) * 0.05F; ModelPart modelPart2 = this.tailParts[q]; modelPart2.yRot = (Mth.wrapDegrees(sample4.yRot() - sample.yRot()) * 1.5F + 180.0F) * (float) (Math.PI / 180.0); @@ -274,13 +274,13 @@ public class EnderDragonModel extends EntityModel { } private void poseLimbs( - float f, ModelPart modelPart, ModelPart modelPart2, ModelPart modelPart3, ModelPart modelPart4, ModelPart modelPart5, ModelPart modelPart6 + float flapAngle, ModelPart frontLeg, ModelPart frontLegTip, ModelPart frontFoot, ModelPart rearLeg, ModelPart rearLegTip, ModelPart rearFoot ) { - modelPart4.xRot = 1.0F + f * 0.1F; - modelPart5.xRot = 0.5F + f * 0.1F; - modelPart6.xRot = 0.75F + f * 0.1F; - modelPart.xRot = 1.3F + f * 0.1F; - modelPart2.xRot = -0.5F - f * 0.1F; - modelPart3.xRot = 0.75F + f * 0.1F; + rearLeg.xRot = 1.0F + flapAngle * 0.1F; + rearLegTip.xRot = 0.5F + flapAngle * 0.1F; + rearFoot.xRot = 0.75F + flapAngle * 0.1F; + frontLeg.xRot = 1.3F + flapAngle * 0.1F; + frontLegTip.xRot = -0.5F - flapAngle * 0.1F; + frontFoot.xRot = 0.75F + flapAngle * 0.1F; } } diff --git a/net/minecraft/client/model/geom/ModelPart.java b/net/minecraft/client/model/geom/ModelPart.java index c0576774..50cef141 100644 --- a/net/minecraft/client/model/geom/ModelPart.java +++ b/net/minecraft/client/model/geom/ModelPart.java @@ -126,9 +126,9 @@ public final class ModelPart { } } - public void rotateBy(Quaternionf quaternionf) { + public void rotateBy(Quaternionf quaternion) { Matrix3f matrix3f = new Matrix3f().rotationZYX(this.zRot, this.yRot, this.xRot); - Matrix3f matrix3f2 = matrix3f.rotate(quaternionf); + Matrix3f matrix3f2 = matrix3f.rotate(quaternion); Vector3f vector3f = matrix3f2.getEulerAnglesZYX(new Vector3f()); this.setRotation(vector3f.x, vector3f.y, vector3f.z); } diff --git a/net/minecraft/client/model/geom/PartPose.java b/net/minecraft/client/model/geom/PartPose.java index 4684df6f..a4c03826 100644 --- a/net/minecraft/client/model/geom/PartPose.java +++ b/net/minecraft/client/model/geom/PartPose.java @@ -19,19 +19,19 @@ public record PartPose(float x, float y, float z, float xRot, float yRot, float return new PartPose(x, y, z, xRot, yRot, zRot, 1.0F, 1.0F, 1.0F); } - public PartPose translated(float f, float g, float h) { - return new PartPose(this.x + f, this.y + g, this.z + h, this.xRot, this.yRot, this.zRot, this.xScale, this.yScale, this.zScale); + public PartPose translated(float x, float y, float z) { + return new PartPose(this.x + x, this.y + y, this.z + z, this.xRot, this.yRot, this.zRot, this.xScale, this.yScale, this.zScale); } - public PartPose withScale(float f) { - return new PartPose(this.x, this.y, this.z, this.xRot, this.yRot, this.zRot, f, f, f); + public PartPose withScale(float scale) { + return new PartPose(this.x, this.y, this.z, this.xRot, this.yRot, this.zRot, scale, scale, scale); } - public PartPose scaled(float f) { - return f == 1.0F ? this : this.scaled(f, f, f); + public PartPose scaled(float scale) { + return scale == 1.0F ? this : this.scaled(scale, scale, scale); } - public PartPose scaled(float f, float g, float h) { - return new PartPose(this.x * f, this.y * g, this.z * h, this.xRot, this.yRot, this.zRot, this.xScale * f, this.yScale * g, this.zScale * h); + public PartPose scaled(float x, float y, float z) { + return new PartPose(this.x * x, this.y * y, this.z * z, this.xRot, this.yRot, this.zRot, this.xScale * x, this.yScale * y, this.zScale * z); } } diff --git a/net/minecraft/client/model/geom/builders/LayerDefinition.java b/net/minecraft/client/model/geom/builders/LayerDefinition.java index 089d75ea..28314693 100644 --- a/net/minecraft/client/model/geom/builders/LayerDefinition.java +++ b/net/minecraft/client/model/geom/builders/LayerDefinition.java @@ -14,8 +14,8 @@ public class LayerDefinition { this.material = material; } - public LayerDefinition apply(MeshTransformer meshTransformer) { - return new LayerDefinition(meshTransformer.apply(this.mesh), this.material); + public LayerDefinition apply(MeshTransformer transformer) { + return new LayerDefinition(transformer.apply(this.mesh), this.material); } public ModelPart bakeRoot() { diff --git a/net/minecraft/client/model/geom/builders/MeshDefinition.java b/net/minecraft/client/model/geom/builders/MeshDefinition.java index 6eb1fc52..e9d28df5 100644 --- a/net/minecraft/client/model/geom/builders/MeshDefinition.java +++ b/net/minecraft/client/model/geom/builders/MeshDefinition.java @@ -14,15 +14,15 @@ public class MeshDefinition { this(new PartDefinition(ImmutableList.of(), PartPose.ZERO)); } - private MeshDefinition(PartDefinition partDefinition) { - this.root = partDefinition; + private MeshDefinition(PartDefinition root) { + this.root = root; } public PartDefinition getRoot() { return this.root; } - public MeshDefinition transformed(UnaryOperator unaryOperator) { - return new MeshDefinition(this.root.transformed(unaryOperator)); + public MeshDefinition transformed(UnaryOperator transformer) { + return new MeshDefinition(this.root.transformed(transformer)); } } diff --git a/net/minecraft/client/model/geom/builders/PartDefinition.java b/net/minecraft/client/model/geom/builders/PartDefinition.java index 590c0d5d..db77d1e9 100644 --- a/net/minecraft/client/model/geom/builders/PartDefinition.java +++ b/net/minecraft/client/model/geom/builders/PartDefinition.java @@ -30,17 +30,17 @@ public class PartDefinition { return this.addOrReplaceChild(name, partDefinition); } - public PartDefinition addOrReplaceChild(String string, PartDefinition partDefinition) { - PartDefinition partDefinition2 = (PartDefinition)this.children.put(string, partDefinition); - if (partDefinition2 != null) { - partDefinition.children.putAll(partDefinition2.children); + public PartDefinition addOrReplaceChild(String name, PartDefinition chuld) { + PartDefinition partDefinition = (PartDefinition)this.children.put(name, chuld); + if (partDefinition != null) { + chuld.children.putAll(partDefinition.children); } - return partDefinition; + return chuld; } - public PartDefinition clearChild(String string) { - return this.addOrReplaceChild(string, CubeListBuilder.create(), PartPose.ZERO); + public PartDefinition clearChild(String name) { + return this.addOrReplaceChild(name, CubeListBuilder.create(), PartPose.ZERO); } public ModelPart bake(int texWidth, int texHeight) { @@ -70,8 +70,8 @@ public class PartDefinition { return this.children.entrySet(); } - public PartDefinition transformed(UnaryOperator unaryOperator) { - PartDefinition partDefinition = new PartDefinition(this.cubes, (PartPose)unaryOperator.apply(this.partPose)); + public PartDefinition transformed(UnaryOperator transformer) { + PartDefinition partDefinition = new PartDefinition(this.cubes, (PartPose)transformer.apply(this.partPose)); partDefinition.children.putAll(this.children); return partDefinition; } diff --git a/net/minecraft/client/multiplayer/ClientChunkCache.java b/net/minecraft/client/multiplayer/ClientChunkCache.java index ec9d220b..b1b9d06a 100644 --- a/net/minecraft/client/multiplayer/ClientChunkCache.java +++ b/net/minecraft/client/multiplayer/ClientChunkCache.java @@ -176,8 +176,8 @@ public class ClientChunkCache extends ChunkSource { } @Override - public void onSectionEmptinessChanged(int i, int j, int k, boolean bl) { - this.storage.onSectionEmptinessChanged(i, j, k, bl); + public void onSectionEmptinessChanged(int x, int y, int z, boolean isEmpty) { + this.storage.onSectionEmptinessChanged(x, y, z, isEmpty); } @Environment(EnvType.CLIENT) @@ -214,19 +214,19 @@ public class ClientChunkCache extends ChunkSource { } } - void drop(int i, LevelChunk levelChunk) { - if (this.chunks.compareAndSet(i, levelChunk, null)) { + void drop(int chunkIndex, LevelChunk chunk) { + if (this.chunks.compareAndSet(chunkIndex, chunk, null)) { this.chunkCount--; - this.dropEmptySections(levelChunk); + this.dropEmptySections(chunk); } - ClientChunkCache.this.level.unload(levelChunk); + ClientChunkCache.this.level.unload(chunk); } - public void onSectionEmptinessChanged(int i, int j, int k, boolean bl) { - if (this.inRange(i, k)) { - long l = SectionPos.asLong(i, j, k); - if (bl) { + public void onSectionEmptinessChanged(int x, int y, int z, boolean isEmpty) { + if (this.inRange(x, z)) { + long l = SectionPos.asLong(x, y, z); + if (isEmpty) { this.loadedEmptySections.add(l); } else if (this.loadedEmptySections.remove(l)) { ClientChunkCache.this.level.onSectionBecomingNonEmpty(l); @@ -234,23 +234,23 @@ public class ClientChunkCache extends ChunkSource { } } - private void dropEmptySections(LevelChunk levelChunk) { - LevelChunkSection[] levelChunkSections = levelChunk.getSections(); + private void dropEmptySections(LevelChunk chunk) { + LevelChunkSection[] levelChunkSections = chunk.getSections(); for (int i = 0; i < levelChunkSections.length; i++) { - ChunkPos chunkPos = levelChunk.getPos(); - this.loadedEmptySections.remove(SectionPos.asLong(chunkPos.x, levelChunk.getSectionYFromSectionIndex(i), chunkPos.z)); + ChunkPos chunkPos = chunk.getPos(); + this.loadedEmptySections.remove(SectionPos.asLong(chunkPos.x, chunk.getSectionYFromSectionIndex(i), chunkPos.z)); } } - private void addEmptySections(LevelChunk levelChunk) { - LevelChunkSection[] levelChunkSections = levelChunk.getSections(); + private void addEmptySections(LevelChunk chunk) { + LevelChunkSection[] levelChunkSections = chunk.getSections(); for (int i = 0; i < levelChunkSections.length; i++) { LevelChunkSection levelChunkSection = levelChunkSections[i]; if (levelChunkSection.hasOnlyAir()) { - ChunkPos chunkPos = levelChunk.getPos(); - this.loadedEmptySections.add(SectionPos.asLong(chunkPos.x, levelChunk.getSectionYFromSectionIndex(i), chunkPos.z)); + ChunkPos chunkPos = chunk.getPos(); + this.loadedEmptySections.add(SectionPos.asLong(chunkPos.x, chunk.getSectionYFromSectionIndex(i), chunkPos.z)); } } } diff --git a/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java b/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java index af6506d0..d93dbbb7 100644 --- a/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java +++ b/net/minecraft/client/multiplayer/ClientHandshakePacketListenerImpl.java @@ -175,9 +175,9 @@ public class ClientHandshakePacketListenerImpl implements ClientLoginPacketListe } @Override - public void handleLoginFinished(ClientboundLoginFinishedPacket clientboundLoginFinishedPacket) { + public void handleLoginFinished(ClientboundLoginFinishedPacket packet) { this.switchState(ClientHandshakePacketListenerImpl.State.JOINING); - GameProfile gameProfile = clientboundLoginFinishedPacket.gameProfile(); + GameProfile gameProfile = packet.gameProfile(); this.connection .setupInboundProtocol( ConfigurationProtocols.CLIENTBOUND, diff --git a/net/minecraft/client/multiplayer/ClientLevel.java b/net/minecraft/client/multiplayer/ClientLevel.java index da937330..a2e289e0 100644 --- a/net/minecraft/client/multiplayer/ClientLevel.java +++ b/net/minecraft/client/multiplayer/ClientLevel.java @@ -22,7 +22,7 @@ import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.color.block.BlockTintCache; import net.minecraft.client.multiplayer.prediction.BlockStatePredictionHandler; -import net.minecraft.client.particle.FireworkParticles; +import net.minecraft.client.particle.FireworkParticles.Starter; import net.minecraft.client.player.AbstractClientPlayer; import net.minecraft.client.renderer.BiomeColors; import net.minecraft.client.renderer.DimensionSpecialEffects; @@ -179,28 +179,28 @@ public class ClientLevel extends Level { } public ClientLevel( - ClientPacketListener clientPacketListener, - ClientLevel.ClientLevelData clientLevelData, - ResourceKey resourceKey, - Holder holder, - int i, - int j, + ClientPacketListener connection, + ClientLevel.ClientLevelData levelData, + ResourceKey dimension, + Holder dimensionTypeRegistration, + int viewDistance, + int serverSimulationDistance, LevelRenderer levelRenderer, - boolean bl, - long l, - int k + boolean isDebug, + long biomeZoomSeed, + int seaLevel ) { - super(clientLevelData, resourceKey, clientPacketListener.registryAccess(), holder, true, bl, l, 1000000); - this.connection = clientPacketListener; - this.chunkSource = new ClientChunkCache(this, i); + super(levelData, dimension, connection.registryAccess(), dimensionTypeRegistration, true, isDebug, biomeZoomSeed, 1000000); + this.connection = connection; + this.chunkSource = new ClientChunkCache(this, viewDistance); this.tickRateManager = new TickRateManager(); - this.clientLevelData = clientLevelData; + this.clientLevelData = levelData; this.levelRenderer = levelRenderer; - this.seaLevel = k; + this.seaLevel = seaLevel; this.levelEventHandler = new LevelEventHandler(this.minecraft, this, levelRenderer); - this.effects = DimensionSpecialEffects.forType(holder.value()); + this.effects = DimensionSpecialEffects.forType(dimensionTypeRegistration.value()); this.setDefaultSpawnPos(new BlockPos(8, 64, 8), 0.0F); - this.serverSimulationDistance = j; + this.serverSimulationDistance = serverSimulationDistance; this.updateSkyBrightness(); this.prepareWeather(); } @@ -253,10 +253,10 @@ public class ClientLevel extends Level { } } - public void setTimeFromServer(long l, long m, boolean bl) { - this.clientLevelData.setGameTime(l); - this.clientLevelData.setDayTime(m); - this.tickDayTime = bl; + public void setTimeFromServer(long gameTime, long dayTime, boolean tickDayTime) { + this.clientLevelData.setGameTime(gameTime); + this.clientLevelData.setDayTime(dayTime); + this.tickDayTime = tickDayTime; } public Iterable entitiesForRendering() { @@ -322,8 +322,8 @@ public class ClientLevel extends Level { this.levelRenderer.onChunkLoaded(chunkPos); } - public void onSectionBecomingNonEmpty(long l) { - this.levelRenderer.onSectionBecomingNonEmpty(l); + public void onSectionBecomingNonEmpty(long sectionPos) { + this.levelRenderer.onSectionBecomingNonEmpty(sectionPos); } public void clearTintCaches() { @@ -528,7 +528,7 @@ public class ClientLevel extends Level { this.addParticle(ParticleTypes.POOF, x, y, z, this.random.nextGaussian() * 0.05, 0.005, this.random.nextGaussian() * 0.05); } } else { - this.minecraft.particleEngine.add(new FireworkParticles.Starter(this, x, y, z, xSpeed, ySpeed, zSpeed, this.minecraft.particleEngine, explosions)); + this.minecraft.particleEngine.add(new Starter(this, x, y, z, xSpeed, ySpeed, zSpeed, this.minecraft.particleEngine, explosions)); } } @@ -602,8 +602,8 @@ public class ClientLevel extends Level { this.levelRenderer.setSectionDirtyWithNeighbors(sectionX, sectionY, sectionZ); } - public void setSectionRangeDirty(int i, int j, int k, int l, int m, int n) { - this.levelRenderer.setSectionRangeDirty(i, j, k, l, m, n); + public void setSectionRangeDirty(int minY, int minX, int minZ, int maxY, int maxX, int maxZ) { + this.levelRenderer.setSectionRangeDirty(minY, minX, minZ, maxY, maxX, maxZ); } @Override @@ -673,58 +673,58 @@ public class ClientLevel extends Level { return g * 0.8F + 0.2F; } - public int getSkyColor(Vec3 vec3, float f) { - float g = this.getTimeOfDay(f); - Vec3 vec32 = vec3.subtract(2.0, 2.0, 2.0).scale(0.25); - Vec3 vec33 = CubicSampler.gaussianSampleVec3( - vec32, (ix, jx, kx) -> Vec3.fromRGB24(this.getBiomeManager().getNoiseBiomeAtQuart(ix, jx, kx).value().getSkyColor()) + public int getSkyColor(Vec3 cameraPosition, float partialTick) { + float f = this.getTimeOfDay(partialTick); + Vec3 vec3 = cameraPosition.subtract(2.0, 2.0, 2.0).scale(0.25); + Vec3 vec32 = CubicSampler.gaussianSampleVec3( + vec3, (ix, jx, k) -> Vec3.fromRGB24(this.getBiomeManager().getNoiseBiomeAtQuart(ix, jx, k).value().getSkyColor()) ); - float h = Mth.cos(g * (float) (Math.PI * 2)) * 2.0F + 0.5F; - h = Mth.clamp(h, 0.0F, 1.0F); - vec33 = vec33.scale(h); - int i = ARGB.color(vec33); - float j = this.getRainLevel(f); + float g = Mth.cos(f * (float) (Math.PI * 2)) * 2.0F + 0.5F; + g = Mth.clamp(g, 0.0F, 1.0F); + vec32 = vec32.scale(g); + int i = ARGB.color(vec32); + float h = this.getRainLevel(partialTick); + if (h > 0.0F) { + float j = 0.6F; + float k = h * 0.75F; + int l = ARGB.scaleRGB(ARGB.greyscale(i), 0.6F); + i = ARGB.lerp(k, i, l); + } + + float j = this.getThunderLevel(partialTick); if (j > 0.0F) { - float k = 0.6F; - float l = j * 0.75F; - int m = ARGB.scaleRGB(ARGB.greyscale(i), 0.6F); - i = ARGB.lerp(l, i, m); + float k = 0.2F; + float m = j * 0.75F; + int n = ARGB.scaleRGB(ARGB.greyscale(i), 0.2F); + i = ARGB.lerp(m, i, n); } - float k = this.getThunderLevel(f); - if (k > 0.0F) { - float l = 0.2F; - float n = k * 0.75F; - int o = ARGB.scaleRGB(ARGB.greyscale(i), 0.2F); - i = ARGB.lerp(n, i, o); - } - - int p = this.getSkyFlashTime(); - if (p > 0) { - float n = Math.min(p - f, 1.0F); - n *= 0.45F; - i = ARGB.lerp(n, i, ARGB.color(204, 204, 255)); + int o = this.getSkyFlashTime(); + if (o > 0) { + float m = Math.min(o - partialTick, 1.0F); + m *= 0.45F; + i = ARGB.lerp(m, i, ARGB.color(204, 204, 255)); } return i; } - public int getCloudColor(float f) { + public int getCloudColor(float partialTick) { int i = -1; - float g = this.getRainLevel(f); - if (g > 0.0F) { + float f = this.getRainLevel(partialTick); + if (f > 0.0F) { int j = ARGB.scaleRGB(ARGB.greyscale(i), 0.6F); - i = ARGB.lerp(g * 0.95F, i, j); + i = ARGB.lerp(f * 0.95F, i, j); } - float h = this.getTimeOfDay(f); - float k = Mth.cos(h * (float) (Math.PI * 2)) * 2.0F + 0.5F; - k = Mth.clamp(k, 0.0F, 1.0F); - i = ARGB.multiply(i, ARGB.colorFromFloat(1.0F, k * 0.9F + 0.1F, k * 0.9F + 0.1F, k * 0.85F + 0.15F)); - float l = this.getThunderLevel(f); - if (l > 0.0F) { - int m = ARGB.scaleRGB(ARGB.greyscale(i), 0.2F); - i = ARGB.lerp(l * 0.95F, i, m); + float g = this.getTimeOfDay(partialTick); + float h = Mth.cos(g * (float) (Math.PI * 2)) * 2.0F + 0.5F; + h = Mth.clamp(h, 0.0F, 1.0F); + i = ARGB.multiply(i, ARGB.colorFromFloat(1.0F, h * 0.9F + 0.1F, h * 0.9F + 0.1F, h * 0.85F + 0.15F)); + float k = this.getThunderLevel(partialTick); + if (k > 0.0F) { + int l = ARGB.scaleRGB(ARGB.greyscale(i), 0.2F); + i = ARGB.lerp(k * 0.95F, i, l); } return i; @@ -866,18 +866,18 @@ public class ClientLevel extends Level { @Override public void explode( - @Nullable Entity entity, + @Nullable Entity source, @Nullable DamageSource damageSource, - @Nullable ExplosionDamageCalculator explosionDamageCalculator, - double d, - double e, - double f, - float g, - boolean bl, + @Nullable ExplosionDamageCalculator damageCalculator, + double x, + double y, + double z, + float radius, + boolean fire, Level.ExplosionInteraction explosionInteraction, - ParticleOptions particleOptions, - ParticleOptions particleOptions2, - Holder holder + ParticleOptions smallExplosionParticles, + ParticleOptions largeExplosionParticles, + Holder explosionSound ) { } diff --git a/net/minecraft/client/multiplayer/ClientPacketListener.java b/net/minecraft/client/multiplayer/ClientPacketListener.java index f8f84bfd..604f529c 100644 --- a/net/minecraft/client/multiplayer/ClientPacketListener.java +++ b/net/minecraft/client/multiplayer/ClientPacketListener.java @@ -30,7 +30,7 @@ import net.minecraft.client.ClientRecipeBook; import net.minecraft.client.DebugQueryHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.Options; -import net.minecraft.client.gui.components.ChatComponent; +import net.minecraft.client.gui.components.ChatComponent.State; import net.minecraft.client.gui.components.toasts.RecipeToast; import net.minecraft.client.gui.components.toasts.SystemToast; import net.minecraft.client.gui.screens.DeathScreen; @@ -38,11 +38,14 @@ import net.minecraft.client.gui.screens.DemoIntroScreen; import net.minecraft.client.gui.screens.MenuScreens; import net.minecraft.client.gui.screens.ReceivingLevelScreen; import net.minecraft.client.gui.screens.WinScreen; +import net.minecraft.client.gui.screens.DeathScreen.TitleConfirmScreen; +import net.minecraft.client.gui.screens.ReceivingLevelScreen.Reason; import net.minecraft.client.gui.screens.achievement.StatsScreen; import net.minecraft.client.gui.screens.inventory.BookViewScreen; import net.minecraft.client.gui.screens.inventory.CommandBlockEditScreen; import net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen; import net.minecraft.client.gui.screens.inventory.HorseInventoryScreen; +import net.minecraft.client.gui.screens.inventory.BookViewScreen.BookAccess; import net.minecraft.client.gui.screens.multiplayer.ServerReconfigScreen; import net.minecraft.client.gui.screens.recipebook.RecipeUpdateListener; import net.minecraft.client.particle.ItemPickupParticle; @@ -289,7 +292,7 @@ import net.minecraft.world.entity.monster.Guardian; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.ProfileKeyPair; -import net.minecraft.world.entity.player.ProfilePublicKey; +import net.minecraft.world.entity.player.ProfilePublicKey.ValidationException; import net.minecraft.world.entity.projectile.AbstractHurtingProjectile; import net.minecraft.world.entity.vehicle.AbstractBoat; import net.minecraft.world.entity.vehicle.AbstractMinecart; @@ -456,7 +459,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme commonPlayerSpawnInfo.seed(), i ); - this.minecraft.setLevel(this.level, ReceivingLevelScreen.Reason.OTHER); + this.minecraft.setLevel(this.level, Reason.OTHER); if (this.minecraft.player == null) { this.minecraft.player = this.minecraft.gameMode.createPlayer(this.level, new StatsCounter(), new ClientRecipeBook()); this.minecraft.player.setYRot(-180.0F); @@ -472,7 +475,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme this.minecraft.player.input = new KeyboardInput(this.minecraft.options); this.minecraft.gameMode.adjustPlayer(this.minecraft.player); this.minecraft.cameraEntity = this.minecraft.player; - this.startWaitingForNewLevel(this.minecraft.player, this.level, ReceivingLevelScreen.Reason.OTHER); + this.startWaitingForNewLevel(this.minecraft.player, this.level, Reason.OTHER); this.minecraft.player.setReducedDebugInfo(packet.reducedDebugInfo()); this.minecraft.player.setShowDeathScreen(packet.showDeathScreen()); this.minecraft.player.setDoLimitedCrafting(packet.doLimitedCrafting()); @@ -581,15 +584,15 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleEntityPositionSync(ClientboundEntityPositionSyncPacket clientboundEntityPositionSyncPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundEntityPositionSyncPacket, this, this.minecraft); - Entity entity = this.level.getEntity(clientboundEntityPositionSyncPacket.id()); + public void handleEntityPositionSync(ClientboundEntityPositionSyncPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); + Entity entity = this.level.getEntity(packet.id()); if (entity != null) { - Vec3 vec3 = clientboundEntityPositionSyncPacket.values().position(); + Vec3 vec3 = packet.values().position(); entity.getPositionCodec().setBase(vec3); if (!entity.isControlledByLocalInstance()) { - float f = clientboundEntityPositionSyncPacket.values().yRot(); - float g = clientboundEntityPositionSyncPacket.values().xRot(); + float f = packet.values().yRot(); + float g = packet.values().xRot(); boolean bl = entity.position().distanceToSqr(vec3) > 4096.0; if (this.level.isTickingEntity(entity) && !bl) { entity.lerpTo(vec3.x, vec3.y, vec3.z, f, g, 3); @@ -601,7 +604,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } } - entity.setOnGround(clientboundEntityPositionSyncPacket.onGround()); + entity.setOnGround(packet.onGround()); } } } @@ -662,10 +665,10 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleSetHeldSlot(ClientboundSetHeldSlotPacket clientboundSetHeldSlotPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundSetHeldSlotPacket, this, this.minecraft); - if (Inventory.isHotbarSlot(clientboundSetHeldSlotPacket.getSlot())) { - this.minecraft.player.getInventory().selected = clientboundSetHeldSlotPacket.getSlot(); + public void handleSetHeldSlot(ClientboundSetHeldSlotPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); + if (Inventory.isHotbarSlot(packet.getSlot())) { + this.minecraft.player.getInventory().selected = packet.getSlot(); } } @@ -696,12 +699,12 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleMinecartAlongTrack(ClientboundMoveMinecartPacket clientboundMoveMinecartPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundMoveMinecartPacket, this, this.minecraft); - Entity entity = clientboundMoveMinecartPacket.getEntity(this.level); + public void handleMinecartAlongTrack(ClientboundMoveMinecartPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); + Entity entity = packet.getEntity(this.level); if (entity instanceof AbstractMinecart abstractMinecart) { if (!entity.isControlledByLocalInstance() && abstractMinecart.getBehavior() instanceof NewMinecartBehavior newMinecartBehavior) { - newMinecartBehavior.lerpSteps.addAll(clientboundMoveMinecartPacket.lerpSteps()); + newMinecartBehavior.lerpSteps.addAll(packet.lerpSteps()); } } } @@ -743,11 +746,11 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme this.connection.send(new ServerboundAcceptTeleportationPacket(packet.id())); } - private static boolean setValuesFromPositionPacket(PositionMoveRotation positionMoveRotation, Set set, Entity entity, boolean bl) { + private static boolean setValuesFromPositionPacket(PositionMoveRotation positionMoveRotation, Set relatives, Entity entity, boolean lerp) { PositionMoveRotation positionMoveRotation2 = PositionMoveRotation.ofEntityUsingLerpTarget(entity); - PositionMoveRotation positionMoveRotation3 = PositionMoveRotation.calculateAbsolute(positionMoveRotation2, positionMoveRotation, set); - boolean bl2 = positionMoveRotation2.position().distanceToSqr(positionMoveRotation3.position()) > 4096.0; - if (bl && !bl2) { + PositionMoveRotation positionMoveRotation3 = PositionMoveRotation.calculateAbsolute(positionMoveRotation2, positionMoveRotation, relatives); + boolean bl = positionMoveRotation2.position().distanceToSqr(positionMoveRotation3.position()) > 4096.0; + if (lerp && !bl) { entity.lerpTo( positionMoveRotation3.position().x(), positionMoveRotation3.position().y(), @@ -764,18 +767,18 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme entity.setYRot(positionMoveRotation3.yRot()); entity.setXRot(positionMoveRotation3.xRot()); PositionMoveRotation positionMoveRotation4 = new PositionMoveRotation(entity.oldPosition(), Vec3.ZERO, entity.yRotO, entity.xRotO); - PositionMoveRotation positionMoveRotation5 = PositionMoveRotation.calculateAbsolute(positionMoveRotation4, positionMoveRotation, set); + PositionMoveRotation positionMoveRotation5 = PositionMoveRotation.calculateAbsolute(positionMoveRotation4, positionMoveRotation, relatives); entity.setOldPosAndRot(positionMoveRotation5.position(), positionMoveRotation5.yRot(), positionMoveRotation5.xRot()); return false; } } @Override - public void handleRotatePlayer(ClientboundPlayerRotationPacket clientboundPlayerRotationPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundPlayerRotationPacket, this, this.minecraft); + public void handleRotatePlayer(ClientboundPlayerRotationPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); Player player = this.minecraft.player; - player.setYRot(clientboundPlayerRotationPacket.yRot()); - player.setXRot(clientboundPlayerRotationPacket.xRot()); + player.setYRot(packet.yRot()); + player.setXRot(packet.xRot()); player.setOldRot(); this.connection.send(new ServerboundMovePlayerPacket.Rot(player.getYRot(), player.getXRot(), false, false)); } @@ -879,7 +882,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); this.minecraft.getChatListener().clearQueue(); this.sendChatAcknowledgement(); - ChatComponent.State state = this.minecraft.gui.getChat().storeState(); + State state = this.minecraft.gui.getChat().storeState(); this.minecraft.clearClientLevel(new ServerReconfigScreen(RECONFIGURE_SCREEN_MESSAGE, this.connection)); this.connection .setupInboundProtocol( @@ -1175,7 +1178,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme LocalPlayer localPlayer = this.minecraft.player; ResourceKey resourceKey2 = localPlayer.level().dimension(); boolean bl = resourceKey != resourceKey2; - ReceivingLevelScreen.Reason reason = this.determineLevelLoadingReason(localPlayer.isDeadOrDying(), resourceKey, resourceKey2); + Reason reason = this.determineLevelLoadingReason(localPlayer.isDeadOrDying(), resourceKey, resourceKey2); if (bl) { Map map = this.level.getAllMapData(); boolean bl2 = commonPlayerSpawnInfo.isDebug(); @@ -1250,20 +1253,20 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme localPlayer2.setPortalCooldown(commonPlayerSpawnInfo.portalCooldown()); localPlayer2.spinningEffectIntensity = localPlayer.spinningEffectIntensity; localPlayer2.oSpinningEffectIntensity = localPlayer.oSpinningEffectIntensity; - if (this.minecraft.screen instanceof DeathScreen || this.minecraft.screen instanceof DeathScreen.TitleConfirmScreen) { + if (this.minecraft.screen instanceof DeathScreen || this.minecraft.screen instanceof TitleConfirmScreen) { this.minecraft.setScreen(null); } this.minecraft.gameMode.setLocalMode(commonPlayerSpawnInfo.gameType(), commonPlayerSpawnInfo.previousGameType()); } - private ReceivingLevelScreen.Reason determineLevelLoadingReason(boolean dying, ResourceKey spawnDimension, ResourceKey currentDimension) { - ReceivingLevelScreen.Reason reason = ReceivingLevelScreen.Reason.OTHER; + private Reason determineLevelLoadingReason(boolean dying, ResourceKey spawnDimension, ResourceKey currentDimension) { + Reason reason = Reason.OTHER; if (!dying) { if (spawnDimension == Level.NETHER || currentDimension == Level.NETHER) { - reason = ReceivingLevelScreen.Reason.NETHER_PORTAL; + reason = Reason.NETHER_PORTAL; } else if (spawnDimension == Level.END || currentDimension == Level.END) { - reason = ReceivingLevelScreen.Reason.END_PORTAL; + reason = Reason.END_PORTAL; } } @@ -1343,19 +1346,19 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleSetCursorItem(ClientboundSetCursorItemPacket clientboundSetCursorItemPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundSetCursorItemPacket, this, this.minecraft); - this.minecraft.getTutorial().onGetItem(clientboundSetCursorItemPacket.contents()); + public void handleSetCursorItem(ClientboundSetCursorItemPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); + this.minecraft.getTutorial().onGetItem(packet.contents()); if (!(this.minecraft.screen instanceof CreativeModeInventoryScreen)) { - this.minecraft.player.containerMenu.setCarried(clientboundSetCursorItemPacket.contents()); + this.minecraft.player.containerMenu.setCarried(packet.contents()); } } @Override - public void handleSetPlayerInventory(ClientboundSetPlayerInventoryPacket clientboundSetPlayerInventoryPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundSetPlayerInventoryPacket, this, this.minecraft); - this.minecraft.getTutorial().onGetItem(clientboundSetPlayerInventoryPacket.contents()); - this.minecraft.player.getInventory().setItem(clientboundSetPlayerInventoryPacket.slot(), clientboundSetPlayerInventoryPacket.contents()); + public void handleSetPlayerInventory(ClientboundSetPlayerInventoryPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); + this.minecraft.getTutorial().onGetItem(packet.contents()); + this.minecraft.player.getInventory().setItem(packet.slot(), packet.contents()); } @Override @@ -1499,7 +1502,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } } - private void startWaitingForNewLevel(LocalPlayer player, ClientLevel level, ReceivingLevelScreen.Reason reason) { + private void startWaitingForNewLevel(LocalPlayer player, ClientLevel level, Reason reason) { this.levelLoadStatusManager = new LevelLoadStatusManager(player, level, this.minecraft.levelRenderer); this.minecraft.setScreen(new ReceivingLevelScreen(this.levelLoadStatusManager::levelReady, reason)); } @@ -1603,14 +1606,14 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleRecipeBookAdd(ClientboundRecipeBookAddPacket clientboundRecipeBookAddPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundRecipeBookAddPacket, this, this.minecraft); + public void handleRecipeBookAdd(ClientboundRecipeBookAddPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); ClientRecipeBook clientRecipeBook = this.minecraft.player.getRecipeBook(); - if (clientboundRecipeBookAddPacket.replace()) { + if (packet.replace()) { clientRecipeBook.clear(); } - for (ClientboundRecipeBookAddPacket.Entry entry : clientboundRecipeBookAddPacket.entries()) { + for (ClientboundRecipeBookAddPacket.Entry entry : packet.entries()) { clientRecipeBook.add(entry.contents()); if (entry.highlight()) { clientRecipeBook.addHighlight(entry.contents().id()); @@ -1625,11 +1628,11 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleRecipeBookRemove(ClientboundRecipeBookRemovePacket clientboundRecipeBookRemovePacket) { - PacketUtils.ensureRunningOnSameThread(clientboundRecipeBookRemovePacket, this, this.minecraft); + public void handleRecipeBookRemove(ClientboundRecipeBookRemovePacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); ClientRecipeBook clientRecipeBook = this.minecraft.player.getRecipeBook(); - for (RecipeDisplayId recipeDisplayId : clientboundRecipeBookRemovePacket.recipes()) { + for (RecipeDisplayId recipeDisplayId : packet.recipes()) { clientRecipeBook.remove(recipeDisplayId); } @@ -1637,16 +1640,16 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } @Override - public void handleRecipeBookSettings(ClientboundRecipeBookSettingsPacket clientboundRecipeBookSettingsPacket) { - PacketUtils.ensureRunningOnSameThread(clientboundRecipeBookSettingsPacket, this, this.minecraft); + public void handleRecipeBookSettings(ClientboundRecipeBookSettingsPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); ClientRecipeBook clientRecipeBook = this.minecraft.player.getRecipeBook(); - clientRecipeBook.setBookSettings(clientboundRecipeBookSettingsPacket.bookSettings()); + clientRecipeBook.setBookSettings(packet.bookSettings()); this.refreshRecipeBook(clientRecipeBook); } - private void refreshRecipeBook(ClientRecipeBook clientRecipeBook) { - clientRecipeBook.rebuildCollections(); - this.searchTrees.updateRecipes(clientRecipeBook, this.level); + private void refreshRecipeBook(ClientRecipeBook recipeBook) { + recipeBook.rebuildCollections(); + this.searchTrees.updateRecipes(recipeBook, this.level); if (this.minecraft.screen instanceof RecipeUpdateListener recipeUpdateListener) { recipeUpdateListener.recipesUpdated(); } @@ -1669,9 +1672,9 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } } - private Registry.PendingTags updateTags(ResourceKey> resourceKey, TagNetworkSerialization.NetworkPayload networkPayload) { - Registry registry = this.registryAccess.lookupOrThrow(resourceKey); - return registry.prepareTagReload(networkPayload.resolve(registry)); + private Registry.PendingTags updateTags(ResourceKey> registryKey, TagNetworkSerialization.NetworkPayload payload) { + Registry registry = this.registryAccess.lookupOrThrow(registryKey); + return registry.prepareTagReload(payload.resolve(registry)); } @Override @@ -1855,26 +1858,30 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme public void handlePlayerInfoUpdate(ClientboundPlayerInfoUpdatePacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); - for (ClientboundPlayerInfoUpdatePacket.Entry entry : packet.newEntries()) { + for (net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.Entry entry : packet.newEntries()) { PlayerInfo playerInfo = new PlayerInfo((GameProfile)Objects.requireNonNull(entry.profile()), this.enforcesSecureChat()); if (this.playerInfoMap.putIfAbsent(entry.profileId(), playerInfo) == null) { this.minecraft.getPlayerSocialManager().addPlayer(playerInfo); } } - for (ClientboundPlayerInfoUpdatePacket.Entry entryx : packet.entries()) { + for (net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.Entry entryx : packet.entries()) { PlayerInfo playerInfo = (PlayerInfo)this.playerInfoMap.get(entryx.profileId()); if (playerInfo == null) { LOGGER.warn("Ignoring player info update for unknown player {} ({})", entryx.profileId(), packet.actions()); } else { - for (ClientboundPlayerInfoUpdatePacket.Action action : packet.actions()) { + for (net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.Action action : packet.actions()) { this.applyPlayerInfoUpdate(action, entryx, playerInfo); } } } } - private void applyPlayerInfoUpdate(ClientboundPlayerInfoUpdatePacket.Action action, ClientboundPlayerInfoUpdatePacket.Entry entry, PlayerInfo playerInfo) { + private void applyPlayerInfoUpdate( + net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.Action action, + net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.Entry entry, + PlayerInfo playerInfo + ) { switch (action) { case INITIALIZE_CHAT: this.initializeChatSession(entry, playerInfo); @@ -1904,7 +1911,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } } - private void initializeChatSession(ClientboundPlayerInfoUpdatePacket.Entry entry, PlayerInfo playerInfo) { + private void initializeChatSession(net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.Entry entry, PlayerInfo playerInfo) { GameProfile gameProfile = playerInfo.getProfile(); SignatureValidator signatureValidator = this.minecraft.getProfileKeySignatureValidator(); if (signatureValidator == null) { @@ -1916,7 +1923,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme try { RemoteChatSession remoteChatSession = data.validate(gameProfile, signatureValidator); playerInfo.setChatSession(remoteChatSession); - } catch (ProfilePublicKey.ValidationException var7) { + } catch (ValidationException var7) { LOGGER.error("Failed to validate profile key for player: '{}'", gameProfile.getName(), var7); playerInfo.clearChatSession(this.enforcesSecureChat()); } @@ -2007,7 +2014,7 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme public void handleOpenBook(ClientboundOpenBookPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.minecraft); ItemStack itemStack = this.minecraft.player.getItemInHand(packet.getHand()); - BookViewScreen.BookAccess bookAccess = BookViewScreen.BookAccess.fromItem(itemStack); + BookAccess bookAccess = BookAccess.fromItem(itemStack); if (bookAccess != null) { this.minecraft.setScreen(new BookViewScreen(bookAccess)); } @@ -2282,17 +2289,17 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme this.level.queueLightUpdate(() -> this.applyLightData(i, j, clientboundLightUpdatePacketData, true)); } - private void applyLightData(int i, int j, ClientboundLightUpdatePacketData clientboundLightUpdatePacketData, boolean bl) { + private void applyLightData(int x, int z, ClientboundLightUpdatePacketData data, boolean update) { LevelLightEngine levelLightEngine = this.level.getChunkSource().getLightEngine(); - BitSet bitSet = clientboundLightUpdatePacketData.getSkyYMask(); - BitSet bitSet2 = clientboundLightUpdatePacketData.getEmptySkyYMask(); - Iterator iterator = clientboundLightUpdatePacketData.getSkyUpdates().iterator(); - this.readSectionList(i, j, levelLightEngine, LightLayer.SKY, bitSet, bitSet2, iterator, bl); - BitSet bitSet3 = clientboundLightUpdatePacketData.getBlockYMask(); - BitSet bitSet4 = clientboundLightUpdatePacketData.getEmptyBlockYMask(); - Iterator iterator2 = clientboundLightUpdatePacketData.getBlockUpdates().iterator(); - this.readSectionList(i, j, levelLightEngine, LightLayer.BLOCK, bitSet3, bitSet4, iterator2, bl); - levelLightEngine.setLightEnabled(new ChunkPos(i, j), true); + BitSet bitSet = data.getSkyYMask(); + BitSet bitSet2 = data.getEmptySkyYMask(); + Iterator iterator = data.getSkyUpdates().iterator(); + this.readSectionList(x, z, levelLightEngine, LightLayer.SKY, bitSet, bitSet2, iterator, update); + BitSet bitSet3 = data.getBlockYMask(); + BitSet bitSet4 = data.getEmptyBlockYMask(); + Iterator iterator2 = data.getBlockUpdates().iterator(); + this.readSectionList(x, z, levelLightEngine, LightLayer.BLOCK, bitSet3, bitSet4, iterator2, update); + levelLightEngine.setLightEnabled(new ChunkPos(x, z), true); } @Override @@ -2374,16 +2381,16 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme } private void readSectionList( - int i, int j, LevelLightEngine levelLightEngine, LightLayer lightLayer, BitSet bitSet, BitSet bitSet2, Iterator iterator, boolean bl + int x, int z, LevelLightEngine lightEngine, LightLayer lightLayer, BitSet skyYMask, BitSet emptySkyYMask, Iterator skyUpdates, boolean update ) { - for (int k = 0; k < levelLightEngine.getLightSectionCount(); k++) { - int l = levelLightEngine.getMinLightSection() + k; - boolean bl2 = bitSet.get(k); - boolean bl3 = bitSet2.get(k); - if (bl2 || bl3) { - levelLightEngine.queueSectionData(lightLayer, SectionPos.of(i, l, j), bl2 ? new DataLayer((byte[])((byte[])iterator.next()).clone()) : new DataLayer()); - if (bl) { - this.level.setSectionDirtyWithNeighbors(i, l, j); + for (int i = 0; i < lightEngine.getLightSectionCount(); i++) { + int j = lightEngine.getMinLightSection() + i; + boolean bl = skyYMask.get(i); + boolean bl2 = emptySkyYMask.get(i); + if (bl || bl2) { + lightEngine.queueSectionData(lightLayer, SectionPos.of(x, j, z), bl ? new DataLayer((byte[])((byte[])skyUpdates.next()).clone()) : new DataLayer()); + if (update) { + this.level.setSectionDirtyWithNeighbors(x, j, z); } } } @@ -2515,10 +2522,10 @@ public class ClientPacketListener extends ClientCommonPacketListenerImpl impleme return this.commands.parse(command, this.suggestionsProvider); } - public void broadcastClientInformation(ClientInformation clientInformation) { - if (!clientInformation.equals(this.remoteClientInformation)) { - this.send(new ServerboundClientInformationPacket(clientInformation)); - this.remoteClientInformation = clientInformation; + public void broadcastClientInformation(ClientInformation information) { + if (!information.equals(this.remoteClientInformation)) { + this.send(new ServerboundClientInformationPacket(information)); + this.remoteClientInformation = information; } } diff --git a/net/minecraft/client/multiplayer/ClientRecipeContainer.java b/net/minecraft/client/multiplayer/ClientRecipeContainer.java index 122529a9..d8c3a526 100644 --- a/net/minecraft/client/multiplayer/ClientRecipeContainer.java +++ b/net/minecraft/client/multiplayer/ClientRecipeContainer.java @@ -14,14 +14,16 @@ public class ClientRecipeContainer implements RecipeAccess { private final Map, RecipePropertySet> itemSets; private final SelectableRecipe.SingleInputSet stonecutterRecipes; - public ClientRecipeContainer(Map, RecipePropertySet> map, SelectableRecipe.SingleInputSet singleInputSet) { - this.itemSets = map; - this.stonecutterRecipes = singleInputSet; + public ClientRecipeContainer( + Map, RecipePropertySet> itemSets, SelectableRecipe.SingleInputSet stonecutterRecipes + ) { + this.itemSets = itemSets; + this.stonecutterRecipes = stonecutterRecipes; } @Override - public RecipePropertySet propertySet(ResourceKey resourceKey) { - return (RecipePropertySet)this.itemSets.getOrDefault(resourceKey, RecipePropertySet.EMPTY); + public RecipePropertySet propertySet(ResourceKey propertySet) { + return (RecipePropertySet)this.itemSets.getOrDefault(propertySet, RecipePropertySet.EMPTY); } @Override diff --git a/net/minecraft/client/multiplayer/MultiPlayerGameMode.java b/net/minecraft/client/multiplayer/MultiPlayerGameMode.java index ee8e5296..3acf0610 100644 --- a/net/minecraft/client/multiplayer/MultiPlayerGameMode.java +++ b/net/minecraft/client/multiplayer/MultiPlayerGameMode.java @@ -459,8 +459,8 @@ public class MultiPlayerGameMode { } } - public void handlePlaceRecipe(int i, RecipeDisplayId recipeDisplayId, boolean bl) { - this.connection.send(new ServerboundPlaceRecipePacket(i, recipeDisplayId, bl)); + public void handlePlaceRecipe(int containerId, RecipeDisplayId recipe, boolean useMaxItems) { + this.connection.send(new ServerboundPlaceRecipePacket(containerId, recipe, useMaxItems)); } /** diff --git a/net/minecraft/client/multiplayer/PlayerInfo.java b/net/minecraft/client/multiplayer/PlayerInfo.java index db73cdbe..085b23e0 100644 --- a/net/minecraft/client/multiplayer/PlayerInfo.java +++ b/net/minecraft/client/multiplayer/PlayerInfo.java @@ -124,8 +124,8 @@ public class PlayerInfo { return this.tabListDisplayName; } - public void setTabListOrder(int i) { - this.tabListOrder = i; + public void setTabListOrder(int tabListOrder) { + this.tabListOrder = tabListOrder; } public int getTabListOrder() { diff --git a/net/minecraft/client/multiplayer/RegistryDataCollector.java b/net/minecraft/client/multiplayer/RegistryDataCollector.java index ff4a6474..5619d36a 100644 --- a/net/minecraft/client/multiplayer/RegistryDataCollector.java +++ b/net/minecraft/client/multiplayer/RegistryDataCollector.java @@ -50,17 +50,19 @@ public class RegistryDataCollector { } private static Registry.PendingTags resolveRegistryTags( - RegistryAccess.Frozen frozen, ResourceKey> resourceKey, TagNetworkSerialization.NetworkPayload networkPayload + RegistryAccess.Frozen registryAccess, ResourceKey> registryKey, TagNetworkSerialization.NetworkPayload payload ) { - Registry registry = frozen.lookupOrThrow(resourceKey); - return registry.prepareTagReload(networkPayload.resolve(registry)); + Registry registry = registryAccess.lookupOrThrow(registryKey); + return registry.prepareTagReload(payload.resolve(registry)); } - private RegistryAccess loadNewElementsAndTags(ResourceProvider resourceProvider, RegistryDataCollector.ContentsCollector contentsCollector, boolean bl) { + private RegistryAccess loadNewElementsAndTags( + ResourceProvider resourceProvider, RegistryDataCollector.ContentsCollector contentCollector, boolean isMemoryConnection + ) { LayeredRegistryAccess layeredRegistryAccess = ClientRegistryLayer.createRegistryAccess(); RegistryAccess.Frozen frozen = layeredRegistryAccess.getAccessForLoading(ClientRegistryLayer.REMOTE); Map>, RegistryDataLoader.NetworkedRegistryData> map = new HashMap(); - contentsCollector.elements + contentCollector.elements .forEach((resourceKey, listx) -> map.put(resourceKey, new RegistryDataLoader.NetworkedRegistryData(listx, TagNetworkSerialization.NetworkPayload.EMPTY))); List> list = new ArrayList(); if (this.tagCollector != null) { @@ -71,7 +73,7 @@ public class RegistryDataCollector { List listxx = networkedRegistryData != null ? networkedRegistryData.elements() : List.of(); return new RegistryDataLoader.NetworkedRegistryData(listxx, networkPayload); }); - } else if (!bl) { + } else if (!isMemoryConnection) { list.add(resolveRegistryTags(frozen, resourceKey, networkPayload)); } } @@ -95,12 +97,14 @@ public class RegistryDataCollector { } private static void addCrashDetails( - CrashReport crashReport, Map>, RegistryDataLoader.NetworkedRegistryData> map, List> list + CrashReport crashReport, + Map>, RegistryDataLoader.NetworkedRegistryData> dynamicRegistries, + List> staticRegistries ) { CrashReportCategory crashReportCategory = crashReport.addCategory("Received Elements and Tags"); crashReportCategory.setDetail( "Dynamic Registries", - (CrashReportDetail)(() -> (String)map.entrySet() + (CrashReportDetail)(() -> (String)dynamicRegistries.entrySet() .stream() .sorted(Comparator.comparing(entry -> ((ResourceKey)entry.getKey()).location())) .map( @@ -116,34 +120,34 @@ public class RegistryDataCollector { ); crashReportCategory.setDetail( "Static Registries", - (CrashReportDetail)(() -> (String)list.stream() + (CrashReportDetail)(() -> (String)staticRegistries.stream() .sorted(Comparator.comparing(pendingTags -> pendingTags.key().location())) .map(pendingTags -> String.format(Locale.ROOT, "\n\t\t%s: tags=%d", pendingTags.key().location(), pendingTags.size())) .collect(Collectors.joining())) ); } - private void loadOnlyTags(RegistryDataCollector.TagCollector tagCollector, RegistryAccess.Frozen frozen, boolean bl) { + private void loadOnlyTags(RegistryDataCollector.TagCollector tagCollector, RegistryAccess.Frozen registryAccess, boolean isMemoryConnection) { tagCollector.forEach((resourceKey, networkPayload) -> { - if (bl || RegistrySynchronization.isNetworkable(resourceKey)) { - resolveRegistryTags(frozen, resourceKey, networkPayload).apply(); + if (isMemoryConnection || RegistrySynchronization.isNetworkable(resourceKey)) { + resolveRegistryTags(registryAccess, resourceKey, networkPayload).apply(); } }); } - public RegistryAccess.Frozen collectGameRegistries(ResourceProvider resourceProvider, RegistryAccess.Frozen frozen, boolean bl) { - RegistryAccess registryAccess; + public RegistryAccess.Frozen collectGameRegistries(ResourceProvider resourceProvider, RegistryAccess.Frozen registryAccess, boolean isMemoryConnection) { + RegistryAccess registryAccess2; if (this.contentsCollector != null) { - registryAccess = this.loadNewElementsAndTags(resourceProvider, this.contentsCollector, bl); + registryAccess2 = this.loadNewElementsAndTags(resourceProvider, this.contentsCollector, isMemoryConnection); } else { if (this.tagCollector != null) { - this.loadOnlyTags(this.tagCollector, frozen, !bl); + this.loadOnlyTags(this.tagCollector, registryAccess, !isMemoryConnection); } - registryAccess = frozen; + registryAccess2 = registryAccess; } - return registryAccess.freeze(); + return registryAccess2.freeze(); } @Environment(EnvType.CLIENT) @@ -159,12 +163,12 @@ public class RegistryDataCollector { static class TagCollector { private final Map>, TagNetworkSerialization.NetworkPayload> tags = new HashMap(); - public void append(ResourceKey> resourceKey, TagNetworkSerialization.NetworkPayload networkPayload) { - this.tags.put(resourceKey, networkPayload); + public void append(ResourceKey> registryKey, TagNetworkSerialization.NetworkPayload payload) { + this.tags.put(registryKey, payload); } - public void forEach(BiConsumer>, ? super TagNetworkSerialization.NetworkPayload> biConsumer) { - this.tags.forEach(biConsumer); + public void forEach(BiConsumer>, ? super TagNetworkSerialization.NetworkPayload> action) { + this.tags.forEach(action); } } } diff --git a/net/minecraft/client/multiplayer/SessionSearchTrees.java b/net/minecraft/client/multiplayer/SessionSearchTrees.java index 28a8f7c3..de122880 100644 --- a/net/minecraft/client/multiplayer/SessionSearchTrees.java +++ b/net/minecraft/client/multiplayer/SessionSearchTrees.java @@ -55,11 +55,11 @@ public class SessionSearchTrees { .filter(string -> !string.isEmpty()); } - public void updateRecipes(ClientRecipeBook clientRecipeBook, Level level) { + public void updateRecipes(ClientRecipeBook recipeBook, Level level) { this.register( RECIPE_COLLECTIONS, () -> { - List list = clientRecipeBook.getCollections(); + List list = recipeBook.getCollections(); RegistryAccess registryAccess = level.registryAccess(); Registry registry = registryAccess.lookupOrThrow(Registries.ITEM); Item.TooltipContext tooltipContext = Item.TooltipContext.of(registryAccess); diff --git a/net/minecraft/client/multiplayer/chat/report/ReportEnvironment.java b/net/minecraft/client/multiplayer/chat/report/ReportEnvironment.java index 23eb04fa..80e1953f 100644 --- a/net/minecraft/client/multiplayer/chat/report/ReportEnvironment.java +++ b/net/minecraft/client/multiplayer/chat/report/ReportEnvironment.java @@ -46,7 +46,7 @@ public record ReportEnvironment(String clientVersion, @Nullable ReportEnvironmen private static String getClientVersion() { StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append("1.21.2"); + stringBuilder.append("1.21.3"); if (Minecraft.checkModStatus().shouldReportAsModified()) { stringBuilder.append(" (modded)"); } diff --git a/net/minecraft/client/particle/ParticleEngine.java b/net/minecraft/client/particle/ParticleEngine.java index 9def498b..55daaa57 100644 --- a/net/minecraft/client/particle/ParticleEngine.java +++ b/net/minecraft/client/particle/ParticleEngine.java @@ -44,12 +44,19 @@ import net.minecraft.client.particle.CampfireSmokeParticle.CosyProvider; import net.minecraft.client.particle.CampfireSmokeParticle.SignalProvider; import net.minecraft.client.particle.CritParticle.DamageIndicatorProvider; import net.minecraft.client.particle.CritParticle.MagicProvider; +import net.minecraft.client.particle.FireworkParticles.FlashProvider; +import net.minecraft.client.particle.FireworkParticles.SparkProvider; import net.minecraft.client.particle.FlameParticle.SmallFlameProvider; +import net.minecraft.client.particle.FlyStraightTowardsParticle.OminousSpawnProvider; +import net.minecraft.client.particle.FlyTowardsPositionParticle.EnchantProvider; +import net.minecraft.client.particle.FlyTowardsPositionParticle.NautilusProvider; +import net.minecraft.client.particle.FlyTowardsPositionParticle.VaultConnectionProvider; import net.minecraft.client.particle.GlowParticle.ElectricSparkProvider; import net.minecraft.client.particle.GlowParticle.GlowSquidProvider; import net.minecraft.client.particle.GlowParticle.ScrapeProvider; import net.minecraft.client.particle.GlowParticle.WaxOffProvider; import net.minecraft.client.particle.GlowParticle.WaxOnProvider; +import net.minecraft.client.particle.GustParticle.SmallProvider; import net.minecraft.client.particle.HeartParticle.AngryVillagerProvider; import net.minecraft.client.particle.ParticleProvider.Sprite; import net.minecraft.client.particle.PlayerCloudParticle.SneezeProvider; @@ -58,6 +65,7 @@ import net.minecraft.client.particle.SoulParticle.EmissiveProvider; import net.minecraft.client.particle.SpellParticle.InstantProvider; import net.minecraft.client.particle.SpellParticle.MobEffectProvider; import net.minecraft.client.particle.SpellParticle.WitchProvider; +import net.minecraft.client.particle.SquidInkParticle.GlowInkProvider; import net.minecraft.client.particle.SuspendedParticle.CrimsonSporeProvider; import net.minecraft.client.particle.SuspendedParticle.SporeBlossomAirProvider; import net.minecraft.client.particle.SuspendedParticle.UnderwaterProvider; @@ -66,6 +74,8 @@ import net.minecraft.client.particle.SuspendedTownParticle.ComposterFillProvider import net.minecraft.client.particle.SuspendedTownParticle.DolphinSpeedProvider; import net.minecraft.client.particle.SuspendedTownParticle.EggCrackProvider; import net.minecraft.client.particle.SuspendedTownParticle.HappyVillagerProvider; +import net.minecraft.client.particle.TerrainParticle.CrumblingProvider; +import net.minecraft.client.particle.TerrainParticle.DustPillarProvider; import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.texture.SpriteLoader; import net.minecraft.client.renderer.texture.TextureAtlas; @@ -128,7 +138,7 @@ public class ParticleEngine implements PreparableReloadListener { private void registerProviders() { this.register(ParticleTypes.ANGRY_VILLAGER, AngryVillagerProvider::new); this.register(ParticleTypes.BLOCK_MARKER, new Provider()); - this.register(ParticleTypes.BLOCK, new TerrainParticle.Provider()); + this.register(ParticleTypes.BLOCK, new net.minecraft.client.particle.TerrainParticle.Provider()); this.register(ParticleTypes.BUBBLE, net.minecraft.client.particle.BubbleParticle.Provider::new); this.register(ParticleTypes.BUBBLE_COLUMN_UP, net.minecraft.client.particle.BubbleColumnUpParticle.Provider::new); this.register(ParticleTypes.BUBBLE_POP, net.minecraft.client.particle.BubblePopParticle.Provider::new); @@ -146,23 +156,23 @@ public class ParticleEngine implements PreparableReloadListener { this.register(ParticleTypes.LANDING_LAVA, DripParticle::createLavaLandParticle); this.register(ParticleTypes.DRIPPING_WATER, DripParticle::createWaterHangParticle); this.register(ParticleTypes.FALLING_WATER, DripParticle::createWaterFallParticle); - this.register(ParticleTypes.DUST, DustParticle.Provider::new); + this.register(ParticleTypes.DUST, net.minecraft.client.particle.DustParticle.Provider::new); this.register(ParticleTypes.DUST_COLOR_TRANSITION, net.minecraft.client.particle.DustColorTransitionParticle.Provider::new); this.register(ParticleTypes.EFFECT, net.minecraft.client.particle.SpellParticle.Provider::new); - this.register(ParticleTypes.ELDER_GUARDIAN, new MobAppearanceParticle.Provider()); + this.register(ParticleTypes.ELDER_GUARDIAN, new net.minecraft.client.particle.MobAppearanceParticle.Provider()); this.register(ParticleTypes.ENCHANTED_HIT, MagicProvider::new); - this.register(ParticleTypes.ENCHANT, FlyTowardsPositionParticle.EnchantProvider::new); + this.register(ParticleTypes.ENCHANT, EnchantProvider::new); this.register(ParticleTypes.END_ROD, net.minecraft.client.particle.EndRodParticle.Provider::new); this.register(ParticleTypes.ENTITY_EFFECT, MobEffectProvider::new); this.register(ParticleTypes.EXPLOSION_EMITTER, new net.minecraft.client.particle.HugeExplosionSeedParticle.Provider()); - this.register(ParticleTypes.EXPLOSION, HugeExplosionParticle.Provider::new); - this.register(ParticleTypes.SONIC_BOOM, SonicBoomParticle.Provider::new); + this.register(ParticleTypes.EXPLOSION, net.minecraft.client.particle.HugeExplosionParticle.Provider::new); + this.register(ParticleTypes.SONIC_BOOM, net.minecraft.client.particle.SonicBoomParticle.Provider::new); this.register(ParticleTypes.FALLING_DUST, net.minecraft.client.particle.FallingDustParticle.Provider::new); - this.register(ParticleTypes.GUST, GustParticle.Provider::new); - this.register(ParticleTypes.SMALL_GUST, GustParticle.SmallProvider::new); + this.register(ParticleTypes.GUST, net.minecraft.client.particle.GustParticle.Provider::new); + this.register(ParticleTypes.SMALL_GUST, SmallProvider::new); this.register(ParticleTypes.GUST_EMITTER_LARGE, new net.minecraft.client.particle.GustSeedParticle.Provider(3.0, 7, 0)); this.register(ParticleTypes.GUST_EMITTER_SMALL, new net.minecraft.client.particle.GustSeedParticle.Provider(1.0, 3, 2)); - this.register(ParticleTypes.FIREWORK, FireworkParticles.SparkProvider::new); + this.register(ParticleTypes.FIREWORK, SparkProvider::new); this.register(ParticleTypes.FISHING, net.minecraft.client.particle.WakeParticle.Provider::new); this.register(ParticleTypes.FLAME, net.minecraft.client.particle.FlameParticle.Provider::new); this.register(ParticleTypes.INFESTED, net.minecraft.client.particle.SpellParticle.Provider::new); @@ -171,7 +181,7 @@ public class ParticleEngine implements PreparableReloadListener { this.register(ParticleTypes.SCULK_CHARGE_POP, net.minecraft.client.particle.SculkChargePopParticle.Provider::new); this.register(ParticleTypes.SOUL, net.minecraft.client.particle.SoulParticle.Provider::new); this.register(ParticleTypes.SOUL_FIRE_FLAME, net.minecraft.client.particle.FlameParticle.Provider::new); - this.register(ParticleTypes.FLASH, FireworkParticles.FlashProvider::new); + this.register(ParticleTypes.FLASH, FlashProvider::new); this.register(ParticleTypes.HAPPY_VILLAGER, HappyVillagerProvider::new); this.register(ParticleTypes.HEART, net.minecraft.client.particle.HeartParticle.Provider::new); this.register(ParticleTypes.INSTANT_EFFECT, InstantProvider::new); @@ -182,7 +192,7 @@ public class ParticleEngine implements PreparableReloadListener { this.register(ParticleTypes.LARGE_SMOKE, net.minecraft.client.particle.LargeSmokeParticle.Provider::new); this.register(ParticleTypes.LAVA, net.minecraft.client.particle.LavaParticle.Provider::new); this.register(ParticleTypes.MYCELIUM, net.minecraft.client.particle.SuspendedTownParticle.Provider::new); - this.register(ParticleTypes.NAUTILUS, FlyTowardsPositionParticle.NautilusProvider::new); + this.register(ParticleTypes.NAUTILUS, NautilusProvider::new); this.register(ParticleTypes.NOTE, net.minecraft.client.particle.NoteParticle.Provider::new); this.register(ParticleTypes.POOF, net.minecraft.client.particle.ExplodeParticle.Provider::new); this.register(ParticleTypes.PORTAL, net.minecraft.client.particle.PortalParticle.Provider::new); @@ -192,9 +202,9 @@ public class ParticleEngine implements PreparableReloadListener { this.register(ParticleTypes.SNEEZE, SneezeProvider::new); this.register(ParticleTypes.SNOWFLAKE, net.minecraft.client.particle.SnowflakeParticle.Provider::new); this.register(ParticleTypes.SPIT, net.minecraft.client.particle.SpitParticle.Provider::new); - this.register(ParticleTypes.SWEEP_ATTACK, AttackSweepParticle.Provider::new); + this.register(ParticleTypes.SWEEP_ATTACK, net.minecraft.client.particle.AttackSweepParticle.Provider::new); this.register(ParticleTypes.TOTEM_OF_UNDYING, net.minecraft.client.particle.TotemParticle.Provider::new); - this.register(ParticleTypes.SQUID_INK, SquidInkParticle.Provider::new); + this.register(ParticleTypes.SQUID_INK, net.minecraft.client.particle.SquidInkParticle.Provider::new); this.register(ParticleTypes.UNDERWATER, UnderwaterProvider::new); this.register(ParticleTypes.SPLASH, net.minecraft.client.particle.SplashParticle.Provider::new); this.register(ParticleTypes.WITCH, WitchProvider::new); @@ -211,7 +221,7 @@ public class ParticleEngine implements PreparableReloadListener { this.register(ParticleTypes.FALLING_OBSIDIAN_TEAR, DripParticle::createObsidianTearFallParticle); this.register(ParticleTypes.LANDING_OBSIDIAN_TEAR, DripParticle::createObsidianTearLandParticle); this.register(ParticleTypes.REVERSE_PORTAL, ReversePortalProvider::new); - this.register(ParticleTypes.WHITE_ASH, WhiteAshParticle.Provider::new); + this.register(ParticleTypes.WHITE_ASH, net.minecraft.client.particle.WhiteAshParticle.Provider::new); this.register(ParticleTypes.SMALL_FLAME, SmallFlameProvider::new); this.register(ParticleTypes.DRIPPING_DRIPSTONE_WATER, DripParticle::createDripstoneWaterHangParticle); this.register(ParticleTypes.FALLING_DRIPSTONE_WATER, DripParticle::createDripstoneWaterFallParticle); @@ -222,7 +232,7 @@ public class ParticleEngine implements PreparableReloadListener { this.register(ParticleTypes.FALLING_DRIPSTONE_LAVA, DripParticle::createDripstoneLavaFallParticle); this.register(ParticleTypes.VIBRATION, net.minecraft.client.particle.VibrationSignalParticle.Provider::new); this.register(ParticleTypes.TRAIL, TrailParticle.Provider::new); - this.register(ParticleTypes.GLOW_SQUID_INK, SquidInkParticle.GlowInkProvider::new); + this.register(ParticleTypes.GLOW_SQUID_INK, GlowInkProvider::new); this.register(ParticleTypes.GLOW, GlowSquidProvider::new); this.register(ParticleTypes.WAX_ON, WaxOnProvider::new); this.register(ParticleTypes.WAX_OFF, WaxOffProvider::new); @@ -230,15 +240,15 @@ public class ParticleEngine implements PreparableReloadListener { this.register(ParticleTypes.SCRAPE, ScrapeProvider::new); this.register(ParticleTypes.SHRIEK, net.minecraft.client.particle.ShriekParticle.Provider::new); this.register(ParticleTypes.EGG_CRACK, EggCrackProvider::new); - this.register(ParticleTypes.DUST_PLUME, DustPlumeParticle.Provider::new); + this.register(ParticleTypes.DUST_PLUME, net.minecraft.client.particle.DustPlumeParticle.Provider::new); this.register(ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER, net.minecraft.client.particle.TrialSpawnerDetectionParticle.Provider::new); this.register(ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER_OMINOUS, net.minecraft.client.particle.TrialSpawnerDetectionParticle.Provider::new); - this.register(ParticleTypes.VAULT_CONNECTION, FlyTowardsPositionParticle.VaultConnectionProvider::new); - this.register(ParticleTypes.DUST_PILLAR, new TerrainParticle.DustPillarProvider()); + this.register(ParticleTypes.VAULT_CONNECTION, VaultConnectionProvider::new); + this.register(ParticleTypes.DUST_PILLAR, new DustPillarProvider()); this.register(ParticleTypes.RAID_OMEN, net.minecraft.client.particle.SpellParticle.Provider::new); this.register(ParticleTypes.TRIAL_OMEN, net.minecraft.client.particle.SpellParticle.Provider::new); - this.register(ParticleTypes.OMINOUS_SPAWNING, FlyStraightTowardsParticle.OminousSpawnProvider::new); - this.register(ParticleTypes.BLOCK_CRUMBLE, new TerrainParticle.CrumblingProvider()); + this.register(ParticleTypes.OMINOUS_SPAWNING, OminousSpawnProvider::new); + this.register(ParticleTypes.BLOCK_CRUMBLE, new CrumblingProvider()); } private void register(ParticleType particleType, ParticleProvider particleFactory) { @@ -264,14 +274,14 @@ public class ParticleEngine implements PreparableReloadListener { @Override public CompletableFuture reload( - PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor executor, Executor executor2 + PreparableReloadListener.PreparationBarrier barrier, ResourceManager manager, Executor backgroundExecutor, Executor gameExecutor ) { @Environment(EnvType.CLIENT) record ParticleDefinition(ResourceLocation id, Optional> sprites) { } CompletableFuture> completableFuture = CompletableFuture.supplyAsync( - () -> PARTICLE_LISTER.listMatchingResources(resourceManager), executor + () -> PARTICLE_LISTER.listMatchingResources(manager), backgroundExecutor ) .thenCompose( map -> { @@ -280,7 +290,9 @@ public class ParticleEngine implements PreparableReloadListener { (resourceLocation, resource) -> { ResourceLocation resourceLocation2 = PARTICLE_LISTER.fileToId(resourceLocation); list.add( - CompletableFuture.supplyAsync(() -> new ParticleDefinition(resourceLocation2, this.loadParticleDescription(resourceLocation2, resource)), executor) + CompletableFuture.supplyAsync( + () -> new ParticleDefinition(resourceLocation2, this.loadParticleDescription(resourceLocation2, resource)), backgroundExecutor + ) ); } ); @@ -288,9 +300,9 @@ public class ParticleEngine implements PreparableReloadListener { } ); CompletableFuture completableFuture2 = SpriteLoader.create(this.textureAtlas) - .loadAndStitch(resourceManager, PARTICLES_ATLAS_INFO, 0, executor) + .loadAndStitch(manager, PARTICLES_ATLAS_INFO, 0, backgroundExecutor) .thenCompose(Preparations::waitForUpload); - return CompletableFuture.allOf(completableFuture2, completableFuture).thenCompose(preparationBarrier::wait).thenAcceptAsync(void_ -> { + return CompletableFuture.allOf(completableFuture2, completableFuture).thenCompose(barrier::wait).thenAcceptAsync(void_ -> { this.clearParticles(); ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("upload"); @@ -326,7 +338,7 @@ public class ParticleEngine implements PreparableReloadListener { } profilerFiller.pop(); - }, executor2); + }, gameExecutor); } public void close() { diff --git a/net/minecraft/client/particle/TrailParticle.java b/net/minecraft/client/particle/TrailParticle.java index 5a71f5a9..65b159fb 100644 --- a/net/minecraft/client/particle/TrailParticle.java +++ b/net/minecraft/client/particle/TrailParticle.java @@ -12,14 +12,14 @@ import net.minecraft.world.phys.Vec3; public class TrailParticle extends TextureSheetParticle { private final Vec3 target; - TrailParticle(ClientLevel clientLevel, double d, double e, double f, double g, double h, double i, Vec3 vec3, int j) { - super(clientLevel, d, e, f, g, h, i); - j = ARGB.scaleRGB(j, 0.875F + this.random.nextFloat() * 0.25F, 0.875F + this.random.nextFloat() * 0.25F, 0.875F + this.random.nextFloat() * 0.25F); - this.rCol = ARGB.red(j) / 255.0F; - this.gCol = ARGB.green(j) / 255.0F; - this.bCol = ARGB.blue(j) / 255.0F; + TrailParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, Vec3 target, int color) { + super(level, x, y, z, xSpeed, ySpeed, zSpeed); + color = ARGB.scaleRGB(color, 0.875F + this.random.nextFloat() * 0.25F, 0.875F + this.random.nextFloat() * 0.25F, 0.875F + this.random.nextFloat() * 0.25F); + this.rCol = ARGB.red(color) / 255.0F; + this.gCol = ARGB.green(color) / 255.0F; + this.bCol = ARGB.blue(color) / 255.0F; this.quadSize = 0.26F; - this.target = vec3; + this.target = target; } @Override @@ -52,16 +52,14 @@ public class TrailParticle extends TextureSheetParticle { public static class Provider implements ParticleProvider { private final SpriteSet sprite; - public Provider(SpriteSet spriteSet) { - this.sprite = spriteSet; + public Provider(SpriteSet sprite) { + this.sprite = sprite; } - public Particle createParticle( - TargetColorParticleOption targetColorParticleOption, ClientLevel clientLevel, double d, double e, double f, double g, double h, double i - ) { - TrailParticle trailParticle = new TrailParticle(clientLevel, d, e, f, g, h, i, targetColorParticleOption.target(), targetColorParticleOption.color()); + public Particle createParticle(TargetColorParticleOption type, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { + TrailParticle trailParticle = new TrailParticle(level, x, y, z, xSpeed, ySpeed, zSpeed, type.target(), type.color()); trailParticle.pickSprite(this.sprite); - trailParticle.setLifetime(clientLevel.random.nextInt(40) + 10); + trailParticle.setLifetime(level.random.nextInt(40) + 10); return trailParticle; } } diff --git a/net/minecraft/client/player/AbstractClientPlayer.java b/net/minecraft/client/player/AbstractClientPlayer.java index 818af212..01c7fbaf 100644 --- a/net/minecraft/client/player/AbstractClientPlayer.java +++ b/net/minecraft/client/player/AbstractClientPlayer.java @@ -70,27 +70,27 @@ public abstract class AbstractClientPlayer extends Player { return playerInfo == null ? DefaultPlayerSkin.get(this.getUUID()) : playerInfo.getSkin(); } - public float getFieldOfViewModifier(boolean bl, float f) { - float g = 1.0F; + public float getFieldOfViewModifier(boolean isFirstPerson, float fovEffectScale) { + float f = 1.0F; if (this.getAbilities().flying) { - g *= 1.1F; + f *= 1.1F; } - float h = this.getAbilities().getWalkingSpeed(); - if (h != 0.0F) { - float i = (float)this.getAttributeValue(Attributes.MOVEMENT_SPEED) / h; - g *= (i + 1.0F) / 2.0F; + float g = this.getAbilities().getWalkingSpeed(); + if (g != 0.0F) { + float h = (float)this.getAttributeValue(Attributes.MOVEMENT_SPEED) / g; + f *= (h + 1.0F) / 2.0F; } if (this.isUsingItem()) { if (this.getUseItem().is(Items.BOW)) { - float i = Math.min(this.getTicksUsingItem() / 20.0F, 1.0F); - g *= 1.0F - Mth.square(i) * 0.15F; - } else if (bl && this.isScoping()) { + float h = Math.min(this.getTicksUsingItem() / 20.0F, 1.0F); + f *= 1.0F - Mth.square(h) * 0.15F; + } else if (isFirstPerson && this.isScoping()) { return 0.1F; } } - return Mth.lerp(f, 1.0F, g); + return Mth.lerp(fovEffectScale, 1.0F, f); } } diff --git a/net/minecraft/client/player/ClientInput.java b/net/minecraft/client/player/ClientInput.java index 49a38ed9..b93acc28 100644 --- a/net/minecraft/client/player/ClientInput.java +++ b/net/minecraft/client/player/ClientInput.java @@ -11,7 +11,7 @@ public class ClientInput { public float leftImpulse; public float forwardImpulse; - public void tick(boolean bl, float f) { + public void tick(boolean isSneaking, float sneakingSpeed) { } public Vec2 getMoveVector() { diff --git a/net/minecraft/client/player/KeyboardInput.java b/net/minecraft/client/player/KeyboardInput.java index baebd3d8..671cf284 100644 --- a/net/minecraft/client/player/KeyboardInput.java +++ b/net/minecraft/client/player/KeyboardInput.java @@ -22,7 +22,7 @@ public class KeyboardInput extends ClientInput { } @Override - public void tick(boolean bl, float f) { + public void tick(boolean isSneaking, float sneakingSpeed) { this.keyPresses = new Input( this.options.keyUp.isDown(), this.options.keyDown.isDown(), @@ -34,9 +34,9 @@ public class KeyboardInput extends ClientInput { ); this.forwardImpulse = calculateImpulse(this.keyPresses.forward(), this.keyPresses.backward()); this.leftImpulse = calculateImpulse(this.keyPresses.left(), this.keyPresses.right()); - if (bl) { - this.leftImpulse *= f; - this.forwardImpulse *= f; + if (isSneaking) { + this.leftImpulse *= sneakingSpeed; + this.forwardImpulse *= sneakingSpeed; } } } diff --git a/net/minecraft/client/player/LocalPlayer.java b/net/minecraft/client/player/LocalPlayer.java index 6368d6b3..d5f59a26 100644 --- a/net/minecraft/client/player/LocalPlayer.java +++ b/net/minecraft/client/player/LocalPlayer.java @@ -406,10 +406,10 @@ public class LocalPlayer extends AbstractClientPlayer { return this.recipeBook; } - public void removeRecipeHighlight(RecipeDisplayId recipeDisplayId) { - if (this.recipeBook.willHighlight(recipeDisplayId)) { - this.recipeBook.removeHighlight(recipeDisplayId); - this.connection.send(new ServerboundRecipeBookSeenRecipePacket(recipeDisplayId)); + public void removeRecipeHighlight(RecipeDisplayId recipe) { + if (this.recipeBook.willHighlight(recipe)) { + this.recipeBook.removeHighlight(recipe); + this.connection.send(new ServerboundRecipeBookSeenRecipePacket(recipe)); } } @@ -900,10 +900,10 @@ public class LocalPlayer extends AbstractClientPlayer { } @Override - public void move(MoverType type, Vec3 pos) { + public void move(MoverType type, Vec3 movement) { double d = this.getX(); double e = this.getZ(); - super.move(type, pos); + super.move(type, movement); float f = (float)(this.getX() - d); float g = (float)(this.getZ() - e); this.updateAutoJump(f, g); @@ -1143,8 +1143,8 @@ public class LocalPlayer extends AbstractClientPlayer { } @Override - public void handleCreativeModeItemDrop(ItemStack itemStack) { - this.minecraft.gameMode.handleCreativeModeItemDrop(itemStack); + public void handleCreativeModeItemDrop(ItemStack stack) { + this.minecraft.gameMode.handleCreativeModeItemDrop(stack); } @Override diff --git a/net/minecraft/client/renderer/CloudRenderer.java b/net/minecraft/client/renderer/CloudRenderer.java index 50f12faf..29ee3dc5 100644 --- a/net/minecraft/client/renderer/CloudRenderer.java +++ b/net/minecraft/client/renderer/CloudRenderer.java @@ -49,7 +49,10 @@ public class CloudRenderer extends SimplePreparableReloadListener prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) { + /** + * Performs any reloading that can be done off-thread, such as file IO + */ + protected Optional prepare(ResourceManager resourceManager, ProfilerFiller profiler) { try { InputStream inputStream = resourceManager.open(TEXTURE_LOCATION); @@ -98,71 +101,71 @@ public class CloudRenderer extends SimplePreparableReloadListener optional, ResourceManager resourceManager, ProfilerFiller profilerFiller) { - this.texture = (CloudRenderer.TextureData)optional.orElse(null); + protected void apply(Optional object, ResourceManager resourceManager, ProfilerFiller profiler) { + this.texture = (CloudRenderer.TextureData)object.orElse(null); this.needsRebuild = true; } - private static boolean isCellEmpty(int i) { - return ARGB.alpha(i) < 10; + private static boolean isCellEmpty(int color) { + return ARGB.alpha(color) < 10; } - private static long packCellData(int i, boolean bl, boolean bl2, boolean bl3, boolean bl4) { - return (long)i << 4 | (bl ? 1 : 0) << 3 | (bl2 ? 1 : 0) << 2 | (bl3 ? 1 : 0) << 1 | (bl4 ? 1 : 0) << 0; + private static long packCellData(int color, boolean northEmpty, boolean eastEmpty, boolean southEmpty, boolean westEmpty) { + return (long)color << 4 | (northEmpty ? 1 : 0) << 3 | (eastEmpty ? 1 : 0) << 2 | (southEmpty ? 1 : 0) << 1 | (westEmpty ? 1 : 0) << 0; } - private static int getColor(long l) { - return (int)(l >> 4 & 4294967295L); + private static int getColor(long cellData) { + return (int)(cellData >> 4 & 4294967295L); } - private static boolean isNorthEmpty(long l) { - return (l >> 3 & 1L) != 0L; + private static boolean isNorthEmpty(long cellData) { + return (cellData >> 3 & 1L) != 0L; } - private static boolean isEastEmpty(long l) { - return (l >> 2 & 1L) != 0L; + private static boolean isEastEmpty(long cellData) { + return (cellData >> 2 & 1L) != 0L; } - private static boolean isSouthEmpty(long l) { - return (l >> 1 & 1L) != 0L; + private static boolean isSouthEmpty(long cellData) { + return (cellData >> 1 & 1L) != 0L; } - private static boolean isWestEmpty(long l) { - return (l >> 0 & 1L) != 0L; + private static boolean isWestEmpty(long cellData) { + return (cellData >> 0 & 1L) != 0L; } - public void render(int i, CloudStatus cloudStatus, float f, Matrix4f matrix4f, Matrix4f matrix4f2, Vec3 vec3, float g) { + public void render(int height, CloudStatus cloudStatus, float color, Matrix4f frustumMatrix, Matrix4f projectionMatrix, Vec3 cameraPosiiton, float ticks) { if (this.texture != null) { - float h = (float)(f - vec3.y); - float j = h + 4.0F; + float f = (float)(color - cameraPosiiton.y); + float g = f + 4.0F; CloudRenderer.RelativeCameraPos relativeCameraPos; - if (j < 0.0F) { + if (g < 0.0F) { relativeCameraPos = CloudRenderer.RelativeCameraPos.ABOVE_CLOUDS; - } else if (h > 0.0F) { + } else if (f > 0.0F) { relativeCameraPos = CloudRenderer.RelativeCameraPos.BELOW_CLOUDS; } else { relativeCameraPos = CloudRenderer.RelativeCameraPos.INSIDE_CLOUDS; } - double d = vec3.x + g * 0.030000001F; - double e = vec3.z + 3.96F; - double k = this.texture.width * 12.0; - double l = this.texture.height * 12.0; - d -= Mth.floor(d / k) * k; - e -= Mth.floor(e / l) * l; - int m = Mth.floor(d / 12.0); - int n = Mth.floor(e / 12.0); - float o = (float)(d - m * 12.0F); - float p = (float)(e - n * 12.0F); + double d = cameraPosiiton.x + ticks * 0.030000001F; + double e = cameraPosiiton.z + 3.96F; + double h = this.texture.width * 12.0; + double i = this.texture.height * 12.0; + d -= Mth.floor(d / h) * h; + e -= Mth.floor(e / i) * i; + int j = Mth.floor(d / 12.0); + int k = Mth.floor(e / 12.0); + float l = (float)(d - j * 12.0F); + float m = (float)(e - k * 12.0F); RenderType renderType = cloudStatus == CloudStatus.FANCY ? RenderType.clouds() : RenderType.flatClouds(); this.vertexBuffer.bind(); - if (this.needsRebuild || m != this.prevCellX || n != this.prevCellZ || relativeCameraPos != this.prevRelativeCameraPos || cloudStatus != this.prevType) { + if (this.needsRebuild || j != this.prevCellX || k != this.prevCellZ || relativeCameraPos != this.prevRelativeCameraPos || cloudStatus != this.prevType) { this.needsRebuild = false; - this.prevCellX = m; - this.prevCellZ = n; + this.prevCellX = j; + this.prevCellZ = k; this.prevRelativeCameraPos = relativeCameraPos; this.prevType = cloudStatus; - MeshData meshData = this.buildMesh(Tesselator.getInstance(), m, n, cloudStatus, relativeCameraPos, renderType); + MeshData meshData = this.buildMesh(Tesselator.getInstance(), j, k, cloudStatus, relativeCameraPos, renderType); if (meshData != null) { this.vertexBuffer.upload(meshData); this.vertexBufferEmpty = false; @@ -172,61 +175,81 @@ public class CloudRenderer extends SimplePreparableReloadListener 0) { - bufferBuilder.addVertex(f, 0.0F, q).setColor(l); - bufferBuilder.addVertex(f, 4.0F, q).setColor(l); - bufferBuilder.addVertex(g, 4.0F, q).setColor(l); - bufferBuilder.addVertex(g, 0.0F, q).setColor(l); + if (isNorthEmpty(cellData) && y > 0) { + bufferBuilder.addVertex(f, 0.0F, j).setColor(frontColor); + bufferBuilder.addVertex(f, 4.0F, j).setColor(frontColor); + bufferBuilder.addVertex(g, 4.0F, j).setColor(frontColor); + bufferBuilder.addVertex(g, 0.0F, j).setColor(frontColor); } - if (isSouthEmpty(o) && n < 0) { - bufferBuilder.addVertex(g, 0.0F, r).setColor(l); - bufferBuilder.addVertex(g, 4.0F, r).setColor(l); - bufferBuilder.addVertex(f, 4.0F, r).setColor(l); - bufferBuilder.addVertex(f, 0.0F, r).setColor(l); + if (isSouthEmpty(cellData) && y < 0) { + bufferBuilder.addVertex(g, 0.0F, k).setColor(frontColor); + bufferBuilder.addVertex(g, 4.0F, k).setColor(frontColor); + bufferBuilder.addVertex(f, 4.0F, k).setColor(frontColor); + bufferBuilder.addVertex(f, 0.0F, k).setColor(frontColor); } - if (isWestEmpty(o) && m > 0) { - bufferBuilder.addVertex(f, 0.0F, r).setColor(k); - bufferBuilder.addVertex(f, 4.0F, r).setColor(k); - bufferBuilder.addVertex(f, 4.0F, q).setColor(k); - bufferBuilder.addVertex(f, 0.0F, q).setColor(k); + if (isWestEmpty(cellData) && x > 0) { + bufferBuilder.addVertex(f, 0.0F, k).setColor(sideColor); + bufferBuilder.addVertex(f, 4.0F, k).setColor(sideColor); + bufferBuilder.addVertex(f, 4.0F, j).setColor(sideColor); + bufferBuilder.addVertex(f, 0.0F, j).setColor(sideColor); } - if (isEastEmpty(o) && m < 0) { - bufferBuilder.addVertex(g, 0.0F, q).setColor(k); - bufferBuilder.addVertex(g, 4.0F, q).setColor(k); - bufferBuilder.addVertex(g, 4.0F, r).setColor(k); - bufferBuilder.addVertex(g, 0.0F, r).setColor(k); + if (isEastEmpty(cellData) && x < 0) { + bufferBuilder.addVertex(g, 0.0F, j).setColor(sideColor); + bufferBuilder.addVertex(g, 4.0F, j).setColor(sideColor); + bufferBuilder.addVertex(g, 4.0F, k).setColor(sideColor); + bufferBuilder.addVertex(g, 0.0F, k).setColor(sideColor); } - boolean bl = Math.abs(m) <= 1 && Math.abs(n) <= 1; + boolean bl = Math.abs(x) <= 1 && Math.abs(y) <= 1; if (bl) { - bufferBuilder.addVertex(g, 4.0F, q).setColor(j); - bufferBuilder.addVertex(g, 4.0F, r).setColor(j); - bufferBuilder.addVertex(f, 4.0F, r).setColor(j); - bufferBuilder.addVertex(f, 4.0F, q).setColor(j); - bufferBuilder.addVertex(f, 0.0F, q).setColor(i); - bufferBuilder.addVertex(f, 0.0F, r).setColor(i); - bufferBuilder.addVertex(g, 0.0F, r).setColor(i); - bufferBuilder.addVertex(g, 0.0F, q).setColor(i); - bufferBuilder.addVertex(g, 0.0F, q).setColor(l); - bufferBuilder.addVertex(g, 4.0F, q).setColor(l); - bufferBuilder.addVertex(f, 4.0F, q).setColor(l); - bufferBuilder.addVertex(f, 0.0F, q).setColor(l); - bufferBuilder.addVertex(f, 0.0F, r).setColor(l); - bufferBuilder.addVertex(f, 4.0F, r).setColor(l); - bufferBuilder.addVertex(g, 4.0F, r).setColor(l); - bufferBuilder.addVertex(g, 0.0F, r).setColor(l); - bufferBuilder.addVertex(f, 0.0F, q).setColor(k); - bufferBuilder.addVertex(f, 4.0F, q).setColor(k); - bufferBuilder.addVertex(f, 4.0F, r).setColor(k); - bufferBuilder.addVertex(f, 0.0F, r).setColor(k); - bufferBuilder.addVertex(g, 0.0F, r).setColor(k); - bufferBuilder.addVertex(g, 4.0F, r).setColor(k); - bufferBuilder.addVertex(g, 4.0F, q).setColor(k); - bufferBuilder.addVertex(g, 0.0F, q).setColor(k); + bufferBuilder.addVertex(g, 4.0F, j).setColor(topColor); + bufferBuilder.addVertex(g, 4.0F, k).setColor(topColor); + bufferBuilder.addVertex(f, 4.0F, k).setColor(topColor); + bufferBuilder.addVertex(f, 4.0F, j).setColor(topColor); + bufferBuilder.addVertex(f, 0.0F, j).setColor(bottomColor); + bufferBuilder.addVertex(f, 0.0F, k).setColor(bottomColor); + bufferBuilder.addVertex(g, 0.0F, k).setColor(bottomColor); + bufferBuilder.addVertex(g, 0.0F, j).setColor(bottomColor); + bufferBuilder.addVertex(g, 0.0F, j).setColor(frontColor); + bufferBuilder.addVertex(g, 4.0F, j).setColor(frontColor); + bufferBuilder.addVertex(f, 4.0F, j).setColor(frontColor); + bufferBuilder.addVertex(f, 0.0F, j).setColor(frontColor); + bufferBuilder.addVertex(f, 0.0F, k).setColor(frontColor); + bufferBuilder.addVertex(f, 4.0F, k).setColor(frontColor); + bufferBuilder.addVertex(g, 4.0F, k).setColor(frontColor); + bufferBuilder.addVertex(g, 0.0F, k).setColor(frontColor); + bufferBuilder.addVertex(f, 0.0F, j).setColor(sideColor); + bufferBuilder.addVertex(f, 4.0F, j).setColor(sideColor); + bufferBuilder.addVertex(f, 4.0F, k).setColor(sideColor); + bufferBuilder.addVertex(f, 0.0F, k).setColor(sideColor); + bufferBuilder.addVertex(g, 0.0F, k).setColor(sideColor); + bufferBuilder.addVertex(g, 4.0F, k).setColor(sideColor); + bufferBuilder.addVertex(g, 4.0F, j).setColor(sideColor); + bufferBuilder.addVertex(g, 0.0F, j).setColor(sideColor); } } diff --git a/net/minecraft/client/renderer/CompiledShaderProgram.java b/net/minecraft/client/renderer/CompiledShaderProgram.java index 9a858526..228bbfc1 100644 --- a/net/minecraft/client/renderer/CompiledShaderProgram.java +++ b/net/minecraft/client/renderer/CompiledShaderProgram.java @@ -4,7 +4,6 @@ import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.platform.Window; import com.mojang.blaze3d.shaders.AbstractUniform; import com.mojang.blaze3d.shaders.CompiledShader; -import com.mojang.blaze3d.shaders.Uniform; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.VertexFormat; import it.unimi.dsi.fastutil.ints.IntArrayList; @@ -17,6 +16,8 @@ import java.util.List; import java.util.Map; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.ShaderProgramConfig.Sampler; +import net.minecraft.client.renderer.ShaderProgramConfig.Uniform; import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.VisibleForTesting; import org.joml.Matrix4f; @@ -25,63 +26,63 @@ import org.joml.Matrix4f; public class CompiledShaderProgram implements AutoCloseable { private static final AbstractUniform DUMMY_UNIFORM = new AbstractUniform(); private static final int NO_SAMPLER_TEXTURE = -1; - private final List samplers = new ArrayList(); + private final List samplers = new ArrayList(); private final Object2IntMap samplerTextures = new Object2IntArrayMap<>(); private final IntList samplerLocations = new IntArrayList(); - private final List uniforms = new ArrayList(); - private final Map uniformsByName = new HashMap(); - private final Map uniformConfigs = new HashMap(); + private final List uniforms = new ArrayList(); + private final Map uniformsByName = new HashMap(); + private final Map uniformConfigs = new HashMap(); private final int programId; @Nullable - public Uniform MODEL_VIEW_MATRIX; + public com.mojang.blaze3d.shaders.Uniform MODEL_VIEW_MATRIX; @Nullable - public Uniform PROJECTION_MATRIX; + public com.mojang.blaze3d.shaders.Uniform PROJECTION_MATRIX; @Nullable - public Uniform TEXTURE_MATRIX; + public com.mojang.blaze3d.shaders.Uniform TEXTURE_MATRIX; @Nullable - public Uniform SCREEN_SIZE; + public com.mojang.blaze3d.shaders.Uniform SCREEN_SIZE; @Nullable - public Uniform COLOR_MODULATOR; + public com.mojang.blaze3d.shaders.Uniform COLOR_MODULATOR; @Nullable - public Uniform LIGHT0_DIRECTION; + public com.mojang.blaze3d.shaders.Uniform LIGHT0_DIRECTION; @Nullable - public Uniform LIGHT1_DIRECTION; + public com.mojang.blaze3d.shaders.Uniform LIGHT1_DIRECTION; @Nullable - public Uniform GLINT_ALPHA; + public com.mojang.blaze3d.shaders.Uniform GLINT_ALPHA; @Nullable - public Uniform FOG_START; + public com.mojang.blaze3d.shaders.Uniform FOG_START; @Nullable - public Uniform FOG_END; + public com.mojang.blaze3d.shaders.Uniform FOG_END; @Nullable - public Uniform FOG_COLOR; + public com.mojang.blaze3d.shaders.Uniform FOG_COLOR; @Nullable - public Uniform FOG_SHAPE; + public com.mojang.blaze3d.shaders.Uniform FOG_SHAPE; @Nullable - public Uniform LINE_WIDTH; + public com.mojang.blaze3d.shaders.Uniform LINE_WIDTH; @Nullable - public Uniform GAME_TIME; + public com.mojang.blaze3d.shaders.Uniform GAME_TIME; @Nullable - public Uniform MODEL_OFFSET; + public com.mojang.blaze3d.shaders.Uniform MODEL_OFFSET; - private CompiledShaderProgram(int i) { - this.programId = i; + private CompiledShaderProgram(int programId) { + this.programId = programId; this.samplerTextures.defaultReturnValue(-1); } - public static CompiledShaderProgram link(CompiledShader compiledShader, CompiledShader compiledShader2, VertexFormat vertexFormat) throws ShaderManager.CompilationException { + public static CompiledShaderProgram link(CompiledShader vertexShader, CompiledShader fragmentShader, VertexFormat vertexFormat) throws ShaderManager.CompilationException { int i = GlStateManager.glCreateProgram(); if (i <= 0) { throw new ShaderManager.CompilationException("Could not create shader program (returned program ID " + i + ")"); } else { vertexFormat.bindAttributes(i); - GlStateManager.glAttachShader(i, compiledShader.getShaderId()); - GlStateManager.glAttachShader(i, compiledShader2.getShaderId()); + GlStateManager.glAttachShader(i, vertexShader.getShaderId()); + GlStateManager.glAttachShader(i, fragmentShader.getShaderId()); GlStateManager.glLinkProgram(i); int j = GlStateManager.glGetProgrami(i, 35714); if (j == 0) { String string = GlStateManager.glGetProgramInfoLog(i, 32768); throw new ShaderManager.CompilationException( - "Error encountered when linking program containing VS " + compiledShader.getId() + " and FS " + compiledShader2.getId() + ". Log output: " + string + "Error encountered when linking program containing VS " + vertexShader.getId() + " and FS " + fragmentShader.getId() + ". Log output: " + string ); } else { return new CompiledShaderProgram(i); @@ -89,14 +90,14 @@ public class CompiledShaderProgram implements AutoCloseable { } } - public void setupUniforms(List list, List list2) { + public void setupUniforms(List uniforms, List samplers) { RenderSystem.assertOnRenderThread(); - for (ShaderProgramConfig.Uniform uniform : list) { + for (Uniform uniform : uniforms) { String string = uniform.name(); - int i = Uniform.glGetUniformLocation(this.programId, string); + int i = com.mojang.blaze3d.shaders.Uniform.glGetUniformLocation(this.programId, string); if (i != -1) { - Uniform uniform2 = this.parseUniformNode(uniform); + com.mojang.blaze3d.shaders.Uniform uniform2 = this.parseUniformNode(uniform); uniform2.setLocation(i); this.uniforms.add(uniform2); this.uniformsByName.put(string, uniform2); @@ -104,8 +105,8 @@ public class CompiledShaderProgram implements AutoCloseable { } } - for (ShaderProgramConfig.Sampler sampler : list2) { - int j = Uniform.glGetUniformLocation(this.programId, sampler.name()); + for (Sampler sampler : samplers) { + int j = com.mojang.blaze3d.shaders.Uniform.glGetUniformLocation(this.programId, sampler.name()); if (j != -1) { this.samplers.add(sampler); this.samplerLocations.add(j); @@ -130,7 +131,7 @@ public class CompiledShaderProgram implements AutoCloseable { } public void close() { - this.uniforms.forEach(Uniform::close); + this.uniforms.forEach(com.mojang.blaze3d.shaders.Uniform::close); GlStateManager.glDeleteProgram(this.programId); } @@ -140,7 +141,7 @@ public class CompiledShaderProgram implements AutoCloseable { int i = GlStateManager._getActiveTexture(); for (int j = 0; j < this.samplerLocations.size(); j++) { - ShaderProgramConfig.Sampler sampler = (ShaderProgramConfig.Sampler)this.samplers.get(j); + Sampler sampler = (Sampler)this.samplers.get(j); if (!this.samplerTextures.containsKey(sampler.name())) { GlStateManager._activeTexture(33984 + j); GlStateManager._bindTexture(0); @@ -156,11 +157,11 @@ public class CompiledShaderProgram implements AutoCloseable { int i = GlStateManager._getActiveTexture(); for (int j = 0; j < this.samplerLocations.size(); j++) { - String string = ((ShaderProgramConfig.Sampler)this.samplers.get(j)).name(); + String string = ((Sampler)this.samplers.get(j)).name(); int k = this.samplerTextures.getInt(string); if (k != -1) { int l = this.samplerLocations.getInt(j); - Uniform.uploadInteger(l, j); + com.mojang.blaze3d.shaders.Uniform.uploadInteger(l, j); RenderSystem.activeTexture(33984 + j); RenderSystem.bindTexture(k); } @@ -168,52 +169,52 @@ public class CompiledShaderProgram implements AutoCloseable { GlStateManager._activeTexture(i); - for (Uniform uniform : this.uniforms) { + for (com.mojang.blaze3d.shaders.Uniform uniform : this.uniforms) { uniform.upload(); } } @Nullable - public Uniform getUniform(String string) { + public com.mojang.blaze3d.shaders.Uniform getUniform(String name) { RenderSystem.assertOnRenderThread(); - return (Uniform)this.uniformsByName.get(string); + return (com.mojang.blaze3d.shaders.Uniform)this.uniformsByName.get(name); } @Nullable - public ShaderProgramConfig.Uniform getUniformConfig(String string) { - return (ShaderProgramConfig.Uniform)this.uniformConfigs.get(string); + public Uniform getUniformConfig(String name) { + return (Uniform)this.uniformConfigs.get(name); } - public AbstractUniform safeGetUniform(String string) { - Uniform uniform = this.getUniform(string); + public AbstractUniform safeGetUniform(String name) { + com.mojang.blaze3d.shaders.Uniform uniform = this.getUniform(name); return (AbstractUniform)(uniform == null ? DUMMY_UNIFORM : uniform); } - public void bindSampler(String string, int i) { - this.samplerTextures.put(string, i); + public void bindSampler(String samplerName, int textureId) { + this.samplerTextures.put(samplerName, textureId); } - private Uniform parseUniformNode(ShaderProgramConfig.Uniform uniform) { - int i = Uniform.getTypeFromString(uniform.type()); + private com.mojang.blaze3d.shaders.Uniform parseUniformNode(Uniform uniform) { + int i = com.mojang.blaze3d.shaders.Uniform.getTypeFromString(uniform.type()); int j = uniform.count(); int k = j > 1 && j <= 4 && i < 8 ? j - 1 : 0; - Uniform uniform2 = new Uniform(uniform.name(), i + k, j); + com.mojang.blaze3d.shaders.Uniform uniform2 = new com.mojang.blaze3d.shaders.Uniform(uniform.name(), i + k, j); uniform2.setFromConfig(uniform); return uniform2; } - public void setDefaultUniforms(VertexFormat.Mode mode, Matrix4f matrix4f, Matrix4f matrix4f2, Window window) { + public void setDefaultUniforms(VertexFormat.Mode mode, Matrix4f frustumMatrix, Matrix4f projectionMatrix, Window window) { for (int i = 0; i < 12; i++) { int j = RenderSystem.getShaderTexture(i); this.bindSampler("Sampler" + i, j); } if (this.MODEL_VIEW_MATRIX != null) { - this.MODEL_VIEW_MATRIX.set(matrix4f); + this.MODEL_VIEW_MATRIX.set(frustumMatrix); } if (this.PROJECTION_MATRIX != null) { - this.PROJECTION_MATRIX.set(matrix4f2); + this.PROJECTION_MATRIX.set(projectionMatrix); } if (this.COLOR_MODULATOR != null) { @@ -261,7 +262,7 @@ public class CompiledShaderProgram implements AutoCloseable { } @VisibleForTesting - public void registerUniform(Uniform uniform) { + public void registerUniform(com.mojang.blaze3d.shaders.Uniform uniform) { this.uniforms.add(uniform); this.uniformsByName.put(uniform.getName(), uniform); } diff --git a/net/minecraft/client/renderer/CoreShaders.java b/net/minecraft/client/renderer/CoreShaders.java index fc6ee44c..73f1a07c 100644 --- a/net/minecraft/client/renderer/CoreShaders.java +++ b/net/minecraft/client/renderer/CoreShaders.java @@ -74,12 +74,12 @@ public class CoreShaders { public static final ShaderProgram RENDERTYPE_GUI_GHOST_RECIPE_OVERLAY = register("rendertype_gui_ghost_recipe_overlay", DefaultVertexFormat.POSITION_COLOR); public static final ShaderProgram RENDERTYPE_BREEZE_WIND = register("rendertype_breeze_wind", DefaultVertexFormat.NEW_ENTITY); - private static ShaderProgram register(String string, VertexFormat vertexFormat) { - return register(string, vertexFormat, ShaderDefines.EMPTY); + private static ShaderProgram register(String name, VertexFormat vertexFormat) { + return register(name, vertexFormat, ShaderDefines.EMPTY); } - private static ShaderProgram register(String string, VertexFormat vertexFormat, ShaderDefines shaderDefines) { - ShaderProgram shaderProgram = new ShaderProgram(ResourceLocation.withDefaultNamespace("core/" + string), vertexFormat, shaderDefines); + private static ShaderProgram register(String name, VertexFormat vertexFormat, ShaderDefines defines) { + ShaderProgram shaderProgram = new ShaderProgram(ResourceLocation.withDefaultNamespace("core/" + name), vertexFormat, defines); PROGRAMS.add(shaderProgram); return shaderProgram; } diff --git a/net/minecraft/client/renderer/DimensionSpecialEffects.java b/net/minecraft/client/renderer/DimensionSpecialEffects.java index d9102afb..ce927ab4 100644 --- a/net/minecraft/client/renderer/DimensionSpecialEffects.java +++ b/net/minecraft/client/renderer/DimensionSpecialEffects.java @@ -41,11 +41,11 @@ public abstract class DimensionSpecialEffects { return EFFECTS.get(dimensionType.effectsLocation()); } - public boolean isSunriseOrSunset(float f) { + public boolean isSunriseOrSunset(float timeOfDay) { return false; } - public int getSunriseOrSunsetColor(float f) { + public int getSunriseOrSunsetColor(float timeOfDay) { return 0; } @@ -117,17 +117,17 @@ public abstract class DimensionSpecialEffects { } @Override - public boolean isSunriseOrSunset(float f) { - float g = Mth.cos(f * (float) (Math.PI * 2)); - return g >= -0.4F && g <= 0.4F; + public boolean isSunriseOrSunset(float timeOfDay) { + float f = Mth.cos(timeOfDay * (float) (Math.PI * 2)); + return f >= -0.4F && f <= 0.4F; } @Override - public int getSunriseOrSunsetColor(float f) { - float g = Mth.cos(f * (float) (Math.PI * 2)); - float h = g / 0.4F * 0.5F + 0.5F; - float i = Mth.square(1.0F - (1.0F - Mth.sin(h * (float) Math.PI)) * 0.99F); - return ARGB.colorFromFloat(i, h * 0.3F + 0.7F, h * h * 0.7F + 0.2F, 0.2F); + public int getSunriseOrSunsetColor(float timeOfDay) { + float f = Mth.cos(timeOfDay * (float) (Math.PI * 2)); + float g = f / 0.4F * 0.5F + 0.5F; + float h = Mth.square(1.0F - (1.0F - Mth.sin(g * (float) Math.PI)) * 0.99F); + return ARGB.colorFromFloat(h, g * 0.3F + 0.7F, g * g * 0.7F + 0.2F, 0.2F); } @Override diff --git a/net/minecraft/client/renderer/FogRenderer.java b/net/minecraft/client/renderer/FogRenderer.java index 851aa9e7..a370f7fc 100644 --- a/net/minecraft/client/renderer/FogRenderer.java +++ b/net/minecraft/client/renderer/FogRenderer.java @@ -40,151 +40,150 @@ public class FogRenderer { private static long biomeChangedTime = -1L; private static boolean fogEnabled = true; - public static Vector4f computeFogColor(Camera camera, float f, ClientLevel clientLevel, int i, float g) { + public static Vector4f computeFogColor(Camera camera, float partialTick, ClientLevel level, int renderDistance, float darkenWorldAmount) { FogType fogType = camera.getFluidInCamera(); Entity entity = camera.getEntity(); - float u; - float v; - float w; + float r; + float s; + float t; if (fogType == FogType.WATER) { long l = Util.getMillis(); - int j = clientLevel.getBiome(BlockPos.containing(camera.getPosition())).value().getWaterFogColor(); + int i = level.getBiome(BlockPos.containing(camera.getPosition())).value().getWaterFogColor(); if (biomeChangedTime < 0L) { - targetBiomeFog = j; - previousBiomeFog = j; + targetBiomeFog = i; + previousBiomeFog = i; biomeChangedTime = l; } - int k = targetBiomeFog >> 16 & 0xFF; - int m = targetBiomeFog >> 8 & 0xFF; - int n = targetBiomeFog & 0xFF; - int o = previousBiomeFog >> 16 & 0xFF; - int p = previousBiomeFog >> 8 & 0xFF; - int q = previousBiomeFog & 0xFF; - float h = Mth.clamp((float)(l - biomeChangedTime) / 5000.0F, 0.0F, 1.0F); - float r = Mth.lerp(h, (float)o, (float)k); - float s = Mth.lerp(h, (float)p, (float)m); - float t = Mth.lerp(h, (float)q, (float)n); - u = r / 255.0F; - v = s / 255.0F; - w = t / 255.0F; - if (targetBiomeFog != j) { - targetBiomeFog = j; - previousBiomeFog = Mth.floor(r) << 16 | Mth.floor(s) << 8 | Mth.floor(t); + int j = targetBiomeFog >> 16 & 0xFF; + int k = targetBiomeFog >> 8 & 0xFF; + int m = targetBiomeFog & 0xFF; + int n = previousBiomeFog >> 16 & 0xFF; + int o = previousBiomeFog >> 8 & 0xFF; + int p = previousBiomeFog & 0xFF; + float f = Mth.clamp((float)(l - biomeChangedTime) / 5000.0F, 0.0F, 1.0F); + float g = Mth.lerp(f, (float)n, (float)j); + float h = Mth.lerp(f, (float)o, (float)k); + float q = Mth.lerp(f, (float)p, (float)m); + r = g / 255.0F; + s = h / 255.0F; + t = q / 255.0F; + if (targetBiomeFog != i) { + targetBiomeFog = i; + previousBiomeFog = Mth.floor(g) << 16 | Mth.floor(h) << 8 | Mth.floor(q); biomeChangedTime = l; } } else if (fogType == FogType.LAVA) { - u = 0.6F; - v = 0.1F; - w = 0.0F; + r = 0.6F; + s = 0.1F; + t = 0.0F; biomeChangedTime = -1L; } else if (fogType == FogType.POWDER_SNOW) { - u = 0.623F; - v = 0.734F; - w = 0.785F; + r = 0.623F; + s = 0.734F; + t = 0.785F; biomeChangedTime = -1L; } else { - float x = 0.25F + 0.75F * i / 32.0F; - x = 1.0F - (float)Math.pow(x, 0.25); - int y = clientLevel.getSkyColor(camera.getPosition(), f); - float z = ARGB.from8BitChannel(ARGB.red(y)); - float aa = ARGB.from8BitChannel(ARGB.green(y)); - float ab = ARGB.from8BitChannel(ARGB.blue(y)); - float ac = Mth.clamp(Mth.cos(clientLevel.getTimeOfDay(f) * (float) (Math.PI * 2)) * 2.0F + 0.5F, 0.0F, 1.0F); - BiomeManager biomeManager = clientLevel.getBiomeManager(); + float u = 0.25F + 0.75F * renderDistance / 32.0F; + u = 1.0F - (float)Math.pow(u, 0.25); + int v = level.getSkyColor(camera.getPosition(), partialTick); + float w = ARGB.from8BitChannel(ARGB.red(v)); + float x = ARGB.from8BitChannel(ARGB.green(v)); + float y = ARGB.from8BitChannel(ARGB.blue(v)); + float z = Mth.clamp(Mth.cos(level.getTimeOfDay(partialTick) * (float) (Math.PI * 2)) * 2.0F + 0.5F, 0.0F, 1.0F); + BiomeManager biomeManager = level.getBiomeManager(); Vec3 vec3 = camera.getPosition().subtract(2.0, 2.0, 2.0).scale(0.25); Vec3 vec32 = CubicSampler.gaussianSampleVec3( - vec3, - (ix, jx, k) -> clientLevel.effects().getBrightnessDependentFogColor(Vec3.fromRGB24(biomeManager.getNoiseBiomeAtQuart(ix, jx, k).value().getFogColor()), ac) + vec3, (ix, j, k) -> level.effects().getBrightnessDependentFogColor(Vec3.fromRGB24(biomeManager.getNoiseBiomeAtQuart(ix, j, k).value().getFogColor()), z) ); - u = (float)vec32.x(); - v = (float)vec32.y(); - w = (float)vec32.z(); - if (i >= 4) { - float h = Mth.sin(clientLevel.getSunAngle(f)) > 0.0F ? -1.0F : 1.0F; - Vector3f vector3f = new Vector3f(h, 0.0F, 0.0F); - float s = camera.getLookVector().dot(vector3f); - if (s < 0.0F) { - s = 0.0F; + r = (float)vec32.x(); + s = (float)vec32.y(); + t = (float)vec32.z(); + if (renderDistance >= 4) { + float f = Mth.sin(level.getSunAngle(partialTick)) > 0.0F ? -1.0F : 1.0F; + Vector3f vector3f = new Vector3f(f, 0.0F, 0.0F); + float h = camera.getLookVector().dot(vector3f); + if (h < 0.0F) { + h = 0.0F; } - if (s > 0.0F && clientLevel.effects().isSunriseOrSunset(clientLevel.getTimeOfDay(f))) { - int ad = clientLevel.effects().getSunriseOrSunsetColor(clientLevel.getTimeOfDay(f)); - s *= ARGB.from8BitChannel(ARGB.alpha(ad)); - u = u * (1.0F - s) + ARGB.from8BitChannel(ARGB.red(ad)) * s; - v = v * (1.0F - s) + ARGB.from8BitChannel(ARGB.green(ad)) * s; - w = w * (1.0F - s) + ARGB.from8BitChannel(ARGB.blue(ad)) * s; + if (h > 0.0F && level.effects().isSunriseOrSunset(level.getTimeOfDay(partialTick))) { + int aa = level.effects().getSunriseOrSunsetColor(level.getTimeOfDay(partialTick)); + h *= ARGB.from8BitChannel(ARGB.alpha(aa)); + r = r * (1.0F - h) + ARGB.from8BitChannel(ARGB.red(aa)) * h; + s = s * (1.0F - h) + ARGB.from8BitChannel(ARGB.green(aa)) * h; + t = t * (1.0F - h) + ARGB.from8BitChannel(ARGB.blue(aa)) * h; } } - u += (z - u) * x; - v += (aa - v) * x; - w += (ab - w) * x; - float hx = clientLevel.getRainLevel(f); - if (hx > 0.0F) { - float r = 1.0F - hx * 0.5F; - float sx = 1.0F - hx * 0.4F; - u *= r; - v *= r; - w *= sx; + r += (w - r) * u; + s += (x - s) * u; + t += (y - t) * u; + float fx = level.getRainLevel(partialTick); + if (fx > 0.0F) { + float g = 1.0F - fx * 0.5F; + float hx = 1.0F - fx * 0.4F; + r *= g; + s *= g; + t *= hx; } - float r = clientLevel.getThunderLevel(f); - if (r > 0.0F) { - float sx = 1.0F - r * 0.5F; - u *= sx; - v *= sx; - w *= sx; + float g = level.getThunderLevel(partialTick); + if (g > 0.0F) { + float hx = 1.0F - g * 0.5F; + r *= hx; + s *= hx; + t *= hx; } biomeChangedTime = -1L; } - float xx = ((float)camera.getPosition().y - clientLevel.getMinY()) * clientLevel.getLevelData().getClearColorScale(); - FogRenderer.MobEffectFogFunction mobEffectFogFunction = getPriorityFogFunction(entity, f); + float ux = ((float)camera.getPosition().y - level.getMinY()) * level.getLevelData().getClearColorScale(); + FogRenderer.MobEffectFogFunction mobEffectFogFunction = getPriorityFogFunction(entity, partialTick); if (mobEffectFogFunction != null) { LivingEntity livingEntity = (LivingEntity)entity; - xx = mobEffectFogFunction.getModifiedVoidDarkness(livingEntity, livingEntity.getEffect(mobEffectFogFunction.getMobEffect()), xx, f); + ux = mobEffectFogFunction.getModifiedVoidDarkness(livingEntity, livingEntity.getEffect(mobEffectFogFunction.getMobEffect()), ux, partialTick); } - if (xx < 1.0F && fogType != FogType.LAVA && fogType != FogType.POWDER_SNOW) { - if (xx < 0.0F) { - xx = 0.0F; + if (ux < 1.0F && fogType != FogType.LAVA && fogType != FogType.POWDER_SNOW) { + if (ux < 0.0F) { + ux = 0.0F; } - xx *= xx; - u *= xx; - v *= xx; - w *= xx; + ux *= ux; + r *= ux; + s *= ux; + t *= ux; } - if (g > 0.0F) { - u = u * (1.0F - g) + u * 0.7F * g; - v = v * (1.0F - g) + v * 0.6F * g; - w = w * (1.0F - g) + w * 0.6F * g; + if (darkenWorldAmount > 0.0F) { + r = r * (1.0F - darkenWorldAmount) + r * 0.7F * darkenWorldAmount; + s = s * (1.0F - darkenWorldAmount) + s * 0.6F * darkenWorldAmount; + t = t * (1.0F - darkenWorldAmount) + t * 0.6F * darkenWorldAmount; } - float zx; + float wx; if (fogType == FogType.WATER) { if (entity instanceof LocalPlayer) { - zx = ((LocalPlayer)entity).getWaterVision(); + wx = ((LocalPlayer)entity).getWaterVision(); } else { - zx = 1.0F; + wx = 1.0F; } } else if (entity instanceof LivingEntity livingEntity2 && livingEntity2.hasEffect(MobEffects.NIGHT_VISION) && !livingEntity2.hasEffect(MobEffects.DARKNESS)) { - zx = GameRenderer.getNightVisionScale(livingEntity2, f); + wx = GameRenderer.getNightVisionScale(livingEntity2, partialTick); } else { - zx = 0.0F; + wx = 0.0F; } - if (u != 0.0F && v != 0.0F && w != 0.0F) { - float aax = Math.min(1.0F / u, Math.min(1.0F / v, 1.0F / w)); - u = u * (1.0F - zx) + u * aax * zx; - v = v * (1.0F - zx) + v * aax * zx; - w = w * (1.0F - zx) + w * aax * zx; + if (r != 0.0F && s != 0.0F && t != 0.0F) { + float xx = Math.min(1.0F / r, Math.min(1.0F / s, 1.0F / t)); + r = r * (1.0F - wx) + r * xx * wx; + s = s * (1.0F - wx) + s * xx * wx; + t = t * (1.0F - wx) + t * xx * wx; } - return new Vector4f(u, v, w, 1.0F); + return new Vector4f(r, s, t, 1.0F); } public static boolean toggleFog() { @@ -201,18 +200,18 @@ public class FogRenderer { : null; } - public static FogParameters setupFog(Camera camera, FogRenderer.FogMode fogMode, Vector4f vector4f, float f, boolean bl, float g) { + public static FogParameters setupFog(Camera camera, FogRenderer.FogMode fogMode, Vector4f fogColor, float renderDistance, boolean isFoggy, float partialTick) { if (!fogEnabled) { return FogParameters.NO_FOG; } else { FogType fogType = camera.getFluidInCamera(); Entity entity = camera.getEntity(); FogRenderer.FogData fogData = new FogRenderer.FogData(fogMode); - FogRenderer.MobEffectFogFunction mobEffectFogFunction = getPriorityFogFunction(entity, g); + FogRenderer.MobEffectFogFunction mobEffectFogFunction = getPriorityFogFunction(entity, partialTick); if (fogType == FogType.LAVA) { if (entity.isSpectator()) { fogData.start = -8.0F; - fogData.end = f * 0.5F; + fogData.end = renderDistance * 0.5F; } else if (entity instanceof LivingEntity && ((LivingEntity)entity).hasEffect(MobEffects.FIRE_RESISTANCE)) { fogData.start = 0.0F; fogData.end = 5.0F; @@ -223,7 +222,7 @@ public class FogRenderer { } else if (fogType == FogType.POWDER_SNOW) { if (entity.isSpectator()) { fogData.start = -8.0F; - fogData.end = f * 0.5F; + fogData.end = renderDistance * 0.5F; } else { fogData.start = 0.0F; fogData.end = 2.0F; @@ -232,7 +231,7 @@ public class FogRenderer { LivingEntity livingEntity = (LivingEntity)entity; MobEffectInstance mobEffectInstance = livingEntity.getEffect(mobEffectFogFunction.getMobEffect()); if (mobEffectInstance != null) { - mobEffectFogFunction.setupFog(fogData, livingEntity, mobEffectInstance, f, g); + mobEffectFogFunction.setupFog(fogData, livingEntity, mobEffectInstance, renderDistance, partialTick); } } else if (fogType == FogType.WATER) { fogData.start = -8.0F; @@ -245,25 +244,25 @@ public class FogRenderer { } } - if (fogData.end > f) { - fogData.end = f; + if (fogData.end > renderDistance) { + fogData.end = renderDistance; fogData.shape = FogShape.CYLINDER; } - } else if (bl) { - fogData.start = f * 0.05F; - fogData.end = Math.min(f, 192.0F) * 0.5F; + } else if (isFoggy) { + fogData.start = renderDistance * 0.05F; + fogData.end = Math.min(renderDistance, 192.0F) * 0.5F; } else if (fogMode == FogRenderer.FogMode.FOG_SKY) { fogData.start = 0.0F; - fogData.end = f; + fogData.end = renderDistance; fogData.shape = FogShape.CYLINDER; } else if (fogMode == FogRenderer.FogMode.FOG_TERRAIN) { - float h = Mth.clamp(f / 10.0F, 4.0F, 64.0F); - fogData.start = f - h; - fogData.end = f; + float f = Mth.clamp(renderDistance / 10.0F, 4.0F, 64.0F); + fogData.start = renderDistance - f; + fogData.end = renderDistance; fogData.shape = FogShape.CYLINDER; } - return new FogParameters(fogData.start, fogData.end, fogData.shape, vector4f.x, vector4f.y, vector4f.z, vector4f.w); + return new FogParameters(fogData.start, fogData.end, fogData.shape, fogColor.x, fogColor.y, fogColor.z, fogColor.w); } } @@ -275,14 +274,14 @@ public class FogRenderer { } @Override - public void setupFog(FogRenderer.FogData fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, float f) { - float g = effectInstance.isInfiniteDuration() ? 5.0F : Mth.lerp(Math.min(1.0F, effectInstance.getDuration() / 20.0F), farPlaneDistance, 5.0F); + public void setupFog(FogRenderer.FogData fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, float partialTick) { + float f = effectInstance.isInfiniteDuration() ? 5.0F : Mth.lerp(Math.min(1.0F, effectInstance.getDuration() / 20.0F), farPlaneDistance, 5.0F); if (fogData.mode == FogRenderer.FogMode.FOG_SKY) { fogData.start = 0.0F; - fogData.end = g * 0.8F; + fogData.end = f * 0.8F; } else if (fogData.mode == FogRenderer.FogMode.FOG_TERRAIN) { - fogData.start = g * 0.25F; - fogData.end = g; + fogData.start = f * 0.25F; + fogData.end = f; } } } @@ -295,18 +294,18 @@ public class FogRenderer { } @Override - public void setupFog(FogRenderer.FogData fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, float f) { - float g = Mth.lerp(effectInstance.getBlendFactor(entity, f), farPlaneDistance, 15.0F); + public void setupFog(FogRenderer.FogData fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, float partialTick) { + float f = Mth.lerp(effectInstance.getBlendFactor(entity, partialTick), farPlaneDistance, 15.0F); fogData.start = switch (fogData.mode) { case FOG_SKY -> 0.0F; - case FOG_TERRAIN -> g * 0.75F; + case FOG_TERRAIN -> f * 0.75F; }; - fogData.end = g; + fogData.end = f; } @Override - public float getModifiedVoidDarkness(LivingEntity entity, MobEffectInstance effectInstance, float f, float partialTick) { + public float getModifiedVoidDarkness(LivingEntity entity, MobEffectInstance effectInstance, float voidDarkness, float partialTick) { return 1.0F - effectInstance.getBlendFactor(entity, partialTick); } } @@ -333,23 +332,23 @@ public class FogRenderer { interface MobEffectFogFunction { Holder getMobEffect(); - void setupFog(FogRenderer.FogData fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, float f); + void setupFog(FogRenderer.FogData fogData, LivingEntity entity, MobEffectInstance effectInstance, float farPlaneDistance, float partialTick); - default boolean isEnabled(LivingEntity entity, float f) { + default boolean isEnabled(LivingEntity entity, float partialTick) { return entity.hasEffect(this.getMobEffect()); } - default float getModifiedVoidDarkness(LivingEntity entity, MobEffectInstance effectInstance, float f, float partialTick) { + default float getModifiedVoidDarkness(LivingEntity entity, MobEffectInstance effectInstance, float voidDarkness, float partialTick) { MobEffectInstance mobEffectInstance = entity.getEffect(this.getMobEffect()); if (mobEffectInstance != null) { if (mobEffectInstance.endsWithin(19)) { - f = 1.0F - mobEffectInstance.getDuration() / 20.0F; + voidDarkness = 1.0F - mobEffectInstance.getDuration() / 20.0F; } else { - f = 0.0F; + voidDarkness = 0.0F; } } - return f; + return voidDarkness; } } } diff --git a/net/minecraft/client/renderer/GameRenderer.java b/net/minecraft/client/renderer/GameRenderer.java index 40eb241d..484360da 100644 --- a/net/minecraft/client/renderer/GameRenderer.java +++ b/net/minecraft/client/renderer/GameRenderer.java @@ -166,8 +166,8 @@ public class GameRenderer implements AutoCloseable { } } - private void setPostEffect(ResourceLocation resourceLocation) { - this.postEffectId = resourceLocation; + private void setPostEffect(ResourceLocation postEffectId) { + this.postEffectId = postEffectId; this.effectActive = true; } @@ -305,28 +305,28 @@ public class GameRenderer implements AutoCloseable { this.fovModifier = Mth.clamp(this.fovModifier, 0.1F, 1.5F); } - private float getFov(Camera camera, float f, boolean bl) { + private float getFov(Camera camera, float partialTick, boolean useFovSetting) { if (this.panoramicMode) { return 90.0F; } else { - float g = 70.0F; - if (bl) { - g = this.minecraft.options.fov().get().intValue(); - g *= Mth.lerp(f, this.oldFovModifier, this.fovModifier); + float f = 70.0F; + if (useFovSetting) { + f = this.minecraft.options.fov().get().intValue(); + f *= Mth.lerp(partialTick, this.oldFovModifier, this.fovModifier); } if (camera.getEntity() instanceof LivingEntity livingEntity && livingEntity.isDeadOrDying()) { - float h = Math.min(livingEntity.deathTime + f, 20.0F); - g /= (1.0F - 500.0F / (h + 500.0F)) * 2.0F + 1.0F; + float g = Math.min(livingEntity.deathTime + partialTick, 20.0F); + f /= (1.0F - 500.0F / (g + 500.0F)) * 2.0F + 1.0F; } FogType fogType = camera.getFluidInCamera(); if (fogType == FogType.LAVA || fogType == FogType.WATER) { - float h = this.minecraft.options.fovEffectScale().get().floatValue(); - g *= Mth.lerp(h, 1.0F, 0.85714287F); + float g = this.minecraft.options.fovEffectScale().get().floatValue(); + f *= Mth.lerp(g, 1.0F, 0.85714287F); } - return g; + return f; } } @@ -412,7 +412,7 @@ public class GameRenderer implements AutoCloseable { } } - public Matrix4f getProjectionMatrix(float f) { + public Matrix4f getProjectionMatrix(float fov) { Matrix4f matrix4f = new Matrix4f(); if (this.zoom != 1.0F) { matrix4f.translate(this.zoomX, -this.zoomY, 0.0F); @@ -420,7 +420,7 @@ public class GameRenderer implements AutoCloseable { } return matrix4f.perspective( - f * (float) (Math.PI / 180.0), (float)this.minecraft.getWindow().getWidth() / this.minecraft.getWindow().getHeight(), 0.05F, this.getDepthFar() + fov * (float) (Math.PI / 180.0), (float)this.minecraft.getWindow().getWidth() / this.minecraft.getWindow().getHeight(), 0.05F, this.getDepthFar() ); } diff --git a/net/minecraft/client/renderer/ItemBlockRenderTypes.java b/net/minecraft/client/renderer/ItemBlockRenderTypes.java index fbd87fa6..e56c70bf 100644 --- a/net/minecraft/client/renderer/ItemBlockRenderTypes.java +++ b/net/minecraft/client/renderer/ItemBlockRenderTypes.java @@ -370,13 +370,13 @@ public class ItemBlockRenderTypes { } } - public static RenderType getRenderType(BlockState blockState) { - RenderType renderType = getChunkRenderType(blockState); + public static RenderType getRenderType(BlockState state) { + RenderType renderType = getChunkRenderType(state); return renderType == RenderType.translucent() ? Sheets.translucentItemSheet() : Sheets.cutoutBlockSheet(); } - public static RenderType getRenderType(ItemStack itemStack) { - if (itemStack.getItem() instanceof BlockItem blockItem) { + public static RenderType getRenderType(ItemStack stack) { + if (stack.getItem() instanceof BlockItem blockItem) { Block block = blockItem.getBlock(); return getRenderType(block.defaultBlockState()); } else { diff --git a/net/minecraft/client/renderer/ItemInHandRenderer.java b/net/minecraft/client/renderer/ItemInHandRenderer.java index 2d76adb5..f3a15559 100644 --- a/net/minecraft/client/renderer/ItemInHandRenderer.java +++ b/net/minecraft/client/renderer/ItemInHandRenderer.java @@ -10,6 +10,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.Minecraft; import net.minecraft.client.player.AbstractClientPlayer; import net.minecraft.client.player.LocalPlayer; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.client.renderer.entity.EntityRenderDispatcher; import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.entity.player.PlayerRenderer; @@ -145,7 +146,7 @@ public class ItemInHandRenderer { return -Mth.cos(f * (float) Math.PI) * 0.5F + 0.5F; } - private void renderMapHand(PoseStack poseStack, MultiBufferSource buffer, int packedLight, HumanoidArm side) { + private void renderMapHand(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, HumanoidArm side) { PlayerRenderer playerRenderer = (PlayerRenderer)this.entityRenderDispatcher.getRenderer(this.minecraft.player); poseStack.pushPose(); float f = side == HumanoidArm.RIGHT ? 1.0F : -1.0F; @@ -155,9 +156,9 @@ public class ItemInHandRenderer { poseStack.translate(f * 0.3F, -1.1F, 0.45F); ResourceLocation resourceLocation = this.minecraft.player.getSkin().texture(); if (side == HumanoidArm.RIGHT) { - playerRenderer.renderRightHand(poseStack, buffer, packedLight, resourceLocation, this.minecraft.player.isModelPartShown(PlayerModelPart.RIGHT_SLEEVE)); + playerRenderer.renderRightHand(poseStack, bufferSource, packedLight, resourceLocation, this.minecraft.player.isModelPartShown(PlayerModelPart.RIGHT_SLEEVE)); } else { - playerRenderer.renderLeftHand(poseStack, buffer, packedLight, resourceLocation, this.minecraft.player.isModelPartShown(PlayerModelPart.LEFT_SLEEVE)); + playerRenderer.renderLeftHand(poseStack, bufferSource, packedLight, resourceLocation, this.minecraft.player.isModelPartShown(PlayerModelPart.LEFT_SLEEVE)); } poseStack.popPose(); @@ -317,7 +318,7 @@ public class ItemInHandRenderer { poseStack.translate(i * 0.56F, -0.52F + equippedProg * -0.6F, -0.72F); } - public void renderHandsWithItems(float partialTicks, PoseStack poseStack, MultiBufferSource.BufferSource buffer, LocalPlayer playerEntity, int combinedLight) { + public void renderHandsWithItems(float partialTicks, PoseStack poseStack, BufferSource buffer, LocalPlayer playerEntity, int combinedLight) { float f = playerEntity.getAttackAnim(partialTicks); InteractionHand interactionHand = MoreObjects.firstNonNull(playerEntity.swingingArm, InteractionHand.MAIN_HAND); float g = playerEntity.getXRot(partialTicks); diff --git a/net/minecraft/client/renderer/ItemModelShaper.java b/net/minecraft/client/renderer/ItemModelShaper.java index fc8181fd..bf656b28 100644 --- a/net/minecraft/client/renderer/ItemModelShaper.java +++ b/net/minecraft/client/renderer/ItemModelShaper.java @@ -29,8 +29,8 @@ public class ItemModelShaper { return resourceLocation == null ? (BakedModel)this.missingModel.get() : this.getItemModel(resourceLocation); } - public BakedModel getItemModel(ResourceLocation resourceLocation) { - return (BakedModel)this.modelToBakedModel.computeIfAbsent(resourceLocation, this.modelGetter); + public BakedModel getItemModel(ResourceLocation name) { + return (BakedModel)this.modelToBakedModel.computeIfAbsent(name, this.modelGetter); } public void invalidateCache() { diff --git a/net/minecraft/client/renderer/LevelEventHandler.java b/net/minecraft/client/renderer/LevelEventHandler.java index 3844f94a..c7aef042 100644 --- a/net/minecraft/client/renderer/LevelEventHandler.java +++ b/net/minecraft/client/renderer/LevelEventHandler.java @@ -61,18 +61,21 @@ public class LevelEventHandler { this.levelRenderer = levelRenderer; } - public void globalLevelEvent(int i, BlockPos blockPos, int j) { - switch (i) { + /** + * Handles a global level event. This includes playing sounds that should be heard by any player, regardless of position and dimension, such as the Wither spawning. + */ + public void globalLevelEvent(int type, BlockPos pos, int data) { + switch (type) { case 1023: case 1028: case 1038: Camera camera = this.minecraft.gameRenderer.getMainCamera(); if (camera.isInitialized()) { - Vec3 vec3 = Vec3.atCenterOf(blockPos).subtract(camera.getPosition()).normalize(); + Vec3 vec3 = Vec3.atCenterOf(pos).subtract(camera.getPosition()).normalize(); Vec3 vec32 = camera.getPosition().add(vec3.scale(2.0)); - if (i == 1023) { + if (type == 1023) { this.level.playLocalSound(vec32.x, vec32.y, vec32.z, SoundEvents.WITHER_SPAWN, SoundSource.HOSTILE, 1.0F, 1.0F, false); - } else if (i == 1038) { + } else if (type == 1038) { this.level.playLocalSound(vec32.x, vec32.y, vec32.z, SoundEvents.END_PORTAL_SPAWN, SoundSource.HOSTILE, 1.0F, 1.0F, false); } else { this.level.playLocalSound(vec32.x, vec32.y, vec32.z, SoundEvents.ENDER_DRAGON_DEATH, SoundSource.HOSTILE, 5.0F, 1.0F, false); @@ -81,246 +84,226 @@ public class LevelEventHandler { } } - public void levelEvent(int i, BlockPos blockPos, int j) { + public void levelEvent(int type, BlockPos pos, int data) { RandomSource randomSource = this.level.random; - switch (i) { + switch (type) { case 1000: - this.level.playLocalSound(blockPos, SoundEvents.DISPENSER_DISPENSE, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.DISPENSER_DISPENSE, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 1001: - this.level.playLocalSound(blockPos, SoundEvents.DISPENSER_FAIL, SoundSource.BLOCKS, 1.0F, 1.2F, false); + this.level.playLocalSound(pos, SoundEvents.DISPENSER_FAIL, SoundSource.BLOCKS, 1.0F, 1.2F, false); break; case 1002: - this.level.playLocalSound(blockPos, SoundEvents.DISPENSER_LAUNCH, SoundSource.BLOCKS, 1.0F, 1.2F, false); + this.level.playLocalSound(pos, SoundEvents.DISPENSER_LAUNCH, SoundSource.BLOCKS, 1.0F, 1.2F, false); break; case 1004: - this.level.playLocalSound(blockPos, SoundEvents.FIREWORK_ROCKET_SHOOT, SoundSource.NEUTRAL, 1.0F, 1.2F, false); + this.level.playLocalSound(pos, SoundEvents.FIREWORK_ROCKET_SHOOT, SoundSource.NEUTRAL, 1.0F, 1.2F, false); break; case 1009: - if (j == 0) { + if (data == 0) { + this.level + .playLocalSound(pos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.8F, false); + } else if (data == 1) { this.level .playLocalSound( - blockPos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.8F, false - ); - } else if (j == 1) { - this.level - .playLocalSound( - blockPos, SoundEvents.GENERIC_EXTINGUISH_FIRE, SoundSource.BLOCKS, 0.7F, 1.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.4F, false + pos, SoundEvents.GENERIC_EXTINGUISH_FIRE, SoundSource.BLOCKS, 0.7F, 1.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.4F, false ); } break; case 1010: - this.level.registryAccess().lookupOrThrow(Registries.JUKEBOX_SONG).get(j).ifPresent(reference -> this.playJukeboxSong(reference, blockPos)); + this.level.registryAccess().lookupOrThrow(Registries.JUKEBOX_SONG).get(data).ifPresent(reference -> this.playJukeboxSong(reference, pos)); break; case 1011: - this.stopJukeboxSongAndNotifyNearby(blockPos); + this.stopJukeboxSongAndNotifyNearby(pos); break; case 1015: this.level - .playLocalSound(blockPos, SoundEvents.GHAST_WARN, SoundSource.HOSTILE, 10.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); + .playLocalSound(pos, SoundEvents.GHAST_WARN, SoundSource.HOSTILE, 10.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1016: this.level - .playLocalSound(blockPos, SoundEvents.GHAST_SHOOT, SoundSource.HOSTILE, 10.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); + .playLocalSound(pos, SoundEvents.GHAST_SHOOT, SoundSource.HOSTILE, 10.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1017: this.level .playLocalSound( - blockPos, SoundEvents.ENDER_DRAGON_SHOOT, SoundSource.HOSTILE, 10.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.ENDER_DRAGON_SHOOT, SoundSource.HOSTILE, 10.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1018: this.level - .playLocalSound(blockPos, SoundEvents.BLAZE_SHOOT, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); + .playLocalSound(pos, SoundEvents.BLAZE_SHOOT, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1019: this.level .playLocalSound( - blockPos, SoundEvents.ZOMBIE_ATTACK_WOODEN_DOOR, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.ZOMBIE_ATTACK_WOODEN_DOOR, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1020: this.level .playLocalSound( - blockPos, SoundEvents.ZOMBIE_ATTACK_IRON_DOOR, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.ZOMBIE_ATTACK_IRON_DOOR, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1021: this.level .playLocalSound( - blockPos, SoundEvents.ZOMBIE_BREAK_WOODEN_DOOR, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.ZOMBIE_BREAK_WOODEN_DOOR, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1022: this.level - .playLocalSound( - blockPos, SoundEvents.WITHER_BREAK_BLOCK, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false - ); + .playLocalSound(pos, SoundEvents.WITHER_BREAK_BLOCK, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1024: this.level - .playLocalSound(blockPos, SoundEvents.WITHER_SHOOT, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); + .playLocalSound(pos, SoundEvents.WITHER_SHOOT, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1025: this.level - .playLocalSound(blockPos, SoundEvents.BAT_TAKEOFF, SoundSource.NEUTRAL, 0.05F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); + .playLocalSound(pos, SoundEvents.BAT_TAKEOFF, SoundSource.NEUTRAL, 0.05F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1026: this.level - .playLocalSound(blockPos, SoundEvents.ZOMBIE_INFECT, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); + .playLocalSound(pos, SoundEvents.ZOMBIE_INFECT, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false); break; case 1027: this.level .playLocalSound( - blockPos, SoundEvents.ZOMBIE_VILLAGER_CONVERTED, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.ZOMBIE_VILLAGER_CONVERTED, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1029: - this.level.playLocalSound(blockPos, SoundEvents.ANVIL_DESTROY, SoundSource.BLOCKS, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.ANVIL_DESTROY, SoundSource.BLOCKS, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); break; case 1030: - this.level.playLocalSound(blockPos, SoundEvents.ANVIL_USE, SoundSource.BLOCKS, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.ANVIL_USE, SoundSource.BLOCKS, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); break; case 1031: - this.level.playLocalSound(blockPos, SoundEvents.ANVIL_LAND, SoundSource.BLOCKS, 0.3F, this.level.random.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.ANVIL_LAND, SoundSource.BLOCKS, 0.3F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1032: this.minecraft.getSoundManager().play(SimpleSoundInstance.forLocalAmbience(SoundEvents.PORTAL_TRAVEL, randomSource.nextFloat() * 0.4F + 0.8F, 0.25F)); break; case 1033: - this.level.playLocalSound(blockPos, SoundEvents.CHORUS_FLOWER_GROW, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.CHORUS_FLOWER_GROW, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 1034: - this.level.playLocalSound(blockPos, SoundEvents.CHORUS_FLOWER_DEATH, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.CHORUS_FLOWER_DEATH, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 1035: - this.level.playLocalSound(blockPos, SoundEvents.BREWING_STAND_BREW, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.BREWING_STAND_BREW, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 1039: - this.level.playLocalSound(blockPos, SoundEvents.PHANTOM_BITE, SoundSource.HOSTILE, 0.3F, this.level.random.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.PHANTOM_BITE, SoundSource.HOSTILE, 0.3F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1040: this.level .playLocalSound( - blockPos, SoundEvents.ZOMBIE_CONVERTED_TO_DROWNED, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.ZOMBIE_CONVERTED_TO_DROWNED, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1041: this.level .playLocalSound( - blockPos, SoundEvents.HUSK_CONVERTED_TO_ZOMBIE, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.HUSK_CONVERTED_TO_ZOMBIE, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1042: - this.level.playLocalSound(blockPos, SoundEvents.GRINDSTONE_USE, SoundSource.BLOCKS, 1.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.GRINDSTONE_USE, SoundSource.BLOCKS, 1.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1043: - this.level.playLocalSound(blockPos, SoundEvents.BOOK_PAGE_TURN, SoundSource.BLOCKS, 1.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.BOOK_PAGE_TURN, SoundSource.BLOCKS, 1.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1044: - this.level.playLocalSound(blockPos, SoundEvents.SMITHING_TABLE_USE, SoundSource.BLOCKS, 1.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.SMITHING_TABLE_USE, SoundSource.BLOCKS, 1.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1045: - this.level.playLocalSound(blockPos, SoundEvents.POINTED_DRIPSTONE_LAND, SoundSource.BLOCKS, 2.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.POINTED_DRIPSTONE_LAND, SoundSource.BLOCKS, 2.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1046: this.level - .playLocalSound( - blockPos, SoundEvents.POINTED_DRIPSTONE_DRIP_LAVA_INTO_CAULDRON, SoundSource.BLOCKS, 2.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false - ); + .playLocalSound(pos, SoundEvents.POINTED_DRIPSTONE_DRIP_LAVA_INTO_CAULDRON, SoundSource.BLOCKS, 2.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1047: this.level - .playLocalSound( - blockPos, SoundEvents.POINTED_DRIPSTONE_DRIP_WATER_INTO_CAULDRON, SoundSource.BLOCKS, 2.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false - ); + .playLocalSound(pos, SoundEvents.POINTED_DRIPSTONE_DRIP_WATER_INTO_CAULDRON, SoundSource.BLOCKS, 2.0F, this.level.random.nextFloat() * 0.1F + 0.9F, false); break; case 1048: this.level .playLocalSound( - blockPos, SoundEvents.SKELETON_CONVERTED_TO_STRAY, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false + pos, SoundEvents.SKELETON_CONVERTED_TO_STRAY, SoundSource.HOSTILE, 2.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, false ); break; case 1049: - this.level.playLocalSound(blockPos, SoundEvents.CRAFTER_CRAFT, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.CRAFTER_CRAFT, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 1050: - this.level.playLocalSound(blockPos, SoundEvents.CRAFTER_FAIL, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.CRAFTER_FAIL, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 1051: - this.level - .playLocalSound(blockPos, SoundEvents.WIND_CHARGE_THROW, SoundSource.BLOCKS, 0.5F, 0.4F / (this.level.getRandom().nextFloat() * 0.4F + 0.8F), false); + this.level.playLocalSound(pos, SoundEvents.WIND_CHARGE_THROW, SoundSource.BLOCKS, 0.5F, 0.4F / (this.level.getRandom().nextFloat() * 0.4F + 0.8F), false); break; case 1500: - ComposterBlock.handleFill(this.level, blockPos, j > 0); + ComposterBlock.handleFill(this.level, pos, data > 0); break; case 1501: this.level - .playLocalSound( - blockPos, SoundEvents.LAVA_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.8F, false - ); + .playLocalSound(pos, SoundEvents.LAVA_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.8F, false); - for (int ox = 0; ox < 8; ox++) { + for (int mx = 0; mx < 8; mx++) { this.level - .addParticle( - ParticleTypes.LARGE_SMOKE, - blockPos.getX() + randomSource.nextDouble(), - blockPos.getY() + 1.2, - blockPos.getZ() + randomSource.nextDouble(), - 0.0, - 0.0, - 0.0 - ); + .addParticle(ParticleTypes.LARGE_SMOKE, pos.getX() + randomSource.nextDouble(), pos.getY() + 1.2, pos.getZ() + randomSource.nextDouble(), 0.0, 0.0, 0.0); } break; case 1502: this.level .playLocalSound( - blockPos, SoundEvents.REDSTONE_TORCH_BURNOUT, SoundSource.BLOCKS, 0.5F, 2.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.8F, false + pos, SoundEvents.REDSTONE_TORCH_BURNOUT, SoundSource.BLOCKS, 0.5F, 2.6F + (randomSource.nextFloat() - randomSource.nextFloat()) * 0.8F, false ); - for (int ox = 0; ox < 5; ox++) { - double g = blockPos.getX() + randomSource.nextDouble() * 0.6 + 0.2; - double p = blockPos.getY() + randomSource.nextDouble() * 0.6 + 0.2; - double q = blockPos.getZ() + randomSource.nextDouble() * 0.6 + 0.2; - this.level.addParticle(ParticleTypes.SMOKE, g, p, q, 0.0, 0.0, 0.0); + for (int mx = 0; mx < 5; mx++) { + double g = pos.getX() + randomSource.nextDouble() * 0.6 + 0.2; + double n = pos.getY() + randomSource.nextDouble() * 0.6 + 0.2; + double o = pos.getZ() + randomSource.nextDouble() * 0.6 + 0.2; + this.level.addParticle(ParticleTypes.SMOKE, g, n, o, 0.0, 0.0, 0.0); } break; case 1503: - this.level.playLocalSound(blockPos, SoundEvents.END_PORTAL_FRAME_FILL, SoundSource.BLOCKS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, SoundEvents.END_PORTAL_FRAME_FILL, SoundSource.BLOCKS, 1.0F, 1.0F, false); - for (int ox = 0; ox < 16; ox++) { - double g = blockPos.getX() + (5.0 + randomSource.nextDouble() * 6.0) / 16.0; - double p = blockPos.getY() + 0.8125; - double q = blockPos.getZ() + (5.0 + randomSource.nextDouble() * 6.0) / 16.0; - this.level.addParticle(ParticleTypes.SMOKE, g, p, q, 0.0, 0.0, 0.0); + for (int mx = 0; mx < 16; mx++) { + double g = pos.getX() + (5.0 + randomSource.nextDouble() * 6.0) / 16.0; + double n = pos.getY() + 0.8125; + double o = pos.getZ() + (5.0 + randomSource.nextDouble() * 6.0) / 16.0; + this.level.addParticle(ParticleTypes.SMOKE, g, n, o, 0.0, 0.0, 0.0); } break; case 1504: - PointedDripstoneBlock.spawnDripParticle(this.level, blockPos, this.level.getBlockState(blockPos)); + PointedDripstoneBlock.spawnDripParticle(this.level, pos, this.level.getBlockState(pos)); break; case 1505: - BoneMealItem.addGrowthParticles(this.level, blockPos, j); - this.level.playLocalSound(blockPos, SoundEvents.BONE_MEAL_USE, SoundSource.BLOCKS, 1.0F, 1.0F, false); + BoneMealItem.addGrowthParticles(this.level, pos, data); + this.level.playLocalSound(pos, SoundEvents.BONE_MEAL_USE, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 2000: - this.shootParticles(j, blockPos, randomSource, ParticleTypes.SMOKE); + this.shootParticles(data, pos, randomSource, ParticleTypes.SMOKE); break; case 2001: - BlockState blockState = Block.stateById(j); + BlockState blockState = Block.stateById(data); if (!blockState.isAir()) { SoundType soundType = blockState.getSoundType(); - this.level - .playLocalSound(blockPos, soundType.getBreakSound(), SoundSource.BLOCKS, (soundType.getVolume() + 1.0F) / 2.0F, soundType.getPitch() * 0.8F, false); + this.level.playLocalSound(pos, soundType.getBreakSound(), SoundSource.BLOCKS, (soundType.getVolume() + 1.0F) / 2.0F, soundType.getPitch() * 0.8F, false); } - this.level.addDestroyBlockEffect(blockPos, blockState); + this.level.addDestroyBlockEffect(pos, blockState); break; case 2002: case 2007: - Vec3 vec3 = Vec3.atBottomCenterOf(blockPos); + Vec3 vec3 = Vec3.atBottomCenterOf(pos); - for (int l = 0; l < 8; l++) { + for (int j = 0; j < 8; j++) { this.levelRenderer .addParticle( new ItemParticleOption(ParticleTypes.ITEM, new ItemStack(Items.SPLASH_POTION)), @@ -333,34 +316,34 @@ public class LevelEventHandler { ); } - float h = (j >> 16 & 0xFF) / 255.0F; - float m = (j >> 8 & 0xFF) / 255.0F; - float n = (j >> 0 & 0xFF) / 255.0F; - ParticleOptions particleOptions = i == 2007 ? ParticleTypes.INSTANT_EFFECT : ParticleTypes.EFFECT; + float h = (data >> 16 & 0xFF) / 255.0F; + float k = (data >> 8 & 0xFF) / 255.0F; + float l = (data >> 0 & 0xFF) / 255.0F; + ParticleOptions particleOptions = type == 2007 ? ParticleTypes.INSTANT_EFFECT : ParticleTypes.EFFECT; - for (int ox = 0; ox < 100; ox++) { + for (int mx = 0; mx < 100; mx++) { double g = randomSource.nextDouble() * 4.0; - double p = randomSource.nextDouble() * Math.PI * 2.0; - double q = Math.cos(p) * g; - double r = 0.01 + randomSource.nextDouble() * 0.5; - double s = Math.sin(p) * g; + double n = randomSource.nextDouble() * Math.PI * 2.0; + double o = Math.cos(n) * g; + double p = 0.01 + randomSource.nextDouble() * 0.5; + double q = Math.sin(n) * g; Particle particle = this.levelRenderer - .addParticleInternal(particleOptions, particleOptions.getType().getOverrideLimiter(), vec3.x + q * 0.1, vec3.y + 0.3, vec3.z + s * 0.1, q, r, s); + .addParticleInternal(particleOptions, particleOptions.getType().getOverrideLimiter(), vec3.x + o * 0.1, vec3.y + 0.3, vec3.z + q * 0.1, o, p, q); if (particle != null) { - float t = 0.75F + randomSource.nextFloat() * 0.25F; - particle.setColor(h * t, m * t, n * t); + float r = 0.75F + randomSource.nextFloat() * 0.25F; + particle.setColor(h * r, k * r, l * r); particle.setPower((float)g); } } - this.level.playLocalSound(blockPos, SoundEvents.SPLASH_POTION_BREAK, SoundSource.NEUTRAL, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); + this.level.playLocalSound(pos, SoundEvents.SPLASH_POTION_BREAK, SoundSource.NEUTRAL, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); break; case 2003: - double d = blockPos.getX() + 0.5; - double e = blockPos.getY(); - double f = blockPos.getZ() + 0.5; + double d = pos.getX() + 0.5; + double e = pos.getY(); + double f = pos.getZ() + 0.5; - for (int k = 0; k < 8; k++) { + for (int i = 0; i < 8; i++) { this.levelRenderer .addParticle( new ItemParticleOption(ParticleTypes.ITEM, new ItemStack(Items.ENDER_EYE)), @@ -379,60 +362,58 @@ public class LevelEventHandler { } break; case 2004: - for (int ux = 0; ux < 20; ux++) { - double v = blockPos.getX() + 0.5 + (randomSource.nextDouble() - 0.5) * 2.0; - double w = blockPos.getY() + 0.5 + (randomSource.nextDouble() - 0.5) * 2.0; - double x = blockPos.getZ() + 0.5 + (randomSource.nextDouble() - 0.5) * 2.0; - this.level.addParticle(ParticleTypes.SMOKE, v, w, x, 0.0, 0.0, 0.0); - this.level.addParticle(ParticleTypes.FLAME, v, w, x, 0.0, 0.0, 0.0); + for (int sx = 0; sx < 20; sx++) { + double t = pos.getX() + 0.5 + (randomSource.nextDouble() - 0.5) * 2.0; + double u = pos.getY() + 0.5 + (randomSource.nextDouble() - 0.5) * 2.0; + double v = pos.getZ() + 0.5 + (randomSource.nextDouble() - 0.5) * 2.0; + this.level.addParticle(ParticleTypes.SMOKE, t, u, v, 0.0, 0.0, 0.0); + this.level.addParticle(ParticleTypes.FLAME, t, u, v, 0.0, 0.0, 0.0); } break; case 2006: - for (int o = 0; o < 200; o++) { - float ad = randomSource.nextFloat() * 4.0F; - float ai = randomSource.nextFloat() * (float) (Math.PI * 2); - double p = Mth.cos(ai) * ad; - double q = 0.01 + randomSource.nextDouble() * 0.5; - double r = Mth.sin(ai) * ad; + for (int m = 0; m < 200; m++) { + float ab = randomSource.nextFloat() * 4.0F; + float ag = randomSource.nextFloat() * (float) (Math.PI * 2); + double n = Mth.cos(ag) * ab; + double o = 0.01 + randomSource.nextDouble() * 0.5; + double p = Mth.sin(ag) * ab; Particle particle2 = this.levelRenderer - .addParticleInternal(ParticleTypes.DRAGON_BREATH, false, blockPos.getX() + p * 0.1, blockPos.getY() + 0.3, blockPos.getZ() + r * 0.1, p, q, r); + .addParticleInternal(ParticleTypes.DRAGON_BREATH, false, pos.getX() + n * 0.1, pos.getY() + 0.3, pos.getZ() + p * 0.1, n, o, p); if (particle2 != null) { - particle2.setPower(ad); + particle2.setPower(ab); } } - if (j == 1) { - this.level.playLocalSound(blockPos, SoundEvents.DRAGON_FIREBALL_EXPLODE, SoundSource.HOSTILE, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); + if (data == 1) { + this.level.playLocalSound(pos, SoundEvents.DRAGON_FIREBALL_EXPLODE, SoundSource.HOSTILE, 1.0F, randomSource.nextFloat() * 0.1F + 0.9F, false); } break; case 2008: - this.level.addParticle(ParticleTypes.EXPLOSION, blockPos.getX() + 0.5, blockPos.getY() + 0.5, blockPos.getZ() + 0.5, 0.0, 0.0, 0.0); + this.level.addParticle(ParticleTypes.EXPLOSION, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 0.0, 0.0, 0.0); break; case 2009: - for (int ox = 0; ox < 8; ox++) { + for (int mx = 0; mx < 8; mx++) { this.level - .addParticle( - ParticleTypes.CLOUD, blockPos.getX() + randomSource.nextDouble(), blockPos.getY() + 1.2, blockPos.getZ() + randomSource.nextDouble(), 0.0, 0.0, 0.0 - ); + .addParticle(ParticleTypes.CLOUD, pos.getX() + randomSource.nextDouble(), pos.getY() + 1.2, pos.getZ() + randomSource.nextDouble(), 0.0, 0.0, 0.0); } break; case 2010: - this.shootParticles(j, blockPos, randomSource, ParticleTypes.WHITE_SMOKE); + this.shootParticles(data, pos, randomSource, ParticleTypes.WHITE_SMOKE); break; case 2011: - ParticleUtils.spawnParticleInBlock(this.level, blockPos, j, ParticleTypes.HAPPY_VILLAGER); + ParticleUtils.spawnParticleInBlock(this.level, pos, data, ParticleTypes.HAPPY_VILLAGER); break; case 2012: - ParticleUtils.spawnParticleInBlock(this.level, blockPos, j, ParticleTypes.HAPPY_VILLAGER); + ParticleUtils.spawnParticleInBlock(this.level, pos, data, ParticleTypes.HAPPY_VILLAGER); break; case 2013: - ParticleUtils.spawnSmashAttackParticles(this.level, blockPos, j); + ParticleUtils.spawnSmashAttackParticles(this.level, pos, data); break; case 3000: - this.level.addParticle(ParticleTypes.EXPLOSION_EMITTER, true, blockPos.getX() + 0.5, blockPos.getY() + 0.5, blockPos.getZ() + 0.5, 0.0, 0.0, 0.0); + this.level.addParticle(ParticleTypes.EXPLOSION_EMITTER, true, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 0.0, 0.0, 0.0); this.level .playLocalSound( - blockPos, + pos, SoundEvents.END_GATEWAY_SPAWN, SoundSource.BLOCKS, 10.0F, @@ -441,93 +422,84 @@ public class LevelEventHandler { ); break; case 3001: - this.level.playLocalSound(blockPos, SoundEvents.ENDER_DRAGON_GROWL, SoundSource.HOSTILE, 64.0F, 0.8F + this.level.random.nextFloat() * 0.3F, false); + this.level.playLocalSound(pos, SoundEvents.ENDER_DRAGON_GROWL, SoundSource.HOSTILE, 64.0F, 0.8F + this.level.random.nextFloat() * 0.3F, false); break; case 3002: - if (j >= 0 && j < Direction.Axis.VALUES.length) { - ParticleUtils.spawnParticlesAlongAxis(Direction.Axis.VALUES[j], this.level, blockPos, 0.125, ParticleTypes.ELECTRIC_SPARK, UniformInt.of(10, 19)); + if (data >= 0 && data < Direction.Axis.VALUES.length) { + ParticleUtils.spawnParticlesAlongAxis(Direction.Axis.VALUES[data], this.level, pos, 0.125, ParticleTypes.ELECTRIC_SPARK, UniformInt.of(10, 19)); } else { - ParticleUtils.spawnParticlesOnBlockFaces(this.level, blockPos, ParticleTypes.ELECTRIC_SPARK, UniformInt.of(3, 5)); + ParticleUtils.spawnParticlesOnBlockFaces(this.level, pos, ParticleTypes.ELECTRIC_SPARK, UniformInt.of(3, 5)); } break; case 3003: - ParticleUtils.spawnParticlesOnBlockFaces(this.level, blockPos, ParticleTypes.WAX_ON, UniformInt.of(3, 5)); - this.level.playLocalSound(blockPos, SoundEvents.HONEYCOMB_WAX_ON, SoundSource.BLOCKS, 1.0F, 1.0F, false); + ParticleUtils.spawnParticlesOnBlockFaces(this.level, pos, ParticleTypes.WAX_ON, UniformInt.of(3, 5)); + this.level.playLocalSound(pos, SoundEvents.HONEYCOMB_WAX_ON, SoundSource.BLOCKS, 1.0F, 1.0F, false); break; case 3004: - ParticleUtils.spawnParticlesOnBlockFaces(this.level, blockPos, ParticleTypes.WAX_OFF, UniformInt.of(3, 5)); + ParticleUtils.spawnParticlesOnBlockFaces(this.level, pos, ParticleTypes.WAX_OFF, UniformInt.of(3, 5)); break; case 3005: - ParticleUtils.spawnParticlesOnBlockFaces(this.level, blockPos, ParticleTypes.SCRAPE, UniformInt.of(3, 5)); + ParticleUtils.spawnParticlesOnBlockFaces(this.level, pos, ParticleTypes.SCRAPE, UniformInt.of(3, 5)); break; case 3006: - int u = j >> 6; - if (u > 0) { - if (randomSource.nextFloat() < 0.3F + u * 0.1F) { - float n = 0.15F + 0.02F * u * u * randomSource.nextFloat(); - float y = 0.4F + 0.3F * u * randomSource.nextFloat(); - this.level.playLocalSound(blockPos, SoundEvents.SCULK_BLOCK_CHARGE, SoundSource.BLOCKS, n, y, false); + int s = data >> 6; + if (s > 0) { + if (randomSource.nextFloat() < 0.3F + s * 0.1F) { + float l = 0.15F + 0.02F * s * s * randomSource.nextFloat(); + float w = 0.4F + 0.3F * s * randomSource.nextFloat(); + this.level.playLocalSound(pos, SoundEvents.SCULK_BLOCK_CHARGE, SoundSource.BLOCKS, l, w, false); } - byte b = (byte)(j & 63); - IntProvider intProvider = UniformInt.of(0, u); - float z = 0.005F; + byte b = (byte)(data & 63); + IntProvider intProvider = UniformInt.of(0, s); + float x = 0.005F; Supplier supplier = () -> new Vec3( Mth.nextDouble(randomSource, -0.005F, 0.005F), Mth.nextDouble(randomSource, -0.005F, 0.005F), Mth.nextDouble(randomSource, -0.005F, 0.005F) ); if (b == 0) { for (Direction direction : Direction.values()) { - float aa = direction == Direction.DOWN ? (float) Math.PI : 0.0F; - double r = direction.getAxis() == Direction.Axis.Y ? 0.65 : 0.57; - ParticleUtils.spawnParticlesOnBlockFace(this.level, blockPos, new SculkChargeParticleOptions(aa), intProvider, direction, supplier, r); + float y = direction == Direction.DOWN ? (float) Math.PI : 0.0F; + double p = direction.getAxis() == Direction.Axis.Y ? 0.65 : 0.57; + ParticleUtils.spawnParticlesOnBlockFace(this.level, pos, new SculkChargeParticleOptions(y), intProvider, direction, supplier, p); } } else { for (Direction direction2 : MultifaceBlock.unpack(b)) { - float ab = direction2 == Direction.UP ? (float) Math.PI : 0.0F; - double q = 0.35; - ParticleUtils.spawnParticlesOnBlockFace(this.level, blockPos, new SculkChargeParticleOptions(ab), intProvider, direction2, supplier, 0.35); + float z = direction2 == Direction.UP ? (float) Math.PI : 0.0F; + double o = 0.35; + ParticleUtils.spawnParticlesOnBlockFace(this.level, pos, new SculkChargeParticleOptions(z), intProvider, direction2, supplier, 0.35); } } } else { - this.level.playLocalSound(blockPos, SoundEvents.SCULK_BLOCK_CHARGE, SoundSource.BLOCKS, 1.0F, 1.0F, false); - boolean bl = this.level.getBlockState(blockPos).isCollisionShapeFullBlock(this.level, blockPos); - int ac = bl ? 40 : 20; - float z = bl ? 0.45F : 0.25F; - float ad = 0.07F; + this.level.playLocalSound(pos, SoundEvents.SCULK_BLOCK_CHARGE, SoundSource.BLOCKS, 1.0F, 1.0F, false); + boolean bl = this.level.getBlockState(pos).isCollisionShapeFullBlock(this.level, pos); + int aa = bl ? 40 : 20; + float x = bl ? 0.45F : 0.25F; + float ab = 0.07F; - for (int ae = 0; ae < ac; ae++) { - float af = 2.0F * randomSource.nextFloat() - 1.0F; - float ab = 2.0F * randomSource.nextFloat() - 1.0F; - float ag = 2.0F * randomSource.nextFloat() - 1.0F; + for (int ac = 0; ac < aa; ac++) { + float ad = 2.0F * randomSource.nextFloat() - 1.0F; + float z = 2.0F * randomSource.nextFloat() - 1.0F; + float ae = 2.0F * randomSource.nextFloat() - 1.0F; this.level .addParticle( - ParticleTypes.SCULK_CHARGE_POP, - blockPos.getX() + 0.5 + af * z, - blockPos.getY() + 0.5 + ab * z, - blockPos.getZ() + 0.5 + ag * z, - af * 0.07F, - ab * 0.07F, - ag * 0.07F + ParticleTypes.SCULK_CHARGE_POP, pos.getX() + 0.5 + ad * x, pos.getY() + 0.5 + z * x, pos.getZ() + 0.5 + ae * x, ad * 0.07F, z * 0.07F, ae * 0.07F ); } } break; case 3007: - for (int ah = 0; ah < 10; ah++) { - this.level - .addParticle( - new ShriekParticleOption(ah * 5), false, blockPos.getX() + 0.5, blockPos.getY() + SculkShriekerBlock.TOP_Y, blockPos.getZ() + 0.5, 0.0, 0.0, 0.0 - ); + for (int af = 0; af < 10; af++) { + this.level.addParticle(new ShriekParticleOption(af * 5), false, pos.getX() + 0.5, pos.getY() + SculkShriekerBlock.TOP_Y, pos.getZ() + 0.5, 0.0, 0.0, 0.0); } - BlockState blockState3 = this.level.getBlockState(blockPos); + BlockState blockState3 = this.level.getBlockState(pos); boolean bl2 = blockState3.hasProperty(BlockStateProperties.WATERLOGGED) && (Boolean)blockState3.getValue(BlockStateProperties.WATERLOGGED); if (!bl2) { this.level .playLocalSound( - blockPos.getX() + 0.5, - blockPos.getY() + SculkShriekerBlock.TOP_Y, - blockPos.getZ() + 0.5, + pos.getX() + 0.5, + pos.getY() + SculkShriekerBlock.TOP_Y, + pos.getZ() + 0.5, SoundEvents.SCULK_SHRIEKER_SHRIEK, SoundSource.BLOCKS, 2.0F, @@ -537,156 +509,152 @@ public class LevelEventHandler { } break; case 3008: - BlockState blockState2 = Block.stateById(j); + BlockState blockState2 = Block.stateById(data); if (blockState2.getBlock() instanceof BrushableBlock brushableBlock) { - this.level.playLocalSound(blockPos, brushableBlock.getBrushCompletedSound(), SoundSource.PLAYERS, 1.0F, 1.0F, false); + this.level.playLocalSound(pos, brushableBlock.getBrushCompletedSound(), SoundSource.PLAYERS, 1.0F, 1.0F, false); } - this.level.addDestroyBlockEffect(blockPos, blockState2); + this.level.addDestroyBlockEffect(pos, blockState2); break; case 3009: - ParticleUtils.spawnParticlesOnBlockFaces(this.level, blockPos, ParticleTypes.EGG_CRACK, UniformInt.of(3, 6)); + ParticleUtils.spawnParticlesOnBlockFaces(this.level, pos, ParticleTypes.EGG_CRACK, UniformInt.of(3, 6)); break; case 3011: - TrialSpawner.addSpawnParticles(this.level, blockPos, randomSource, TrialSpawner.FlameParticle.decode(j).particleType); + TrialSpawner.addSpawnParticles(this.level, pos, randomSource, TrialSpawner.FlameParticle.decode(data).particleType); break; case 3012: this.level .playLocalSound( - blockPos, SoundEvents.TRIAL_SPAWNER_SPAWN_MOB, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true + pos, SoundEvents.TRIAL_SPAWNER_SPAWN_MOB, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true ); - TrialSpawner.addSpawnParticles(this.level, blockPos, randomSource, TrialSpawner.FlameParticle.decode(j).particleType); + TrialSpawner.addSpawnParticles(this.level, pos, randomSource, TrialSpawner.FlameParticle.decode(data).particleType); break; case 3013: this.level .playLocalSound( - blockPos, SoundEvents.TRIAL_SPAWNER_DETECT_PLAYER, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true + pos, SoundEvents.TRIAL_SPAWNER_DETECT_PLAYER, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true ); - TrialSpawner.addDetectPlayerParticles(this.level, blockPos, randomSource, j, ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER); + TrialSpawner.addDetectPlayerParticles(this.level, pos, randomSource, data, ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER); break; case 3014: this.level .playLocalSound( - blockPos, SoundEvents.TRIAL_SPAWNER_EJECT_ITEM, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true + pos, SoundEvents.TRIAL_SPAWNER_EJECT_ITEM, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true ); - TrialSpawner.addEjectItemParticles(this.level, blockPos, randomSource); + TrialSpawner.addEjectItemParticles(this.level, pos, randomSource); break; case 3015: - if (this.level.getBlockEntity(blockPos) instanceof VaultBlockEntity vaultBlockEntity) { + if (this.level.getBlockEntity(pos) instanceof VaultBlockEntity vaultBlockEntity) { VaultBlockEntity.Client.emitActivationParticles( this.level, vaultBlockEntity.getBlockPos(), vaultBlockEntity.getBlockState(), vaultBlockEntity.getSharedData(), - j == 0 ? ParticleTypes.SMALL_FLAME : ParticleTypes.SOUL_FIRE_FLAME + data == 0 ? ParticleTypes.SMALL_FLAME : ParticleTypes.SOUL_FIRE_FLAME ); this.level - .playLocalSound(blockPos, SoundEvents.VAULT_ACTIVATE, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true); + .playLocalSound(pos, SoundEvents.VAULT_ACTIVATE, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true); } break; case 3016: - VaultBlockEntity.Client.emitDeactivationParticles(this.level, blockPos, j == 0 ? ParticleTypes.SMALL_FLAME : ParticleTypes.SOUL_FIRE_FLAME); + VaultBlockEntity.Client.emitDeactivationParticles(this.level, pos, data == 0 ? ParticleTypes.SMALL_FLAME : ParticleTypes.SOUL_FIRE_FLAME); this.level - .playLocalSound( - blockPos, SoundEvents.VAULT_DEACTIVATE, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true - ); + .playLocalSound(pos, SoundEvents.VAULT_DEACTIVATE, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true); break; case 3017: - TrialSpawner.addEjectItemParticles(this.level, blockPos, randomSource); + TrialSpawner.addEjectItemParticles(this.level, pos, randomSource); break; case 3018: - for (int ux = 0; ux < 10; ux++) { + for (int sx = 0; sx < 10; sx++) { + double t = randomSource.nextGaussian() * 0.02; + double u = randomSource.nextGaussian() * 0.02; double v = randomSource.nextGaussian() * 0.02; - double w = randomSource.nextGaussian() * 0.02; - double x = randomSource.nextGaussian() * 0.02; this.level .addParticle( - ParticleTypes.POOF, - blockPos.getX() + randomSource.nextDouble(), - blockPos.getY() + randomSource.nextDouble(), - blockPos.getZ() + randomSource.nextDouble(), - v, - w, - x + ParticleTypes.POOF, pos.getX() + randomSource.nextDouble(), pos.getY() + randomSource.nextDouble(), pos.getZ() + randomSource.nextDouble(), t, u, v ); } this.level - .playLocalSound(blockPos, SoundEvents.COBWEB_PLACE, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true); + .playLocalSound(pos, SoundEvents.COBWEB_PLACE, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true); break; case 3019: this.level .playLocalSound( - blockPos, SoundEvents.TRIAL_SPAWNER_DETECT_PLAYER, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true + pos, SoundEvents.TRIAL_SPAWNER_DETECT_PLAYER, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true ); - TrialSpawner.addDetectPlayerParticles(this.level, blockPos, randomSource, j, ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER_OMINOUS); + TrialSpawner.addDetectPlayerParticles(this.level, pos, randomSource, data, ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER_OMINOUS); break; case 3020: this.level .playLocalSound( - blockPos, + pos, SoundEvents.TRIAL_SPAWNER_OMINOUS_ACTIVATE, SoundSource.BLOCKS, - j == 0 ? 0.3F : 1.0F, + data == 0 ? 0.3F : 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true ); - TrialSpawner.addDetectPlayerParticles(this.level, blockPos, randomSource, 0, ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER_OMINOUS); - TrialSpawner.addBecomeOminousParticles(this.level, blockPos, randomSource); + TrialSpawner.addDetectPlayerParticles(this.level, pos, randomSource, 0, ParticleTypes.TRIAL_SPAWNER_DETECTED_PLAYER_OMINOUS); + TrialSpawner.addBecomeOminousParticles(this.level, pos, randomSource); break; case 3021: this.level .playLocalSound( - blockPos, SoundEvents.TRIAL_SPAWNER_SPAWN_ITEM, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true + pos, SoundEvents.TRIAL_SPAWNER_SPAWN_ITEM, SoundSource.BLOCKS, 1.0F, (randomSource.nextFloat() - randomSource.nextFloat()) * 0.2F + 1.0F, true ); - TrialSpawner.addSpawnParticles(this.level, blockPos, randomSource, TrialSpawner.FlameParticle.decode(j).particleType); + TrialSpawner.addSpawnParticles(this.level, pos, randomSource, TrialSpawner.FlameParticle.decode(data).particleType); } } - private void shootParticles(int i, BlockPos blockPos, RandomSource randomSource, SimpleParticleType simpleParticleType) { - Direction direction = Direction.from3DDataValue(i); - int j = direction.getStepX(); - int k = direction.getStepY(); - int l = direction.getStepZ(); + private void shootParticles(int direction, BlockPos pos, RandomSource random, SimpleParticleType particleType) { + Direction direction2 = Direction.from3DDataValue(direction); + int i = direction2.getStepX(); + int j = direction2.getStepY(); + int k = direction2.getStepZ(); - for (int m = 0; m < 10; m++) { - double d = randomSource.nextDouble() * 0.2 + 0.01; - double e = blockPos.getX() + j * 0.6 + 0.5 + j * 0.01 + (randomSource.nextDouble() - 0.5) * l * 0.5; - double f = blockPos.getY() + k * 0.6 + 0.5 + k * 0.01 + (randomSource.nextDouble() - 0.5) * k * 0.5; - double g = blockPos.getZ() + l * 0.6 + 0.5 + l * 0.01 + (randomSource.nextDouble() - 0.5) * j * 0.5; - double h = j * d + randomSource.nextGaussian() * 0.01; - double n = k * d + randomSource.nextGaussian() * 0.01; - double o = l * d + randomSource.nextGaussian() * 0.01; - this.levelRenderer.addParticle(simpleParticleType, e, f, g, h, n, o); + for (int l = 0; l < 10; l++) { + double d = random.nextDouble() * 0.2 + 0.01; + double e = pos.getX() + i * 0.6 + 0.5 + i * 0.01 + (random.nextDouble() - 0.5) * k * 0.5; + double f = pos.getY() + j * 0.6 + 0.5 + j * 0.01 + (random.nextDouble() - 0.5) * j * 0.5; + double g = pos.getZ() + k * 0.6 + 0.5 + k * 0.01 + (random.nextDouble() - 0.5) * i * 0.5; + double h = i * d + random.nextGaussian() * 0.01; + double m = j * d + random.nextGaussian() * 0.01; + double n = k * d + random.nextGaussian() * 0.01; + this.levelRenderer.addParticle(particleType, e, f, g, h, m, n); } } - private void playJukeboxSong(Holder holder, BlockPos blockPos) { - this.stopJukeboxSong(blockPos); - JukeboxSong jukeboxSong = holder.value(); + private void playJukeboxSong(Holder song, BlockPos pos) { + this.stopJukeboxSong(pos); + JukeboxSong jukeboxSong = song.value(); SoundEvent soundEvent = jukeboxSong.soundEvent().value(); - SoundInstance soundInstance = SimpleSoundInstance.forJukeboxSong(soundEvent, Vec3.atCenterOf(blockPos)); - this.playingJukeboxSongs.put(blockPos, soundInstance); + SoundInstance soundInstance = SimpleSoundInstance.forJukeboxSong(soundEvent, Vec3.atCenterOf(pos)); + this.playingJukeboxSongs.put(pos, soundInstance); this.minecraft.getSoundManager().play(soundInstance); this.minecraft.gui.setNowPlaying(jukeboxSong.description()); - this.notifyNearbyEntities(this.level, blockPos, true); + this.notifyNearbyEntities(this.level, pos, true); } - private void stopJukeboxSong(BlockPos blockPos) { - SoundInstance soundInstance = (SoundInstance)this.playingJukeboxSongs.remove(blockPos); + private void stopJukeboxSong(BlockPos pos) { + SoundInstance soundInstance = (SoundInstance)this.playingJukeboxSongs.remove(pos); if (soundInstance != null) { this.minecraft.getSoundManager().stop(soundInstance); } } - private void stopJukeboxSongAndNotifyNearby(BlockPos blockPos) { - this.stopJukeboxSong(blockPos); - this.notifyNearbyEntities(this.level, blockPos, false); + private void stopJukeboxSongAndNotifyNearby(BlockPos pos) { + this.stopJukeboxSong(pos); + this.notifyNearbyEntities(this.level, pos, false); } - private void notifyNearbyEntities(Level level, BlockPos blockPos, boolean bl) { - for (LivingEntity livingEntity : level.getEntitiesOfClass(LivingEntity.class, new AABB(blockPos).inflate(3.0))) { - livingEntity.setRecordPlayingNearby(blockPos, bl); + /** + * Notifies living entities in a 3 block range of the specified {@code pos} that a record is or isn't playing nearby, dependent on the specified {@code playing} parameter. + * This is used to make parrots start or stop partying. + */ + private void notifyNearbyEntities(Level level, BlockPos pos, boolean playing) { + for (LivingEntity livingEntity : level.getEntitiesOfClass(LivingEntity.class, new AABB(pos).inflate(3.0))) { + livingEntity.setRecordPlayingNearby(pos, playing); } } } diff --git a/net/minecraft/client/renderer/LevelRenderer.java b/net/minecraft/client/renderer/LevelRenderer.java index 98101c0d..c30d2178 100644 --- a/net/minecraft/client/renderer/LevelRenderer.java +++ b/net/minecraft/client/renderer/LevelRenderer.java @@ -53,6 +53,7 @@ import net.minecraft.client.PrioritizeChunkUpdates; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.Particle; import net.minecraft.client.player.LocalPlayer; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher; import net.minecraft.client.renderer.chunk.RenderRegionCache; import net.minecraft.client.renderer.chunk.SectionRenderDispatcher; @@ -421,12 +422,12 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab public void renderLevel( GraphicsResourceAllocator graphicsResourceAllocator, DeltaTracker deltaTracker, - boolean bl, + boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, - Matrix4f matrix4f, - Matrix4f matrix4f2 + Matrix4f frustumMatrix, + Matrix4f projectionMatrix ) { float f = deltaTracker.getGameTimeDeltaPartialTick(false); RenderSystem.setShaderGameTime(this.level.getGameTime(), f); @@ -442,33 +443,33 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab double e = vec3.y(); double g = vec3.z(); profilerFiller.popPush("culling"); - boolean bl2 = this.capturedFrustum != null; - Frustum frustum = bl2 ? this.capturedFrustum : this.cullingFrustum; + boolean bl = this.capturedFrustum != null; + Frustum frustum = bl ? this.capturedFrustum : this.cullingFrustum; Profiler.get().popPush("captureFrustum"); if (this.captureFrustum) { - this.capturedFrustum = bl2 ? new Frustum(matrix4f, matrix4f2) : frustum; + this.capturedFrustum = bl ? new Frustum(frustumMatrix, projectionMatrix) : frustum; this.capturedFrustum.prepare(d, e, g); this.captureFrustum = false; } profilerFiller.popPush("fog"); float h = gameRenderer.getRenderDistance(); - boolean bl3 = this.minecraft.level.effects().isFoggyAt(Mth.floor(d), Mth.floor(e)) || this.minecraft.gui.getBossOverlay().shouldCreateWorldFog(); + boolean bl2 = this.minecraft.level.effects().isFoggyAt(Mth.floor(d), Mth.floor(e)) || this.minecraft.gui.getBossOverlay().shouldCreateWorldFog(); Vector4f vector4f = FogRenderer.computeFogColor( camera, f, this.minecraft.level, this.minecraft.options.getEffectiveRenderDistance(), gameRenderer.getDarkenWorldAmount(f) ); - FogParameters fogParameters = FogRenderer.setupFog(camera, FogRenderer.FogMode.FOG_TERRAIN, vector4f, h, bl3, f); - FogParameters fogParameters2 = FogRenderer.setupFog(camera, FogRenderer.FogMode.FOG_SKY, vector4f, h, bl3, f); + FogParameters fogParameters = FogRenderer.setupFog(camera, FogRenderer.FogMode.FOG_TERRAIN, vector4f, h, bl2, f); + FogParameters fogParameters2 = FogRenderer.setupFog(camera, FogRenderer.FogMode.FOG_SKY, vector4f, h, bl2, f); profilerFiller.popPush("cullEntities"); - boolean bl4 = this.collectVisibleEntities(camera, frustum, this.visibleEntities); + boolean bl3 = this.collectVisibleEntities(camera, frustum, this.visibleEntities); this.visibleEntityCount = this.visibleEntities.size(); profilerFiller.popPush("terrain_setup"); - this.setupRender(camera, frustum, bl2, this.minecraft.player.isSpectator()); + this.setupRender(camera, frustum, bl, this.minecraft.player.isSpectator()); profilerFiller.popPush("compile_sections"); this.compileSections(camera); Matrix4fStack matrix4fStack = RenderSystem.getModelViewStack(); matrix4fStack.pushMatrix(); - matrix4fStack.mul(matrix4f); + matrix4fStack.mul(frustumMatrix); FrameGraphBuilder frameGraphBuilder = new FrameGraphBuilder(); this.targets.main = frameGraphBuilder.importExternal("main", this.minecraft.getMainRenderTarget()); int i = this.minecraft.getMainRenderTarget().width; @@ -493,13 +494,13 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab RenderSystem.clearColor(vector4f.x, vector4f.y, vector4f.z, 0.0F); RenderSystem.clear(16640); }); - if (!bl3) { + if (!bl2) { this.addSkyPass(frameGraphBuilder, camera, f, fogParameters2); } - this.addMainPass(frameGraphBuilder, frustum, camera, matrix4f, matrix4f2, fogParameters, bl, bl4, deltaTracker, profilerFiller); + this.addMainPass(frameGraphBuilder, frustum, camera, frustumMatrix, projectionMatrix, fogParameters, renderBlockOutline, bl3, deltaTracker, profilerFiller); PostChain postChain2 = this.minecraft.getShaderManager().getPostChain(ENTITY_OUTLINE_POST_CHAIN_ID, LevelTargetBundle.OUTLINE_TARGETS); - if (bl4 && postChain2 != null) { + if (bl3 && postChain2 != null) { postChain2.addToFrame(frameGraphBuilder, i, j, this.targets); } @@ -510,7 +511,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab if (!Float.isNaN(k)) { float l = this.ticks + f; int m = this.level.getCloudColor(f); - this.addCloudsPass(frameGraphBuilder, matrix4f, matrix4f2, cloudStatus, camera.getPosition(), l, m, k + 0.33F); + this.addCloudsPass(frameGraphBuilder, frustumMatrix, projectionMatrix, cloudStatus, camera.getPosition(), l, m, k + 0.33F); } } @@ -523,12 +524,12 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab profilerFiller.popPush("framegraph"); frameGraphBuilder.execute(graphicsResourceAllocator, new FrameGraphBuilder.Inspector() { @Override - public void beforeExecutePass(String string) { - profilerFiller.push(string); + public void beforeExecutePass(String name) { + profilerFiller.push(name); } @Override - public void afterExecutePass(String string) { + public void afterExecutePass(String name) { profilerFiller.pop(); } }); @@ -545,13 +546,13 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab FrameGraphBuilder frameGraphBuilder, Frustum frustum, Camera camera, - Matrix4f matrix4f, - Matrix4f matrix4f2, + Matrix4f frustumMatrix, + Matrix4f projectionMatrix, FogParameters fogParameters, - boolean bl, - boolean bl2, + boolean renderBlockOutline, + boolean renderEntityOutline, DeltaTracker deltaTracker, - ProfilerFiller profilerFiller + ProfilerFiller profiler ) { FramePass framePass = frameGraphBuilder.addPass("main"); this.targets.main = framePass.readsAndWrites(this.targets.main); @@ -567,7 +568,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.targets.weather = framePass.readsAndWrites(this.targets.weather); } - if (bl2 && this.targets.entityOutline != null) { + if (renderEntityOutline && this.targets.entityOutline != null) { this.targets.entityOutline = framePass.readsAndWrites(this.targets.entityOutline); } @@ -583,10 +584,10 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab double d = vec3.x(); double e = vec3.y(); double g = vec3.z(); - profilerFiller.push("terrain"); - this.renderSectionLayer(RenderType.solid(), d, e, g, matrix4f, matrix4f2); - this.renderSectionLayer(RenderType.cutoutMipped(), d, e, g, matrix4f, matrix4f2); - this.renderSectionLayer(RenderType.cutout(), d, e, g, matrix4f, matrix4f2); + profiler.push("terrain"); + this.renderSectionLayer(RenderType.solid(), d, e, g, frustumMatrix, projectionMatrix); + this.renderSectionLayer(RenderType.cutoutMipped(), d, e, g, frustumMatrix, projectionMatrix); + this.renderSectionLayer(RenderType.cutout(), d, e, g, frustumMatrix, projectionMatrix); if (this.level.effects().constantAmbientLight()) { Lighting.setupNetherLevel(); } else { @@ -612,13 +613,13 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } PoseStack poseStack = new PoseStack(); - MultiBufferSource.BufferSource bufferSource = this.renderBuffers.bufferSource(); - MultiBufferSource.BufferSource bufferSource2 = this.renderBuffers.crumblingBufferSource(); - profilerFiller.popPush("entities"); + BufferSource bufferSource = this.renderBuffers.bufferSource(); + BufferSource bufferSource2 = this.renderBuffers.crumblingBufferSource(); + profiler.popPush("entities"); this.renderEntities(poseStack, bufferSource, camera, deltaTracker, this.visibleEntities); bufferSource.endLastBatch(); this.checkPoseStack(poseStack); - profilerFiller.popPush("blockentities"); + profiler.popPush("blockentities"); this.renderBlockEntities(poseStack, bufferSource, bufferSource2, camera, f); bufferSource.endLastBatch(); this.checkPoseStack(poseStack); @@ -633,11 +634,11 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab bufferSource.endBatch(Sheets.hangingSignSheet()); bufferSource.endBatch(Sheets.chestSheet()); this.renderBuffers.outlineBufferSource().endOutlineBatch(); - if (bl) { + if (renderBlockOutline) { this.renderBlockOutline(camera, bufferSource, poseStack, false); } - profilerFiller.popPush("debug"); + profiler.popPush("debug"); this.minecraft.debugRenderer.render(poseStack, frustum, bufferSource, d, e, g); bufferSource.endLastBatch(); this.checkPoseStack(poseStack); @@ -648,7 +649,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab bufferSource.endBatch(RenderType.glint()); bufferSource.endBatch(RenderType.glintTranslucent()); bufferSource.endBatch(RenderType.entityGlint()); - profilerFiller.popPush("destroyProgress"); + profiler.popPush("destroyProgress"); this.renderBlockDestroyAnimation(poseStack, camera, bufferSource2); bufferSource2.endBatch(); this.checkPoseStack(poseStack); @@ -660,20 +661,20 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab resourceHandle2.get().copyDepthFrom(resourceHandle.get()); } - profilerFiller.popPush("translucent"); - this.renderSectionLayer(RenderType.translucent(), d, e, g, matrix4f, matrix4f2); - profilerFiller.popPush("string"); - this.renderSectionLayer(RenderType.tripwire(), d, e, g, matrix4f, matrix4f2); - if (bl) { + profiler.popPush("translucent"); + this.renderSectionLayer(RenderType.translucent(), d, e, g, frustumMatrix, projectionMatrix); + profiler.popPush("string"); + this.renderSectionLayer(RenderType.tripwire(), d, e, g, frustumMatrix, projectionMatrix); + if (renderBlockOutline) { this.renderBlockOutline(camera, bufferSource, poseStack, true); } bufferSource.endBatch(); - profilerFiller.pop(); + profiler.pop(); }); } - private void addParticlesPass(FrameGraphBuilder frameGraphBuilder, Camera camera, LightTexture lightTexture, float f, FogParameters fogParameters) { + private void addParticlesPass(FrameGraphBuilder frameGraphBuilder, Camera camera, LightTexture lightTexture, float partialTick, FogParameters fog) { FramePass framePass = frameGraphBuilder.addPass("particles"); if (this.targets.particles != null) { this.targets.particles = framePass.readsAndWrites(this.targets.particles); @@ -685,7 +686,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab ResourceHandle resourceHandle = this.targets.main; ResourceHandle resourceHandle2 = this.targets.particles; framePass.executes(() -> { - RenderSystem.setShaderFog(fogParameters); + RenderSystem.setShaderFog(fog); if (resourceHandle2 != null) { resourceHandle2.get().setClearColor(0.0F, 0.0F, 0.0F, 0.0F); resourceHandle2.get().clear(); @@ -693,13 +694,20 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } RenderStateShard.PARTICLES_TARGET.setupRenderState(); - this.minecraft.particleEngine.render(lightTexture, camera, f); + this.minecraft.particleEngine.render(lightTexture, camera, partialTick); RenderStateShard.PARTICLES_TARGET.clearRenderState(); }); } private void addCloudsPass( - FrameGraphBuilder frameGraphBuilder, Matrix4f matrix4f, Matrix4f matrix4f2, CloudStatus cloudStatus, Vec3 vec3, float f, int i, float g + FrameGraphBuilder frameGraphBuilder, + Matrix4f frustumMatrix, + Matrix4f projectionMatrix, + CloudStatus cloudStatus, + Vec3 cameraPosition, + float ageInTicks, + int height, + float ticks ) { FramePass framePass = frameGraphBuilder.addPass("clouds"); if (this.targets.clouds != null) { @@ -715,13 +723,13 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab resourceHandle.get().clear(); } - this.cloudRenderer.render(i, cloudStatus, g, matrix4f, matrix4f2, vec3, f); + this.cloudRenderer.render(height, cloudStatus, ticks, frustumMatrix, projectionMatrix, cameraPosition, ageInTicks); }); } - private void addWeatherPass(FrameGraphBuilder frameGraphBuilder, LightTexture lightTexture, Vec3 vec3, float f, FogParameters fogParameters) { + private void addWeatherPass(FrameGraphBuilder frameGraphBuilder, LightTexture lightTexture, Vec3 cameraPosition, float partialTick, FogParameters fog) { int i = this.minecraft.options.getEffectiveRenderDistance() * 16; - float g = this.minecraft.gameRenderer.getDepthFar(); + float f = this.minecraft.gameRenderer.getDepthFar(); FramePass framePass = frameGraphBuilder.addPass("weather"); if (this.targets.weather != null) { this.targets.weather = framePass.readsAndWrites(this.targets.weather); @@ -730,15 +738,15 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } framePass.executes(() -> { - RenderSystem.setShaderFog(fogParameters); + RenderSystem.setShaderFog(fog); RenderStateShard.WEATHER_TARGET.setupRenderState(); - this.weatherEffectRenderer.render(this.minecraft.level, lightTexture, this.ticks, f, vec3); - this.worldBorderRenderer.render(this.level.getWorldBorder(), vec3, i, g); + this.weatherEffectRenderer.render(this.minecraft.level, lightTexture, this.ticks, partialTick, cameraPosition); + this.worldBorderRenderer.render(this.level.getWorldBorder(), cameraPosition, i, f); RenderStateShard.WEATHER_TARGET.clearRenderState(); }); } - private void addLateDebugPass(FrameGraphBuilder frameGraphBuilder, Vec3 vec3, FogParameters fogParameters) { + private void addLateDebugPass(FrameGraphBuilder frameGraphBuilder, Vec3 cameraPosition, FogParameters fog) { FramePass framePass = frameGraphBuilder.addPass("late_debug"); this.targets.main = framePass.readsAndWrites(this.targets.main); if (this.targets.itemEntity != null) { @@ -747,17 +755,17 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab ResourceHandle resourceHandle = this.targets.main; framePass.executes(() -> { - RenderSystem.setShaderFog(fogParameters); + RenderSystem.setShaderFog(fog); resourceHandle.get().bindWrite(false); PoseStack poseStack = new PoseStack(); - MultiBufferSource.BufferSource bufferSource = this.renderBuffers.bufferSource(); - this.minecraft.debugRenderer.renderAfterTranslucents(poseStack, bufferSource, vec3.x, vec3.y, vec3.z); + BufferSource bufferSource = this.renderBuffers.bufferSource(); + this.minecraft.debugRenderer.renderAfterTranslucents(poseStack, bufferSource, cameraPosition.x, cameraPosition.y, cameraPosition.z); bufferSource.endLastBatch(); this.checkPoseStack(poseStack); }); } - private boolean collectVisibleEntities(Camera camera, Frustum frustum, List list) { + private boolean collectVisibleEntities(Camera camera, Frustum frustum, List output) { Vec3 vec3 = camera.getPosition(); double d = vec3.x(); double e = vec3.y(); @@ -772,7 +780,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab if ((this.level.isOutsideBuildHeight(blockPos.getY()) || this.isSectionCompiled(blockPos)) && (entity != camera.getEntity() || camera.isDetached() || camera.getEntity() instanceof LivingEntity && ((LivingEntity)camera.getEntity()).isSleeping()) && (!(entity instanceof LocalPlayer) || camera.getEntity() == entity)) { - list.add(entity); + output.add(entity); if (bl2 && this.minecraft.shouldEntityAppearGlowing(entity)) { bl = true; } @@ -783,7 +791,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab return bl; } - private void renderEntities(PoseStack poseStack, MultiBufferSource.BufferSource bufferSource, Camera camera, DeltaTracker deltaTracker, List list) { + private void renderEntities(PoseStack poseStack, BufferSource bufferSource, Camera camera, DeltaTracker deltaTracker, List entities) { Vec3 vec3 = camera.getPosition(); double d = vec3.x(); double e = vec3.y(); @@ -791,7 +799,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab TickRateManager tickRateManager = this.minecraft.level.tickRateManager(); boolean bl = this.shouldShowEntityOutlines(); - for (Entity entity : list) { + for (Entity entity : entities) { if (entity.tickCount == 0) { entity.xOld = entity.getX(); entity.yOld = entity.getY(); @@ -813,13 +821,11 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } - private void renderBlockEntities( - PoseStack poseStack, MultiBufferSource.BufferSource bufferSource, MultiBufferSource.BufferSource bufferSource2, Camera camera, float f - ) { + private void renderBlockEntities(PoseStack poseStack, BufferSource bufferSource, BufferSource crumblingBufferSource, Camera camera, float partialTick) { Vec3 vec3 = camera.getPosition(); double d = vec3.x(); double e = vec3.y(); - double g = vec3.z(); + double f = vec3.z(); for (SectionRenderDispatcher.RenderSection renderSection : this.visibleSections) { List list = renderSection.getCompiled().getRenderableBlockEntities(); @@ -828,13 +834,15 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab BlockPos blockPos = blockEntity.getBlockPos(); MultiBufferSource multiBufferSource = bufferSource; poseStack.pushPose(); - poseStack.translate(blockPos.getX() - d, blockPos.getY() - e, blockPos.getZ() - g); + poseStack.translate(blockPos.getX() - d, blockPos.getY() - e, blockPos.getZ() - f); SortedSet sortedSet = this.destructionProgress.get(blockPos.asLong()); if (sortedSet != null && !sortedSet.isEmpty()) { int i = ((BlockDestructionProgress)sortedSet.last()).getProgress(); if (i >= 0) { PoseStack.Pose pose = poseStack.last(); - VertexConsumer vertexConsumer = new SheetedDecalTextureGenerator(bufferSource2.getBuffer((RenderType)ModelBakery.DESTROY_TYPES.get(i)), pose, 1.0F); + VertexConsumer vertexConsumer = new SheetedDecalTextureGenerator( + crumblingBufferSource.getBuffer((RenderType)ModelBakery.DESTROY_TYPES.get(i)), pose, 1.0F + ); multiBufferSource = renderType -> { VertexConsumer vertexConsumer2 = bufferSource.getBuffer(renderType); return renderType.affectsCrumbling() ? VertexMultiConsumer.create(vertexConsumer, vertexConsumer2) : vertexConsumer2; @@ -842,7 +850,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } - this.blockEntityRenderDispatcher.render(blockEntity, f, poseStack, multiBufferSource); + this.blockEntityRenderDispatcher.render(blockEntity, partialTick, poseStack, multiBufferSource); poseStack.popPose(); } } @@ -852,14 +860,14 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab for (BlockEntity blockEntity2 : this.globalBlockEntities) { BlockPos blockPos2 = blockEntity2.getBlockPos(); poseStack.pushPose(); - poseStack.translate(blockPos2.getX() - d, blockPos2.getY() - e, blockPos2.getZ() - g); - this.blockEntityRenderDispatcher.render(blockEntity2, f, poseStack, bufferSource); + poseStack.translate(blockPos2.getX() - d, blockPos2.getY() - e, blockPos2.getZ() - f); + this.blockEntityRenderDispatcher.render(blockEntity2, partialTick, poseStack, bufferSource); poseStack.popPose(); } } } - private void renderBlockDestroyAnimation(PoseStack poseStack, Camera camera, MultiBufferSource.BufferSource bufferSource) { + private void renderBlockDestroyAnimation(PoseStack poseStack, Camera camera, BufferSource bufferSource) { Vec3 vec3 = camera.getPosition(); double d = vec3.x(); double e = vec3.y(); @@ -882,14 +890,14 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } - private void renderBlockOutline(Camera camera, MultiBufferSource.BufferSource bufferSource, PoseStack poseStack, boolean bl) { + private void renderBlockOutline(Camera camera, BufferSource bufferSource, PoseStack poseStack, boolean sort) { if (this.minecraft.hitResult instanceof BlockHitResult blockHitResult) { if (blockHitResult.getType() != Type.MISS) { BlockPos blockPos = blockHitResult.getBlockPos(); BlockState blockState = this.level.getBlockState(blockPos); if (!blockState.isAir() && this.level.getWorldBorder().isWithinBounds(blockPos)) { - boolean bl2 = ItemBlockRenderTypes.getChunkRenderType(blockState).sortOnUpload(); - if (bl2 != bl) { + boolean bl = ItemBlockRenderTypes.getChunkRenderType(blockState).sortOnUpload(); + if (bl != sort) { return; } @@ -927,15 +935,15 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab .render(entity, d - camX, e - camY, f - camZ, partialTick, poseStack, bufferSource, this.entityRenderDispatcher.getPackedLightCoords(entity, partialTick)); } - private void scheduleTranslucentSectionResort(Vec3 vec3) { + private void scheduleTranslucentSectionResort(Vec3 cameraPosition) { if (!this.visibleSections.isEmpty()) { - BlockPos blockPos = BlockPos.containing(vec3); + BlockPos blockPos = BlockPos.containing(cameraPosition); boolean bl = !blockPos.equals(this.lastTranslucentSortBlockPos); Profiler.get().push("translucent_sort"); SectionRenderDispatcher.TranslucencyPointOfView translucencyPointOfView = new SectionRenderDispatcher.TranslucencyPointOfView(); for (SectionRenderDispatcher.RenderSection renderSection : this.nearbyVisibleSections) { - this.scheduleResort(renderSection, translucencyPointOfView, vec3, bl, true); + this.scheduleResort(renderSection, translucencyPointOfView, cameraPosition, bl, true); } this.translucencyResortIterationIndex = this.translucencyResortIterationIndex % this.visibleSections.size(); @@ -943,7 +951,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab while (i-- > 0) { int j = this.translucencyResortIterationIndex++ % this.visibleSections.size(); - this.scheduleResort(this.visibleSections.get(j), translucencyPointOfView, vec3, bl, false); + this.scheduleResort(this.visibleSections.get(j), translucencyPointOfView, cameraPosition, bl, false); } this.lastTranslucentSortBlockPos = blockPos; @@ -951,18 +959,21 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } + /** + * @param force If {@code true}, will schedule a resort even if the point of view hasn't changed + */ private void scheduleResort( - SectionRenderDispatcher.RenderSection renderSection, - SectionRenderDispatcher.TranslucencyPointOfView translucencyPointOfView, - Vec3 vec3, - boolean bl, - boolean bl2 + SectionRenderDispatcher.RenderSection section, + SectionRenderDispatcher.TranslucencyPointOfView pointOfView, + Vec3 cameraPosition, + boolean force, + boolean ignoreAxisAlignment ) { - translucencyPointOfView.set(vec3, renderSection.getSectionNode()); - boolean bl3 = !translucencyPointOfView.equals(renderSection.pointOfView.get()); - boolean bl4 = bl && (translucencyPointOfView.isAxisAligned() || bl2); - if ((bl4 || bl3) && !renderSection.transparencyResortingScheduled() && renderSection.hasTranslucentGeometry()) { - renderSection.resortTransparency(this.sectionRenderDispatcher); + pointOfView.set(cameraPosition, section.getSectionNode()); + boolean bl = !pointOfView.equals(section.pointOfView.get()); + boolean bl2 = force && (pointOfView.isAxisAligned() || ignoreAxisAlignment); + if ((bl2 || bl) && !section.transparencyResortingScheduled() && section.hasTranslucentGeometry()) { + section.resortTransparency(this.sectionRenderDispatcher); } } @@ -1044,7 +1055,7 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } - private void addSkyPass(FrameGraphBuilder frameGraphBuilder, Camera camera, float f, FogParameters fogParameters) { + private void addSkyPass(FrameGraphBuilder frameGraphBuilder, Camera camera, float partialTick, FogParameters fog) { FogType fogType = camera.getFluidInCamera(); if (fogType != FogType.POWDER_SNOW && fogType != FogType.LAVA && !this.doesMobEffectBlockSky(camera)) { DimensionSpecialEffects dimensionSpecialEffects = this.level.effects(); @@ -1053,20 +1064,20 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab FramePass framePass = frameGraphBuilder.addPass("sky"); this.targets.main = framePass.readsAndWrites(this.targets.main); framePass.executes(() -> { - RenderSystem.setShaderFog(fogParameters); + RenderSystem.setShaderFog(fog); RenderStateShard.MAIN_TARGET.setupRenderState(); PoseStack poseStack = new PoseStack(); if (skyType == DimensionSpecialEffects.SkyType.END) { this.skyRenderer.renderEndSky(poseStack); } else { Tesselator tesselator = Tesselator.getInstance(); - float g = this.level.getSunAngle(f); - float h = this.level.getTimeOfDay(f); - float i = 1.0F - this.level.getRainLevel(f); - float j = this.level.getStarBrightness(f) * i; + float g = this.level.getSunAngle(partialTick); + float h = this.level.getTimeOfDay(partialTick); + float i = 1.0F - this.level.getRainLevel(partialTick); + float j = this.level.getStarBrightness(partialTick) * i; int k = dimensionSpecialEffects.getSunriseOrSunsetColor(h); int l = this.level.getMoonPhase(); - int m = this.level.getSkyColor(this.minecraft.gameRenderer.getMainCamera().getPosition(), f); + int m = this.level.getSkyColor(this.minecraft.gameRenderer.getMainCamera().getPosition(), partialTick); float n = ARGB.from8BitChannel(ARGB.red(m)); float o = ARGB.from8BitChannel(ARGB.green(m)); float p = ARGB.from8BitChannel(ARGB.blue(m)); @@ -1075,8 +1086,8 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.skyRenderer.renderSunriseAndSunset(poseStack, tesselator, g, k); } - this.skyRenderer.renderSunMoonAndStars(poseStack, tesselator, h, l, i, j, fogParameters); - if (this.shouldRenderDarkDisc(f)) { + this.skyRenderer.renderSunMoonAndStars(poseStack, tesselator, h, l, i, j, fog); + if (this.shouldRenderDarkDisc(partialTick)) { this.skyRenderer.renderDarkDisc(poseStack); } } @@ -1085,8 +1096,8 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } - private boolean shouldRenderDarkDisc(float f) { - return this.minecraft.player.getEyePosition(f).y - this.level.getLevelData().getHorizonHeight(this.level) < 0.0; + private boolean shouldRenderDarkDisc(float partialTick) { + return this.minecraft.player.getEyePosition(partialTick).y - this.level.getLevelData().getHorizonHeight(this.level) < 0.0; } private boolean doesMobEffectBlockSky(Camera camera) { @@ -1138,13 +1149,13 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.scheduleTranslucentSectionResort(camera.getPosition()); } - private static boolean isLightOnInSectionAndNeighbors(LevelLightEngine levelLightEngine, long l) { - int i = SectionPos.z(l); - int j = SectionPos.x(l); + private static boolean isLightOnInSectionAndNeighbors(LevelLightEngine lightEngine, long packedSectionPos) { + int i = SectionPos.z(packedSectionPos); + int j = SectionPos.x(packedSectionPos); for (int k = i - 1; k <= i + 1; k++) { - for (int m = j - 1; m <= j + 1; m++) { - if (!levelLightEngine.lightOnInColumn(SectionPos.getZeroNode(m, k))) { + for (int l = j - 1; l <= j + 1; l++) { + if (!lightEngine.lightOnInColumn(SectionPos.getZeroNode(l, k))) { return false; } } @@ -1154,16 +1165,10 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } private void renderHitOutline( - PoseStack poseStack, VertexConsumer vertexConsumer, Entity entity, double d, double e, double f, BlockPos blockPos, BlockState blockState, int i + PoseStack poseStack, VertexConsumer buffer, Entity entity, double camX, double camY, double camZ, BlockPos pos, BlockState state, int color ) { ShapeRenderer.renderShape( - poseStack, - vertexConsumer, - blockState.getShape(this.level, blockPos, CollisionContext.of(entity)), - blockPos.getX() - d, - blockPos.getY() - e, - blockPos.getZ() - f, - i + poseStack, buffer, state.getShape(this.level, pos, CollisionContext.of(entity)), pos.getX() - camX, pos.getY() - camY, pos.getZ() - camZ, color ); } @@ -1204,11 +1209,11 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.setSectionRangeDirty(sectionX - 1, sectionY - 1, sectionZ - 1, sectionX + 1, sectionY + 1, sectionZ + 1); } - public void setSectionRangeDirty(int i, int j, int k, int l, int m, int n) { - for (int o = k; o <= n; o++) { - for (int p = i; p <= l; p++) { - for (int q = j; q <= m; q++) { - this.setSectionDirty(p, q, o); + public void setSectionRangeDirty(int minY, int minX, int minZ, int maxY, int maxX, int maxZ) { + for (int i = minZ; i <= maxZ; i++) { + for (int j = minY; j <= maxY; j++) { + for (int k = minX; k <= maxX; k++) { + this.setSectionDirty(j, k, i); } } } @@ -1222,8 +1227,8 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab this.viewArea.setDirty(sectionX, sectionY, sectionZ, reRenderOnMainThread); } - public void onSectionBecomingNonEmpty(long l) { - SectionRenderDispatcher.RenderSection renderSection = this.viewArea.getRenderSection(l); + public void onSectionBecomingNonEmpty(long sectionPos) { + SectionRenderDispatcher.RenderSection renderSection = this.viewArea.getRenderSection(sectionPos); if (renderSection != null) { this.sectionOcclusionGraph.schedulePropagationFrom(renderSection); } @@ -1289,9 +1294,9 @@ public class LevelRenderer implements ResourceManagerReloadListener, AutoCloseab } } - private ParticleStatus calculateParticleLevel(boolean bl) { + private ParticleStatus calculateParticleLevel(boolean decreased) { ParticleStatus particleStatus = this.minecraft.options.particles().get(); - if (bl && particleStatus == ParticleStatus.MINIMAL && this.level.random.nextInt(10) == 0) { + if (decreased && particleStatus == ParticleStatus.MINIMAL && this.level.random.nextInt(10) == 0) { particleStatus = ParticleStatus.DECREASED; } diff --git a/net/minecraft/client/renderer/LevelTargetBundle.java b/net/minecraft/client/renderer/LevelTargetBundle.java index 46ad0a0a..fe1fac6a 100644 --- a/net/minecraft/client/renderer/LevelTargetBundle.java +++ b/net/minecraft/client/renderer/LevelTargetBundle.java @@ -37,45 +37,45 @@ public class LevelTargetBundle implements PostChain.TargetBundle { public ResourceHandle entityOutline; @Override - public void replace(ResourceLocation resourceLocation, ResourceHandle resourceHandle) { - if (resourceLocation.equals(MAIN_TARGET_ID)) { - this.main = resourceHandle; - } else if (resourceLocation.equals(TRANSLUCENT_TARGET_ID)) { - this.translucent = resourceHandle; - } else if (resourceLocation.equals(ITEM_ENTITY_TARGET_ID)) { - this.itemEntity = resourceHandle; - } else if (resourceLocation.equals(PARTICLES_TARGET_ID)) { - this.particles = resourceHandle; - } else if (resourceLocation.equals(WEATHER_TARGET_ID)) { - this.weather = resourceHandle; - } else if (resourceLocation.equals(CLOUDS_TARGET_ID)) { - this.clouds = resourceHandle; + public void replace(ResourceLocation id, ResourceHandle handle) { + if (id.equals(MAIN_TARGET_ID)) { + this.main = handle; + } else if (id.equals(TRANSLUCENT_TARGET_ID)) { + this.translucent = handle; + } else if (id.equals(ITEM_ENTITY_TARGET_ID)) { + this.itemEntity = handle; + } else if (id.equals(PARTICLES_TARGET_ID)) { + this.particles = handle; + } else if (id.equals(WEATHER_TARGET_ID)) { + this.weather = handle; + } else if (id.equals(CLOUDS_TARGET_ID)) { + this.clouds = handle; } else { - if (!resourceLocation.equals(ENTITY_OUTLINE_TARGET_ID)) { - throw new IllegalArgumentException("No target with id " + resourceLocation); + if (!id.equals(ENTITY_OUTLINE_TARGET_ID)) { + throw new IllegalArgumentException("No target with id " + id); } - this.entityOutline = resourceHandle; + this.entityOutline = handle; } } @Nullable @Override - public ResourceHandle get(ResourceLocation resourceLocation) { - if (resourceLocation.equals(MAIN_TARGET_ID)) { + public ResourceHandle get(ResourceLocation id) { + if (id.equals(MAIN_TARGET_ID)) { return this.main; - } else if (resourceLocation.equals(TRANSLUCENT_TARGET_ID)) { + } else if (id.equals(TRANSLUCENT_TARGET_ID)) { return this.translucent; - } else if (resourceLocation.equals(ITEM_ENTITY_TARGET_ID)) { + } else if (id.equals(ITEM_ENTITY_TARGET_ID)) { return this.itemEntity; - } else if (resourceLocation.equals(PARTICLES_TARGET_ID)) { + } else if (id.equals(PARTICLES_TARGET_ID)) { return this.particles; - } else if (resourceLocation.equals(WEATHER_TARGET_ID)) { + } else if (id.equals(WEATHER_TARGET_ID)) { return this.weather; - } else if (resourceLocation.equals(CLOUDS_TARGET_ID)) { + } else if (id.equals(CLOUDS_TARGET_ID)) { return this.clouds; } else { - return resourceLocation.equals(ENTITY_OUTLINE_TARGET_ID) ? this.entityOutline : null; + return id.equals(ENTITY_OUTLINE_TARGET_ID) ? this.entityOutline : null; } } diff --git a/net/minecraft/client/renderer/LightTexture.java b/net/minecraft/client/renderer/LightTexture.java index 6a904dfe..fb0c9be7 100644 --- a/net/minecraft/client/renderer/LightTexture.java +++ b/net/minecraft/client/renderer/LightTexture.java @@ -131,10 +131,10 @@ public class LightTexture implements AutoCloseable { return getBrightness(dimensionType.ambientLight(), lightLevel); } - public static float getBrightness(float f, int i) { - float g = i / 15.0F; - float h = g / (4.0F - 3.0F * g); - return Mth.lerp(f, h, 1.0F); + public static float getBrightness(float ambientLight, int lightLevel) { + float f = lightLevel / 15.0F; + float g = f / (4.0F - 3.0F * f); + return Mth.lerp(ambientLight, g, 1.0F); } public static int pack(int blockLight, int skyLight) { @@ -149,13 +149,13 @@ public class LightTexture implements AutoCloseable { return packedLight >>> 20 & 15; } - public static int lightCoordsWithEmission(int i, int j) { - if (j == 0) { - return i; + public static int lightCoordsWithEmission(int packedLight, int emmision) { + if (emmision == 0) { + return packedLight; } else { - int k = Math.max(sky(i), j); - int l = Math.max(block(i), j); - return pack(l, k); + int i = Math.max(sky(packedLight), emmision); + int j = Math.max(block(packedLight), emmision); + return pack(j, i); } } } diff --git a/net/minecraft/client/renderer/MapRenderer.java b/net/minecraft/client/renderer/MapRenderer.java index 14118240..7f6743a3 100644 --- a/net/minecraft/client/renderer/MapRenderer.java +++ b/net/minecraft/client/renderer/MapRenderer.java @@ -8,6 +8,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; import net.minecraft.client.renderer.state.MapRenderState; +import net.minecraft.client.renderer.state.MapRenderState.MapDecorationRenderState; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.MapDecorationTextureManager; import net.minecraft.client.resources.MapTextureManager; @@ -27,22 +28,22 @@ public class MapRenderer { private final MapTextureManager mapTextureManager; private final MapDecorationTextureManager decorationTextures; - public MapRenderer(MapDecorationTextureManager mapDecorationTextureManager, MapTextureManager mapTextureManager) { - this.decorationTextures = mapDecorationTextureManager; + public MapRenderer(MapDecorationTextureManager decorationTextures, MapTextureManager mapTextureManager) { + this.decorationTextures = decorationTextures; this.mapTextureManager = mapTextureManager; } - public void render(MapRenderState mapRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, boolean bl, int i) { + public void render(MapRenderState renderState, PoseStack poseStack, MultiBufferSource bufferSource, boolean active, int packedLight) { Matrix4f matrix4f = poseStack.last().pose(); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.text(mapRenderState.texture)); - vertexConsumer.addVertex(matrix4f, 0.0F, 128.0F, -0.01F).setColor(-1).setUv(0.0F, 1.0F).setLight(i); - vertexConsumer.addVertex(matrix4f, 128.0F, 128.0F, -0.01F).setColor(-1).setUv(1.0F, 1.0F).setLight(i); - vertexConsumer.addVertex(matrix4f, 128.0F, 0.0F, -0.01F).setColor(-1).setUv(1.0F, 0.0F).setLight(i); - vertexConsumer.addVertex(matrix4f, 0.0F, 0.0F, -0.01F).setColor(-1).setUv(0.0F, 0.0F).setLight(i); - int j = 0; + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.text(renderState.texture)); + vertexConsumer.addVertex(matrix4f, 0.0F, 128.0F, -0.01F).setColor(-1).setUv(0.0F, 1.0F).setLight(packedLight); + vertexConsumer.addVertex(matrix4f, 128.0F, 128.0F, -0.01F).setColor(-1).setUv(1.0F, 1.0F).setLight(packedLight); + vertexConsumer.addVertex(matrix4f, 128.0F, 0.0F, -0.01F).setColor(-1).setUv(1.0F, 0.0F).setLight(packedLight); + vertexConsumer.addVertex(matrix4f, 0.0F, 0.0F, -0.01F).setColor(-1).setUv(0.0F, 0.0F).setLight(packedLight); + int i = 0; - for (MapRenderState.MapDecorationRenderState mapDecorationRenderState : mapRenderState.decorations) { - if (!bl || mapDecorationRenderState.renderOnFrame) { + for (MapDecorationRenderState mapDecorationRenderState : renderState.decorations) { + if (!active || mapDecorationRenderState.renderOnFrame) { poseStack.pushPose(); poseStack.translate(mapDecorationRenderState.x / 2.0F + 64.0F, mapDecorationRenderState.y / 2.0F + 64.0F, -0.02F); poseStack.mulPose(Axis.ZP.rotationDegrees(mapDecorationRenderState.rot * 360 / 16.0F)); @@ -51,11 +52,23 @@ public class MapRenderer { Matrix4f matrix4f2 = poseStack.last().pose(); TextureAtlasSprite textureAtlasSprite = mapDecorationRenderState.atlasSprite; if (textureAtlasSprite != null) { - VertexConsumer vertexConsumer2 = multiBufferSource.getBuffer(RenderType.text(textureAtlasSprite.atlasLocation())); - vertexConsumer2.addVertex(matrix4f2, -1.0F, 1.0F, j * -0.001F).setColor(-1).setUv(textureAtlasSprite.getU0(), textureAtlasSprite.getV0()).setLight(i); - vertexConsumer2.addVertex(matrix4f2, 1.0F, 1.0F, j * -0.001F).setColor(-1).setUv(textureAtlasSprite.getU1(), textureAtlasSprite.getV0()).setLight(i); - vertexConsumer2.addVertex(matrix4f2, 1.0F, -1.0F, j * -0.001F).setColor(-1).setUv(textureAtlasSprite.getU1(), textureAtlasSprite.getV1()).setLight(i); - vertexConsumer2.addVertex(matrix4f2, -1.0F, -1.0F, j * -0.001F).setColor(-1).setUv(textureAtlasSprite.getU0(), textureAtlasSprite.getV1()).setLight(i); + VertexConsumer vertexConsumer2 = bufferSource.getBuffer(RenderType.text(textureAtlasSprite.atlasLocation())); + vertexConsumer2.addVertex(matrix4f2, -1.0F, 1.0F, i * -0.001F) + .setColor(-1) + .setUv(textureAtlasSprite.getU0(), textureAtlasSprite.getV0()) + .setLight(packedLight); + vertexConsumer2.addVertex(matrix4f2, 1.0F, 1.0F, i * -0.001F) + .setColor(-1) + .setUv(textureAtlasSprite.getU1(), textureAtlasSprite.getV0()) + .setLight(packedLight); + vertexConsumer2.addVertex(matrix4f2, 1.0F, -1.0F, i * -0.001F) + .setColor(-1) + .setUv(textureAtlasSprite.getU1(), textureAtlasSprite.getV1()) + .setLight(packedLight); + vertexConsumer2.addVertex(matrix4f2, -1.0F, -1.0F, i * -0.001F) + .setColor(-1) + .setUv(textureAtlasSprite.getU0(), textureAtlasSprite.getV1()) + .setLight(packedLight); poseStack.popPose(); } @@ -68,33 +81,43 @@ public class MapRenderer { poseStack.scale(g, g, 1.0F); poseStack.translate(0.0F, 0.0F, -0.1F); font.drawInBatch( - mapDecorationRenderState.name, 0.0F, 0.0F, -1, false, poseStack.last().pose(), multiBufferSource, Font.DisplayMode.NORMAL, Integer.MIN_VALUE, i, false + mapDecorationRenderState.name, + 0.0F, + 0.0F, + -1, + false, + poseStack.last().pose(), + bufferSource, + Font.DisplayMode.NORMAL, + Integer.MIN_VALUE, + packedLight, + false ); poseStack.popPose(); } - j++; + i++; } } } - public void extractRenderState(MapId mapId, MapItemSavedData mapItemSavedData, MapRenderState mapRenderState) { - mapRenderState.texture = this.mapTextureManager.prepareMapTexture(mapId, mapItemSavedData); - mapRenderState.decorations.clear(); + public void extractRenderState(MapId id, MapItemSavedData savedData, MapRenderState renderState) { + renderState.texture = this.mapTextureManager.prepareMapTexture(id, savedData); + renderState.decorations.clear(); - for (MapDecoration mapDecoration : mapItemSavedData.getDecorations()) { - mapRenderState.decorations.add(this.extractDecorationRenderState(mapDecoration)); + for (MapDecoration mapDecoration : savedData.getDecorations()) { + renderState.decorations.add(this.extractDecorationRenderState(mapDecoration)); } } - private MapRenderState.MapDecorationRenderState extractDecorationRenderState(MapDecoration mapDecoration) { - MapRenderState.MapDecorationRenderState mapDecorationRenderState = new MapRenderState.MapDecorationRenderState(); - mapDecorationRenderState.atlasSprite = this.decorationTextures.get(mapDecoration); - mapDecorationRenderState.x = mapDecoration.x(); - mapDecorationRenderState.y = mapDecoration.y(); - mapDecorationRenderState.rot = mapDecoration.rot(); - mapDecorationRenderState.name = (Component)mapDecoration.name().orElse(null); - mapDecorationRenderState.renderOnFrame = mapDecoration.renderOnFrame(); + private MapDecorationRenderState extractDecorationRenderState(MapDecoration decoration) { + MapDecorationRenderState mapDecorationRenderState = new MapDecorationRenderState(); + mapDecorationRenderState.atlasSprite = this.decorationTextures.get(decoration); + mapDecorationRenderState.x = decoration.x(); + mapDecorationRenderState.y = decoration.y(); + mapDecorationRenderState.rot = decoration.rot(); + mapDecorationRenderState.name = (Component)decoration.name().orElse(null); + mapDecorationRenderState.renderOnFrame = decoration.renderOnFrame(); return mapDecorationRenderState; } } diff --git a/net/minecraft/client/renderer/Octree.java b/net/minecraft/client/renderer/Octree.java index 338a68f5..549f583e 100644 --- a/net/minecraft/client/renderer/Octree.java +++ b/net/minecraft/client/renderer/Octree.java @@ -16,34 +16,34 @@ public class Octree { private final Octree.Branch root; final BlockPos cameraSectionCenter; - public Octree(SectionPos sectionPos, int i, int j, int k) { - int l = i * 2 + 1; - int m = Mth.smallestEncompassingPowerOfTwo(l); - int n = i * 16; - BlockPos blockPos = sectionPos.origin(); - this.cameraSectionCenter = sectionPos.center(); - int o = blockPos.getX() - n; - int p = o + m * 16 - 1; - int q = m >= j ? k : blockPos.getY() - n; - int r = q + m * 16 - 1; - int s = blockPos.getZ() - n; - int t = s + m * 16 - 1; - this.root = new Octree.Branch(new BoundingBox(o, q, s, p, r, t)); + public Octree(SectionPos cameraSectionPos, int viewDistance, int sectionGridSizeY, int minY) { + int i = viewDistance * 2 + 1; + int j = Mth.smallestEncompassingPowerOfTwo(i); + int k = viewDistance * 16; + BlockPos blockPos = cameraSectionPos.origin(); + this.cameraSectionCenter = cameraSectionPos.center(); + int l = blockPos.getX() - k; + int m = l + j * 16 - 1; + int n = j >= sectionGridSizeY ? minY : blockPos.getY() - k; + int o = n + j * 16 - 1; + int p = blockPos.getZ() - k; + int q = p + j * 16 - 1; + this.root = new Octree.Branch(new BoundingBox(l, n, p, m, o, q)); } - public boolean add(SectionRenderDispatcher.RenderSection renderSection) { - return this.root.add(renderSection); + public boolean add(SectionRenderDispatcher.RenderSection section) { + return this.root.add(section); } - public void visitNodes(Octree.OctreeVisitor octreeVisitor, Frustum frustum, int i) { - this.root.visitNodes(octreeVisitor, false, frustum, 0, i, true); + public void visitNodes(Octree.OctreeVisitor visitor, Frustum frustum, int nearbyRadius) { + this.root.visitNodes(visitor, false, frustum, 0, nearbyRadius, true); } - boolean isClose(double d, double e, double f, double g, double h, double i, int j) { - int k = this.cameraSectionCenter.getX(); - int l = this.cameraSectionCenter.getY(); - int m = this.cameraSectionCenter.getZ(); - return k > d - j && k < g + j && l > e - j && l < h + j && m > f - j && m < i + j; + boolean isClose(double minX, double minY, double minZ, double maxX, double maxY, double maxZ, int radius) { + int i = this.cameraSectionCenter.getX(); + int j = this.cameraSectionCenter.getY(); + int k = this.cameraSectionCenter.getZ(); + return i > minX - radius && i < maxX + radius && j > minY - radius && j < maxY + radius && k > minZ - radius && k < maxZ + radius; } @Environment(EnvType.CLIENT) @@ -59,19 +59,19 @@ public class Octree { final int yShift; final int zShift; - private AxisSorting(final int j, final int k, final int l) { - this.xShift = j; - this.yShift = k; - this.zShift = l; + private AxisSorting(final int xShift, final int yShift, final int zShift) { + this.xShift = xShift; + this.yShift = yShift; + this.zShift = zShift; } - public static Octree.AxisSorting getAxisSorting(int i, int j, int k) { - if (i > j && i > k) { - return j > k ? XYZ : XZY; - } else if (j > i && j > k) { - return i > k ? YXZ : YZX; + public static Octree.AxisSorting getAxisSorting(int xDiff, int yDiff, int zDiff) { + if (xDiff > yDiff && xDiff > zDiff) { + return yDiff > zDiff ? XYZ : XZY; + } else if (yDiff > xDiff && yDiff > zDiff) { + return xDiff > zDiff ? YXZ : YZX; } else { - return i > j ? ZXY : ZYX; + return xDiff > yDiff ? ZXY : ZYX; } } } @@ -102,41 +102,41 @@ public class Octree { this.cameraZDiffNegative = k < 0; } - public boolean add(SectionRenderDispatcher.RenderSection renderSection) { - boolean bl = renderSection.getOrigin().getX() - this.bbCenterX < 0; - boolean bl2 = renderSection.getOrigin().getY() - this.bbCenterY < 0; - boolean bl3 = renderSection.getOrigin().getZ() - this.bbCenterZ < 0; + public boolean add(SectionRenderDispatcher.RenderSection section) { + boolean bl = section.getOrigin().getX() - this.bbCenterX < 0; + boolean bl2 = section.getOrigin().getY() - this.bbCenterY < 0; + boolean bl3 = section.getOrigin().getZ() - this.bbCenterZ < 0; boolean bl4 = bl != this.cameraXDiffNegative; boolean bl5 = bl2 != this.cameraYDiffNegative; boolean bl6 = bl3 != this.cameraZDiffNegative; int i = getNodeIndex(this.sorting, bl4, bl5, bl6); if (this.areChildrenLeaves()) { boolean bl7 = this.nodes[i] != null; - this.nodes[i] = Octree.this.new Leaf(renderSection); + this.nodes[i] = Octree.this.new Leaf(section); return !bl7; } else if (this.nodes[i] != null) { Octree.Branch branch = (Octree.Branch)this.nodes[i]; - return branch.add(renderSection); + return branch.add(section); } else { BoundingBox boundingBox = this.createChildBoundingBox(bl, bl2, bl3); Octree.Branch branch2 = Octree.this.new Branch(boundingBox); this.nodes[i] = branch2; - return branch2.add(renderSection); + return branch2.add(section); } } - private static int getNodeIndex(Octree.AxisSorting axisSorting, boolean bl, boolean bl2, boolean bl3) { + private static int getNodeIndex(Octree.AxisSorting sorting, boolean xDiffNegative, boolean yDiffNegative, boolean zDiffNegative) { int i = 0; - if (bl) { - i += axisSorting.xShift; + if (xDiffNegative) { + i += sorting.xShift; } - if (bl2) { - i += axisSorting.yShift; + if (yDiffNegative) { + i += sorting.yShift; } - if (bl3) { - i += axisSorting.zShift; + if (zDiffNegative) { + i += sorting.zShift; } return i; @@ -146,10 +146,10 @@ public class Octree { return this.boundingBox.getXSpan() == 32; } - private BoundingBox createChildBoundingBox(boolean bl, boolean bl2, boolean bl3) { + private BoundingBox createChildBoundingBox(boolean xDiffNegative, boolean yDiffNegative, boolean zDiffNegative) { int i; int j; - if (bl) { + if (xDiffNegative) { i = this.boundingBox.minX(); j = this.bbCenterX - 1; } else { @@ -159,7 +159,7 @@ public class Octree { int k; int l; - if (bl2) { + if (yDiffNegative) { k = this.boundingBox.minY(); l = this.bbCenterY - 1; } else { @@ -169,7 +169,7 @@ public class Octree { int m; int n; - if (bl3) { + if (zDiffNegative) { m = this.boundingBox.minZ(); n = this.bbCenterZ - 1; } else { @@ -181,24 +181,30 @@ public class Octree { } @Override - public void visitNodes(Octree.OctreeVisitor octreeVisitor, boolean bl, Frustum frustum, int i, int j, boolean bl2) { - boolean bl3 = bl; - if (!bl) { - int k = frustum.cubeInFrustum(this.boundingBox); - bl = k == -2; - bl3 = k == -2 || k == -1; + public void visitNodes(Octree.OctreeVisitor visitor, boolean isLeafNode, Frustum frustum, int recursionDepth, int nearbyRadius, boolean isNearby) { + boolean bl = isLeafNode; + if (!isLeafNode) { + int i = frustum.cubeInFrustum(this.boundingBox); + isLeafNode = i == -2; + bl = i == -2 || i == -1; } - if (bl3) { - bl2 = bl2 + if (bl) { + isNearby = isNearby && Octree.this.isClose( - this.boundingBox.minX(), this.boundingBox.minY(), this.boundingBox.minZ(), this.boundingBox.maxX(), this.boundingBox.maxY(), this.boundingBox.maxZ(), j + this.boundingBox.minX(), + this.boundingBox.minY(), + this.boundingBox.minZ(), + this.boundingBox.maxX(), + this.boundingBox.maxY(), + this.boundingBox.maxZ(), + nearbyRadius ); - octreeVisitor.visit(this, bl, i, bl2); + visitor.visit(this, isLeafNode, recursionDepth, isNearby); for (Octree.Node node : this.nodes) { if (node != null) { - node.visitNodes(octreeVisitor, bl, frustum, i + 1, j, bl2); + node.visitNodes(visitor, isLeafNode, frustum, recursionDepth + 1, nearbyRadius, isNearby); } } } @@ -227,16 +233,16 @@ public class Octree { final class Leaf implements Octree.Node { private final SectionRenderDispatcher.RenderSection section; - Leaf(final SectionRenderDispatcher.RenderSection renderSection) { - this.section = renderSection; + Leaf(final SectionRenderDispatcher.RenderSection section) { + this.section = section; } @Override - public void visitNodes(Octree.OctreeVisitor octreeVisitor, boolean bl, Frustum frustum, int i, int j, boolean bl2) { + public void visitNodes(Octree.OctreeVisitor visitor, boolean isLeafNode, Frustum frustum, int recursionDepth, int nearbyRadius, boolean isNearby) { AABB aABB = this.section.getBoundingBox(); - if (bl || frustum.isVisible(this.getSection().getBoundingBox())) { - bl2 = bl2 && Octree.this.isClose(aABB.minX, aABB.minY, aABB.minZ, aABB.maxX, aABB.maxY, aABB.maxZ, j); - octreeVisitor.visit(this, bl, i, bl2); + if (isLeafNode || frustum.isVisible(this.getSection().getBoundingBox())) { + isNearby = isNearby && Octree.this.isClose(aABB.minX, aABB.minY, aABB.minZ, aABB.maxX, aABB.maxY, aABB.maxZ, nearbyRadius); + visitor.visit(this, isLeafNode, recursionDepth, isNearby); } } @@ -253,7 +259,7 @@ public class Octree { @Environment(EnvType.CLIENT) public interface Node { - void visitNodes(Octree.OctreeVisitor octreeVisitor, boolean bl, Frustum frustum, int i, int j, boolean bl2); + void visitNodes(Octree.OctreeVisitor visitor, boolean isLeafNode, Frustum frustum, int recursionDepth, int nearbyRadius, boolean isNearby); @Nullable SectionRenderDispatcher.RenderSection getSection(); diff --git a/net/minecraft/client/renderer/OutlineBufferSource.java b/net/minecraft/client/renderer/OutlineBufferSource.java index 6c52aa5e..d5078f4f 100644 --- a/net/minecraft/client/renderer/OutlineBufferSource.java +++ b/net/minecraft/client/renderer/OutlineBufferSource.java @@ -6,18 +6,19 @@ import com.mojang.blaze3d.vertex.VertexMultiConsumer; import java.util.Optional; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.util.ARGB; @Environment(EnvType.CLIENT) public class OutlineBufferSource implements MultiBufferSource { - private final MultiBufferSource.BufferSource bufferSource; - private final MultiBufferSource.BufferSource outlineBufferSource = MultiBufferSource.immediate(new ByteBufferBuilder(1536)); + private final BufferSource bufferSource; + private final BufferSource outlineBufferSource = MultiBufferSource.immediate(new ByteBufferBuilder(1536)); private int teamR = 255; private int teamG = 255; private int teamB = 255; private int teamA = 255; - public OutlineBufferSource(MultiBufferSource.BufferSource bufferSource) { + public OutlineBufferSource(BufferSource bufferSource) { this.bufferSource = bufferSource; } diff --git a/net/minecraft/client/renderer/PostChain.java b/net/minecraft/client/renderer/PostChain.java index 67e0be9e..d24cf7ec 100644 --- a/net/minecraft/client/renderer/PostChain.java +++ b/net/minecraft/client/renderer/PostChain.java @@ -20,6 +20,14 @@ import java.util.stream.Stream; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.PostChain.TargetBundle.1; +import net.minecraft.client.renderer.PostChainConfig.FixedSizedTarget; +import net.minecraft.client.renderer.PostChainConfig.FullScreenTarget; +import net.minecraft.client.renderer.PostChainConfig.Input; +import net.minecraft.client.renderer.PostChainConfig.InternalTarget; +import net.minecraft.client.renderer.PostChainConfig.Pass; +import net.minecraft.client.renderer.PostChainConfig.TargetInput; +import net.minecraft.client.renderer.PostChainConfig.TextureInput; +import net.minecraft.client.renderer.PostChainConfig.Uniform; import net.minecraft.client.renderer.texture.AbstractTexture; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.resources.ResourceLocation; @@ -30,43 +38,40 @@ import org.joml.Matrix4f; public class PostChain { public static final ResourceLocation MAIN_TARGET_ID = ResourceLocation.withDefaultNamespace("main"); private final List passes; - private final Map internalTargets; + private final Map internalTargets; private final Set externalTargets; - private PostChain(List list, Map map, Set set) { - this.passes = list; - this.internalTargets = map; - this.externalTargets = set; + private PostChain(List passes, Map internalTargets, Set externalTargets) { + this.passes = passes; + this.internalTargets = internalTargets; + this.externalTargets = externalTargets; } - public static PostChain load(PostChainConfig postChainConfig, TextureManager textureManager, ShaderManager shaderManager, Set set) throws ShaderManager.CompilationException { - Stream stream = postChainConfig.passes() - .stream() - .flatMap(passx -> passx.inputs().stream()) - .flatMap(input -> input.referencedTargets().stream()); - Set set2 = (Set)stream.filter(resourceLocation -> !postChainConfig.internalTargets().containsKey(resourceLocation)) + public static PostChain load(PostChainConfig config, TextureManager textureManager, ShaderManager shaderManager, Set externalTargets) throws ShaderManager.CompilationException { + Stream stream = config.passes().stream().flatMap(passx -> passx.inputs().stream()).flatMap(input -> input.referencedTargets().stream()); + Set set = (Set)stream.filter(resourceLocation -> !config.internalTargets().containsKey(resourceLocation)) .collect(Collectors.toSet()); - Set set3 = Sets.difference(set2, set); - if (!set3.isEmpty()) { - throw new ShaderManager.CompilationException("Referenced external targets are not available in this context: " + set3); + Set set2 = Sets.difference(set, externalTargets); + if (!set2.isEmpty()) { + throw new ShaderManager.CompilationException("Referenced external targets are not available in this context: " + set2); } else { Builder builder = ImmutableList.builder(); - for (PostChainConfig.Pass pass : postChainConfig.passes()) { + for (Pass pass : config.passes()) { builder.add(createPass(textureManager, shaderManager, pass)); } - return new PostChain(builder.build(), postChainConfig.internalTargets(), set2); + return new PostChain(builder.build(), config.internalTargets(), set); } } - private static PostPass createPass(TextureManager textureManager, ShaderManager shaderManager, PostChainConfig.Pass pass) throws ShaderManager.CompilationException { + private static PostPass createPass(TextureManager textureManager, ShaderManager shaderManager, Pass pass) throws ShaderManager.CompilationException { ResourceLocation resourceLocation = pass.program(); CompiledShaderProgram compiledShaderProgram = shaderManager.getProgramForLoading( new ShaderProgram(resourceLocation, DefaultVertexFormat.POSITION, ShaderDefines.EMPTY) ); - for (PostChainConfig.Uniform uniform : pass.uniforms()) { + for (Uniform uniform : pass.uniforms()) { String string = uniform.name(); if (compiledShaderProgram.getUniform(string) == null) { throw new ShaderManager.CompilationException("Uniform '" + string + "' does not exist for " + resourceLocation); @@ -76,14 +81,14 @@ public class PostChain { String string2 = resourceLocation.toString(); PostPass postPass = new PostPass(string2, compiledShaderProgram, pass.outputTarget(), pass.uniforms()); - for (PostChainConfig.Input input : pass.inputs()) { + for (Input input : pass.inputs()) { switch (input) { - case PostChainConfig.TextureInput(String var35, ResourceLocation var36, int var37, int var38, boolean var39): + case TextureInput(String var35, ResourceLocation var36, int var37, int var38, boolean var39): AbstractTexture abstractTexture = textureManager.getTexture(var36.withPath((UnaryOperator)(stringx -> "textures/effect/" + stringx + ".png"))); abstractTexture.setFilter(var39, false); postPass.addInput(new PostPass.TextureInput(var35, abstractTexture, var37, var38)); break; - case PostChainConfig.TargetInput(String var22, ResourceLocation var41, boolean var42, boolean var43): + case TargetInput(String var22, ResourceLocation var41, boolean var42, boolean var43): postPass.addInput(new PostPass.TargetInput(var22, var41, var42, var43)); break; default: @@ -94,20 +99,20 @@ public class PostChain { return postPass; } - public void addToFrame(FrameGraphBuilder frameGraphBuilder, int i, int j, PostChain.TargetBundle targetBundle) { - Matrix4f matrix4f = new Matrix4f().setOrtho(0.0F, i, 0.0F, j, 0.1F, 1000.0F); + public void addToFrame(FrameGraphBuilder frameGraphBuilder, int width, int height, PostChain.TargetBundle targetBundle) { + Matrix4f matrix4f = new Matrix4f().setOrtho(0.0F, width, 0.0F, height, 0.1F, 1000.0F); Map> map = new HashMap(this.internalTargets.size() + this.externalTargets.size()); for (ResourceLocation resourceLocation : this.externalTargets) { map.put(resourceLocation, targetBundle.getOrThrow(resourceLocation)); } - for (Entry entry : this.internalTargets.entrySet()) { + for (Entry entry : this.internalTargets.entrySet()) { ResourceLocation resourceLocation2 = (ResourceLocation)entry.getKey(); - RenderTargetDescriptor renderTargetDescriptor = switch ((PostChainConfig.InternalTarget)entry.getValue()) { - case PostChainConfig.FixedSizedTarget(int var25, int var26) -> new RenderTargetDescriptor(var25, var26, true); - case PostChainConfig.FullScreenTarget var16 -> new RenderTargetDescriptor(i, j, true); + RenderTargetDescriptor renderTargetDescriptor = switch ((InternalTarget)entry.getValue()) { + case FixedSizedTarget(int var25, int var26) -> new RenderTargetDescriptor(var25, var26, true); + case FullScreenTarget var16 -> new RenderTargetDescriptor(width, height, true); default -> throw new MatchException(null, null); }; map.put(resourceLocation2, frameGraphBuilder.createInternal(resourceLocation2.toString(), renderTargetDescriptor)); @@ -123,10 +128,10 @@ public class PostChain { } @Deprecated - public void process(RenderTarget renderTarget, GraphicsResourceAllocator graphicsResourceAllocator) { + public void process(RenderTarget target, GraphicsResourceAllocator graphicsResourceAllocator) { FrameGraphBuilder frameGraphBuilder = new FrameGraphBuilder(); - PostChain.TargetBundle targetBundle = PostChain.TargetBundle.of(MAIN_TARGET_ID, frameGraphBuilder.importExternal("main", renderTarget)); - this.addToFrame(frameGraphBuilder, renderTarget.width, renderTarget.height, targetBundle); + PostChain.TargetBundle targetBundle = PostChain.TargetBundle.of(MAIN_TARGET_ID, frameGraphBuilder.importExternal("main", target)); + this.addToFrame(frameGraphBuilder, target.width, target.height, targetBundle); frameGraphBuilder.execute(graphicsResourceAllocator); } @@ -138,19 +143,19 @@ public class PostChain { @Environment(EnvType.CLIENT) public interface TargetBundle { - static PostChain.TargetBundle of(ResourceLocation resourceLocation, ResourceHandle resourceHandle) { - return new 1(resourceHandle, resourceLocation); + static PostChain.TargetBundle of(ResourceLocation id, ResourceHandle handle) { + return new 1(handle, id); } - void replace(ResourceLocation resourceLocation, ResourceHandle resourceHandle); + void replace(ResourceLocation id, ResourceHandle handle); @Nullable - ResourceHandle get(ResourceLocation resourceLocation); + ResourceHandle get(ResourceLocation id); - default ResourceHandle getOrThrow(ResourceLocation resourceLocation) { - ResourceHandle resourceHandle = this.get(resourceLocation); + default ResourceHandle getOrThrow(ResourceLocation id) { + ResourceHandle resourceHandle = this.get(id); if (resourceHandle == null) { - throw new IllegalArgumentException("Missing target with id " + resourceLocation); + throw new IllegalArgumentException("Missing target with id " + id); } else { return resourceHandle; } diff --git a/net/minecraft/client/renderer/PostPass.java b/net/minecraft/client/renderer/PostPass.java index 2a948a53..5c408e4d 100644 --- a/net/minecraft/client/renderer/PostPass.java +++ b/net/minecraft/client/renderer/PostPass.java @@ -5,7 +5,6 @@ import com.mojang.blaze3d.framegraph.FrameGraphBuilder; import com.mojang.blaze3d.framegraph.FramePass; import com.mojang.blaze3d.pipeline.RenderTarget; import com.mojang.blaze3d.resource.ResourceHandle; -import com.mojang.blaze3d.shaders.Uniform; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.BufferBuilder; import com.mojang.blaze3d.vertex.BufferUploader; @@ -17,6 +16,7 @@ import java.util.List; import java.util.Map; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; +import net.minecraft.client.renderer.PostChainConfig.Uniform; import net.minecraft.client.renderer.texture.AbstractTexture; import net.minecraft.resources.ResourceLocation; import org.joml.Matrix4f; @@ -26,28 +26,28 @@ public class PostPass { private final String name; private final CompiledShaderProgram shader; private final ResourceLocation outputTargetId; - private final List uniforms; + private final List uniforms; private final List inputs = new ArrayList(); - public PostPass(String string, CompiledShaderProgram compiledShaderProgram, ResourceLocation resourceLocation, List list) { - this.name = string; - this.shader = compiledShaderProgram; - this.outputTargetId = resourceLocation; - this.uniforms = list; + public PostPass(String name, CompiledShaderProgram shader, ResourceLocation outputTargetId, List uniforms) { + this.name = name; + this.shader = shader; + this.outputTargetId = outputTargetId; + this.uniforms = uniforms; } public void addInput(PostPass.Input input) { this.inputs.add(input); } - public void addToFrame(FrameGraphBuilder frameGraphBuilder, Map> map, Matrix4f matrix4f) { + public void addToFrame(FrameGraphBuilder frameGraphBuilder, Map> targets, Matrix4f projectionMatrix) { FramePass framePass = frameGraphBuilder.addPass(this.name); for (PostPass.Input input : this.inputs) { - input.addToPass(framePass, map); + input.addToPass(framePass, targets); } - ResourceHandle resourceHandle = (ResourceHandle)map.computeIfPresent( + ResourceHandle resourceHandle = (ResourceHandle)targets.computeIfPresent( this.outputTargetId, (resourceLocation, resourceHandlex) -> framePass.readsAndWrites(resourceHandlex) ); if (resourceHandle == null) { @@ -58,13 +58,13 @@ public class PostPass { RenderSystem.viewport(0, 0, renderTarget.width, renderTarget.height); for (PostPass.Input inputx : this.inputs) { - inputx.bindTo(this.shader, map); + inputx.bindTo(this.shader, targets); } this.shader.safeGetUniform("OutSize").set((float)renderTarget.width, (float)renderTarget.height); - for (PostChainConfig.Uniform uniform : this.uniforms) { - Uniform uniform2 = this.shader.getUniform(uniform.name()); + for (Uniform uniform : this.uniforms) { + com.mojang.blaze3d.shaders.Uniform uniform2 = this.shader.getUniform(uniform.name()); if (uniform2 != null) { uniform2.setFromConfig(uniform.values(), uniform.values().size()); } @@ -76,7 +76,7 @@ public class PostPass { RenderSystem.depthFunc(519); RenderSystem.setShader(this.shader); RenderSystem.backupProjectionMatrix(); - RenderSystem.setProjectionMatrix(matrix4f, ProjectionType.ORTHOGRAPHIC); + RenderSystem.setProjectionMatrix(projectionMatrix, ProjectionType.ORTHOGRAPHIC); BufferBuilder bufferBuilder = Tesselator.getInstance().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION); bufferBuilder.addVertex(0.0F, 0.0F, 500.0F); bufferBuilder.addVertex(renderTarget.width, 0.0F, 500.0F); @@ -88,7 +88,7 @@ public class PostPass { renderTarget.unbindWrite(); for (PostPass.Input input2 : this.inputs) { - input2.cleanup(map); + input2.cleanup(targets); } this.restoreDefaultUniforms(); @@ -97,10 +97,10 @@ public class PostPass { } private void restoreDefaultUniforms() { - for (PostChainConfig.Uniform uniform : this.uniforms) { + for (Uniform uniform : this.uniforms) { String string = uniform.name(); - Uniform uniform2 = this.shader.getUniform(string); - ShaderProgramConfig.Uniform uniform3 = this.shader.getUniformConfig(string); + com.mojang.blaze3d.shaders.Uniform uniform2 = this.shader.getUniform(string); + net.minecraft.client.renderer.ShaderProgramConfig.Uniform uniform3 = this.shader.getUniformConfig(string); if (uniform2 != null && uniform3 != null && !uniform.values().equals(uniform3.values())) { uniform2.setFromConfig(uniform3); } @@ -113,18 +113,18 @@ public class PostPass { @Environment(EnvType.CLIENT) public interface Input { - void addToPass(FramePass framePass, Map> map); + void addToPass(FramePass pass, Map> targets); - void bindTo(CompiledShaderProgram compiledShaderProgram, Map> map); + void bindTo(CompiledShaderProgram shaderProgram, Map> targets); - default void cleanup(Map> map) { + default void cleanup(Map> targets) { } } @Environment(EnvType.CLIENT) public record TargetInput(String samplerName, ResourceLocation targetId, boolean depthBuffer, boolean bilinear) implements PostPass.Input { - private ResourceHandle getHandle(Map> map) { - ResourceHandle resourceHandle = (ResourceHandle)map.get(this.targetId); + private ResourceHandle getHandle(Map> targets) { + ResourceHandle resourceHandle = (ResourceHandle)targets.get(this.targetId); if (resourceHandle == null) { throw new IllegalStateException("Missing handle for target " + this.targetId); } else { @@ -133,23 +133,23 @@ public class PostPass { } @Override - public void addToPass(FramePass framePass, Map> map) { - framePass.reads(this.getHandle(map)); + public void addToPass(FramePass pass, Map> targets) { + pass.reads(this.getHandle(targets)); } @Override - public void bindTo(CompiledShaderProgram compiledShaderProgram, Map> map) { - ResourceHandle resourceHandle = this.getHandle(map); + public void bindTo(CompiledShaderProgram shaderProgram, Map> targets) { + ResourceHandle resourceHandle = this.getHandle(targets); RenderTarget renderTarget = resourceHandle.get(); renderTarget.setFilterMode(this.bilinear ? 9729 : 9728); - compiledShaderProgram.bindSampler(this.samplerName + "Sampler", this.depthBuffer ? renderTarget.getDepthTextureId() : renderTarget.getColorTextureId()); - compiledShaderProgram.safeGetUniform(this.samplerName + "Size").set((float)renderTarget.width, (float)renderTarget.height); + shaderProgram.bindSampler(this.samplerName + "Sampler", this.depthBuffer ? renderTarget.getDepthTextureId() : renderTarget.getColorTextureId()); + shaderProgram.safeGetUniform(this.samplerName + "Size").set((float)renderTarget.width, (float)renderTarget.height); } @Override - public void cleanup(Map> map) { + public void cleanup(Map> targets) { if (this.bilinear) { - this.getHandle(map).get().setFilterMode(9728); + this.getHandle(targets).get().setFilterMode(9728); } } } @@ -157,13 +157,13 @@ public class PostPass { @Environment(EnvType.CLIENT) public record TextureInput(String samplerName, AbstractTexture texture, int width, int height) implements PostPass.Input { @Override - public void addToPass(FramePass framePass, Map> map) { + public void addToPass(FramePass pass, Map> targets) { } @Override - public void bindTo(CompiledShaderProgram compiledShaderProgram, Map> map) { - compiledShaderProgram.bindSampler(this.samplerName + "Sampler", this.texture.getId()); - compiledShaderProgram.safeGetUniform(this.samplerName + "Size").set((float)this.width, (float)this.height); + public void bindTo(CompiledShaderProgram shaderProgram, Map> targets) { + shaderProgram.bindSampler(this.samplerName + "Sampler", this.texture.getId()); + shaderProgram.safeGetUniform(this.samplerName + "Size").set((float)this.width, (float)this.height); } } } diff --git a/net/minecraft/client/renderer/RenderStateShard.java b/net/minecraft/client/renderer/RenderStateShard.java index 78934e6c..ae64f557 100644 --- a/net/minecraft/client/renderer/RenderStateShard.java +++ b/net/minecraft/client/renderer/RenderStateShard.java @@ -593,9 +593,9 @@ public abstract class RenderStateShard { protected static class ShaderStateShard extends RenderStateShard { private final Optional shader; - public ShaderStateShard(ShaderProgram shaderProgram) { - super("shader", () -> RenderSystem.setShader(shaderProgram), () -> {}); - this.shader = Optional.of(shaderProgram); + public ShaderStateShard(ShaderProgram shader) { + super("shader", () -> RenderSystem.setShader(shader), () -> {}); + this.shader = Optional.of(shader); } public ShaderStateShard() { @@ -615,16 +615,16 @@ public abstract class RenderStateShard { private final TriState blur; private final boolean mipmap; - public TextureStateShard(ResourceLocation resourceLocation, TriState triState, boolean bl) { + public TextureStateShard(ResourceLocation texture, TriState blur, boolean mipmap) { super(() -> { TextureManager textureManager = Minecraft.getInstance().getTextureManager(); - AbstractTexture abstractTexture = textureManager.getTexture(resourceLocation); - abstractTexture.setFilter(triState.toBoolean(abstractTexture.getDefaultBlur()), bl); - RenderSystem.setShaderTexture(0, resourceLocation); + AbstractTexture abstractTexture = textureManager.getTexture(texture); + abstractTexture.setFilter(blur.toBoolean(abstractTexture.getDefaultBlur()), mipmap); + RenderSystem.setShaderTexture(0, texture); }, () -> {}); - this.texture = Optional.of(resourceLocation); - this.blur = triState; - this.mipmap = bl; + this.texture = Optional.of(texture); + this.blur = blur; + this.mipmap = mipmap; } @Override diff --git a/net/minecraft/client/renderer/RenderType.java b/net/minecraft/client/renderer/RenderType.java index 2d4e1bc4..0ca92adb 100644 --- a/net/minecraft/client/renderer/RenderType.java +++ b/net/minecraft/client/renderer/RenderType.java @@ -938,16 +938,16 @@ public abstract class RenderType extends RenderStateShard { return createArmorCutoutNoCull("armor_decal_cutout_no_cull", id, true); } - public static RenderType armorTranslucent(ResourceLocation resourceLocation) { - return (RenderType)ARMOR_TRANSLUCENT.apply(resourceLocation); + public static RenderType armorTranslucent(ResourceLocation id) { + return (RenderType)ARMOR_TRANSLUCENT.apply(id); } public static RenderType entitySolid(ResourceLocation location) { return (RenderType)ENTITY_SOLID.apply(location); } - public static RenderType entitySolidZOffsetForward(ResourceLocation resourceLocation) { - return (RenderType)ENTITY_SOLID_Z_OFFSET_FORWARD.apply(resourceLocation); + public static RenderType entitySolidZOffsetForward(ResourceLocation location) { + return (RenderType)ENTITY_SOLID_Z_OFFSET_FORWARD.apply(location); } public static RenderType entityCutout(ResourceLocation location) { @@ -1160,7 +1160,7 @@ public abstract class RenderType extends RenderStateShard { return END_GATEWAY; } - private static RenderType.CompositeRenderType createClouds(boolean bl, boolean bl2) { + private static RenderType.CompositeRenderType createClouds(boolean color, boolean cull) { return create( "clouds", DefaultVertexFormat.POSITION_COLOR, @@ -1171,8 +1171,8 @@ public abstract class RenderType extends RenderStateShard { RenderType.CompositeState.builder() .setShaderState(RENDERTYPE_CLOUDS_SHADER) .setTransparencyState(TRANSLUCENT_TRANSPARENCY) - .setCullState(bl2 ? CULL : NO_CULL) - .setWriteMaskState(bl ? DEPTH_WRITE : COLOR_DEPTH_WRITE) + .setCullState(cull ? CULL : NO_CULL) + .setWriteMaskState(color ? DEPTH_WRITE : COLOR_DEPTH_WRITE) .setOutputState(CLOUDS_TARGET) .createCompositeState(true) ); @@ -1234,12 +1234,12 @@ public abstract class RenderType extends RenderStateShard { return GUI_OVERLAY; } - public static RenderType guiTexturedOverlay(ResourceLocation resourceLocation) { - return (RenderType)GUI_TEXTURED_OVERLAY.apply(resourceLocation); + public static RenderType guiTexturedOverlay(ResourceLocation location) { + return (RenderType)GUI_TEXTURED_OVERLAY.apply(location); } - public static RenderType guiOpaqueTexturedBackground(ResourceLocation resourceLocation) { - return (RenderType)GUI_OPAQUE_TEXTURED_BACKGROUND.apply(resourceLocation); + public static RenderType guiOpaqueTexturedBackground(ResourceLocation location) { + return (RenderType)GUI_OPAQUE_TEXTURED_BACKGROUND.apply(location); } public static RenderType guiNauseaOverlay() { @@ -1254,16 +1254,16 @@ public abstract class RenderType extends RenderStateShard { return GUI_GHOST_RECIPE_OVERLAY; } - public static RenderType guiTextured(ResourceLocation resourceLocation) { - return (RenderType)GUI_TEXTURED.apply(resourceLocation); + public static RenderType guiTextured(ResourceLocation location) { + return (RenderType)GUI_TEXTURED.apply(location); } - public static RenderType vignette(ResourceLocation resourceLocation) { - return (RenderType)VIGNETTE.apply(resourceLocation); + public static RenderType vignette(ResourceLocation location) { + return (RenderType)VIGNETTE.apply(location); } - public static RenderType crosshair(ResourceLocation resourceLocation) { - return (RenderType)CROSSHAIR.apply(resourceLocation); + public static RenderType crosshair(ResourceLocation location) { + return (RenderType)CROSSHAIR.apply(location); } public static RenderType mojangLogo() { diff --git a/net/minecraft/client/renderer/SectionOcclusionGraph.java b/net/minecraft/client/renderer/SectionOcclusionGraph.java index 0e920aaf..3625804a 100644 --- a/net/minecraft/client/renderer/SectionOcclusionGraph.java +++ b/net/minecraft/client/renderer/SectionOcclusionGraph.java @@ -76,13 +76,15 @@ public class SectionOcclusionGraph { this.needsFullUpdate = true; } - public void addSectionsInFrustum(Frustum frustum, List list, List list2) { + public void addSectionsInFrustum( + Frustum frustum, List visibleSections, List nearbyVisibleSections + ) { ((SectionOcclusionGraph.GraphState)this.currentGraph.get()).storage().sectionTree.visitNodes((node, bl, i, bl2) -> { SectionRenderDispatcher.RenderSection renderSection = node.getSection(); if (renderSection != null) { - list.add(renderSection); + visibleSections.add(renderSection); if (bl2) { - list2.add(renderSection); + nearbyVisibleSections.add(renderSection); } } }, frustum, 32); @@ -104,44 +106,48 @@ public class SectionOcclusionGraph { } } - public void schedulePropagationFrom(SectionRenderDispatcher.RenderSection renderSection) { + public void schedulePropagationFrom(SectionRenderDispatcher.RenderSection section) { SectionOcclusionGraph.GraphEvents graphEvents = (SectionOcclusionGraph.GraphEvents)this.nextGraphEvents.get(); if (graphEvents != null) { - graphEvents.sectionsToPropagateFrom.add(renderSection); + graphEvents.sectionsToPropagateFrom.add(section); } SectionOcclusionGraph.GraphEvents graphEvents2 = ((SectionOcclusionGraph.GraphState)this.currentGraph.get()).events; if (graphEvents2 != graphEvents) { - graphEvents2.sectionsToPropagateFrom.add(renderSection); + graphEvents2.sectionsToPropagateFrom.add(section); } } - public void update(boolean bl, Camera camera, Frustum frustum, List list, LongOpenHashSet longOpenHashSet) { + public void update( + boolean smartCull, Camera camera, Frustum frustum, List visibleSections, LongOpenHashSet loadedEmptySections + ) { Vec3 vec3 = camera.getPosition(); if (this.needsFullUpdate && (this.fullUpdateTask == null || this.fullUpdateTask.isDone())) { - this.scheduleFullUpdate(bl, camera, vec3, longOpenHashSet); + this.scheduleFullUpdate(smartCull, camera, vec3, loadedEmptySections); } - this.runPartialUpdate(bl, frustum, list, vec3, longOpenHashSet); + this.runPartialUpdate(smartCull, frustum, visibleSections, vec3, loadedEmptySections); } - private void scheduleFullUpdate(boolean bl, Camera camera, Vec3 vec3, LongOpenHashSet longOpenHashSet) { + private void scheduleFullUpdate(boolean smartCull, Camera camera, Vec3 cameraPosition, LongOpenHashSet loadedEmptySections) { this.needsFullUpdate = false; - LongOpenHashSet longOpenHashSet2 = longOpenHashSet.clone(); + LongOpenHashSet longOpenHashSet = loadedEmptySections.clone(); this.fullUpdateTask = CompletableFuture.runAsync(() -> { SectionOcclusionGraph.GraphState graphState = new SectionOcclusionGraph.GraphState(this.viewArea); this.nextGraphEvents.set(graphState.events); Queue queue = Queues.newArrayDeque(); this.initializeQueueForFullUpdate(camera, queue); queue.forEach(node -> graphState.storage.sectionToNodeMap.put(node.section, node)); - this.runUpdates(graphState.storage, vec3, queue, bl, renderSection -> {}, longOpenHashSet2); + this.runUpdates(graphState.storage, cameraPosition, queue, smartCull, renderSection -> {}, longOpenHashSet); this.currentGraph.set(graphState); this.nextGraphEvents.set(null); this.needsFrustumUpdate.set(true); }, Util.backgroundExecutor()); } - private void runPartialUpdate(boolean bl, Frustum frustum, List list, Vec3 vec3, LongOpenHashSet longOpenHashSet) { + private void runPartialUpdate( + boolean smartCull, Frustum frustum, List visibleSections, Vec3 cameraPosition, LongOpenHashSet loadedEmptySections + ) { SectionOcclusionGraph.GraphState graphState = (SectionOcclusionGraph.GraphState)this.currentGraph.get(); this.queueSectionsWithNewNeighbors(graphState); if (!graphState.events.sectionsToPropagateFrom.isEmpty()) { @@ -161,7 +167,7 @@ public class SectionOcclusionGraph { this.needsFrustumUpdate.set(true); } }; - this.runUpdates(graphState.storage, vec3, queue, bl, consumer, longOpenHashSet); + this.runUpdates(graphState.storage, cameraPosition, queue, smartCull, consumer, loadedEmptySections); } } @@ -233,43 +239,73 @@ public class SectionOcclusionGraph { } private void runUpdates( - SectionOcclusionGraph.GraphStorage graphStorage, - Vec3 vec3, + SectionOcclusionGraph.GraphStorage storage, + Vec3 cameraPosition, Queue queue, - boolean bl, - Consumer consumer, - LongOpenHashSet longOpenHashSet + boolean smartCull, + Consumer visibleSectionConsumer, + LongOpenHashSet loadedEmptySection ) { int i = 16; - BlockPos blockPos = new BlockPos(Mth.floor(vec3.x / 16.0) * 16, Mth.floor(vec3.y / 16.0) * 16, Mth.floor(vec3.z / 16.0) * 16); + BlockPos blockPos = new BlockPos(Mth.floor(cameraPosition.x / 16.0) * 16, Mth.floor(cameraPosition.y / 16.0) * 16, Mth.floor(cameraPosition.z / 16.0) * 16); long l = SectionPos.asLong(blockPos); BlockPos blockPos2 = blockPos.offset(8, 8, 8); while (!queue.isEmpty()) { SectionOcclusionGraph.Node node = (SectionOcclusionGraph.Node)queue.poll(); SectionRenderDispatcher.RenderSection renderSection = node.section; - if (!longOpenHashSet.contains(node.section.getSectionNode())) { - if (graphStorage.sectionTree.add(node.section)) { - consumer.accept(node.section); + if (!loadedEmptySection.contains(node.section.getSectionNode())) { + if (storage.sectionTree.add(node.section)) { + visibleSectionConsumer.accept(node.section); } } else { node.section.compiled.compareAndSet(SectionRenderDispatcher.CompiledSection.UNCOMPILED, SectionRenderDispatcher.CompiledSection.EMPTY); } - boolean bl2 = Math.abs(renderSection.getOrigin().getX() - blockPos.getX()) > 60 + boolean bl = Math.abs(renderSection.getOrigin().getX() - blockPos.getX()) > 60 || Math.abs(renderSection.getOrigin().getY() - blockPos.getY()) > 60 || Math.abs(renderSection.getOrigin().getZ() - blockPos.getZ()) > 60; for (Direction direction : DIRECTIONS) { SectionRenderDispatcher.RenderSection renderSection2 = this.getRelativeFrom(l, renderSection, direction); - if (renderSection2 != null && (!bl || !node.hasDirection(direction.getOpposite()))) { - if (bl && node.hasSourceDirections()) { + if (renderSection2 != null && (!smartCull || !node.hasDirection(direction.getOpposite()))) { + if (smartCull && node.hasSourceDirections()) { SectionRenderDispatcher.CompiledSection compiledSection = renderSection.getCompiled(); - boolean bl3 = false; + boolean bl2 = false; for (int j = 0; j < DIRECTIONS.length; j++) { if (node.hasSourceDirection(j) && compiledSection.facesCanSeeEachother(DIRECTIONS[j].getOpposite(), direction)) { - bl3 = true; + bl2 = true; + break; + } + } + + if (!bl2) { + continue; + } + } + + if (smartCull && bl) { + BlockPos blockPos3 = renderSection2.getOrigin(); + BlockPos blockPos4 = blockPos3.offset( + (direction.getAxis() == Direction.Axis.X ? blockPos2.getX() <= blockPos3.getX() : blockPos2.getX() >= blockPos3.getX()) ? 0 : 16, + (direction.getAxis() == Direction.Axis.Y ? blockPos2.getY() <= blockPos3.getY() : blockPos2.getY() >= blockPos3.getY()) ? 0 : 16, + (direction.getAxis() == Direction.Axis.Z ? blockPos2.getZ() <= blockPos3.getZ() : blockPos2.getZ() >= blockPos3.getZ()) ? 0 : 16 + ); + Vec3 vec3 = new Vec3(blockPos4.getX(), blockPos4.getY(), blockPos4.getZ()); + Vec3 vec32 = cameraPosition.subtract(vec3).normalize().scale(CEILED_SECTION_DIAGONAL); + boolean bl3 = true; + + while (cameraPosition.subtract(vec3).lengthSqr() > 3600.0) { + vec3 = vec3.add(vec32); + LevelHeightAccessor levelHeightAccessor = this.viewArea.getLevelHeightAccessor(); + if (vec3.y > levelHeightAccessor.getMaxY() || vec3.y < levelHeightAccessor.getMinY()) { + break; + } + + SectionRenderDispatcher.RenderSection renderSection3 = this.viewArea.getRenderSectionAt(BlockPos.containing(vec3.x, vec3.y, vec3.z)); + if (renderSection3 == null || storage.sectionToNodeMap.get(renderSection3) == null) { + bl3 = false; break; } } @@ -279,37 +315,7 @@ public class SectionOcclusionGraph { } } - if (bl && bl2) { - BlockPos blockPos3 = renderSection2.getOrigin(); - BlockPos blockPos4 = blockPos3.offset( - (direction.getAxis() == Direction.Axis.X ? blockPos2.getX() <= blockPos3.getX() : blockPos2.getX() >= blockPos3.getX()) ? 0 : 16, - (direction.getAxis() == Direction.Axis.Y ? blockPos2.getY() <= blockPos3.getY() : blockPos2.getY() >= blockPos3.getY()) ? 0 : 16, - (direction.getAxis() == Direction.Axis.Z ? blockPos2.getZ() <= blockPos3.getZ() : blockPos2.getZ() >= blockPos3.getZ()) ? 0 : 16 - ); - Vec3 vec32 = new Vec3(blockPos4.getX(), blockPos4.getY(), blockPos4.getZ()); - Vec3 vec33 = vec3.subtract(vec32).normalize().scale(CEILED_SECTION_DIAGONAL); - boolean bl4 = true; - - while (vec3.subtract(vec32).lengthSqr() > 3600.0) { - vec32 = vec32.add(vec33); - LevelHeightAccessor levelHeightAccessor = this.viewArea.getLevelHeightAccessor(); - if (vec32.y > levelHeightAccessor.getMaxY() || vec32.y < levelHeightAccessor.getMinY()) { - break; - } - - SectionRenderDispatcher.RenderSection renderSection3 = this.viewArea.getRenderSectionAt(BlockPos.containing(vec32.x, vec32.y, vec32.z)); - if (renderSection3 == null || graphStorage.sectionToNodeMap.get(renderSection3) == null) { - bl4 = false; - break; - } - } - - if (!bl4) { - continue; - } - } - - SectionOcclusionGraph.Node node2 = graphStorage.sectionToNodeMap.get(renderSection2); + SectionOcclusionGraph.Node node2 = storage.sectionToNodeMap.get(renderSection2); if (node2 != null) { node2.addSourceDirection(direction); } else { @@ -317,10 +323,10 @@ public class SectionOcclusionGraph { node3.setDirections(node.directions, direction); if (renderSection2.hasAllNeighbors()) { queue.add(node3); - graphStorage.sectionToNodeMap.put(renderSection2, node3); + storage.sectionToNodeMap.put(renderSection2, node3); } else if (this.isInViewDistance(l, renderSection2.getSectionNode())) { - graphStorage.sectionToNodeMap.put(renderSection2, node3); - graphStorage.chunksWaitingForNeighbors + storage.sectionToNodeMap.put(renderSection2, node3); + storage.chunksWaitingForNeighbors .computeIfAbsent( ChunkPos.asLong(renderSection2.getOrigin()), (Long2ObjectFunction>)(lx -> new ArrayList()) ) @@ -332,17 +338,19 @@ public class SectionOcclusionGraph { } } - private boolean isInViewDistance(long l, long m) { - return ChunkTrackingView.isInViewDistance(SectionPos.x(l), SectionPos.z(l), this.viewArea.getViewDistance(), SectionPos.x(m), SectionPos.z(m)); + private boolean isInViewDistance(long centerPos, long pos) { + return ChunkTrackingView.isInViewDistance( + SectionPos.x(centerPos), SectionPos.z(centerPos), this.viewArea.getViewDistance(), SectionPos.x(pos), SectionPos.z(pos) + ); } @Nullable - private SectionRenderDispatcher.RenderSection getRelativeFrom(long l, SectionRenderDispatcher.RenderSection renderSection, Direction direction) { - long m = renderSection.getNeighborSectionNode(direction); - if (!this.isInViewDistance(l, m)) { + private SectionRenderDispatcher.RenderSection getRelativeFrom(long sectionPos, SectionRenderDispatcher.RenderSection section, Direction direction) { + long l = section.getNeighborSectionNode(direction); + if (!this.isInViewDistance(sectionPos, l)) { return null; } else { - return Mth.abs(SectionPos.y(l) - SectionPos.y(m)) > this.viewArea.getViewDistance() ? null : this.viewArea.getRenderSection(m); + return Mth.abs(SectionPos.y(sectionPos) - SectionPos.y(l)) > this.viewArea.getViewDistance() ? null : this.viewArea.getRenderSection(l); } } diff --git a/net/minecraft/client/renderer/ShaderDefines.java b/net/minecraft/client/renderer/ShaderDefines.java index d39ffe7b..1a661170 100644 --- a/net/minecraft/client/renderer/ShaderDefines.java +++ b/net/minecraft/client/renderer/ShaderDefines.java @@ -26,18 +26,18 @@ public record ShaderDefines(Map values, Set flags) { return new ShaderDefines.Builder(); } - public ShaderDefines withOverrides(ShaderDefines shaderDefines) { + public ShaderDefines withOverrides(ShaderDefines defines) { if (this.isEmpty()) { - return shaderDefines; - } else if (shaderDefines.isEmpty()) { + return defines; + } else if (defines.isEmpty()) { return this; } else { - ImmutableMap.Builder builder = ImmutableMap.builderWithExpectedSize(this.values.size() + shaderDefines.values.size()); + ImmutableMap.Builder builder = ImmutableMap.builderWithExpectedSize(this.values.size() + defines.values.size()); builder.putAll(this.values); - builder.putAll(shaderDefines.values); - ImmutableSet.Builder builder2 = ImmutableSet.builderWithExpectedSize(this.flags.size() + shaderDefines.flags.size()); + builder.putAll(defines.values); + ImmutableSet.Builder builder2 = ImmutableSet.builderWithExpectedSize(this.flags.size() + defines.flags.size()); builder2.addAll(this.flags); - builder2.addAll(shaderDefines.flags); + builder2.addAll(defines.flags); return new ShaderDefines(builder.buildKeepingLast(), builder2.build()); } } @@ -70,26 +70,26 @@ public record ShaderDefines(Map values, Set flags) { Builder() { } - public ShaderDefines.Builder define(String string, String string2) { - if (string2.isBlank()) { + public ShaderDefines.Builder define(String key, String value) { + if (value.isBlank()) { throw new IllegalArgumentException("Cannot define empty string"); } else { - this.values.put(string, escapeNewLines(string2)); + this.values.put(key, escapeNewLines(value)); return this; } } - private static String escapeNewLines(String string) { - return string.replaceAll("\n", "\\\\\n"); + private static String escapeNewLines(String str) { + return str.replaceAll("\n", "\\\\\n"); } - public ShaderDefines.Builder define(String string, float f) { - this.values.put(string, String.valueOf(f)); + public ShaderDefines.Builder define(String key, float value) { + this.values.put(key, String.valueOf(value)); return this; } - public ShaderDefines.Builder define(String string) { - this.flags.add(string); + public ShaderDefines.Builder define(String flag) { + this.flags.add(flag); return this; } diff --git a/net/minecraft/client/renderer/ShaderManager.java b/net/minecraft/client/renderer/ShaderManager.java index 36683c02..23c8d180 100644 --- a/net/minecraft/client/renderer/ShaderManager.java +++ b/net/minecraft/client/renderer/ShaderManager.java @@ -50,12 +50,15 @@ public class ShaderManager extends SimplePreparableReloadListener recoveryHandler; private ShaderManager.CompilationCache compilationCache = new ShaderManager.CompilationCache(ShaderManager.Configs.EMPTY); - public ShaderManager(TextureManager textureManager, Consumer consumer) { + public ShaderManager(TextureManager textureManager, Consumer recoveryHandler) { this.textureManager = textureManager; - this.recoveryHandler = consumer; + this.recoveryHandler = recoveryHandler; } - protected ShaderManager.Configs prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) { + /** + * Performs any reloading that can be done off-thread, such as file IO + */ + protected ShaderManager.Configs prepare(ResourceManager resourceManager, ProfilerFiller profiler) { Builder builder = ImmutableMap.builder(); Builder builder2 = ImmutableMap.builder(); Map map = resourceManager.listResources("shaders", resourceLocation -> isProgram(resourceLocation) || isShader(resourceLocation)); @@ -80,21 +83,21 @@ public class ShaderManager extends SimplePreparableReloadListener map, - Builder builder + Map shaderResources, + Builder output ) { - ResourceLocation resourceLocation2 = type.idConverter().fileToId(resourceLocation); - GlslPreprocessor glslPreprocessor = createPreprocessor(map, resourceLocation); + ResourceLocation resourceLocation = type.idConverter().fileToId(location); + GlslPreprocessor glslPreprocessor = createPreprocessor(shaderResources, location); try { - Reader reader = resource.openAsReader(); + Reader reader = shader.openAsReader(); try { String string = IOUtils.toString(reader); - builder.put(new ShaderManager.ShaderSourceKey(resourceLocation2, type), String.join("", glslPreprocessor.process(string))); + output.put(new ShaderManager.ShaderSourceKey(resourceLocation, type), String.join("", glslPreprocessor.process(string))); } catch (Throwable var11) { if (reader != null) { try { @@ -111,12 +114,12 @@ public class ShaderManager extends SimplePreparableReloadListener map, ResourceLocation resourceLocation) { - final ResourceLocation resourceLocation2 = resourceLocation.withPath(FileUtil::getFullResourcePath); + private static GlslPreprocessor createPreprocessor(Map shaderResources, ResourceLocation shaderLocation) { + final ResourceLocation resourceLocation = shaderLocation.withPath(FileUtil::getFullResourcePath); return new GlslPreprocessor() { private final Set importedLocations = new ObjectArraySet<>(); @@ -125,7 +128,7 @@ public class ShaderManager extends SimplePreparableReloadListener)(string2 -> FileUtil.normalizeResourcePath(string2 + directory))); + resourceLocationx = resourceLocation.withPath((UnaryOperator)(string2 -> FileUtil.normalizeResourcePath(string2 + directory))); } else { resourceLocationx = ResourceLocation.parse(directory).withPrefix("shaders/include/"); } @@ -138,7 +141,7 @@ public class ShaderManager extends SimplePreparableReloadListener builder) { - ResourceLocation resourceLocation2 = PROGRAM_ID_CONVERTER.fileToId(resourceLocation); + private static void loadProgram(ResourceLocation location, Resource resource, Builder output) { + ResourceLocation resourceLocation = PROGRAM_ID_CONVERTER.fileToId(location); try { Reader reader = resource.openAsReader(); @@ -178,7 +181,7 @@ public class ShaderManager extends SimplePreparableReloadListener builder) { - ResourceLocation resourceLocation2 = POST_CHAIN_ID_CONVERTER.fileToId(resourceLocation); + private static void loadPostChain(ResourceLocation location, Resource postChain, Builder output) { + ResourceLocation resourceLocation = POST_CHAIN_ID_CONVERTER.fileToId(location); try { - Reader reader = resource.openAsReader(); + Reader reader = postChain.openAsReader(); try { JsonElement jsonElement = JsonParser.parseReader(reader); - builder.put(resourceLocation2, PostChainConfig.CODEC.parse(JsonOps.INSTANCE, jsonElement).getOrThrow(JsonSyntaxException::new)); + output.put(resourceLocation, PostChainConfig.CODEC.parse(JsonOps.INSTANCE, jsonElement).getOrThrow(JsonSyntaxException::new)); } catch (Throwable var8) { if (reader != null) { try { @@ -224,20 +227,20 @@ public class ShaderManager extends SimplePreparableReloadListener map = new HashMap(); for (ShaderProgram shaderProgram : CoreShaders.getProgramsToPreload()) { @@ -268,8 +271,8 @@ public class ShaderManager extends SimplePreparableReloadListener set) { + public PostChain getPostChain(ResourceLocation id, Set externalTargets) { try { - return this.compilationCache.getOrLoadPostChain(resourceLocation, set); + return this.compilationCache.getOrLoadPostChain(id, externalTargets); } catch (ShaderManager.CompilationException var4) { - LOGGER.error("Failed to load post chain: {}", resourceLocation, var4); - this.compilationCache.postChains.put(resourceLocation, Optional.empty()); + LOGGER.error("Failed to load post chain: {}", id, var4); + this.compilationCache.postChains.put(id, Optional.empty()); this.recoveryHandler.accept(var4); return null; } @@ -388,31 +387,31 @@ public class ShaderManager extends SimplePreparableReloadListener optional = (Optional)this.programs.get(shaderProgram); + public CompiledShaderProgram getOrCompileProgram(ShaderProgram program) throws ShaderManager.CompilationException { + Optional optional = (Optional)this.programs.get(program); if (optional != null) { return (CompiledShaderProgram)optional.orElse(null); } else { - CompiledShaderProgram compiledShaderProgram = this.compileProgram(shaderProgram); - this.programs.put(shaderProgram, Optional.of(compiledShaderProgram)); + CompiledShaderProgram compiledShaderProgram = this.compileProgram(program); + this.programs.put(program, Optional.of(compiledShaderProgram)); return compiledShaderProgram; } } - CompiledShaderProgram compileProgram(ShaderProgram shaderProgram) throws ShaderManager.CompilationException { - ShaderProgramConfig shaderProgramConfig = (ShaderProgramConfig)this.configs.programs.get(shaderProgram.configId()); + CompiledShaderProgram compileProgram(ShaderProgram program) throws ShaderManager.CompilationException { + ShaderProgramConfig shaderProgramConfig = (ShaderProgramConfig)this.configs.programs.get(program.configId()); if (shaderProgramConfig == null) { - throw new ShaderManager.CompilationException("Could not find program with id: " + shaderProgram.configId()); + throw new ShaderManager.CompilationException("Could not find program with id: " + program.configId()); } else { - ShaderDefines shaderDefines = shaderProgramConfig.defines().withOverrides(shaderProgram.defines()); + ShaderDefines shaderDefines = shaderProgramConfig.defines().withOverrides(program.defines()); CompiledShader compiledShader = this.getOrCompileShader(shaderProgramConfig.vertex(), CompiledShader.Type.VERTEX, shaderDefines); CompiledShader compiledShader2 = this.getOrCompileShader(shaderProgramConfig.fragment(), CompiledShader.Type.FRAGMENT, shaderDefines); - return ShaderManager.linkProgram(shaderProgram, shaderProgramConfig, compiledShader, compiledShader2); + return ShaderManager.linkProgram(program, shaderProgramConfig, compiledShader, compiledShader2); } } - private CompiledShader getOrCompileShader(ResourceLocation resourceLocation, CompiledShader.Type type, ShaderDefines shaderDefines) throws ShaderManager.CompilationException { - ShaderManager.ShaderCompilationKey shaderCompilationKey = new ShaderManager.ShaderCompilationKey(resourceLocation, type, shaderDefines); + private CompiledShader getOrCompileShader(ResourceLocation id, CompiledShader.Type type, ShaderDefines defines) throws ShaderManager.CompilationException { + ShaderManager.ShaderCompilationKey shaderCompilationKey = new ShaderManager.ShaderCompilationKey(id, type, defines); CompiledShader compiledShader = (CompiledShader)this.shaders.get(shaderCompilationKey); if (compiledShader == null) { compiledShader = this.compileShader(shaderCompilationKey); @@ -422,34 +421,34 @@ public class ShaderManager extends SimplePreparableReloadListener set) throws ShaderManager.CompilationException { - Optional optional = (Optional)this.postChains.get(resourceLocation); + public PostChain getOrLoadPostChain(ResourceLocation name, Set externalTargets) throws ShaderManager.CompilationException { + Optional optional = (Optional)this.postChains.get(name); if (optional != null) { return (PostChain)optional.orElse(null); } else { - PostChain postChain = this.loadPostChain(resourceLocation, set); - this.postChains.put(resourceLocation, Optional.of(postChain)); + PostChain postChain = this.loadPostChain(name, externalTargets); + this.postChains.put(name, Optional.of(postChain)); return postChain; } } - private PostChain loadPostChain(ResourceLocation resourceLocation, Set set) throws ShaderManager.CompilationException { - PostChainConfig postChainConfig = (PostChainConfig)this.configs.postChains.get(resourceLocation); + private PostChain loadPostChain(ResourceLocation name, Set externalTargets) throws ShaderManager.CompilationException { + PostChainConfig postChainConfig = (PostChainConfig)this.configs.postChains.get(name); if (postChainConfig == null) { - throw new ShaderManager.CompilationException("Could not find post chain with id: " + resourceLocation); + throw new ShaderManager.CompilationException("Could not find post chain with id: " + name); } else { - return PostChain.load(postChainConfig, ShaderManager.this.textureManager, ShaderManager.this, set); + return PostChain.load(postChainConfig, ShaderManager.this.textureManager, ShaderManager.this, externalTargets); } } @@ -465,8 +464,8 @@ public class ShaderManager extends SimplePreparableReloadListener { + shape.forAllEdges((g, h, j, k, l, m) -> { Vector3f vector3f = new Vector3f((float)(k - g), (float)(l - h), (float)(m - j)).normalize(); - vertexConsumer.addVertex(pose, (float)(g + d), (float)(h + e), (float)(j + f)).setColor(i).setNormal(pose, vector3f); - vertexConsumer.addVertex(pose, (float)(k + d), (float)(l + e), (float)(m + f)).setColor(i).setNormal(pose, vector3f); + buffer.addVertex(pose, (float)(g + x), (float)(h + y), (float)(j + z)).setColor(color).setNormal(pose, vector3f); + buffer.addVertex(pose, (float)(k + x), (float)(l + y), (float)(m + z)).setColor(color).setNormal(pose, vector3f); }); } - public static void renderLineBox(PoseStack poseStack, VertexConsumer vertexConsumer, AABB aABB, float f, float g, float h, float i) { - renderLineBox(poseStack, vertexConsumer, aABB.minX, aABB.minY, aABB.minZ, aABB.maxX, aABB.maxY, aABB.maxZ, f, g, h, i, f, g, h); - } - - public static void renderLineBox( - PoseStack poseStack, VertexConsumer vertexConsumer, double d, double e, double f, double g, double h, double i, float j, float k, float l, float m - ) { - renderLineBox(poseStack, vertexConsumer, d, e, f, g, h, i, j, k, l, m, j, k, l); + public static void renderLineBox(PoseStack poseStack, VertexConsumer buffer, AABB box, float red, float green, float blue, float alpha) { + renderLineBox(poseStack, buffer, box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ, red, green, blue, alpha, red, green, blue); } public static void renderLineBox( PoseStack poseStack, - VertexConsumer vertexConsumer, - double d, - double e, - double f, - double g, - double h, - double i, - float j, - float k, - float l, - float m, - float n, - float o, - float p + VertexConsumer buffer, + double minX, + double minY, + double minZ, + double maxX, + double maxY, + double maxZ, + float red, + float green, + float blue, + float alpha + ) { + renderLineBox(poseStack, buffer, minX, minY, minZ, maxX, maxY, maxZ, red, green, blue, alpha, red, green, blue); + } + + public static void renderLineBox( + PoseStack poseStack, + VertexConsumer buffer, + double minX, + double minY, + double minZ, + double maxX, + double maxY, + double maxZ, + float red, + float green, + float blue, + float alpha, + float red2, + float green2, + float blue2 ) { PoseStack.Pose pose = poseStack.last(); - float q = (float)d; - float r = (float)e; - float s = (float)f; - float t = (float)g; - float u = (float)h; - float v = (float)i; - vertexConsumer.addVertex(pose, q, r, s).setColor(j, o, p, m).setNormal(pose, 1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, t, r, s).setColor(j, o, p, m).setNormal(pose, 1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, q, r, s).setColor(n, k, p, m).setNormal(pose, 0.0F, 1.0F, 0.0F); - vertexConsumer.addVertex(pose, q, u, s).setColor(n, k, p, m).setNormal(pose, 0.0F, 1.0F, 0.0F); - vertexConsumer.addVertex(pose, q, r, s).setColor(n, o, l, m).setNormal(pose, 0.0F, 0.0F, 1.0F); - vertexConsumer.addVertex(pose, q, r, v).setColor(n, o, l, m).setNormal(pose, 0.0F, 0.0F, 1.0F); - vertexConsumer.addVertex(pose, t, r, s).setColor(j, k, l, m).setNormal(pose, 0.0F, 1.0F, 0.0F); - vertexConsumer.addVertex(pose, t, u, s).setColor(j, k, l, m).setNormal(pose, 0.0F, 1.0F, 0.0F); - vertexConsumer.addVertex(pose, t, u, s).setColor(j, k, l, m).setNormal(pose, -1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, q, u, s).setColor(j, k, l, m).setNormal(pose, -1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, q, u, s).setColor(j, k, l, m).setNormal(pose, 0.0F, 0.0F, 1.0F); - vertexConsumer.addVertex(pose, q, u, v).setColor(j, k, l, m).setNormal(pose, 0.0F, 0.0F, 1.0F); - vertexConsumer.addVertex(pose, q, u, v).setColor(j, k, l, m).setNormal(pose, 0.0F, -1.0F, 0.0F); - vertexConsumer.addVertex(pose, q, r, v).setColor(j, k, l, m).setNormal(pose, 0.0F, -1.0F, 0.0F); - vertexConsumer.addVertex(pose, q, r, v).setColor(j, k, l, m).setNormal(pose, 1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, t, r, v).setColor(j, k, l, m).setNormal(pose, 1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, t, r, v).setColor(j, k, l, m).setNormal(pose, 0.0F, 0.0F, -1.0F); - vertexConsumer.addVertex(pose, t, r, s).setColor(j, k, l, m).setNormal(pose, 0.0F, 0.0F, -1.0F); - vertexConsumer.addVertex(pose, q, u, v).setColor(j, k, l, m).setNormal(pose, 1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, t, u, v).setColor(j, k, l, m).setNormal(pose, 1.0F, 0.0F, 0.0F); - vertexConsumer.addVertex(pose, t, r, v).setColor(j, k, l, m).setNormal(pose, 0.0F, 1.0F, 0.0F); - vertexConsumer.addVertex(pose, t, u, v).setColor(j, k, l, m).setNormal(pose, 0.0F, 1.0F, 0.0F); - vertexConsumer.addVertex(pose, t, u, s).setColor(j, k, l, m).setNormal(pose, 0.0F, 0.0F, 1.0F); - vertexConsumer.addVertex(pose, t, u, v).setColor(j, k, l, m).setNormal(pose, 0.0F, 0.0F, 1.0F); + float f = (float)minX; + float g = (float)minY; + float h = (float)minZ; + float i = (float)maxX; + float j = (float)maxY; + float k = (float)maxZ; + buffer.addVertex(pose, f, g, h).setColor(red, green2, blue2, alpha).setNormal(pose, 1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, i, g, h).setColor(red, green2, blue2, alpha).setNormal(pose, 1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, f, g, h).setColor(red2, green, blue2, alpha).setNormal(pose, 0.0F, 1.0F, 0.0F); + buffer.addVertex(pose, f, j, h).setColor(red2, green, blue2, alpha).setNormal(pose, 0.0F, 1.0F, 0.0F); + buffer.addVertex(pose, f, g, h).setColor(red2, green2, blue, alpha).setNormal(pose, 0.0F, 0.0F, 1.0F); + buffer.addVertex(pose, f, g, k).setColor(red2, green2, blue, alpha).setNormal(pose, 0.0F, 0.0F, 1.0F); + buffer.addVertex(pose, i, g, h).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 1.0F, 0.0F); + buffer.addVertex(pose, i, j, h).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 1.0F, 0.0F); + buffer.addVertex(pose, i, j, h).setColor(red, green, blue, alpha).setNormal(pose, -1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, f, j, h).setColor(red, green, blue, alpha).setNormal(pose, -1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, f, j, h).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 0.0F, 1.0F); + buffer.addVertex(pose, f, j, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 0.0F, 1.0F); + buffer.addVertex(pose, f, j, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, -1.0F, 0.0F); + buffer.addVertex(pose, f, g, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, -1.0F, 0.0F); + buffer.addVertex(pose, f, g, k).setColor(red, green, blue, alpha).setNormal(pose, 1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, i, g, k).setColor(red, green, blue, alpha).setNormal(pose, 1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, i, g, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 0.0F, -1.0F); + buffer.addVertex(pose, i, g, h).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 0.0F, -1.0F); + buffer.addVertex(pose, f, j, k).setColor(red, green, blue, alpha).setNormal(pose, 1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, i, j, k).setColor(red, green, blue, alpha).setNormal(pose, 1.0F, 0.0F, 0.0F); + buffer.addVertex(pose, i, g, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 1.0F, 0.0F); + buffer.addVertex(pose, i, j, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 1.0F, 0.0F); + buffer.addVertex(pose, i, j, h).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 0.0F, 1.0F); + buffer.addVertex(pose, i, j, k).setColor(red, green, blue, alpha).setNormal(pose, 0.0F, 0.0F, 1.0F); } public static void addChainedFilledBoxVertices( - PoseStack poseStack, VertexConsumer vertexConsumer, double d, double e, double f, double g, double h, double i, float j, float k, float l, float m + PoseStack poseStack, + VertexConsumer buffer, + double minX, + double minY, + double minZ, + double maxX, + double maxY, + double maxZ, + float red, + float green, + float blue, + float alpha ) { - addChainedFilledBoxVertices(poseStack, vertexConsumer, (float)d, (float)e, (float)f, (float)g, (float)h, (float)i, j, k, l, m); + addChainedFilledBoxVertices(poseStack, buffer, (float)minX, (float)minY, (float)minZ, (float)maxX, (float)maxY, (float)maxZ, red, green, blue, alpha); } public static void addChainedFilledBoxVertices( - PoseStack poseStack, VertexConsumer vertexConsumer, float f, float g, float h, float i, float j, float k, float l, float m, float n, float o + PoseStack poseStack, + VertexConsumer buffer, + float minX, + float minY, + float minZ, + float maxX, + float maxY, + float maxZ, + float red, + float green, + float blue, + float alpha ) { Matrix4f matrix4f = poseStack.last().pose(); - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); + buffer.addVertex(matrix4f, minX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, minY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, minX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, minZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, maxZ).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, maxX, maxY, maxZ).setColor(red, green, blue, alpha); } public static void renderFace( PoseStack poseStack, - VertexConsumer vertexConsumer, - Direction direction, - float f, - float g, - float h, - float i, - float j, - float k, - float l, - float m, - float n, - float o + VertexConsumer buffer, + Direction face, + float x1, + float y1, + float z1, + float x2, + float y2, + float z2, + float red, + float green, + float blue, + float alpha ) { Matrix4f matrix4f = poseStack.last().pose(); - switch (direction) { + switch (face) { case DOWN: - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, k).setColor(l, m, n, o); + buffer.addVertex(matrix4f, x1, y1, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y1, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y1, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y1, z2).setColor(red, green, blue, alpha); break; case UP: - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, h).setColor(l, m, n, o); + buffer.addVertex(matrix4f, x1, y2, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y2, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y2, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y2, z1).setColor(red, green, blue, alpha); break; case NORTH: - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, h).setColor(l, m, n, o); + buffer.addVertex(matrix4f, x1, y1, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y2, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y2, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y1, z1).setColor(red, green, blue, alpha); break; case SOUTH: - vertexConsumer.addVertex(matrix4f, f, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, k).setColor(l, m, n, o); + buffer.addVertex(matrix4f, x1, y1, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y1, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y2, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y2, z2).setColor(red, green, blue, alpha); break; case WEST: - vertexConsumer.addVertex(matrix4f, f, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, g, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, f, j, h).setColor(l, m, n, o); + buffer.addVertex(matrix4f, x1, y1, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y1, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y2, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x1, y2, z1).setColor(red, green, blue, alpha); break; case EAST: - vertexConsumer.addVertex(matrix4f, i, g, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, h).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, j, k).setColor(l, m, n, o); - vertexConsumer.addVertex(matrix4f, i, g, k).setColor(l, m, n, o); + buffer.addVertex(matrix4f, x2, y1, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y2, z1).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y2, z2).setColor(red, green, blue, alpha); + buffer.addVertex(matrix4f, x2, y1, z2).setColor(red, green, blue, alpha); } } - public static void renderVector(PoseStack poseStack, VertexConsumer vertexConsumer, Vector3f vector3f, Vec3 vec3, int i) { + public static void renderVector(PoseStack poseStack, VertexConsumer buffer, Vector3f startPos, Vec3 vector, int color) { PoseStack.Pose pose = poseStack.last(); - vertexConsumer.addVertex(pose, vector3f).setColor(i).setNormal(pose, (float)vec3.x, (float)vec3.y, (float)vec3.z); - vertexConsumer.addVertex(pose, (float)(vector3f.x() + vec3.x), (float)(vector3f.y() + vec3.y), (float)(vector3f.z() + vec3.z)) - .setColor(i) - .setNormal(pose, (float)vec3.x, (float)vec3.y, (float)vec3.z); + buffer.addVertex(pose, startPos).setColor(color).setNormal(pose, (float)vector.x, (float)vector.y, (float)vector.z); + buffer.addVertex(pose, (float)(startPos.x() + vector.x), (float)(startPos.y() + vector.y), (float)(startPos.z() + vector.z)) + .setColor(color) + .setNormal(pose, (float)vector.x, (float)vector.y, (float)vector.z); } } diff --git a/net/minecraft/client/renderer/SkyRenderer.java b/net/minecraft/client/renderer/SkyRenderer.java index 37986398..3038a3d4 100644 --- a/net/minecraft/client/renderer/SkyRenderer.java +++ b/net/minecraft/client/renderer/SkyRenderer.java @@ -82,22 +82,22 @@ public class SkyRenderer implements AutoCloseable { return bufferBuilder.buildOrThrow(); } - private MeshData buildSkyDisc(Tesselator tesselator, float f) { - float g = Math.signum(f) * 512.0F; + private MeshData buildSkyDisc(Tesselator tesselator, float y) { + float f = Math.signum(y) * 512.0F; BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.TRIANGLE_FAN, DefaultVertexFormat.POSITION); - bufferBuilder.addVertex(0.0F, f, 0.0F); + bufferBuilder.addVertex(0.0F, y, 0.0F); for (int i = -180; i <= 180; i += 45) { - bufferBuilder.addVertex(g * Mth.cos(i * (float) (Math.PI / 180.0)), f, 512.0F * Mth.sin(i * (float) (Math.PI / 180.0))); + bufferBuilder.addVertex(f * Mth.cos(i * (float) (Math.PI / 180.0)), y, 512.0F * Mth.sin(i * (float) (Math.PI / 180.0))); } return bufferBuilder.buildOrThrow(); } - public void renderSkyDisc(float f, float g, float h) { + public void renderSkyDisc(float red, float green, float blue) { RenderSystem.depthMask(false); RenderSystem.setShader(CoreShaders.POSITION); - RenderSystem.setShaderColor(f, g, h, 1.0F); + RenderSystem.setShaderColor(red, green, blue, 1.0F); this.topSkyBuffer.bind(); this.topSkyBuffer.drawWithShader(RenderSystem.getModelViewMatrix(), RenderSystem.getProjectionMatrix(), RenderSystem.getShader()); VertexBuffer.unbind(); @@ -119,28 +119,30 @@ public class SkyRenderer implements AutoCloseable { RenderSystem.depthMask(true); } - public void renderSunMoonAndStars(PoseStack poseStack, Tesselator tesselator, float f, int i, float g, float h, FogParameters fogParameters) { + public void renderSunMoonAndStars( + PoseStack poseStack, Tesselator tesselator, float timeOfDay, int moonPhase, float rainLevel, float starBrightness, FogParameters fog + ) { poseStack.pushPose(); poseStack.mulPose(Axis.YP.rotationDegrees(-90.0F)); - poseStack.mulPose(Axis.XP.rotationDegrees(f * 360.0F)); - this.renderSun(g, tesselator, poseStack); - this.renderMoon(i, g, tesselator, poseStack); - if (h > 0.0F) { - this.renderStars(fogParameters, h, poseStack); + poseStack.mulPose(Axis.XP.rotationDegrees(timeOfDay * 360.0F)); + this.renderSun(rainLevel, tesselator, poseStack); + this.renderMoon(moonPhase, rainLevel, tesselator, poseStack); + if (starBrightness > 0.0F) { + this.renderStars(fog, starBrightness, poseStack); } poseStack.popPose(); } - private void renderSun(float f, Tesselator tesselator, PoseStack poseStack) { - float g = 30.0F; - float h = 100.0F; + private void renderSun(float alpha, Tesselator tesselator, PoseStack poseStack) { + float f = 30.0F; + float g = 100.0F; BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); Matrix4f matrix4f = poseStack.last().pose(); RenderSystem.depthMask(false); RenderSystem.overlayBlendFunc(); RenderSystem.setShader(CoreShaders.POSITION_TEX); - RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, f); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, alpha); RenderSystem.setShaderTexture(0, SUN_LOCATION); RenderSystem.enableBlend(); bufferBuilder.addVertex(matrix4f, -30.0F, 100.0F, -30.0F).setUv(0.0F, 0.0F); @@ -154,27 +156,27 @@ public class SkyRenderer implements AutoCloseable { RenderSystem.depthMask(true); } - private void renderMoon(int i, float f, Tesselator tesselator, PoseStack poseStack) { - float g = 20.0F; - int j = i % 4; - int k = i / 4 % 2; - float h = (j + 0) / 4.0F; - float l = (k + 0) / 2.0F; - float m = (j + 1) / 4.0F; - float n = (k + 1) / 2.0F; - float o = 100.0F; + private void renderMoon(int phase, float alpha, Tesselator tesselator, PoseStack poseStack) { + float f = 20.0F; + int i = phase % 4; + int j = phase / 4 % 2; + float g = (i + 0) / 4.0F; + float h = (j + 0) / 2.0F; + float k = (i + 1) / 4.0F; + float l = (j + 1) / 2.0F; + float m = 100.0F; BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); RenderSystem.depthMask(false); RenderSystem.overlayBlendFunc(); RenderSystem.setShader(CoreShaders.POSITION_TEX); - RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, f); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, alpha); RenderSystem.setShaderTexture(0, MOON_LOCATION); RenderSystem.enableBlend(); Matrix4f matrix4f = poseStack.last().pose(); - bufferBuilder.addVertex(matrix4f, -20.0F, -100.0F, 20.0F).setUv(m, n); - bufferBuilder.addVertex(matrix4f, 20.0F, -100.0F, 20.0F).setUv(h, n); - bufferBuilder.addVertex(matrix4f, 20.0F, -100.0F, -20.0F).setUv(h, l); - bufferBuilder.addVertex(matrix4f, -20.0F, -100.0F, -20.0F).setUv(m, l); + bufferBuilder.addVertex(matrix4f, -20.0F, -100.0F, 20.0F).setUv(k, l); + bufferBuilder.addVertex(matrix4f, 20.0F, -100.0F, 20.0F).setUv(g, l); + bufferBuilder.addVertex(matrix4f, 20.0F, -100.0F, -20.0F).setUv(g, h); + bufferBuilder.addVertex(matrix4f, -20.0F, -100.0F, -20.0F).setUv(k, h); BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.disableBlend(); @@ -182,20 +184,20 @@ public class SkyRenderer implements AutoCloseable { RenderSystem.depthMask(true); } - private void renderStars(FogParameters fogParameters, float f, PoseStack poseStack) { + private void renderStars(FogParameters fog, float starBrightness, PoseStack poseStack) { Matrix4fStack matrix4fStack = RenderSystem.getModelViewStack(); matrix4fStack.pushMatrix(); matrix4fStack.mul(poseStack.last().pose()); RenderSystem.depthMask(false); RenderSystem.overlayBlendFunc(); RenderSystem.setShader(CoreShaders.POSITION); - RenderSystem.setShaderColor(f, f, f, f); + RenderSystem.setShaderColor(starBrightness, starBrightness, starBrightness, starBrightness); RenderSystem.enableBlend(); RenderSystem.setShaderFog(FogParameters.NO_FOG); this.starBuffer.bind(); this.starBuffer.drawWithShader(matrix4fStack, RenderSystem.getProjectionMatrix(), RenderSystem.getShader()); VertexBuffer.unbind(); - RenderSystem.setShaderFog(fogParameters); + RenderSystem.setShaderFog(fog); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.disableBlend(); RenderSystem.defaultBlendFunc(); @@ -203,27 +205,27 @@ public class SkyRenderer implements AutoCloseable { matrix4fStack.popMatrix(); } - public void renderSunriseAndSunset(PoseStack poseStack, Tesselator tesselator, float f, int i) { + public void renderSunriseAndSunset(PoseStack poseStack, Tesselator tesselator, float sunAngle, int color) { RenderSystem.setShader(CoreShaders.POSITION_COLOR); RenderSystem.depthMask(false); RenderSystem.enableBlend(); poseStack.pushPose(); poseStack.mulPose(Axis.XP.rotationDegrees(90.0F)); - float g = Mth.sin(f) < 0.0F ? 180.0F : 0.0F; - poseStack.mulPose(Axis.ZP.rotationDegrees(g)); + float f = Mth.sin(sunAngle) < 0.0F ? 180.0F : 0.0F; + poseStack.mulPose(Axis.ZP.rotationDegrees(f)); poseStack.mulPose(Axis.ZP.rotationDegrees(90.0F)); Matrix4f matrix4f = poseStack.last().pose(); BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.TRIANGLE_FAN, DefaultVertexFormat.POSITION_COLOR); - float h = ARGB.from8BitChannel(ARGB.alpha(i)); - bufferBuilder.addVertex(matrix4f, 0.0F, 100.0F, 0.0F).setColor(i); - int j = ARGB.transparent(i); - int k = 16; + float g = ARGB.from8BitChannel(ARGB.alpha(color)); + bufferBuilder.addVertex(matrix4f, 0.0F, 100.0F, 0.0F).setColor(color); + int i = ARGB.transparent(color); + int j = 16; - for (int l = 0; l <= 16; l++) { - float m = l * (float) (Math.PI * 2) / 16.0F; - float n = Mth.sin(m); - float o = Mth.cos(m); - bufferBuilder.addVertex(matrix4f, n * 120.0F, o * 120.0F, -o * 40.0F * h).setColor(j); + for (int k = 0; k <= 16; k++) { + float h = k * (float) (Math.PI * 2) / 16.0F; + float l = Mth.sin(h); + float m = Mth.cos(h); + bufferBuilder.addVertex(matrix4f, l * 120.0F, m * 120.0F, -m * 40.0F * g).setColor(i); } BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); diff --git a/net/minecraft/client/renderer/ViewArea.java b/net/minecraft/client/renderer/ViewArea.java index d407b3eb..03e1d4a9 100644 --- a/net/minecraft/client/renderer/ViewArea.java +++ b/net/minecraft/client/renderer/ViewArea.java @@ -73,13 +73,13 @@ public class ViewArea { return this.level; } - public void repositionCamera(SectionPos sectionPos) { + public void repositionCamera(SectionPos newSectionPos) { for (int i = 0; i < this.sectionGridSizeX; i++) { - int j = sectionPos.x() - this.viewDistance; + int j = newSectionPos.x() - this.viewDistance; int k = j + Math.floorMod(i - j, this.sectionGridSizeX); for (int l = 0; l < this.sectionGridSizeZ; l++) { - int m = sectionPos.z() - this.viewDistance; + int m = newSectionPos.z() - this.viewDistance; int n = m + Math.floorMod(l - m, this.sectionGridSizeZ); for (int o = 0; o < this.sectionGridSizeY; o++) { @@ -93,7 +93,7 @@ public class ViewArea { } } - this.cameraSectionPos = sectionPos; + this.cameraSectionPos = newSectionPos; this.levelRenderer.getSectionOcclusionGraph().invalidate(); } @@ -114,30 +114,30 @@ public class ViewArea { } @Nullable - protected SectionRenderDispatcher.RenderSection getRenderSection(long l) { - int i = SectionPos.x(l); - int j = SectionPos.y(l); - int k = SectionPos.z(l); + protected SectionRenderDispatcher.RenderSection getRenderSection(long sectionPos) { + int i = SectionPos.x(sectionPos); + int j = SectionPos.y(sectionPos); + int k = SectionPos.z(sectionPos); return this.getRenderSection(i, j, k); } @Nullable - private SectionRenderDispatcher.RenderSection getRenderSection(int i, int j, int k) { - if (!this.containsSection(i, j, k)) { + private SectionRenderDispatcher.RenderSection getRenderSection(int x, int y, int z) { + if (!this.containsSection(x, y, z)) { return null; } else { - int l = j - this.level.getMinSectionY(); - int m = Math.floorMod(i, this.sectionGridSizeX); - int n = Math.floorMod(k, this.sectionGridSizeZ); - return this.sections[this.getSectionIndex(m, l, n)]; + int i = y - this.level.getMinSectionY(); + int j = Math.floorMod(x, this.sectionGridSizeX); + int k = Math.floorMod(z, this.sectionGridSizeZ); + return this.sections[this.getSectionIndex(j, i, k)]; } } - private boolean containsSection(int i, int j, int k) { - if (j >= this.level.getMinSectionY() && j <= this.level.getMaxSectionY()) { - return i < this.cameraSectionPos.x() - this.viewDistance || i > this.cameraSectionPos.x() + this.viewDistance + private boolean containsSection(int x, int y, int z) { + if (y >= this.level.getMinSectionY() && y <= this.level.getMaxSectionY()) { + return x < this.cameraSectionPos.x() - this.viewDistance || x > this.cameraSectionPos.x() + this.viewDistance ? false - : k >= this.cameraSectionPos.z() - this.viewDistance && k <= this.cameraSectionPos.z() + this.viewDistance; + : z >= this.cameraSectionPos.z() - this.viewDistance && z <= this.cameraSectionPos.z() + this.viewDistance; } else { return false; } diff --git a/net/minecraft/client/renderer/WeatherEffectRenderer.java b/net/minecraft/client/renderer/WeatherEffectRenderer.java index f1bfe763..1b801f66 100644 --- a/net/minecraft/client/renderer/WeatherEffectRenderer.java +++ b/net/minecraft/client/renderer/WeatherEffectRenderer.java @@ -60,44 +60,50 @@ public class WeatherEffectRenderer { } } - public void render(Level level, LightTexture lightTexture, int i, float f, Vec3 vec3) { - float g = level.getRainLevel(f); - if (!(g <= 0.0F)) { - int j = Minecraft.useFancyGraphics() ? 10 : 5; + public void render(Level level, LightTexture lightTexture, int ticks, float partialTick, Vec3 cameraPosition) { + float f = level.getRainLevel(partialTick); + if (!(f <= 0.0F)) { + int i = Minecraft.useFancyGraphics() ? 10 : 5; List list = new ArrayList(); List list2 = new ArrayList(); - this.collectColumnInstances(level, i, f, vec3, j, list, list2); + this.collectColumnInstances(level, ticks, partialTick, cameraPosition, i, list, list2); if (!list.isEmpty() || !list2.isEmpty()) { - this.render(lightTexture, vec3, j, g, list, list2); + this.render(lightTexture, cameraPosition, i, f, list, list2); } } } private void collectColumnInstances( - Level level, int i, float f, Vec3 vec3, int j, List list, List list2 + Level level, + int ticks, + float partialTick, + Vec3 cameraPosition, + int radius, + List rainColumnInstances, + List snowColumnInstances ) { - int k = Mth.floor(vec3.x); - int l = Mth.floor(vec3.y); - int m = Mth.floor(vec3.z); + int i = Mth.floor(cameraPosition.x); + int j = Mth.floor(cameraPosition.y); + int k = Mth.floor(cameraPosition.z); BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); RandomSource randomSource = RandomSource.create(); - for (int n = m - j; n <= m + j; n++) { - for (int o = k - j; o <= k + j; o++) { - int p = level.getHeight(Heightmap.Types.MOTION_BLOCKING, o, n); - int q = Math.max(l - j, p); - int r = Math.max(l + j, p); - if (r - q != 0) { - Biome.Precipitation precipitation = this.getPrecipitationAt(level, mutableBlockPos.set(o, l, n)); + for (int l = k - radius; l <= k + radius; l++) { + for (int m = i - radius; m <= i + radius; m++) { + int n = level.getHeight(Heightmap.Types.MOTION_BLOCKING, m, l); + int o = Math.max(j - radius, n); + int p = Math.max(j + radius, n); + if (p - o != 0) { + Biome.Precipitation precipitation = this.getPrecipitationAt(level, mutableBlockPos.set(m, j, l)); if (precipitation != Biome.Precipitation.NONE) { - int s = o * o * 3121 + o * 45238971 ^ n * n * 418711 + n * 13761; - randomSource.setSeed(s); - int t = Math.max(l, p); - int u = LevelRenderer.getLightColor(level, mutableBlockPos.set(o, t, n)); + int q = m * m * 3121 + m * 45238971 ^ l * l * 418711 + l * 13761; + randomSource.setSeed(q); + int r = Math.max(j, n); + int s = LevelRenderer.getLightColor(level, mutableBlockPos.set(m, r, l)); if (precipitation == Biome.Precipitation.RAIN) { - list.add(this.createRainColumnInstance(randomSource, i, o, q, r, n, u, f)); + rainColumnInstances.add(this.createRainColumnInstance(randomSource, ticks, m, o, p, l, s, partialTick)); } else if (precipitation == Biome.Precipitation.SNOW) { - list2.add(this.createSnowColumnInstance(randomSource, i, o, q, r, n, u, f)); + snowColumnInstances.add(this.createSnowColumnInstance(randomSource, ticks, m, o, p, l, s, partialTick)); } } } @@ -106,7 +112,12 @@ public class WeatherEffectRenderer { } private void render( - LightTexture lightTexture, Vec3 vec3, int i, float f, List list, List list2 + LightTexture lightTexture, + Vec3 cameraPosition, + int radius, + float rainLevel, + List rainColumnInstances, + List snowCoiumnInstances ) { lightTexture.turnOnLightLayer(); Tesselator tesselator = Tesselator.getInstance(); @@ -115,14 +126,14 @@ public class WeatherEffectRenderer { RenderSystem.enableDepthTest(); RenderSystem.depthMask(Minecraft.useShaderTransparency()); RenderSystem.setShader(CoreShaders.PARTICLE); - if (!list.isEmpty()) { + if (!rainColumnInstances.isEmpty()) { RenderSystem.setShaderTexture(0, RAIN_LOCATION); - this.renderInstances(tesselator, list, vec3, 1.0F, i, f); + this.renderInstances(tesselator, rainColumnInstances, cameraPosition, 1.0F, radius, rainLevel); } - if (!list2.isEmpty()) { + if (!snowCoiumnInstances.isEmpty()) { RenderSystem.setShaderTexture(0, SNOW_LOCATION); - this.renderInstances(tesselator, list2, vec3, 0.8F, i, f); + this.renderInstances(tesselator, snowCoiumnInstances, cameraPosition, 0.8F, radius, rainLevel); } RenderSystem.depthMask(true); @@ -131,71 +142,77 @@ public class WeatherEffectRenderer { lightTexture.turnOffLightLayer(); } - private WeatherEffectRenderer.ColumnInstance createRainColumnInstance(RandomSource randomSource, int i, int j, int k, int l, int m, int n, float f) { - int o = i & 131071; - int p = j * j * 3121 + j * 45238971 + m * m * 418711 + m * 13761 & 0xFF; - float g = 3.0F + randomSource.nextFloat(); - float h = -(o + p + f) / 32.0F * g; - float q = h % 32.0F; - return new WeatherEffectRenderer.ColumnInstance(j, m, k, l, 0.0F, q, n); + private WeatherEffectRenderer.ColumnInstance createRainColumnInstance( + RandomSource random, int ticks, int x, int bottomY, int topY, int z, int lightCoords, float partialTick + ) { + int i = ticks & 131071; + int j = x * x * 3121 + x * 45238971 + z * z * 418711 + z * 13761 & 0xFF; + float f = 3.0F + random.nextFloat(); + float g = -(i + j + partialTick) / 32.0F * f; + float h = g % 32.0F; + return new WeatherEffectRenderer.ColumnInstance(x, z, bottomY, topY, 0.0F, h, lightCoords); } - private WeatherEffectRenderer.ColumnInstance createSnowColumnInstance(RandomSource randomSource, int i, int j, int k, int l, int m, int n, float f) { - float g = i + f; - float h = (float)(randomSource.nextDouble() + g * 0.01F * (float)randomSource.nextGaussian()); - float o = (float)(randomSource.nextDouble() + g * (float)randomSource.nextGaussian() * 0.001F); - float p = -((i & 511) + f) / 512.0F; - int q = LightTexture.pack((LightTexture.block(n) * 3 + 15) / 4, (LightTexture.sky(n) * 3 + 15) / 4); - return new WeatherEffectRenderer.ColumnInstance(j, m, k, l, h, p + o, q); + private WeatherEffectRenderer.ColumnInstance createSnowColumnInstance( + RandomSource random, int ticks, int x, int bottomY, int topY, int z, int lightCoords, float partialTick + ) { + float f = ticks + partialTick; + float g = (float)(random.nextDouble() + f * 0.01F * (float)random.nextGaussian()); + float h = (float)(random.nextDouble() + f * (float)random.nextGaussian() * 0.001F); + float i = -((ticks & 511) + partialTick) / 512.0F; + int j = LightTexture.pack((LightTexture.block(lightCoords) * 3 + 15) / 4, (LightTexture.sky(lightCoords) * 3 + 15) / 4); + return new WeatherEffectRenderer.ColumnInstance(x, z, bottomY, topY, g, i + h, j); } - private void renderInstances(Tesselator tesselator, List list, Vec3 vec3, float f, int i, float g) { + private void renderInstances( + Tesselator tesselator, List instances, Vec3 cameraPosition, float amount, int radius, float rainLevel + ) { BufferBuilder bufferBuilder = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.PARTICLE); - for (WeatherEffectRenderer.ColumnInstance columnInstance : list) { - float h = (float)(columnInstance.x + 0.5 - vec3.x); - float j = (float)(columnInstance.z + 0.5 - vec3.z); - float k = (float)Mth.lengthSquared(h, j); - float l = Mth.lerp(k / (i * i), f, 0.5F) * g; - int m = ARGB.white(l); - int n = (columnInstance.z - Mth.floor(vec3.z) + 16) * 32 + columnInstance.x - Mth.floor(vec3.x) + 16; - float o = this.columnSizeX[n] / 2.0F; - float p = this.columnSizeZ[n] / 2.0F; - float q = h - o; - float r = h + o; - float s = (float)(columnInstance.topY - vec3.y); - float t = (float)(columnInstance.bottomY - vec3.y); - float u = j - p; - float v = j + p; - float w = columnInstance.uOffset + 0.0F; - float x = columnInstance.uOffset + 1.0F; - float y = columnInstance.bottomY * 0.25F + columnInstance.vOffset; - float z = columnInstance.topY * 0.25F + columnInstance.vOffset; - bufferBuilder.addVertex(q, s, u).setUv(w, y).setColor(m).setLight(columnInstance.lightCoords); - bufferBuilder.addVertex(r, s, v).setUv(x, y).setColor(m).setLight(columnInstance.lightCoords); - bufferBuilder.addVertex(r, t, v).setUv(x, z).setColor(m).setLight(columnInstance.lightCoords); - bufferBuilder.addVertex(q, t, u).setUv(w, z).setColor(m).setLight(columnInstance.lightCoords); + for (WeatherEffectRenderer.ColumnInstance columnInstance : instances) { + float f = (float)(columnInstance.x + 0.5 - cameraPosition.x); + float g = (float)(columnInstance.z + 0.5 - cameraPosition.z); + float h = (float)Mth.lengthSquared(f, g); + float i = Mth.lerp(h / (radius * radius), amount, 0.5F) * rainLevel; + int j = ARGB.white(i); + int k = (columnInstance.z - Mth.floor(cameraPosition.z) + 16) * 32 + columnInstance.x - Mth.floor(cameraPosition.x) + 16; + float l = this.columnSizeX[k] / 2.0F; + float m = this.columnSizeZ[k] / 2.0F; + float n = f - l; + float o = f + l; + float p = (float)(columnInstance.topY - cameraPosition.y); + float q = (float)(columnInstance.bottomY - cameraPosition.y); + float r = g - m; + float s = g + m; + float t = columnInstance.uOffset + 0.0F; + float u = columnInstance.uOffset + 1.0F; + float v = columnInstance.bottomY * 0.25F + columnInstance.vOffset; + float w = columnInstance.topY * 0.25F + columnInstance.vOffset; + bufferBuilder.addVertex(n, p, r).setUv(t, v).setColor(j).setLight(columnInstance.lightCoords); + bufferBuilder.addVertex(o, p, s).setUv(u, v).setColor(j).setLight(columnInstance.lightCoords); + bufferBuilder.addVertex(o, q, s).setUv(u, w).setColor(j).setLight(columnInstance.lightCoords); + bufferBuilder.addVertex(n, q, r).setUv(t, w).setColor(j).setLight(columnInstance.lightCoords); } BufferUploader.drawWithShader(bufferBuilder.buildOrThrow()); } - public void tickRainParticles(ClientLevel clientLevel, Camera camera, int i, ParticleStatus particleStatus) { - float f = clientLevel.getRainLevel(1.0F) / (Minecraft.useFancyGraphics() ? 1.0F : 2.0F); + public void tickRainParticles(ClientLevel level, Camera camera, int ticks, ParticleStatus particleStatus) { + float f = level.getRainLevel(1.0F) / (Minecraft.useFancyGraphics() ? 1.0F : 2.0F); if (!(f <= 0.0F)) { - RandomSource randomSource = RandomSource.create(i * 312987231L); + RandomSource randomSource = RandomSource.create(ticks * 312987231L); BlockPos blockPos = BlockPos.containing(camera.getPosition()); BlockPos blockPos2 = null; - int j = (int)(100.0F * f * f) / (particleStatus == ParticleStatus.DECREASED ? 2 : 1); + int i = (int)(100.0F * f * f) / (particleStatus == ParticleStatus.DECREASED ? 2 : 1); - for (int k = 0; k < j; k++) { + for (int j = 0; j < i; j++) { + int k = randomSource.nextInt(21) - 10; int l = randomSource.nextInt(21) - 10; - int m = randomSource.nextInt(21) - 10; - BlockPos blockPos3 = clientLevel.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, blockPos.offset(l, 0, m)); - if (blockPos3.getY() > clientLevel.getMinY() + BlockPos blockPos3 = level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, blockPos.offset(k, 0, l)); + if (blockPos3.getY() > level.getMinY() && blockPos3.getY() <= blockPos.getY() + 10 && blockPos3.getY() >= blockPos.getY() - 10 - && this.getPrecipitationAt(clientLevel, blockPos3) == Biome.Precipitation.RAIN) { + && this.getPrecipitationAt(level, blockPos3) == Biome.Precipitation.RAIN) { blockPos2 = blockPos3.below(); if (particleStatus == ParticleStatus.MINIMAL) { break; @@ -203,37 +220,36 @@ public class WeatherEffectRenderer { double d = randomSource.nextDouble(); double e = randomSource.nextDouble(); - BlockState blockState = clientLevel.getBlockState(blockPos2); - FluidState fluidState = clientLevel.getFluidState(blockPos2); - VoxelShape voxelShape = blockState.getCollisionShape(clientLevel, blockPos2); + BlockState blockState = level.getBlockState(blockPos2); + FluidState fluidState = level.getFluidState(blockPos2); + VoxelShape voxelShape = blockState.getCollisionShape(level, blockPos2); double g = voxelShape.max(Direction.Axis.Y, d, e); - double h = fluidState.getHeight(clientLevel, blockPos2); - double n = Math.max(g, h); + double h = fluidState.getHeight(level, blockPos2); + double m = Math.max(g, h); ParticleOptions particleOptions = !fluidState.is(FluidTags.LAVA) && !blockState.is(Blocks.MAGMA_BLOCK) && !CampfireBlock.isLitCampfire(blockState) ? ParticleTypes.RAIN : ParticleTypes.SMOKE; - clientLevel.addParticle(particleOptions, blockPos2.getX() + d, blockPos2.getY() + n, blockPos2.getZ() + e, 0.0, 0.0, 0.0); + level.addParticle(particleOptions, blockPos2.getX() + d, blockPos2.getY() + m, blockPos2.getZ() + e, 0.0, 0.0, 0.0); } } if (blockPos2 != null && randomSource.nextInt(3) < this.rainSoundTime++) { this.rainSoundTime = 0; - if (blockPos2.getY() > blockPos.getY() + 1 - && clientLevel.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, blockPos).getY() > Mth.floor((float)blockPos.getY())) { - clientLevel.playLocalSound(blockPos2, SoundEvents.WEATHER_RAIN_ABOVE, SoundSource.WEATHER, 0.1F, 0.5F, false); + if (blockPos2.getY() > blockPos.getY() + 1 && level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, blockPos).getY() > Mth.floor((float)blockPos.getY())) { + level.playLocalSound(blockPos2, SoundEvents.WEATHER_RAIN_ABOVE, SoundSource.WEATHER, 0.1F, 0.5F, false); } else { - clientLevel.playLocalSound(blockPos2, SoundEvents.WEATHER_RAIN, SoundSource.WEATHER, 0.2F, 1.0F, false); + level.playLocalSound(blockPos2, SoundEvents.WEATHER_RAIN, SoundSource.WEATHER, 0.2F, 1.0F, false); } } } } - private Biome.Precipitation getPrecipitationAt(Level level, BlockPos blockPos) { - if (!level.getChunkSource().hasChunk(SectionPos.blockToSectionCoord(blockPos.getX()), SectionPos.blockToSectionCoord(blockPos.getZ()))) { + private Biome.Precipitation getPrecipitationAt(Level level, BlockPos pos) { + if (!level.getChunkSource().hasChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ()))) { return Biome.Precipitation.NONE; } else { - Biome biome = level.getBiome(blockPos).value(); - return biome.getPrecipitationAt(blockPos, level.getSeaLevel()); + Biome biome = level.getBiome(pos).value(); + return biome.getPrecipitationAt(pos, level.getSeaLevel()); } } diff --git a/net/minecraft/client/renderer/WorldBorderRenderer.java b/net/minecraft/client/renderer/WorldBorderRenderer.java index f00e515a..2705d6ea 100644 --- a/net/minecraft/client/renderer/WorldBorderRenderer.java +++ b/net/minecraft/client/renderer/WorldBorderRenderer.java @@ -22,18 +22,21 @@ import net.minecraft.world.phys.Vec3; public class WorldBorderRenderer { private static final ResourceLocation FORCEFIELD_LOCATION = ResourceLocation.withDefaultNamespace("textures/misc/forcefield.png"); - public void render(WorldBorder worldBorder, Vec3 vec3, double d, double e) { - double f = worldBorder.getMinX(); - double g = worldBorder.getMaxX(); - double h = worldBorder.getMinZ(); - double i = worldBorder.getMaxZ(); - if (!(vec3.x < g - d) || !(vec3.x > f + d) || !(vec3.z < i - d) || !(vec3.z > h + d)) { - double j = 1.0 - worldBorder.getDistanceToBorder(vec3.x, vec3.z) / d; - j = Math.pow(j, 4.0); - j = Mth.clamp(j, 0.0, 1.0); - double k = vec3.x; - double l = vec3.z; - float m = (float)e; + public void render(WorldBorder worldBorder, Vec3 cameraPosition, double renderDistance, double farPlaneDepth) { + double d = worldBorder.getMinX(); + double e = worldBorder.getMaxX(); + double f = worldBorder.getMinZ(); + double g = worldBorder.getMaxZ(); + if (!(cameraPosition.x < e - renderDistance) + || !(cameraPosition.x > d + renderDistance) + || !(cameraPosition.z < g - renderDistance) + || !(cameraPosition.z > f + renderDistance)) { + double h = 1.0 - worldBorder.getDistanceToBorder(cameraPosition.x, cameraPosition.z) / renderDistance; + h = Math.pow(h, 4.0); + h = Mth.clamp(h, 0.0, 1.0); + double i = cameraPosition.x; + double j = cameraPosition.z; + float k = (float)farPlaneDepth; RenderSystem.enableBlend(); RenderSystem.enableDepthTest(); RenderSystem.blendFuncSeparate( @@ -41,78 +44,78 @@ public class WorldBorderRenderer { ); RenderSystem.setShaderTexture(0, FORCEFIELD_LOCATION); RenderSystem.depthMask(Minecraft.useShaderTransparency()); - int n = worldBorder.getStatus().getColor(); - float o = ARGB.red(n) / 255.0F; - float p = ARGB.green(n) / 255.0F; - float q = ARGB.blue(n) / 255.0F; - RenderSystem.setShaderColor(o, p, q, (float)j); + int l = worldBorder.getStatus().getColor(); + float m = ARGB.red(l) / 255.0F; + float n = ARGB.green(l) / 255.0F; + float o = ARGB.blue(l) / 255.0F; + RenderSystem.setShaderColor(m, n, o, (float)h); RenderSystem.setShader(CoreShaders.POSITION_TEX); RenderSystem.polygonOffset(-3.0F, -3.0F); RenderSystem.enablePolygonOffset(); RenderSystem.disableCull(); - float r = (float)(Util.getMillis() % 3000L) / 3000.0F; - float s = (float)(-Mth.frac(vec3.y * 0.5)); - float t = s + m; + float p = (float)(Util.getMillis() % 3000L) / 3000.0F; + float q = (float)(-Mth.frac(cameraPosition.y * 0.5)); + float r = q + k; BufferBuilder bufferBuilder = Tesselator.getInstance().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); - double u = Math.max(Mth.floor(l - d), h); - double v = Math.min(Mth.ceil(l + d), i); - float w = (Mth.floor(u) & 1) * 0.5F; - if (k > g - d) { - float x = w; + double s = Math.max(Mth.floor(j - renderDistance), f); + double t = Math.min(Mth.ceil(j + renderDistance), g); + float u = (Mth.floor(s) & 1) * 0.5F; + if (i > e - renderDistance) { + float v = u; - for (double y = u; y < v; x += 0.5F) { - double z = Math.min(1.0, v - y); - float aa = (float)z * 0.5F; - bufferBuilder.addVertex((float)(g - k), -m, (float)(y - l)).setUv(r - x, r + t); - bufferBuilder.addVertex((float)(g - k), -m, (float)(y + z - l)).setUv(r - (aa + x), r + t); - bufferBuilder.addVertex((float)(g - k), m, (float)(y + z - l)).setUv(r - (aa + x), r + s); - bufferBuilder.addVertex((float)(g - k), m, (float)(y - l)).setUv(r - x, r + s); - y++; + for (double w = s; w < t; v += 0.5F) { + double x = Math.min(1.0, t - w); + float y = (float)x * 0.5F; + bufferBuilder.addVertex((float)(e - i), -k, (float)(w - j)).setUv(p - v, p + r); + bufferBuilder.addVertex((float)(e - i), -k, (float)(w + x - j)).setUv(p - (y + v), p + r); + bufferBuilder.addVertex((float)(e - i), k, (float)(w + x - j)).setUv(p - (y + v), p + q); + bufferBuilder.addVertex((float)(e - i), k, (float)(w - j)).setUv(p - v, p + q); + w++; } } - if (k < f + d) { - float x = w; + if (i < d + renderDistance) { + float v = u; - for (double y = u; y < v; x += 0.5F) { - double z = Math.min(1.0, v - y); - float aa = (float)z * 0.5F; - bufferBuilder.addVertex((float)(f - k), -m, (float)(y - l)).setUv(r + x, r + t); - bufferBuilder.addVertex((float)(f - k), -m, (float)(y + z - l)).setUv(r + aa + x, r + t); - bufferBuilder.addVertex((float)(f - k), m, (float)(y + z - l)).setUv(r + aa + x, r + s); - bufferBuilder.addVertex((float)(f - k), m, (float)(y - l)).setUv(r + x, r + s); - y++; + for (double w = s; w < t; v += 0.5F) { + double x = Math.min(1.0, t - w); + float y = (float)x * 0.5F; + bufferBuilder.addVertex((float)(d - i), -k, (float)(w - j)).setUv(p + v, p + r); + bufferBuilder.addVertex((float)(d - i), -k, (float)(w + x - j)).setUv(p + y + v, p + r); + bufferBuilder.addVertex((float)(d - i), k, (float)(w + x - j)).setUv(p + y + v, p + q); + bufferBuilder.addVertex((float)(d - i), k, (float)(w - j)).setUv(p + v, p + q); + w++; } } - u = Math.max(Mth.floor(k - d), f); - v = Math.min(Mth.ceil(k + d), g); - w = (Mth.floor(u) & 1) * 0.5F; - if (l > i - d) { - float x = w; + s = Math.max(Mth.floor(i - renderDistance), d); + t = Math.min(Mth.ceil(i + renderDistance), e); + u = (Mth.floor(s) & 1) * 0.5F; + if (j > g - renderDistance) { + float v = u; - for (double y = u; y < v; x += 0.5F) { - double z = Math.min(1.0, v - y); - float aa = (float)z * 0.5F; - bufferBuilder.addVertex((float)(y - k), -m, (float)(i - l)).setUv(r + x, r + t); - bufferBuilder.addVertex((float)(y + z - k), -m, (float)(i - l)).setUv(r + aa + x, r + t); - bufferBuilder.addVertex((float)(y + z - k), m, (float)(i - l)).setUv(r + aa + x, r + s); - bufferBuilder.addVertex((float)(y - k), m, (float)(i - l)).setUv(r + x, r + s); - y++; + for (double w = s; w < t; v += 0.5F) { + double x = Math.min(1.0, t - w); + float y = (float)x * 0.5F; + bufferBuilder.addVertex((float)(w - i), -k, (float)(g - j)).setUv(p + v, p + r); + bufferBuilder.addVertex((float)(w + x - i), -k, (float)(g - j)).setUv(p + y + v, p + r); + bufferBuilder.addVertex((float)(w + x - i), k, (float)(g - j)).setUv(p + y + v, p + q); + bufferBuilder.addVertex((float)(w - i), k, (float)(g - j)).setUv(p + v, p + q); + w++; } } - if (l < h + d) { - float x = w; + if (j < f + renderDistance) { + float v = u; - for (double y = u; y < v; x += 0.5F) { - double z = Math.min(1.0, v - y); - float aa = (float)z * 0.5F; - bufferBuilder.addVertex((float)(y - k), -m, (float)(h - l)).setUv(r - x, r + t); - bufferBuilder.addVertex((float)(y + z - k), -m, (float)(h - l)).setUv(r - (aa + x), r + t); - bufferBuilder.addVertex((float)(y + z - k), m, (float)(h - l)).setUv(r - (aa + x), r + s); - bufferBuilder.addVertex((float)(y - k), m, (float)(h - l)).setUv(r - x, r + s); - y++; + for (double w = s; w < t; v += 0.5F) { + double x = Math.min(1.0, t - w); + float y = (float)x * 0.5F; + bufferBuilder.addVertex((float)(w - i), -k, (float)(f - j)).setUv(p - v, p + r); + bufferBuilder.addVertex((float)(w + x - i), -k, (float)(f - j)).setUv(p - (y + v), p + r); + bufferBuilder.addVertex((float)(w + x - i), k, (float)(f - j)).setUv(p - (y + v), p + q); + bufferBuilder.addVertex((float)(w - i), k, (float)(f - j)).setUv(p - v, p + q); + w++; } } diff --git a/net/minecraft/client/renderer/block/LiquidBlockRenderer.java b/net/minecraft/client/renderer/block/LiquidBlockRenderer.java index c7329871..972b6424 100644 --- a/net/minecraft/client/renderer/block/LiquidBlockRenderer.java +++ b/net/minecraft/client/renderer/block/LiquidBlockRenderer.java @@ -43,29 +43,29 @@ public class LiquidBlockRenderer { return secondState.getType().isSame(firstState.getType()); } - private static boolean isFaceOccludedByState(Direction direction, float f, BlockState blockState) { - VoxelShape voxelShape = blockState.getFaceOcclusionShape(direction.getOpposite()); + private static boolean isFaceOccludedByState(Direction face, float height, BlockState state) { + VoxelShape voxelShape = state.getFaceOcclusionShape(face.getOpposite()); if (voxelShape == Shapes.empty()) { return false; } else if (voxelShape == Shapes.block()) { - boolean bl = f == 1.0F; - return direction != Direction.UP || bl; + boolean bl = height == 1.0F; + return face != Direction.UP || bl; } else { - VoxelShape voxelShape2 = Shapes.box(0.0, 0.0, 0.0, 1.0, f, 1.0); - return Shapes.blockOccudes(voxelShape2, voxelShape, direction); + VoxelShape voxelShape2 = Shapes.box(0.0, 0.0, 0.0, 1.0, height, 1.0); + return Shapes.blockOccudes(voxelShape2, voxelShape, face); } } - private static boolean isFaceOccludedByNeighbor(Direction direction, float f, BlockState blockState) { - return isFaceOccludedByState(direction, f, blockState); + private static boolean isFaceOccludedByNeighbor(Direction face, float height, BlockState state) { + return isFaceOccludedByState(face, height, state); } - private static boolean isFaceOccludedBySelf(BlockState blockState, Direction direction) { - return isFaceOccludedByState(direction.getOpposite(), 1.0F, blockState); + private static boolean isFaceOccludedBySelf(BlockState state, Direction face) { + return isFaceOccludedByState(face.getOpposite(), 1.0F, state); } - public static boolean shouldRenderFace(FluidState fluidState, BlockState blockState, Direction direction, FluidState fluidState2) { - return !isFaceOccludedBySelf(blockState, direction) && !isNeighborSameFluid(fluidState, fluidState2); + public static boolean shouldRenderFace(FluidState fluidState, BlockState blockState, Direction side, FluidState neighborFluid) { + return !isFaceOccludedBySelf(blockState, side) && !isNeighborSameFluid(fluidState, neighborFluid); } public void tesselate(BlockAndTintGetter level, BlockPos pos, VertexConsumer buffer, BlockState blockState, FluidState fluidState) { diff --git a/net/minecraft/client/renderer/block/model/BakedOverrides.java b/net/minecraft/client/renderer/block/model/BakedOverrides.java index 0e243b55..f4af498e 100644 --- a/net/minecraft/client/renderer/block/model/BakedOverrides.java +++ b/net/minecraft/client/renderer/block/model/BakedOverrides.java @@ -7,6 +7,7 @@ import java.util.List; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.block.model.ItemOverride.Predicate; import net.minecraft.client.renderer.item.ItemProperties; import net.minecraft.client.renderer.item.ItemPropertyFunction; import net.minecraft.client.resources.model.BakedModel; @@ -29,10 +30,10 @@ public class BakedOverrides { this.properties = new ResourceLocation[0]; } - public BakedOverrides(ModelBaker modelBaker, List list) { - this.properties = (ResourceLocation[])list.stream() + public BakedOverrides(ModelBaker baker, List overrides) { + this.properties = (ResourceLocation[])overrides.stream() .flatMap(itemOverridex -> itemOverridex.predicates().stream()) - .map(ItemOverride.Predicate::property) + .map(Predicate::property) .distinct() .toArray(ResourceLocation[]::new); Object2IntMap object2IntMap = new Object2IntOpenHashMap<>(); @@ -41,34 +42,34 @@ public class BakedOverrides { object2IntMap.put(this.properties[i], i); } - List list2 = Lists.newArrayList(); + List list = Lists.newArrayList(); - for (int j = list.size() - 1; j >= 0; j--) { - ItemOverride itemOverride = (ItemOverride)list.get(j); - BakedModel bakedModel = modelBaker.bake(itemOverride.model(), BlockModelRotation.X0_Y0); + for (int j = overrides.size() - 1; j >= 0; j--) { + ItemOverride itemOverride = (ItemOverride)overrides.get(j); + BakedModel bakedModel = baker.bake(itemOverride.model(), BlockModelRotation.X0_Y0); BakedOverrides.PropertyMatcher[] propertyMatchers = (BakedOverrides.PropertyMatcher[])itemOverride.predicates().stream().map(predicate -> { int i = object2IntMap.getInt(predicate.property()); return new BakedOverrides.PropertyMatcher(i, predicate.value()); }).toArray(BakedOverrides.PropertyMatcher[]::new); - list2.add(new BakedOverrides.BakedOverride(propertyMatchers, bakedModel)); + list.add(new BakedOverrides.BakedOverride(propertyMatchers, bakedModel)); } - this.overrides = (BakedOverrides.BakedOverride[])list2.toArray(new BakedOverrides.BakedOverride[0]); + this.overrides = (BakedOverrides.BakedOverride[])list.toArray(new BakedOverrides.BakedOverride[0]); } @Nullable - public BakedModel findOverride(ItemStack itemStack, @Nullable ClientLevel clientLevel, @Nullable LivingEntity livingEntity, int i) { - int j = this.properties.length; - if (j != 0) { - float[] fs = new float[j]; + public BakedModel findOverride(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int seed) { + int i = this.properties.length; + if (i != 0) { + float[] fs = new float[i]; - for (int k = 0; k < j; k++) { - ResourceLocation resourceLocation = this.properties[k]; - ItemPropertyFunction itemPropertyFunction = ItemProperties.getProperty(itemStack, resourceLocation); + for (int j = 0; j < i; j++) { + ResourceLocation resourceLocation = this.properties[j]; + ItemPropertyFunction itemPropertyFunction = ItemProperties.getProperty(stack, resourceLocation); if (itemPropertyFunction != null) { - fs[k] = itemPropertyFunction.call(itemStack, clientLevel, livingEntity, i); + fs[j] = itemPropertyFunction.call(stack, level, entity, seed); } else { - fs[k] = Float.NEGATIVE_INFINITY; + fs[j] = Float.NEGATIVE_INFINITY; } } @@ -85,9 +86,9 @@ public class BakedOverrides { @Environment(EnvType.CLIENT) record BakedOverride(BakedOverrides.PropertyMatcher[] matchers, @Nullable BakedModel model) { - boolean test(float[] fs) { + boolean test(float[] values) { for (BakedOverrides.PropertyMatcher propertyMatcher : this.matchers) { - float f = fs[propertyMatcher.index]; + float f = values[propertyMatcher.index]; if (f < propertyMatcher.value) { return false; } diff --git a/net/minecraft/client/renderer/block/model/BakedQuad.java b/net/minecraft/client/renderer/block/model/BakedQuad.java index 380cd182..e6b9d34c 100644 --- a/net/minecraft/client/renderer/block/model/BakedQuad.java +++ b/net/minecraft/client/renderer/block/model/BakedQuad.java @@ -17,13 +17,13 @@ public class BakedQuad { private final boolean shade; private final int lightEmission; - public BakedQuad(int[] is, int i, Direction direction, TextureAtlasSprite textureAtlasSprite, boolean bl, int j) { - this.vertices = is; - this.tintIndex = i; + public BakedQuad(int[] verticies, int tintIndex, Direction direction, TextureAtlasSprite sprite, boolean shade, int lightEmission) { + this.vertices = verticies; + this.tintIndex = tintIndex; this.direction = direction; - this.sprite = textureAtlasSprite; - this.shade = bl; - this.lightEmission = j; + this.sprite = sprite; + this.shade = shade; + this.lightEmission = lightEmission; } public TextureAtlasSprite getSprite() { diff --git a/net/minecraft/client/renderer/block/model/BlockElement.java b/net/minecraft/client/renderer/block/model/BlockElement.java index 2e146dcb..f1cf9d8a 100644 --- a/net/minecraft/client/renderer/block/model/BlockElement.java +++ b/net/minecraft/client/renderer/block/model/BlockElement.java @@ -31,19 +31,19 @@ public class BlockElement { public final boolean shade; public final int lightEmission; - public BlockElement(Vector3f vector3f, Vector3f vector3f2, Map map) { - this(vector3f, vector3f2, map, null, true, 0); + public BlockElement(Vector3f from, Vector3f to, Map faces) { + this(from, to, faces, null, true, 0); } public BlockElement( - Vector3f vector3f, Vector3f vector3f2, Map map, @Nullable BlockElementRotation blockElementRotation, boolean bl, int i + Vector3f from, Vector3f to, Map faces, @Nullable BlockElementRotation rotation, boolean shade, int lightEmission ) { - this.from = vector3f; - this.to = vector3f2; - this.faces = map; - this.rotation = blockElementRotation; - this.shade = bl; - this.lightEmission = i; + this.from = from; + this.to = to; + this.faces = faces; + this.rotation = rotation; + this.shade = shade; + this.lightEmission = lightEmission; this.fillUvs(); } diff --git a/net/minecraft/client/renderer/block/model/BlockModel.java b/net/minecraft/client/renderer/block/model/BlockModel.java index bba1d9c7..a8e4d655 100644 --- a/net/minecraft/client/renderer/block/model/BlockModel.java +++ b/net/minecraft/client/renderer/block/model/BlockModel.java @@ -139,23 +139,23 @@ public class BlockModel implements UnbakedModel { return this.bake(spriteGetter, state, true); } - public BakedModel bake(Function function, ModelState modelState, boolean bl) { - TextureAtlasSprite textureAtlasSprite = (TextureAtlasSprite)function.apply(this.getMaterial("particle")); + public BakedModel bake(Function spriteGetter, ModelState state, boolean isGui3d) { + TextureAtlasSprite textureAtlasSprite = (TextureAtlasSprite)spriteGetter.apply(this.getMaterial("particle")); if (this.getRootModel() == SpecialModels.BLOCK_ENTITY_MARKER) { return new BuiltInModel(this.getTransforms(), textureAtlasSprite, this.getGuiLight().lightLikeBlock()); } else { - SimpleBakedModel.Builder builder = new SimpleBakedModel.Builder(this, bl).particle(textureAtlasSprite); + SimpleBakedModel.Builder builder = new SimpleBakedModel.Builder(this, isGui3d).particle(textureAtlasSprite); for (BlockElement blockElement : this.getElements()) { for (Direction direction : blockElement.faces.keySet()) { BlockElementFace blockElementFace = (BlockElementFace)blockElement.faces.get(direction); - TextureAtlasSprite textureAtlasSprite2 = (TextureAtlasSprite)function.apply(this.getMaterial(blockElementFace.texture())); + TextureAtlasSprite textureAtlasSprite2 = (TextureAtlasSprite)spriteGetter.apply(this.getMaterial(blockElementFace.texture())); if (blockElementFace.cullForDirection() == null) { - builder.addUnculledFace(bakeFace(blockElement, blockElementFace, textureAtlasSprite2, direction, modelState)); + builder.addUnculledFace(bakeFace(blockElement, blockElementFace, textureAtlasSprite2, direction, state)); } else { builder.addCulledFace( - Direction.rotate(modelState.getRotation().getMatrix(), blockElementFace.cullForDirection()), - bakeFace(blockElement, blockElementFace, textureAtlasSprite2, direction, modelState) + Direction.rotate(state.getRotation().getMatrix(), blockElementFace.cullForDirection()), + bakeFace(blockElement, blockElementFace, textureAtlasSprite2, direction, state) ); } } diff --git a/net/minecraft/client/renderer/block/model/BlockModelDefinition.java b/net/minecraft/client/renderer/block/model/BlockModelDefinition.java index 02397d1a..c611d7e5 100644 --- a/net/minecraft/client/renderer/block/model/BlockModelDefinition.java +++ b/net/minecraft/client/renderer/block/model/BlockModelDefinition.java @@ -50,13 +50,13 @@ public class BlockModelDefinition { return GsonHelper.fromJson(GSON, reader, BlockModelDefinition.class); } - public static BlockModelDefinition fromJsonElement(JsonElement jsonElement) { - return GSON.fromJson(jsonElement, BlockModelDefinition.class); + public static BlockModelDefinition fromJsonElement(JsonElement json) { + return GSON.fromJson(json, BlockModelDefinition.class); } - public BlockModelDefinition(Map map, @Nullable MultiPart.Definition definition) { - this.multiPart = definition; - this.variants = map; + public BlockModelDefinition(Map variants, @Nullable MultiPart.Definition multiPart) { + this.multiPart = multiPart; + this.variants = variants; } @VisibleForTesting @@ -98,7 +98,7 @@ public class BlockModelDefinition { return this.multiPart; } - public Map instantiate(StateDefinition stateDefinition, String string) { + public Map instantiate(StateDefinition stateDefinition, String name) { Map map = new IdentityHashMap(); List list = stateDefinition.getPossibleStates(); MultiPart multiPart; @@ -114,12 +114,12 @@ public class BlockModelDefinition { list.stream().filter(VariantSelector.predicate(stateDefinition, string2)).forEach(blockState -> { UnbakedModel unbakedModel = (UnbakedModel)map.put(blockState, multiVariant); if (unbakedModel != null && unbakedModel != multiPart) { - String stringxx = (String)((Entry)this.variants.entrySet().stream().filter(entry -> entry.getValue() == unbakedModel).findFirst().get()).getKey(); - throw new RuntimeException("Overlapping definition with: " + stringxx); + String stringx = (String)((Entry)this.variants.entrySet().stream().filter(entry -> entry.getValue() == unbakedModel).findFirst().get()).getKey(); + throw new RuntimeException("Overlapping definition with: " + stringx); } }); } catch (Exception var9) { - LOGGER.warn("Exception loading blockstate definition: '{}' for variant: '{}': {}", string, string2, var9.getMessage()); + LOGGER.warn("Exception loading blockstate definition: '{}' for variant: '{}': {}", name, string2, var9.getMessage()); } }); return map; @@ -152,12 +152,12 @@ public class BlockModelDefinition { } @Nullable - protected MultiPart.Definition getMultiPart(JsonDeserializationContext jsonDeserializationContext, JsonObject jsonObject) { - if (!jsonObject.has("multipart")) { + protected MultiPart.Definition getMultiPart(JsonDeserializationContext context, JsonObject json) { + if (!json.has("multipart")) { return null; } else { - JsonArray jsonArray = GsonHelper.getAsJsonArray(jsonObject, "multipart"); - return jsonDeserializationContext.deserialize(jsonArray, MultiPart.Definition.class); + JsonArray jsonArray = GsonHelper.getAsJsonArray(json, "multipart"); + return context.deserialize(jsonArray, MultiPart.Definition.class); } } } diff --git a/net/minecraft/client/renderer/block/model/FaceBakery.java b/net/minecraft/client/renderer/block/model/FaceBakery.java index e4ea0239..aeb0bfa1 100644 --- a/net/minecraft/client/renderer/block/model/FaceBakery.java +++ b/net/minecraft/client/renderer/block/model/FaceBakery.java @@ -29,38 +29,38 @@ public class FaceBakery { public static final int UV_INDEX = 4; public BakedQuad bakeQuad( - Vector3f vector3f, - Vector3f vector3f2, - BlockElementFace blockElementFace, - TextureAtlasSprite textureAtlasSprite, - Direction direction, - ModelState modelState, - @Nullable BlockElementRotation blockElementRotation, - boolean bl, - int i + Vector3f posFrom, + Vector3f posTo, + BlockElementFace face, + TextureAtlasSprite sprite, + Direction facing, + ModelState transform, + @Nullable BlockElementRotation rotation, + boolean shade, + int lightEmission ) { - BlockFaceUV blockFaceUV = blockElementFace.uv(); - if (modelState.isUvLocked()) { - blockFaceUV = recomputeUVs(blockElementFace.uv(), direction, modelState.getRotation()); + BlockFaceUV blockFaceUV = face.uv(); + if (transform.isUvLocked()) { + blockFaceUV = recomputeUVs(face.uv(), facing, transform.getRotation()); } float[] fs = new float[blockFaceUV.uvs.length]; System.arraycopy(blockFaceUV.uvs, 0, fs, 0, fs.length); - float f = textureAtlasSprite.uvShrinkRatio(); + float f = sprite.uvShrinkRatio(); float g = (blockFaceUV.uvs[0] + blockFaceUV.uvs[0] + blockFaceUV.uvs[2] + blockFaceUV.uvs[2]) / 4.0F; float h = (blockFaceUV.uvs[1] + blockFaceUV.uvs[1] + blockFaceUV.uvs[3] + blockFaceUV.uvs[3]) / 4.0F; blockFaceUV.uvs[0] = Mth.lerp(f, blockFaceUV.uvs[0], g); blockFaceUV.uvs[2] = Mth.lerp(f, blockFaceUV.uvs[2], g); blockFaceUV.uvs[1] = Mth.lerp(f, blockFaceUV.uvs[1], h); blockFaceUV.uvs[3] = Mth.lerp(f, blockFaceUV.uvs[3], h); - int[] is = this.makeVertices(blockFaceUV, textureAtlasSprite, direction, this.setupShape(vector3f, vector3f2), modelState.getRotation(), blockElementRotation); - Direction direction2 = calculateFacing(is); + int[] is = this.makeVertices(blockFaceUV, sprite, facing, this.setupShape(posFrom, posTo), transform.getRotation(), rotation); + Direction direction = calculateFacing(is); System.arraycopy(fs, 0, blockFaceUV.uvs, 0, fs.length); - if (blockElementRotation == null) { - this.recalculateWinding(is, direction2); + if (rotation == null) { + this.recalculateWinding(is, direction); } - return new BakedQuad(is, blockElementFace.tintIndex(), direction2, textureAtlasSprite, bl, i); + return new BakedQuad(is, face.tintIndex(), direction, sprite, shade, lightEmission); } public static BlockFaceUV recomputeUVs(BlockFaceUV uv, Direction facing, Transformation rotation) { @@ -103,17 +103,17 @@ public class FaceBakery { } private int[] makeVertices( - BlockFaceUV blockFaceUV, - TextureAtlasSprite textureAtlasSprite, - Direction direction, - float[] fs, + BlockFaceUV uvs, + TextureAtlasSprite sprite, + Direction orientation, + float[] posDiv16, Transformation transformation, - @Nullable BlockElementRotation blockElementRotation + @Nullable BlockElementRotation partRotation ) { int[] is = new int[32]; for (int i = 0; i < 4; i++) { - this.bakeVertex(is, i, direction, blockFaceUV, fs, textureAtlasSprite, transformation, blockElementRotation); + this.bakeVertex(is, i, orientation, uvs, posDiv16, sprite, transformation, partRotation); } return is; @@ -131,20 +131,20 @@ public class FaceBakery { } private void bakeVertex( - int[] is, - int i, - Direction direction, + int[] vertexData, + int vertexIndex, + Direction facing, BlockFaceUV blockFaceUV, - float[] fs, - TextureAtlasSprite textureAtlasSprite, + float[] posDiv16, + TextureAtlasSprite sprite, Transformation transformation, - @Nullable BlockElementRotation blockElementRotation + @Nullable BlockElementRotation partRotation ) { - VertexInfo vertexInfo = FaceInfo.fromFacing(direction).getVertexInfo(i); - Vector3f vector3f = new Vector3f(fs[vertexInfo.xFace], fs[vertexInfo.yFace], fs[vertexInfo.zFace]); - this.applyElementRotation(vector3f, blockElementRotation); + VertexInfo vertexInfo = FaceInfo.fromFacing(facing).getVertexInfo(vertexIndex); + Vector3f vector3f = new Vector3f(posDiv16[vertexInfo.xFace], posDiv16[vertexInfo.yFace], posDiv16[vertexInfo.zFace]); + this.applyElementRotation(vector3f, partRotation); this.applyModelRotation(vector3f, transformation); - this.fillVertex(is, i, vector3f, textureAtlasSprite, blockFaceUV); + this.fillVertex(vertexData, vertexIndex, vector3f, sprite, blockFaceUV); } private void fillVertex(int[] vertexData, int vertexIndex, Vector3f vector, TextureAtlasSprite sprite, BlockFaceUV blockFaceUV) { diff --git a/net/minecraft/client/renderer/block/model/MultiVariant.java b/net/minecraft/client/renderer/block/model/MultiVariant.java index 58c5346a..8d9ee246 100644 --- a/net/minecraft/client/renderer/block/model/MultiVariant.java +++ b/net/minecraft/client/renderer/block/model/MultiVariant.java @@ -33,7 +33,7 @@ public record MultiVariant(List variants) implements UnbakedBlockStateM } @Override - public Object visualEqualityGroup(BlockState blockState) { + public Object visualEqualityGroup(BlockState state) { return this; } diff --git a/net/minecraft/client/renderer/block/model/UnbakedBlockStateModel.java b/net/minecraft/client/renderer/block/model/UnbakedBlockStateModel.java index d4dc3723..714b44b1 100644 --- a/net/minecraft/client/renderer/block/model/UnbakedBlockStateModel.java +++ b/net/minecraft/client/renderer/block/model/UnbakedBlockStateModel.java @@ -7,5 +7,5 @@ import net.minecraft.world.level.block.state.BlockState; @Environment(EnvType.CLIENT) public interface UnbakedBlockStateModel extends UnbakedModel { - Object visualEqualityGroup(BlockState blockState); + Object visualEqualityGroup(BlockState state); } diff --git a/net/minecraft/client/renderer/block/model/VariantSelector.java b/net/minecraft/client/renderer/block/model/VariantSelector.java index 05cae2bb..2b7b2d03 100644 --- a/net/minecraft/client/renderer/block/model/VariantSelector.java +++ b/net/minecraft/client/renderer/block/model/VariantSelector.java @@ -19,24 +19,24 @@ public class VariantSelector { private static final Splitter COMMA_SPLITTER = Splitter.on(','); private static final Splitter EQUAL_SPLITTER = Splitter.on('=').limit(2); - public static > Predicate> predicate(StateDefinition stateDefinition, String string) { + public static > Predicate> predicate(StateDefinition stateDefinition, String value) { Map, Comparable> map = new HashMap(); - for (String string2 : COMMA_SPLITTER.split(string)) { - Iterator iterator = EQUAL_SPLITTER.split(string2).iterator(); + for (String string : COMMA_SPLITTER.split(value)) { + Iterator iterator = EQUAL_SPLITTER.split(string).iterator(); if (iterator.hasNext()) { - String string3 = (String)iterator.next(); - Property property = stateDefinition.getProperty(string3); + String string2 = (String)iterator.next(); + Property property = stateDefinition.getProperty(string2); if (property != null && iterator.hasNext()) { - String string4 = (String)iterator.next(); - Comparable comparable = getValueHelper((Property>)property, string4); + String string3 = (String)iterator.next(); + Comparable comparable = getValueHelper((Property>)property, string3); if (comparable == null) { - throw new RuntimeException("Unknown value: '" + string4 + "' for blockstate property: '" + string3 + "' " + property.getPossibleValues()); + throw new RuntimeException("Unknown value: '" + string3 + "' for blockstate property: '" + string2 + "' " + property.getPossibleValues()); } map.put(property, comparable); - } else if (!string3.isEmpty()) { - throw new RuntimeException("Unknown blockstate property: '" + string3 + "'"); + } else if (!string2.isEmpty()) { + throw new RuntimeException("Unknown blockstate property: '" + string2 + "'"); } } } @@ -53,7 +53,7 @@ public class VariantSelector { } @Nullable - private static > T getValueHelper(Property property, String string) { - return (T)property.getValue(string).orElse(null); + private static > T getValueHelper(Property property, String value) { + return (T)property.getValue(value).orElse(null); } } diff --git a/net/minecraft/client/renderer/block/model/multipart/MultiPart.java b/net/minecraft/client/renderer/block/model/multipart/MultiPart.java index 65be9618..47bfa1aa 100644 --- a/net/minecraft/client/renderer/block/model/multipart/MultiPart.java +++ b/net/minecraft/client/renderer/block/model/multipart/MultiPart.java @@ -34,16 +34,16 @@ import net.minecraft.world.level.block.state.StateDefinition; public class MultiPart implements UnbakedBlockStateModel { private final List selectors; - MultiPart(List list) { - this.selectors = list; + MultiPart(List selectors) { + this.selectors = selectors; } @Override - public Object visualEqualityGroup(BlockState blockState) { + public Object visualEqualityGroup(BlockState state) { IntList intList = new IntArrayList(); for (int i = 0; i < this.selectors.size(); i++) { - if (((MultiPart.InstantiatedSelector)this.selectors.get(i)).predicate.test(blockState)) { + if (((MultiPart.InstantiatedSelector)this.selectors.get(i)).predicate.test(state)) { intList.add(i); } } diff --git a/net/minecraft/client/renderer/blockentity/BannerRenderer.java b/net/minecraft/client/renderer/blockentity/BannerRenderer.java index c72a304d..4cc973a4 100644 --- a/net/minecraft/client/renderer/blockentity/BannerRenderer.java +++ b/net/minecraft/client/renderer/blockentity/BannerRenderer.java @@ -106,7 +106,7 @@ public class BannerRenderer implements BlockEntityRenderer { */ public static void renderPatterns( PoseStack poseStack, - MultiBufferSource buffer, + MultiBufferSource bufferSource, int packedLight, int packedOverlay, ModelPart flagPart, @@ -115,29 +115,29 @@ public class BannerRenderer implements BlockEntityRenderer { DyeColor baseColor, BannerPatternLayers patterns ) { - renderPatterns(poseStack, buffer, packedLight, packedOverlay, flagPart, flagMaterial, banner, baseColor, patterns, false, true); + renderPatterns(poseStack, bufferSource, packedLight, packedOverlay, flagPart, flagMaterial, banner, baseColor, patterns, false, true); } public static void renderPatterns( PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i, - int j, - ModelPart modelPart, - Material material, - boolean bl, - DyeColor dyeColor, - BannerPatternLayers bannerPatternLayers, - boolean bl2, - boolean bl3 + MultiBufferSource bufferSource, + int packedLight, + int packedOverlay, + ModelPart flagPart, + Material flagMaterial, + boolean banner, + DyeColor baseColor, + BannerPatternLayers patterns, + boolean withGlint, + boolean noEntity ) { - modelPart.render(poseStack, material.buffer(multiBufferSource, RenderType::entitySolid, bl3, bl2), i, j); - renderPatternLayer(poseStack, multiBufferSource, i, j, modelPart, bl ? Sheets.BANNER_BASE : Sheets.SHIELD_BASE, dyeColor); + flagPart.render(poseStack, flagMaterial.buffer(bufferSource, RenderType::entitySolid, noEntity, withGlint), packedLight, packedOverlay); + renderPatternLayer(poseStack, bufferSource, packedLight, packedOverlay, flagPart, banner ? Sheets.BANNER_BASE : Sheets.SHIELD_BASE, baseColor); - for (int k = 0; k < 16 && k < bannerPatternLayers.layers().size(); k++) { - Layer layer = (Layer)bannerPatternLayers.layers().get(k); - Material material2 = bl ? Sheets.getBannerMaterial(layer.pattern()) : Sheets.getShieldMaterial(layer.pattern()); - renderPatternLayer(poseStack, multiBufferSource, i, j, modelPart, material2, layer.color()); + for (int i = 0; i < 16 && i < patterns.layers().size(); i++) { + Layer layer = (Layer)patterns.layers().get(i); + Material material = banner ? Sheets.getBannerMaterial(layer.pattern()) : Sheets.getShieldMaterial(layer.pattern()); + renderPatternLayer(poseStack, bufferSource, packedLight, packedOverlay, flagPart, material, layer.color()); } } diff --git a/net/minecraft/client/renderer/blockentity/BedRenderer.java b/net/minecraft/client/renderer/blockentity/BedRenderer.java index 0772e916..3cb3fe57 100644 --- a/net/minecraft/client/renderer/blockentity/BedRenderer.java +++ b/net/minecraft/client/renderer/blockentity/BedRenderer.java @@ -102,16 +102,16 @@ public class BedRenderer implements BlockEntityRenderer { } private void renderPiece( - PoseStack poseStack, MultiBufferSource multiBufferSource, Model model, Direction direction, Material material, int i, int j, boolean bl + PoseStack poseStack, MultiBufferSource bufferSource, Model model, Direction direction, Material material, int packedLight, int packedOverlay, boolean isFeet ) { poseStack.pushPose(); - poseStack.translate(0.0F, 0.5625F, bl ? -1.0F : 0.0F); + poseStack.translate(0.0F, 0.5625F, isFeet ? -1.0F : 0.0F); poseStack.mulPose(Axis.XP.rotationDegrees(90.0F)); poseStack.translate(0.5F, 0.5F, 0.5F); poseStack.mulPose(Axis.ZP.rotationDegrees(180.0F + direction.toYRot())); poseStack.translate(-0.5F, -0.5F, -0.5F); - VertexConsumer vertexConsumer = material.buffer(multiBufferSource, RenderType::entitySolid); - model.renderToBuffer(poseStack, vertexConsumer, i, j); + VertexConsumer vertexConsumer = material.buffer(bufferSource, RenderType::entitySolid); + model.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/blockentity/ChestRenderer.java b/net/minecraft/client/renderer/blockentity/ChestRenderer.java index 8f47d141..dffdf99a 100644 --- a/net/minecraft/client/renderer/blockentity/ChestRenderer.java +++ b/net/minecraft/client/renderer/blockentity/ChestRenderer.java @@ -84,8 +84,8 @@ public class ChestRenderer implements Bl } } - private void render(PoseStack poseStack, VertexConsumer vertexConsumer, ChestModel chestModel, float f, int i, int j) { - chestModel.setupAnim(f); - chestModel.renderToBuffer(poseStack, vertexConsumer, i, j); + private void render(PoseStack poseStack, VertexConsumer buffer, ChestModel model, float openness, int packedLight, int packedOverlay) { + model.setupAnim(openness); + model.renderToBuffer(poseStack, buffer, packedLight, packedOverlay); } } diff --git a/net/minecraft/client/renderer/blockentity/ShulkerBoxRenderer.java b/net/minecraft/client/renderer/blockentity/ShulkerBoxRenderer.java index 84385a61..c68410b3 100644 --- a/net/minecraft/client/renderer/blockentity/ShulkerBoxRenderer.java +++ b/net/minecraft/client/renderer/blockentity/ShulkerBoxRenderer.java @@ -62,14 +62,14 @@ public class ShulkerBoxRenderer implements BlockEntityRenderer { } } - public static Model createSignModel(EntityModelSet entityModelSet, WoodType woodType, boolean bl) { - ModelLayerLocation modelLayerLocation = bl ? ModelLayers.createStandingSignModelName(woodType) : ModelLayers.createWallSignModelName(woodType); - return new Model.Simple(entityModelSet.bakeLayer(modelLayerLocation), RenderType::entityCutoutNoCull); + public static Model createSignModel(EntityModelSet modelSet, WoodType woodType, boolean standingSign) { + ModelLayerLocation modelLayerLocation = standingSign ? ModelLayers.createStandingSignModelName(woodType) : ModelLayers.createWallSignModelName(woodType); + return new Model.Simple(modelSet.bakeLayer(modelLayerLocation), RenderType::entityCutoutNoCull); } - public static LayerDefinition createSignLayer(boolean bl) { + public static LayerDefinition createSignLayer(boolean standingSign) { MeshDefinition meshDefinition = new MeshDefinition(); PartDefinition partDefinition = meshDefinition.getRoot(); partDefinition.addOrReplaceChild("sign", CubeListBuilder.create().texOffs(0, 0).addBox(-12.0F, -14.0F, -1.0F, 24.0F, 12.0F, 2.0F), PartPose.ZERO); - if (bl) { + if (standingSign) { partDefinition.addOrReplaceChild("stick", CubeListBuilder.create().texOffs(0, 14).addBox(-1.0F, -2.0F, -1.0F, 2.0F, 14.0F, 2.0F), PartPose.ZERO); } diff --git a/net/minecraft/client/renderer/chunk/CompileTaskDynamicQueue.java b/net/minecraft/client/renderer/chunk/CompileTaskDynamicQueue.java index 4e87dd70..dede17be 100644 --- a/net/minecraft/client/renderer/chunk/CompileTaskDynamicQueue.java +++ b/net/minecraft/client/renderer/chunk/CompileTaskDynamicQueue.java @@ -15,12 +15,12 @@ public class CompileTaskDynamicQueue { private int recompileQuota = 2; private final List tasks = new ObjectArrayList<>(); - public synchronized void add(CompileTask compileTask) { - this.tasks.add(compileTask); + public synchronized void add(CompileTask task) { + this.tasks.add(task); } @Nullable - public synchronized CompileTask poll(Vec3 vec3) { + public synchronized CompileTask poll(Vec3 cameraPosition) { int i = -1; int j = -1; double d = Double.MAX_VALUE; @@ -33,7 +33,7 @@ public class CompileTaskDynamicQueue { if (compileTask.isCancelled.get()) { listIterator.remove(); } else { - double f = compileTask.getOrigin().distToCenterSqr(vec3); + double f = compileTask.getOrigin().distToCenterSqr(cameraPosition); if (!compileTask.isRecompile() && f < d) { d = f; i = k; @@ -62,8 +62,8 @@ public class CompileTaskDynamicQueue { } @Nullable - private CompileTask removeTaskByIndex(int i) { - return i >= 0 ? (CompileTask)this.tasks.remove(i) : null; + private CompileTask removeTaskByIndex(int index) { + return index >= 0 ? (CompileTask)this.tasks.remove(index) : null; } public synchronized void clear() { diff --git a/net/minecraft/client/renderer/chunk/SectionRenderDispatcher.java b/net/minecraft/client/renderer/chunk/SectionRenderDispatcher.java index 9f8dc070..bf4855bb 100644 --- a/net/minecraft/client/renderer/chunk/SectionRenderDispatcher.java +++ b/net/minecraft/client/renderer/chunk/SectionRenderDispatcher.java @@ -4,10 +4,10 @@ import com.google.common.collect.Lists; import com.google.common.collect.Queues; import com.google.common.collect.Sets; import com.mojang.blaze3d.buffers.BufferUsage; -import com.mojang.blaze3d.vertex.ByteBufferBuilder; import com.mojang.blaze3d.vertex.MeshData; import com.mojang.blaze3d.vertex.VertexBuffer; import com.mojang.blaze3d.vertex.VertexSorting; +import com.mojang.blaze3d.vertex.ByteBufferBuilder.Result; import com.mojang.blaze3d.vertex.MeshData.SortState; import it.unimi.dsi.fastutil.objects.ObjectArraySet; import java.util.Collection; @@ -68,21 +68,21 @@ public class SectionRenderDispatcher { final SectionCompiler sectionCompiler; public SectionRenderDispatcher( - ClientLevel clientLevel, - LevelRenderer levelRenderer, - TracingExecutor tracingExecutor, - RenderBuffers renderBuffers, - BlockRenderDispatcher blockRenderDispatcher, - BlockEntityRenderDispatcher blockEntityRenderDispatcher + ClientLevel level, + LevelRenderer renderer, + TracingExecutor executor, + RenderBuffers buffer, + BlockRenderDispatcher blockRenderer, + BlockEntityRenderDispatcher blockEntityRenderer ) { - this.level = clientLevel; - this.renderer = levelRenderer; - this.fixedBuffers = renderBuffers.fixedBufferPack(); - this.bufferPool = renderBuffers.sectionBufferPool(); - this.executor = tracingExecutor; - this.consecutiveExecutor = new ConsecutiveExecutor(tracingExecutor, "Section Renderer"); + this.level = level; + this.renderer = renderer; + this.fixedBuffers = buffer.fixedBufferPack(); + this.bufferPool = buffer.sectionBufferPool(); + this.executor = executor; + this.consecutiveExecutor = new ConsecutiveExecutor(executor, "Section Renderer"); this.consecutiveExecutor.schedule(this::runTask); - this.sectionCompiler = new SectionCompiler(blockRenderDispatcher, blockEntityRenderDispatcher); + this.sectionCompiler = new SectionCompiler(blockRenderer, blockEntityRenderer); } public void setLevel(ClientLevel level) { @@ -183,7 +183,7 @@ public class SectionRenderDispatcher { }, this.toUpload::add); } - public CompletableFuture uploadSectionIndexBuffer(ByteBufferBuilder.Result result, VertexBuffer vertexBuffer) { + public CompletableFuture uploadSectionIndexBuffer(Result result, VertexBuffer vertexBuffer) { return this.closed ? CompletableFuture.completedFuture(null) : CompletableFuture.runAsync(() -> { if (vertexBuffer.isInvalid()) { result.close(); @@ -259,13 +259,13 @@ public class SectionRenderDispatcher { final BlockPos.MutableBlockPos origin = new BlockPos.MutableBlockPos(-1, -1, -1); private boolean playerChanged; - public RenderSection(final int i, final long l) { - this.index = i; - this.setSectionNode(l); + public RenderSection(final int index, final long sectionNode) { + this.index = index; + this.setSectionNode(sectionNode); } - private boolean doesChunkExistAt(long l) { - return SectionRenderDispatcher.this.level.getChunk(SectionPos.x(l), SectionPos.z(l), ChunkStatus.FULL, false) != null; + private boolean doesChunkExistAt(long pos) { + return SectionRenderDispatcher.this.level.getChunk(SectionPos.x(pos), SectionPos.z(pos), ChunkStatus.FULL, false) != null; } public boolean hasAllNeighbors() { @@ -286,12 +286,12 @@ public class SectionRenderDispatcher { return (VertexBuffer)this.buffers.get(renderType); } - public void setSectionNode(long l) { + public void setSectionNode(long sectionNode) { this.reset(); - this.sectionNode = l; - int i = SectionPos.sectionToBlockCoord(SectionPos.x(l)); - int j = SectionPos.sectionToBlockCoord(SectionPos.y(l)); - int k = SectionPos.sectionToBlockCoord(SectionPos.z(l)); + this.sectionNode = sectionNode; + int i = SectionPos.sectionToBlockCoord(SectionPos.x(sectionNode)); + int j = SectionPos.sectionToBlockCoord(SectionPos.y(sectionNode)); + int k = SectionPos.sectionToBlockCoord(SectionPos.z(sectionNode)); this.origin.set(i, j, k); this.bb = new AABB(i, j, k, i + 16, j + 16, k + 16); } @@ -351,9 +351,9 @@ public class SectionRenderDispatcher { return SectionPos.offset(this.sectionNode, direction); } - public void resortTransparency(SectionRenderDispatcher sectionRenderDispatcher) { + public void resortTransparency(SectionRenderDispatcher dispatcher) { this.lastResortTransparencyTask = new ResortTransparencyTask(this, this.getCompiled()); - sectionRenderDispatcher.schedule(this.lastResortTransparencyTask); + dispatcher.schedule(this.lastResortTransparencyTask); } public boolean hasTranslucentGeometry() { @@ -431,20 +431,20 @@ public class SectionRenderDispatcher { private int y; private int z; - public static SectionRenderDispatcher.TranslucencyPointOfView of(Vec3 vec3, long l) { - return new SectionRenderDispatcher.TranslucencyPointOfView().set(vec3, l); + public static SectionRenderDispatcher.TranslucencyPointOfView of(Vec3 cameraPosition, long sectionNode) { + return new SectionRenderDispatcher.TranslucencyPointOfView().set(cameraPosition, sectionNode); } - public SectionRenderDispatcher.TranslucencyPointOfView set(Vec3 vec3, long l) { - this.x = getCoordinate(vec3.x(), SectionPos.x(l)); - this.y = getCoordinate(vec3.y(), SectionPos.y(l)); - this.z = getCoordinate(vec3.z(), SectionPos.z(l)); + public SectionRenderDispatcher.TranslucencyPointOfView set(Vec3 cameraPosition, long sectionNode) { + this.x = getCoordinate(cameraPosition.x(), SectionPos.x(sectionNode)); + this.y = getCoordinate(cameraPosition.y(), SectionPos.y(sectionNode)); + this.z = getCoordinate(cameraPosition.z(), SectionPos.z(sectionNode)); return this; } - private static int getCoordinate(double d, int i) { - int j = SectionPos.blockToSectionCoord(d) - i; - return Mth.clamp(j, -1, 1); + private static int getCoordinate(double cameraCoord, int sectionCoord) { + int i = SectionPos.blockToSectionCoord(cameraCoord) - sectionCoord; + return Mth.clamp(i, -1, 1); } public boolean isAxisAligned() { diff --git a/net/minecraft/client/renderer/culling/Frustum.java b/net/minecraft/client/renderer/culling/Frustum.java index b0ebfebd..a6c470a6 100644 --- a/net/minecraft/client/renderer/culling/Frustum.java +++ b/net/minecraft/client/renderer/culling/Frustum.java @@ -74,14 +74,14 @@ public class Frustum { return this.cubeInFrustum(boundingBox.minX(), boundingBox.minY(), boundingBox.minZ(), boundingBox.maxX() + 1, boundingBox.maxY() + 1, boundingBox.maxZ() + 1); } - private int cubeInFrustum(double d, double e, double f, double g, double h, double i) { - float j = (float)(d - this.camX); - float k = (float)(e - this.camY); - float l = (float)(f - this.camZ); - float m = (float)(g - this.camX); - float n = (float)(h - this.camY); - float o = (float)(i - this.camZ); - return this.intersection.intersectAab(j, k, l, m, n, o); + private int cubeInFrustum(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) { + float f = (float)(minX - this.camX); + float g = (float)(minY - this.camY); + float h = (float)(minZ - this.camZ); + float i = (float)(maxX - this.camX); + float j = (float)(maxY - this.camY); + float k = (float)(maxZ - this.camZ); + return this.intersection.intersectAab(f, g, h, i, j, k); } public Vector4f[] getFrustumPoints() { diff --git a/net/minecraft/client/renderer/debug/ChunkCullingDebugRenderer.java b/net/minecraft/client/renderer/debug/ChunkCullingDebugRenderer.java index 27c71e1c..06690437 100644 --- a/net/minecraft/client/renderer/debug/ChunkCullingDebugRenderer.java +++ b/net/minecraft/client/renderer/debug/ChunkCullingDebugRenderer.java @@ -160,15 +160,21 @@ public class ChunkCullingDebugRenderer implements DebugRenderer.SimpleDebugRende } } - private void addFrustumVertex(VertexConsumer vertexConsumer, Matrix4f matrix4f, Vector4f vector4f) { - vertexConsumer.addVertex(matrix4f, vector4f.x(), vector4f.y(), vector4f.z()).setColor(-16777216).setNormal(0.0F, 0.0F, -1.0F); + private void addFrustumVertex(VertexConsumer buffer, Matrix4f pose, Vector4f position) { + buffer.addVertex(pose, position.x(), position.y(), position.z()).setColor(-16777216).setNormal(0.0F, 0.0F, -1.0F); } - private void addFrustumQuad(VertexConsumer vertexConsumer, Matrix4f matrix4f, Vector4f[] vector4fs, int i, int j, int k, int l, int m, int n, int o) { + private void addFrustumQuad( + VertexConsumer buffer, Matrix4f pose, Vector4f[] frustumPoints, int point1, int point2, int point3, int point4, int red, int green, int blue + ) { float f = 0.25F; - vertexConsumer.addVertex(matrix4f, vector4fs[i].x(), vector4fs[i].y(), vector4fs[i].z()).setColor((float)m, (float)n, (float)o, 0.25F); - vertexConsumer.addVertex(matrix4f, vector4fs[j].x(), vector4fs[j].y(), vector4fs[j].z()).setColor((float)m, (float)n, (float)o, 0.25F); - vertexConsumer.addVertex(matrix4f, vector4fs[k].x(), vector4fs[k].y(), vector4fs[k].z()).setColor((float)m, (float)n, (float)o, 0.25F); - vertexConsumer.addVertex(matrix4f, vector4fs[l].x(), vector4fs[l].y(), vector4fs[l].z()).setColor((float)m, (float)n, (float)o, 0.25F); + buffer.addVertex(pose, frustumPoints[point1].x(), frustumPoints[point1].y(), frustumPoints[point1].z()) + .setColor((float)red, (float)green, (float)blue, 0.25F); + buffer.addVertex(pose, frustumPoints[point2].x(), frustumPoints[point2].y(), frustumPoints[point2].z()) + .setColor((float)red, (float)green, (float)blue, 0.25F); + buffer.addVertex(pose, frustumPoints[point3].x(), frustumPoints[point3].y(), frustumPoints[point3].z()) + .setColor((float)red, (float)green, (float)blue, 0.25F); + buffer.addVertex(pose, frustumPoints[point4].x(), frustumPoints[point4].y(), frustumPoints[point4].z()) + .setColor((float)red, (float)green, (float)blue, 0.25F); } } diff --git a/net/minecraft/client/renderer/debug/DebugRenderer.java b/net/minecraft/client/renderer/debug/DebugRenderer.java index 3c0809bf..812d3bfb 100644 --- a/net/minecraft/client/renderer/debug/DebugRenderer.java +++ b/net/minecraft/client/renderer/debug/DebugRenderer.java @@ -12,6 +12,7 @@ import net.minecraft.client.gui.Font; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.ShapeRenderer; +import net.minecraft.client.renderer.MultiBufferSource.BufferSource; import net.minecraft.client.renderer.culling.Frustum; import net.minecraft.core.BlockPos; import net.minecraft.util.ARGB; @@ -121,20 +122,20 @@ public class DebugRenderer { return this.renderOctree = !this.renderOctree; } - public void render(PoseStack poseStack, Frustum frustum, MultiBufferSource.BufferSource bufferSource, double d, double e, double f) { + public void render(PoseStack poseStack, Frustum frustum, BufferSource bufferSource, double camX, double camY, double camZ) { if (this.renderChunkborder && !Minecraft.getInstance().showOnlyReducedInfo()) { - this.chunkBorderRenderer.render(poseStack, bufferSource, d, e, f); + this.chunkBorderRenderer.render(poseStack, bufferSource, camX, camY, camZ); } if (this.renderOctree) { - this.octreeDebugRenderer.render(poseStack, frustum, bufferSource, d, e, f); + this.octreeDebugRenderer.render(poseStack, frustum, bufferSource, camX, camY, camZ); } - this.gameTestDebugRenderer.render(poseStack, bufferSource, d, e, f); + this.gameTestDebugRenderer.render(poseStack, bufferSource, camX, camY, camZ); } - public void renderAfterTranslucents(PoseStack poseStack, MultiBufferSource.BufferSource bufferSource, double d, double e, double f) { - this.chunkCullingDebugRenderer.render(poseStack, bufferSource, d, e, f); + public void renderAfterTranslucents(PoseStack poseStack, BufferSource bufferSource, double camX, double camY, double camZ) { + this.chunkCullingDebugRenderer.render(poseStack, bufferSource, camX, camY, camZ); } public static Optional getTargetedEntity(@Nullable Entity entity, int distance) { @@ -226,8 +227,8 @@ public class DebugRenderer { double z, int color, float scale, - boolean bl, - float f, + boolean center, + float xOffset, boolean transparent ) { Minecraft minecraft = Minecraft.getInstance(); @@ -236,58 +237,68 @@ public class DebugRenderer { Font font = minecraft.font; double d = camera.getPosition().x; double e = camera.getPosition().y; - double g = camera.getPosition().z; + double f = camera.getPosition().z; poseStack.pushPose(); - poseStack.translate((float)(x - d), (float)(y - e) + 0.07F, (float)(z - g)); + poseStack.translate((float)(x - d), (float)(y - e) + 0.07F, (float)(z - f)); poseStack.mulPose(camera.rotation()); poseStack.scale(scale, -scale, scale); - float h = bl ? -font.width(text) / 2.0F : 0.0F; - h -= f / scale; + float g = center ? -font.width(text) / 2.0F : 0.0F; + g -= xOffset / scale; font.drawInBatch( - text, h, 0.0F, color, false, poseStack.last().pose(), bufferSource, transparent ? Font.DisplayMode.SEE_THROUGH : Font.DisplayMode.NORMAL, 0, 15728880 + text, g, 0.0F, color, false, poseStack.last().pose(), bufferSource, transparent ? Font.DisplayMode.SEE_THROUGH : Font.DisplayMode.NORMAL, 0, 15728880 ); poseStack.popPose(); } } - private static Vec3 mixColor(float f) { - float g = 5.99999F; - int i = (int)(Mth.clamp(f, 0.0F, 1.0F) * 5.99999F); - float h = f * 5.99999F - i; + private static Vec3 mixColor(float shift) { + float f = 5.99999F; + int i = (int)(Mth.clamp(shift, 0.0F, 1.0F) * 5.99999F); + float g = shift * 5.99999F - i; return switch (i) { - case 0 -> new Vec3(1.0, h, 0.0); - case 1 -> new Vec3(1.0F - h, 1.0, 0.0); - case 2 -> new Vec3(0.0, 1.0, h); - case 3 -> new Vec3(0.0, 1.0 - h, 1.0); - case 4 -> new Vec3(h, 0.0, 1.0); - case 5 -> new Vec3(1.0, 0.0, 1.0 - h); + case 0 -> new Vec3(1.0, g, 0.0); + case 1 -> new Vec3(1.0F - g, 1.0, 0.0); + case 2 -> new Vec3(0.0, 1.0, g); + case 3 -> new Vec3(0.0, 1.0 - g, 1.0); + case 4 -> new Vec3(g, 0.0, 1.0); + case 5 -> new Vec3(1.0, 0.0, 1.0 - g); default -> throw new IllegalStateException("Unexpected value: " + i); }; } - private static Vec3 shiftHue(float f, float g, float h, float i) { - Vec3 vec3 = mixColor(i).scale(f); - Vec3 vec32 = mixColor((i + 0.33333334F) % 1.0F).scale(g); - Vec3 vec33 = mixColor((i + 0.6666667F) % 1.0F).scale(h); + private static Vec3 shiftHue(float red, float green, float blue, float shift) { + Vec3 vec3 = mixColor(shift).scale(red); + Vec3 vec32 = mixColor((shift + 0.33333334F) % 1.0F).scale(green); + Vec3 vec33 = mixColor((shift + 0.6666667F) % 1.0F).scale(blue); Vec3 vec34 = vec3.add(vec32).add(vec33); double d = Math.max(Math.max(1.0, vec34.x), Math.max(vec34.y, vec34.z)); return new Vec3(vec34.x / d, vec34.y / d, vec34.z / d); } public static void renderVoxelShape( - PoseStack poseStack, VertexConsumer vertexConsumer, VoxelShape voxelShape, double d, double e, double f, float g, float h, float i, float j, boolean bl + PoseStack poseStack, + VertexConsumer buffer, + VoxelShape shape, + double x, + double y, + double z, + float red, + float green, + float blue, + float alpha, + boolean lowerColorVariance ) { - List list = voxelShape.toAabbs(); + List list = shape.toAabbs(); if (!list.isEmpty()) { - int k = bl ? list.size() : list.size() * 8; - ShapeRenderer.renderShape(poseStack, vertexConsumer, Shapes.create((AABB)list.get(0)), d, e, f, ARGB.colorFromFloat(j, g, h, i)); + int i = lowerColorVariance ? list.size() : list.size() * 8; + ShapeRenderer.renderShape(poseStack, buffer, Shapes.create((AABB)list.get(0)), x, y, z, ARGB.colorFromFloat(alpha, red, green, blue)); - for (int l = 1; l < list.size(); l++) { - AABB aABB = (AABB)list.get(l); - float m = (float)l / k; - Vec3 vec3 = shiftHue(g, h, i, m); - ShapeRenderer.renderShape(poseStack, vertexConsumer, Shapes.create(aABB), d, e, f, ARGB.colorFromFloat(j, (float)vec3.x, (float)vec3.y, (float)vec3.z)); + for (int j = 1; j < list.size(); j++) { + AABB aABB = (AABB)list.get(j); + float f = (float)j / i; + Vec3 vec3 = shiftHue(red, green, blue, f); + ShapeRenderer.renderShape(poseStack, buffer, Shapes.create(aABB), x, y, z, ARGB.colorFromFloat(alpha, (float)vec3.x, (float)vec3.y, (float)vec3.z)); } } } diff --git a/net/minecraft/client/renderer/debug/OctreeDebugRenderer.java b/net/minecraft/client/renderer/debug/OctreeDebugRenderer.java index b4bf58dc..8670e987 100644 --- a/net/minecraft/client/renderer/debug/OctreeDebugRenderer.java +++ b/net/minecraft/client/renderer/debug/OctreeDebugRenderer.java @@ -22,51 +22,51 @@ public class OctreeDebugRenderer { this.minecraft = minecraft; } - public void render(PoseStack poseStack, Frustum frustum, MultiBufferSource multiBufferSource, double d, double e, double f) { + public void render(PoseStack poseStack, Frustum frustum, MultiBufferSource bufferSource, double camX, double camY, double camZ) { Octree octree = this.minecraft.levelRenderer.getSectionOcclusionGraph().getOctree(); MutableInt mutableInt = new MutableInt(0); - octree.visitNodes((node, bl, i, bl2) -> this.renderNode(node, poseStack, multiBufferSource, d, e, f, i, bl, mutableInt, bl2), frustum, 32); + octree.visitNodes((node, bl, i, bl2) -> this.renderNode(node, poseStack, bufferSource, camX, camY, camZ, i, bl, mutableInt, bl2), frustum, 32); } private void renderNode( Octree.Node node, PoseStack poseStack, - MultiBufferSource multiBufferSource, - double d, - double e, - double f, - int i, - boolean bl, - MutableInt mutableInt, - boolean bl2 + MultiBufferSource bufferSource, + double camX, + double camY, + double camZ, + int recursionDepth, + boolean isLeafNode, + MutableInt nodesRendered, + boolean isNearby ) { AABB aABB = node.getAABB(); - double g = aABB.getXsize(); - long l = Math.round(g / 16.0); + double d = aABB.getXsize(); + long l = Math.round(d / 16.0); if (l == 1L) { - mutableInt.add(1); - double h = aABB.getCenter().x; - double j = aABB.getCenter().y; - double k = aABB.getCenter().z; - int m = bl2 ? -16711936 : -1; - DebugRenderer.renderFloatingText(poseStack, multiBufferSource, String.valueOf(mutableInt.getValue()), h, j, k, m, 0.3F); + nodesRendered.add(1); + double e = aABB.getCenter().x; + double f = aABB.getCenter().y; + double g = aABB.getCenter().z; + int i = isNearby ? -16711936 : -1; + DebugRenderer.renderFloatingText(poseStack, bufferSource, String.valueOf(nodesRendered.getValue()), e, f, g, i, 0.3F); } - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.lines()); - long n = l + 5L; + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.lines()); + long m = l + 5L; ShapeRenderer.renderLineBox( poseStack, vertexConsumer, - aABB.deflate(0.1 * i).move(-d, -e, -f), - getColorComponent(n, 0.3F), - getColorComponent(n, 0.8F), - getColorComponent(n, 0.5F), - bl ? 0.4F : 1.0F + aABB.deflate(0.1 * recursionDepth).move(-camX, -camY, -camZ), + getColorComponent(m, 0.3F), + getColorComponent(m, 0.8F), + getColorComponent(m, 0.5F), + isLeafNode ? 0.4F : 1.0F ); } - private static float getColorComponent(long l, float f) { - float g = 0.1F; - return Mth.frac(f * (float)l) * 0.9F + 0.1F; + private static float getColorComponent(long value, float multiplier) { + float f = 0.1F; + return Mth.frac(multiplier * (float)value) * 0.9F + 0.1F; } } diff --git a/net/minecraft/client/renderer/debug/PathfindingRenderer.java b/net/minecraft/client/renderer/debug/PathfindingRenderer.java index 15b325c5..776046df 100644 --- a/net/minecraft/client/renderer/debug/PathfindingRenderer.java +++ b/net/minecraft/client/renderer/debug/PathfindingRenderer.java @@ -57,13 +57,23 @@ public class PathfindingRenderer implements DebugRenderer.SimpleDebugRenderer { } } - public static void renderPath(PoseStack poseStack, MultiBufferSource buffer, Path path, float f, boolean bl, boolean bl2, double x, double y, double z) { - renderPathLine(poseStack, buffer.getBuffer(RenderType.debugLineStrip(6.0)), path, x, y, z); + public static void renderPath( + PoseStack poseStack, + MultiBufferSource bufferSource, + Path path, + float nodeSize, + boolean renderDebugNodes, + boolean renderDebugInfo, + double x, + double y, + double z + ) { + renderPathLine(poseStack, bufferSource.getBuffer(RenderType.debugLineStrip(6.0)), path, x, y, z); BlockPos blockPos = path.getTarget(); if (distanceToCamera(blockPos, x, y, z) <= 80.0F) { DebugRenderer.renderFilledBox( poseStack, - buffer, + bufferSource, new AABB( blockPos.getX() + 0.25F, blockPos.getY() + 0.25F, blockPos.getZ() + 0.25, blockPos.getX() + 0.75F, blockPos.getY() + 0.75F, blockPos.getZ() + 0.75F ) @@ -77,15 +87,18 @@ public class PathfindingRenderer implements DebugRenderer.SimpleDebugRenderer { for (int i = 0; i < path.getNodeCount(); i++) { Node node = path.getNode(i); if (distanceToCamera(node.asBlockPos(), x, y, z) <= 80.0F) { - float g = i == path.getNextNodeIndex() ? 1.0F : 0.0F; - float h = i == path.getNextNodeIndex() ? 0.0F : 1.0F; + float f = i == path.getNextNodeIndex() ? 1.0F : 0.0F; + float g = i == path.getNextNodeIndex() ? 0.0F : 1.0F; DebugRenderer.renderFilledBox( poseStack, - buffer, - new AABB(node.x + 0.5F - f, node.y + 0.01F * i, node.z + 0.5F - f, node.x + 0.5F + f, node.y + 0.25F + 0.01F * i, node.z + 0.5F + f).move(-x, -y, -z), - g, + bufferSource, + new AABB( + node.x + 0.5F - nodeSize, node.y + 0.01F * i, node.z + 0.5F - nodeSize, node.x + 0.5F + nodeSize, node.y + 0.25F + 0.01F * i, node.z + 0.5F + nodeSize + ) + .move(-x, -y, -z), + f, 0.0F, - h, + g, 0.5F ); } @@ -93,13 +106,20 @@ public class PathfindingRenderer implements DebugRenderer.SimpleDebugRenderer { } DebugData debugData = path.debugData(); - if (bl && debugData != null) { + if (renderDebugNodes && debugData != null) { for (Node node2 : debugData.closedSet()) { if (distanceToCamera(node2.asBlockPos(), x, y, z) <= 80.0F) { DebugRenderer.renderFilledBox( poseStack, - buffer, - new AABB(node2.x + 0.5F - f / 2.0F, node2.y + 0.01F, node2.z + 0.5F - f / 2.0F, node2.x + 0.5F + f / 2.0F, node2.y + 0.1, node2.z + 0.5F + f / 2.0F) + bufferSource, + new AABB( + node2.x + 0.5F - nodeSize / 2.0F, + node2.y + 0.01F, + node2.z + 0.5F - nodeSize / 2.0F, + node2.x + 0.5F + nodeSize / 2.0F, + node2.y + 0.1, + node2.z + 0.5F + nodeSize / 2.0F + ) .move(-x, -y, -z), 1.0F, 0.8F, @@ -113,8 +133,15 @@ public class PathfindingRenderer implements DebugRenderer.SimpleDebugRenderer { if (distanceToCamera(node2x.asBlockPos(), x, y, z) <= 80.0F) { DebugRenderer.renderFilledBox( poseStack, - buffer, - new AABB(node2x.x + 0.5F - f / 2.0F, node2x.y + 0.01F, node2x.z + 0.5F - f / 2.0F, node2x.x + 0.5F + f / 2.0F, node2x.y + 0.1, node2x.z + 0.5F + f / 2.0F) + bufferSource, + new AABB( + node2x.x + 0.5F - nodeSize / 2.0F, + node2x.y + 0.01F, + node2x.z + 0.5F - nodeSize / 2.0F, + node2x.x + 0.5F + nodeSize / 2.0F, + node2x.y + 0.1, + node2x.z + 0.5F + nodeSize / 2.0F + ) .move(-x, -y, -z), 0.8F, 1.0F, @@ -125,13 +152,15 @@ public class PathfindingRenderer implements DebugRenderer.SimpleDebugRenderer { } } - if (bl2) { + if (renderDebugInfo) { for (int j = 0; j < path.getNodeCount(); j++) { Node node3 = path.getNode(j); if (distanceToCamera(node3.asBlockPos(), x, y, z) <= 80.0F) { - DebugRenderer.renderFloatingText(poseStack, buffer, String.valueOf(node3.type), node3.x + 0.5, node3.y + 0.75, node3.z + 0.5, -1, 0.02F, true, 0.0F, true); DebugRenderer.renderFloatingText( - poseStack, buffer, String.format(Locale.ROOT, "%.2f", node3.costMalus), node3.x + 0.5, node3.y + 0.25, node3.z + 0.5, -1, 0.02F, true, 0.0F, true + poseStack, bufferSource, String.valueOf(node3.type), node3.x + 0.5, node3.y + 0.75, node3.z + 0.5, -1, 0.02F, true, 0.0F, true + ); + DebugRenderer.renderFloatingText( + poseStack, bufferSource, String.format(Locale.ROOT, "%.2f", node3.costMalus), node3.x + 0.5, node3.y + 0.25, node3.z + 0.5, -1, 0.02F, true, 0.0F, true ); } } diff --git a/net/minecraft/client/renderer/debug/RedstoneWireOrientationsRenderer.java b/net/minecraft/client/renderer/debug/RedstoneWireOrientationsRenderer.java index 0b5ad1a0..9cdf9868 100644 --- a/net/minecraft/client/renderer/debug/RedstoneWireOrientationsRenderer.java +++ b/net/minecraft/client/renderer/debug/RedstoneWireOrientationsRenderer.java @@ -12,6 +12,7 @@ import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.ShapeRenderer; import net.minecraft.network.protocol.common.custom.RedstoneWireOrientationsDebugPayload; +import net.minecraft.network.protocol.common.custom.RedstoneWireOrientationsDebugPayload.Wire; import net.minecraft.world.level.redstone.Orientation; import org.joml.Vector3f; @@ -25,8 +26,8 @@ public class RedstoneWireOrientationsRenderer implements DebugRenderer.SimpleDeb this.minecraft = minecraft; } - public void addWireOrientations(RedstoneWireOrientationsDebugPayload redstoneWireOrientationsDebugPayload) { - this.updatedWires.add(redstoneWireOrientationsDebugPayload); + public void addWireOrientations(RedstoneWireOrientationsDebugPayload payload) { + this.updatedWires.add(payload); } @Override @@ -41,7 +42,7 @@ public class RedstoneWireOrientationsRenderer implements DebugRenderer.SimpleDeb if (m > 200L) { iterator.remove(); } else { - for (RedstoneWireOrientationsDebugPayload.Wire wire : redstoneWireOrientationsDebugPayload.wires()) { + for (Wire wire : redstoneWireOrientationsDebugPayload.wires()) { Vector3f vector3f = wire.pos().getBottomCenter().subtract(camX, camY - 0.1, camZ).toVector3f(); Orientation orientation = wire.orientation(); ShapeRenderer.renderVector(poseStack, vertexConsumer, vector3f, orientation.getFront().getUnitVec3().scale(0.5), -16776961); diff --git a/net/minecraft/client/renderer/entity/AbstractBoatRenderer.java b/net/minecraft/client/renderer/entity/AbstractBoatRenderer.java index c90186a2..6dd44d53 100644 --- a/net/minecraft/client/renderer/entity/AbstractBoatRenderer.java +++ b/net/minecraft/client/renderer/entity/AbstractBoatRenderer.java @@ -21,31 +21,31 @@ public abstract class AbstractBoatRenderer extends EntityRenderer 0.0F) { - poseStack.mulPose(Axis.XP.rotationDegrees(Mth.sin(f) * f * boatRenderState.damageTime / 10.0F * boatRenderState.hurtDir)); + poseStack.mulPose(Axis.XP.rotationDegrees(Mth.sin(f) * f * renderState.damageTime / 10.0F * renderState.hurtDir)); } - if (!Mth.equal(boatRenderState.bubbleAngle, 0.0F)) { - poseStack.mulPose(new Quaternionf().setAngleAxis(boatRenderState.bubbleAngle * (float) (Math.PI / 180.0), 1.0F, 0.0F, 1.0F)); + if (!Mth.equal(renderState.bubbleAngle, 0.0F)) { + poseStack.mulPose(new Quaternionf().setAngleAxis(renderState.bubbleAngle * (float) (Math.PI / 180.0), 1.0F, 0.0F, 1.0F)); } poseStack.scale(-1.0F, -1.0F, 1.0F); poseStack.mulPose(Axis.YP.rotationDegrees(90.0F)); EntityModel entityModel = this.model(); - entityModel.setupAnim(boatRenderState); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(this.renderType()); - entityModel.renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY); - this.renderTypeAdditions(boatRenderState, poseStack, multiBufferSource, i); + entityModel.setupAnim(renderState); + VertexConsumer vertexConsumer = bufferSource.getBuffer(this.renderType()); + entityModel.renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY); + this.renderTypeAdditions(renderState, poseStack, bufferSource, packedLight); poseStack.popPose(); - super.render(boatRenderState, poseStack, multiBufferSource, i); + super.render(renderState, poseStack, bufferSource, packedLight); } - protected void renderTypeAdditions(BoatRenderState boatRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { + protected void renderTypeAdditions(BoatRenderState renderState, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { } protected abstract EntityModel model(); @@ -56,15 +56,15 @@ public abstract class AbstractBoatRenderer extends EntityRenderer extends AgeableMobRenderer { - public AbstractHoglinRenderer(EntityRendererProvider.Context context, ModelLayerLocation modelLayerLocation, ModelLayerLocation modelLayerLocation2, float f) { - super(context, new HoglinModel(context.bakeLayer(modelLayerLocation)), new HoglinModel(context.bakeLayer(modelLayerLocation2)), f); + public AbstractHoglinRenderer(EntityRendererProvider.Context context, ModelLayerLocation adultModel, ModelLayerLocation babyModel, float shadowRadius) { + super(context, new HoglinModel(context.bakeLayer(adultModel)), new HoglinModel(context.bakeLayer(babyModel)), shadowRadius); } public HoglinRenderState createRenderState() { return new HoglinRenderState(); } - public void extractRenderState(T mob, HoglinRenderState hoglinRenderState, float f) { - super.extractRenderState(mob, hoglinRenderState, f); - hoglinRenderState.attackAnimationRemainingTicks = mob.getAttackAnimationRemainingTicks(); + public void extractRenderState(T entity, HoglinRenderState reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + reusedState.attackAnimationRemainingTicks = entity.getAttackAnimationRemainingTicks(); } } diff --git a/net/minecraft/client/renderer/entity/AbstractMinecartRenderer.java b/net/minecraft/client/renderer/entity/AbstractMinecartRenderer.java index 4eb9e161..177b926d 100644 --- a/net/minecraft/client/renderer/entity/AbstractMinecartRenderer.java +++ b/net/minecraft/client/renderer/entity/AbstractMinecartRenderer.java @@ -28,66 +28,66 @@ public abstract class AbstractMinecartRenderer> 16 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; float g = (((float)(l >> 20 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; float h = (((float)(l >> 24 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; poseStack.translate(f, g, h); - if (minecartRenderState.isNewRender) { - newRender(minecartRenderState, poseStack); + if (renderState.isNewRender) { + newRender(renderState, poseStack); } else { - oldRender(minecartRenderState, poseStack); + oldRender(renderState, poseStack); } - float j = minecartRenderState.hurtTime; - if (j > 0.0F) { - poseStack.mulPose(Axis.XP.rotationDegrees(Mth.sin(j) * j * minecartRenderState.damageTime / 10.0F * minecartRenderState.hurtDir)); + float i = renderState.hurtTime; + if (i > 0.0F) { + poseStack.mulPose(Axis.XP.rotationDegrees(Mth.sin(i) * i * renderState.damageTime / 10.0F * renderState.hurtDir)); } - BlockState blockState = minecartRenderState.displayBlockState; + BlockState blockState = renderState.displayBlockState; if (blockState.getRenderShape() != RenderShape.INVISIBLE) { poseStack.pushPose(); - float k = 0.75F; + float j = 0.75F; poseStack.scale(0.75F, 0.75F, 0.75F); - poseStack.translate(-0.5F, (minecartRenderState.displayOffset - 8) / 16.0F, 0.5F); + poseStack.translate(-0.5F, (renderState.displayOffset - 8) / 16.0F, 0.5F); poseStack.mulPose(Axis.YP.rotationDegrees(90.0F)); - this.renderMinecartContents(minecartRenderState, blockState, poseStack, multiBufferSource, i); + this.renderMinecartContents(renderState, blockState, poseStack, bufferSource, packedLight); poseStack.popPose(); } poseStack.scale(-1.0F, -1.0F, 1.0F); - this.model.setupAnim(minecartRenderState); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(this.model.renderType(MINECART_LOCATION)); - this.model.renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY); + this.model.setupAnim(renderState); + VertexConsumer vertexConsumer = bufferSource.getBuffer(this.model.renderType(MINECART_LOCATION)); + this.model.renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY); poseStack.popPose(); } - private static void newRender(S minecartRenderState, PoseStack poseStack) { - poseStack.mulPose(Axis.YP.rotationDegrees(minecartRenderState.yRot)); - poseStack.mulPose(Axis.ZP.rotationDegrees(-minecartRenderState.xRot)); + private static void newRender(S renderState, PoseStack poseStack) { + poseStack.mulPose(Axis.YP.rotationDegrees(renderState.yRot)); + poseStack.mulPose(Axis.ZP.rotationDegrees(-renderState.xRot)); poseStack.translate(0.0F, 0.375F, 0.0F); } - private static void oldRender(S minecartRenderState, PoseStack poseStack) { - double d = minecartRenderState.x; - double e = minecartRenderState.y; - double f = minecartRenderState.z; - float g = minecartRenderState.xRot; - float h = minecartRenderState.yRot; - if (minecartRenderState.posOnRail != null && minecartRenderState.frontPos != null && minecartRenderState.backPos != null) { - Vec3 vec3 = minecartRenderState.frontPos; - Vec3 vec32 = minecartRenderState.backPos; - poseStack.translate(minecartRenderState.posOnRail.x - d, (vec3.y + vec32.y) / 2.0 - e, minecartRenderState.posOnRail.z - f); + private static void oldRender(S renderState, PoseStack poseStack) { + double d = renderState.x; + double e = renderState.y; + double f = renderState.z; + float g = renderState.xRot; + float h = renderState.yRot; + if (renderState.posOnRail != null && renderState.frontPos != null && renderState.backPos != null) { + Vec3 vec3 = renderState.frontPos; + Vec3 vec32 = renderState.backPos; + poseStack.translate(renderState.posOnRail.x - d, (vec3.y + vec32.y) / 2.0 - e, renderState.posOnRail.z - f); Vec3 vec33 = vec32.add(-vec3.x, -vec3.y, -vec3.z); if (vec33.length() != 0.0) { vec33 = vec33.normalize(); @@ -101,79 +101,75 @@ public abstract class AbstractMinecartRenderer void newExtractState( - T abstractMinecart, NewMinecartBehavior newMinecartBehavior, S minecartRenderState, float f + T minecart, NewMinecartBehavior behavior, S renderState, float partialTick ) { - if (newMinecartBehavior.cartHasPosRotLerp()) { - minecartRenderState.renderPos = newMinecartBehavior.getCartLerpPosition(f); - minecartRenderState.xRot = newMinecartBehavior.getCartLerpXRot(f); - minecartRenderState.yRot = newMinecartBehavior.getCartLerpYRot(f); + if (behavior.cartHasPosRotLerp()) { + renderState.renderPos = behavior.getCartLerpPosition(partialTick); + renderState.xRot = behavior.getCartLerpXRot(partialTick); + renderState.yRot = behavior.getCartLerpYRot(partialTick); } else { - minecartRenderState.renderPos = null; - minecartRenderState.xRot = abstractMinecart.getXRot(); - minecartRenderState.yRot = abstractMinecart.getYRot(); + renderState.renderPos = null; + renderState.xRot = minecart.getXRot(); + renderState.yRot = minecart.getYRot(); } } private static void oldExtractState( - T abstractMinecart, OldMinecartBehavior oldMinecartBehavior, S minecartRenderState, float f + T minecart, OldMinecartBehavior behavior, S renderState, float partialTick ) { - float g = 0.3F; - minecartRenderState.xRot = abstractMinecart.getXRot(f); - minecartRenderState.yRot = abstractMinecart.getYRot(f); - double d = minecartRenderState.x; - double e = minecartRenderState.y; - double h = minecartRenderState.z; - Vec3 vec3 = oldMinecartBehavior.getPos(d, e, h); + float f = 0.3F; + renderState.xRot = minecart.getXRot(partialTick); + renderState.yRot = minecart.getYRot(partialTick); + double d = renderState.x; + double e = renderState.y; + double g = renderState.z; + Vec3 vec3 = behavior.getPos(d, e, g); if (vec3 != null) { - minecartRenderState.posOnRail = vec3; - Vec3 vec32 = oldMinecartBehavior.getPosOffs(d, e, h, 0.3F); - Vec3 vec33 = oldMinecartBehavior.getPosOffs(d, e, h, -0.3F); - minecartRenderState.frontPos = (Vec3)Objects.requireNonNullElse(vec32, vec3); - minecartRenderState.backPos = (Vec3)Objects.requireNonNullElse(vec33, vec3); + renderState.posOnRail = vec3; + Vec3 vec32 = behavior.getPosOffs(d, e, g, 0.3F); + Vec3 vec33 = behavior.getPosOffs(d, e, g, -0.3F); + renderState.frontPos = (Vec3)Objects.requireNonNullElse(vec32, vec3); + renderState.backPos = (Vec3)Objects.requireNonNullElse(vec33, vec3); } else { - minecartRenderState.posOnRail = null; - minecartRenderState.frontPos = null; - minecartRenderState.backPos = null; + renderState.posOnRail = null; + renderState.frontPos = null; + renderState.backPos = null; } } - protected void renderMinecartContents(S minecartRenderState, BlockState blockState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { - this.blockRenderer.renderSingleBlock(blockState, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY); + protected void renderMinecartContents(S renderState, BlockState state, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { + this.blockRenderer.renderSingleBlock(state, poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY); } - protected AABB getBoundingBoxForCulling(T abstractMinecart) { - AABB aABB = super.getBoundingBoxForCulling(abstractMinecart); - return abstractMinecart.hasCustomDisplay() ? aABB.inflate(Math.abs(abstractMinecart.getDisplayOffset()) / 16.0) : aABB; + protected AABB getBoundingBoxForCulling(T minecraft) { + AABB aABB = super.getBoundingBoxForCulling(minecraft); + return minecraft.hasCustomDisplay() ? aABB.inflate(Math.abs(minecraft.getDisplayOffset()) / 16.0) : aABB; } - public Vec3 getRenderOffset(S minecartRenderState) { - Vec3 vec3 = super.getRenderOffset(minecartRenderState); - return minecartRenderState.isNewRender && minecartRenderState.renderPos != null - ? vec3.add( - minecartRenderState.renderPos.x - minecartRenderState.x, - minecartRenderState.renderPos.y - minecartRenderState.y, - minecartRenderState.renderPos.z - minecartRenderState.z - ) + public Vec3 getRenderOffset(S renderState) { + Vec3 vec3 = super.getRenderOffset(renderState); + return renderState.isNewRender && renderState.renderPos != null + ? vec3.add(renderState.renderPos.x - renderState.x, renderState.renderPos.y - renderState.y, renderState.renderPos.z - renderState.z) : vec3; } } diff --git a/net/minecraft/client/renderer/entity/AbstractSkeletonRenderer.java b/net/minecraft/client/renderer/entity/AbstractSkeletonRenderer.java index b0300c1e..656e9a68 100644 --- a/net/minecraft/client/renderer/entity/AbstractSkeletonRenderer.java +++ b/net/minecraft/client/renderer/entity/AbstractSkeletonRenderer.java @@ -11,29 +11,29 @@ import net.minecraft.world.entity.monster.AbstractSkeleton; @Environment(EnvType.CLIENT) public abstract class AbstractSkeletonRenderer extends HumanoidMobRenderer> { public AbstractSkeletonRenderer( - EntityRendererProvider.Context context, ModelLayerLocation modelLayerLocation, ModelLayerLocation modelLayerLocation2, ModelLayerLocation modelLayerLocation3 + EntityRendererProvider.Context context, ModelLayerLocation modelLayer, ModelLayerLocation skeletonLayer, ModelLayerLocation innerModelLayer ) { - this(context, modelLayerLocation2, modelLayerLocation3, new SkeletonModel<>(context.bakeLayer(modelLayerLocation))); + this(context, skeletonLayer, innerModelLayer, new SkeletonModel<>(context.bakeLayer(modelLayer))); } public AbstractSkeletonRenderer( - EntityRendererProvider.Context context, ModelLayerLocation modelLayerLocation, ModelLayerLocation modelLayerLocation2, SkeletonModel skeletonModel + EntityRendererProvider.Context context, ModelLayerLocation skeletonLayer, ModelLayerLocation innerModelLayer, SkeletonModel model ) { - super(context, skeletonModel, 0.5F); + super(context, model, 0.5F); this.addLayer( new HumanoidArmorLayer<>( - this, new SkeletonModel(context.bakeLayer(modelLayerLocation)), new SkeletonModel(context.bakeLayer(modelLayerLocation2)), context.getEquipmentRenderer() + this, new SkeletonModel(context.bakeLayer(skeletonLayer)), new SkeletonModel(context.bakeLayer(innerModelLayer)), context.getEquipmentRenderer() ) ); } - public void extractRenderState(T abstractSkeleton, S skeletonRenderState, float f) { - super.extractRenderState(abstractSkeleton, skeletonRenderState, f); - skeletonRenderState.isAggressive = abstractSkeleton.isAggressive(); - skeletonRenderState.isShaking = abstractSkeleton.isShaking(); + public void extractRenderState(T entity, S reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + reusedState.isAggressive = entity.isAggressive(); + reusedState.isShaking = entity.isShaking(); } - protected boolean isShaking(S skeletonRenderState) { - return skeletonRenderState.isShaking; + protected boolean isShaking(S renderState) { + return renderState.isShaking; } } diff --git a/net/minecraft/client/renderer/entity/AbstractZombieRenderer.java b/net/minecraft/client/renderer/entity/AbstractZombieRenderer.java index 913c2117..17bd48e0 100644 --- a/net/minecraft/client/renderer/entity/AbstractZombieRenderer.java +++ b/net/minecraft/client/renderer/entity/AbstractZombieRenderer.java @@ -13,23 +13,23 @@ public abstract class AbstractZombieRenderer(this, zombieModel3, zombieModel4, zombieModel5, zombieModel6, context.getEquipmentRenderer())); + super(context, adultModel, babyModel, 0.5F); + this.addLayer(new HumanoidArmorLayer<>(this, innerModel, outerModel, innerModelBaby, outerModelBaby, context.getEquipmentRenderer())); } - public ResourceLocation getTextureLocation(S zombieRenderState) { + public ResourceLocation getTextureLocation(S renderState) { return ZOMBIE_LOCATION; } - public void extractRenderState(T zombie, S zombieRenderState, float f) { - super.extractRenderState(zombie, zombieRenderState, f); - zombieRenderState.isAggressive = zombie.isAggressive(); - zombieRenderState.isConverting = zombie.isUnderWaterConverting(); + public void extractRenderState(T entity, S reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + reusedState.isAggressive = entity.isAggressive(); + reusedState.isConverting = entity.isUnderWaterConverting(); } - protected boolean isShaking(S zombieRenderState) { - return super.isShaking(zombieRenderState) || zombieRenderState.isConverting; + protected boolean isShaking(S renderState) { + return super.isShaking(renderState) || renderState.isConverting; } } diff --git a/net/minecraft/client/renderer/entity/AgeableMobRenderer.java b/net/minecraft/client/renderer/entity/AgeableMobRenderer.java index a348612a..062f9491 100644 --- a/net/minecraft/client/renderer/entity/AgeableMobRenderer.java +++ b/net/minecraft/client/renderer/entity/AgeableMobRenderer.java @@ -14,15 +14,15 @@ public abstract class AgeableMobRenderer(this, context.getModelSet(), context.getItemRenderer())); } - public ResourceLocation getTextureLocation(ArmorStandRenderState armorStandRenderState) { + public ResourceLocation getTextureLocation(ArmorStandRenderState renderState) { return DEFAULT_SKIN_LOCATION; } @@ -54,49 +54,49 @@ public class ArmorStandRenderer extends LivingEntityRenderer model; - public BoatRenderer(EntityRendererProvider.Context context, ModelLayerLocation modelLayerLocation) { + public BoatRenderer(EntityRendererProvider.Context context, ModelLayerLocation modelLayer) { super(context); - this.texture = modelLayerLocation.model().withPath((UnaryOperator)(string -> "textures/entity/" + string + ".png")); + this.texture = modelLayer.model().withPath((UnaryOperator)(string -> "textures/entity/" + string + ".png")); this.waterPatchModel = new Model.Simple(context.bakeLayer(ModelLayers.BOAT_WATER_PATCH), resourceLocation -> RenderType.waterMask()); - this.model = new BoatModel(context.bakeLayer(modelLayerLocation)); + this.model = new BoatModel(context.bakeLayer(modelLayer)); } @Override @@ -39,9 +39,10 @@ public class BoatRenderer extends AbstractBoatRenderer { } @Override - protected void renderTypeAdditions(BoatRenderState boatRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { - if (!boatRenderState.isUnderWater) { - this.waterPatchModel.renderToBuffer(poseStack, multiBufferSource.getBuffer(this.waterPatchModel.renderType(this.texture)), i, OverlayTexture.NO_OVERLAY); + protected void renderTypeAdditions(BoatRenderState renderState, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { + if (!renderState.isUnderWater) { + this.waterPatchModel + .renderToBuffer(poseStack, bufferSource.getBuffer(this.waterPatchModel.renderType(this.texture)), packedLight, OverlayTexture.NO_OVERLAY); } } } diff --git a/net/minecraft/client/renderer/entity/BreezeRenderer.java b/net/minecraft/client/renderer/entity/BreezeRenderer.java index a09ac26f..2f3cef2c 100644 --- a/net/minecraft/client/renderer/entity/BreezeRenderer.java +++ b/net/minecraft/client/renderer/entity/BreezeRenderer.java @@ -23,13 +23,13 @@ public class BreezeRenderer extends MobRenderer { } @Override - public ResourceLocation getTextureLocation(LivingEntityRenderState livingEntityRenderState) { + public ResourceLocation getTextureLocation(LivingEntityRenderState renderState) { return CAVE_SPIDER_LOCATION; } } diff --git a/net/minecraft/client/renderer/entity/CodRenderer.java b/net/minecraft/client/renderer/entity/CodRenderer.java index f2012290..a90be1d2 100644 --- a/net/minecraft/client/renderer/entity/CodRenderer.java +++ b/net/minecraft/client/renderer/entity/CodRenderer.java @@ -20,7 +20,7 @@ public class CodRenderer extends MobRenderer quaternionf.rotationYXZ( - (float) (-Math.PI / 180.0) * displayEntityRenderState.entityYRot, (float) (Math.PI / 180.0) * displayEntityRenderState.entityXRot, 0.0F + case FIXED -> quaternion.rotationYXZ( + (float) (-Math.PI / 180.0) * entityRenderState.entityYRot, (float) (Math.PI / 180.0) * entityRenderState.entityXRot, 0.0F ); - case HORIZONTAL -> quaternionf.rotationYXZ( - (float) (-Math.PI / 180.0) * displayEntityRenderState.entityYRot, (float) (Math.PI / 180.0) * cameraXRot(camera), 0.0F - ); - case VERTICAL -> quaternionf.rotationYXZ( - (float) (-Math.PI / 180.0) * cameraYrot(camera), (float) (Math.PI / 180.0) * displayEntityRenderState.entityXRot, 0.0F - ); - case CENTER -> quaternionf.rotationYXZ((float) (-Math.PI / 180.0) * cameraYrot(camera), (float) (Math.PI / 180.0) * cameraXRot(camera), 0.0F); + case HORIZONTAL -> quaternion.rotationYXZ((float) (-Math.PI / 180.0) * entityRenderState.entityYRot, (float) (Math.PI / 180.0) * cameraXRot(camera), 0.0F); + case VERTICAL -> quaternion.rotationYXZ((float) (-Math.PI / 180.0) * cameraYrot(camera), (float) (Math.PI / 180.0) * entityRenderState.entityXRot, 0.0F); + case CENTER -> quaternion.rotationYXZ((float) (-Math.PI / 180.0) * cameraYrot(camera), (float) (Math.PI / 180.0) * cameraXRot(camera), 0.0F); }; } @@ -118,14 +114,14 @@ public abstract class DisplayRenderer 0.0F; - case RIGHT -> m - cachedLine.width(); - case CENTER -> m / 2.0F - cachedLine.width() / 2.0F; + case RIGHT -> l - cachedLine.width(); + case CENTER -> l / 2.0F - cachedLine.width() / 2.0F; default -> throw new MatchException(null, null); }; this.font .drawInBatch( cachedLine.contents(), - h, g, + f, c << 24 | 16777215, bl3, matrix4f, - multiBufferSource, + bufferSource, bl ? Font.DisplayMode.SEE_THROUGH : Font.DisplayMode.POLYGON_OFFSET, 0, - i + packedLight ); - g += l; + f += k; } } } diff --git a/net/minecraft/client/renderer/entity/DonkeyRenderer.java b/net/minecraft/client/renderer/entity/DonkeyRenderer.java index 12b5dbca..f99e1123 100644 --- a/net/minecraft/client/renderer/entity/DonkeyRenderer.java +++ b/net/minecraft/client/renderer/entity/DonkeyRenderer.java @@ -14,14 +14,12 @@ public class DonkeyRenderer extends AbstractHors public static final ResourceLocation MULE_TEXTURE = ResourceLocation.withDefaultNamespace("textures/entity/horse/mule.png"); private final ResourceLocation texture; - public DonkeyRenderer( - EntityRendererProvider.Context context, float f, ModelLayerLocation modelLayerLocation, ModelLayerLocation modelLayerLocation2, boolean bl - ) { - super(context, new DonkeyModel(context.bakeLayer(modelLayerLocation)), new DonkeyModel(context.bakeLayer(modelLayerLocation2)), f); - this.texture = bl ? MULE_TEXTURE : DONKEY_TEXTURE; + public DonkeyRenderer(EntityRendererProvider.Context context, float scale, ModelLayerLocation adultModelLayer, ModelLayerLocation babyModelLayer, boolean mule) { + super(context, new DonkeyModel(context.bakeLayer(adultModelLayer)), new DonkeyModel(context.bakeLayer(babyModelLayer)), scale); + this.texture = mule ? MULE_TEXTURE : DONKEY_TEXTURE; } - public ResourceLocation getTextureLocation(DonkeyRenderState donkeyRenderState) { + public ResourceLocation getTextureLocation(DonkeyRenderState renderState) { return this.texture; } @@ -29,8 +27,8 @@ public class DonkeyRenderer extends AbstractHors return new DonkeyRenderState(); } - public void extractRenderState(T abstractChestedHorse, DonkeyRenderState donkeyRenderState, float f) { - super.extractRenderState(abstractChestedHorse, donkeyRenderState, f); - donkeyRenderState.hasChest = abstractChestedHorse.hasChest(); + public void extractRenderState(T entity, DonkeyRenderState reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + reusedState.hasChest = entity.hasChest(); } } diff --git a/net/minecraft/client/renderer/entity/DragonFireballRenderer.java b/net/minecraft/client/renderer/entity/DragonFireballRenderer.java index a4dae302..0e7cd972 100644 --- a/net/minecraft/client/renderer/entity/DragonFireballRenderer.java +++ b/net/minecraft/client/renderer/entity/DragonFireballRenderer.java @@ -26,18 +26,18 @@ public class DragonFireballRenderer extends EntityRenderer 0.0F) { - float h = enderDragonRenderState.deathTime / 200.0F; - int j = ARGB.color(Mth.floor(h * 255.0F), -1); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.dragonExplosionAlpha(DRAGON_EXPLODING_LOCATION)); - this.model.renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY, j); - VertexConsumer vertexConsumer2 = multiBufferSource.getBuffer(DECAL); - this.model.renderToBuffer(poseStack, vertexConsumer2, i, OverlayTexture.pack(0.0F, enderDragonRenderState.hasRedOverlay)); + this.model.setupAnim(renderState); + if (renderState.deathTime > 0.0F) { + float h = renderState.deathTime / 200.0F; + int i = ARGB.color(Mth.floor(h * 255.0F), -1); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.dragonExplosionAlpha(DRAGON_EXPLODING_LOCATION)); + this.model.renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY, i); + VertexConsumer vertexConsumer2 = bufferSource.getBuffer(DECAL); + this.model.renderToBuffer(poseStack, vertexConsumer2, packedLight, OverlayTexture.pack(0.0F, renderState.hasRedOverlay)); } else { - VertexConsumer vertexConsumer3 = multiBufferSource.getBuffer(RENDER_TYPE); - this.model.renderToBuffer(poseStack, vertexConsumer3, i, OverlayTexture.pack(0.0F, enderDragonRenderState.hasRedOverlay)); + VertexConsumer vertexConsumer3 = bufferSource.getBuffer(RENDER_TYPE); + this.model.renderToBuffer(poseStack, vertexConsumer3, packedLight, OverlayTexture.pack(0.0F, renderState.hasRedOverlay)); } - VertexConsumer vertexConsumer3 = multiBufferSource.getBuffer(EYES); - this.model.renderToBuffer(poseStack, vertexConsumer3, i, OverlayTexture.NO_OVERLAY); - if (enderDragonRenderState.deathTime > 0.0F) { - float k = enderDragonRenderState.deathTime / 200.0F; + VertexConsumer vertexConsumer3 = bufferSource.getBuffer(EYES); + this.model.renderToBuffer(poseStack, vertexConsumer3, packedLight, OverlayTexture.NO_OVERLAY); + if (renderState.deathTime > 0.0F) { + float j = renderState.deathTime / 200.0F; poseStack.pushPose(); poseStack.translate(0.0F, -1.0F, -2.0F); - renderRays(poseStack, k, multiBufferSource.getBuffer(RenderType.dragonRays())); - renderRays(poseStack, k, multiBufferSource.getBuffer(RenderType.dragonRaysDepth())); + renderRays(poseStack, j, bufferSource.getBuffer(RenderType.dragonRays())); + renderRays(poseStack, j, bufferSource.getBuffer(RenderType.dragonRaysDepth())); poseStack.popPose(); } poseStack.popPose(); - if (enderDragonRenderState.beamOffset != null) { + if (renderState.beamOffset != null) { renderCrystalBeams( - (float)enderDragonRenderState.beamOffset.x, - (float)enderDragonRenderState.beamOffset.y, - (float)enderDragonRenderState.beamOffset.z, - enderDragonRenderState.ageInTicks, + (float)renderState.beamOffset.x, + (float)renderState.beamOffset.y, + (float)renderState.beamOffset.z, + renderState.ageInTicks, poseStack, - multiBufferSource, - i + bufferSource, + packedLight ); } - super.render(enderDragonRenderState, poseStack, multiBufferSource, i); + super.render(renderState, poseStack, bufferSource, packedLight); } private static void renderRays(PoseStack poseStack, float dragonDeathCompletion, VertexConsumer buffer) { @@ -137,43 +137,55 @@ public class EnderDragonRenderer extends EntityRenderer 0 ? enderDragon.dragonDeathTime + f : 0.0F; - enderDragonRenderState.hasRedOverlay = enderDragon.hurtTime > 0; - EndCrystal endCrystal = enderDragon.nearestCrystal; + public void extractRenderState(EnderDragon entity, EnderDragonRenderState reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + reusedState.flapTime = Mth.lerp(partialTick, entity.oFlapTime, entity.flapTime); + reusedState.deathTime = entity.dragonDeathTime > 0 ? entity.dragonDeathTime + partialTick : 0.0F; + reusedState.hasRedOverlay = entity.hurtTime > 0; + EndCrystal endCrystal = entity.nearestCrystal; if (endCrystal != null) { - Vec3 vec3 = endCrystal.getPosition(f).add(0.0, EndCrystalRenderer.getY(endCrystal.time + f), 0.0); - enderDragonRenderState.beamOffset = vec3.subtract(enderDragon.getPosition(f)); + Vec3 vec3 = endCrystal.getPosition(partialTick).add(0.0, EndCrystalRenderer.getY(endCrystal.time + partialTick), 0.0); + reusedState.beamOffset = vec3.subtract(entity.getPosition(partialTick)); } else { - enderDragonRenderState.beamOffset = null; + reusedState.beamOffset = null; } - DragonPhaseInstance dragonPhaseInstance = enderDragon.getPhaseManager().getCurrentPhase(); - enderDragonRenderState.isLandingOrTakingOff = dragonPhaseInstance == EnderDragonPhase.LANDING || dragonPhaseInstance == EnderDragonPhase.TAKEOFF; - enderDragonRenderState.isSitting = dragonPhaseInstance.isSitting(); - BlockPos blockPos = enderDragon.level() - .getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(enderDragon.getFightOrigin())); - enderDragonRenderState.distanceToEgg = blockPos.distToCenterSqr(enderDragon.position()); - enderDragonRenderState.partialTicks = enderDragon.isDeadOrDying() ? 0.0F : f; - enderDragonRenderState.flightHistory.copyFrom(enderDragon.flightHistory); + DragonPhaseInstance dragonPhaseInstance = entity.getPhaseManager().getCurrentPhase(); + reusedState.isLandingOrTakingOff = dragonPhaseInstance == EnderDragonPhase.LANDING || dragonPhaseInstance == EnderDragonPhase.TAKEOFF; + reusedState.isSitting = dragonPhaseInstance.isSitting(); + BlockPos blockPos = entity.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(entity.getFightOrigin())); + reusedState.distanceToEgg = blockPos.distToCenterSqr(entity.position()); + reusedState.partialTicks = entity.isDeadOrDying() ? 0.0F : partialTick; + reusedState.flightHistory.copyFrom(entity.flightHistory); } - protected boolean affectedByCulling(EnderDragon enderDragon) { + protected boolean affectedByCulling(EnderDragon display) { return false; } } diff --git a/net/minecraft/client/renderer/entity/EndermiteRenderer.java b/net/minecraft/client/renderer/entity/EndermiteRenderer.java index dcaa33ec..e60accce 100644 --- a/net/minecraft/client/renderer/entity/EndermiteRenderer.java +++ b/net/minecraft/client/renderer/entity/EndermiteRenderer.java @@ -22,7 +22,7 @@ public class EndermiteRenderer extends MobRenderer EntityRenderer getRenderer(T entity) { @@ -148,25 +148,35 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { return entityRenderer.shouldRender(entity, frustum, camX, camY, camZ); } - public void render(E entity, double d, double e, double f, float g, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { + public void render( + E entity, double xOffset, double yOffset, double zOffset, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight + ) { EntityRenderer entityRenderer = this.getRenderer(entity); - this.render(entity, d, e, f, g, poseStack, multiBufferSource, i, entityRenderer); + this.render(entity, xOffset, yOffset, zOffset, partialTick, poseStack, bufferSource, packedLight, entityRenderer); } private void render( - E entity, double d, double e, double f, float g, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, EntityRenderer entityRenderer + E entity, + double xOffset, + double yOffset, + double zOffset, + float partialTick, + PoseStack poseStack, + MultiBufferSource bufferSource, + int packedLight, + EntityRenderer renderer ) { try { - S entityRenderState = entityRenderer.createRenderState(entity, g); - Vec3 vec3 = entityRenderer.getRenderOffset(entityRenderState); - double h = d + vec3.x(); - double j = e + vec3.y(); - double k = f + vec3.z(); + S entityRenderState = renderer.createRenderState(entity, partialTick); + Vec3 vec3 = renderer.getRenderOffset(entityRenderState); + double d = xOffset + vec3.x(); + double e = yOffset + vec3.y(); + double f = zOffset + vec3.z(); poseStack.pushPose(); - poseStack.translate(h, j, k); - entityRenderer.render(entityRenderState, poseStack, multiBufferSource, i); + poseStack.translate(d, e, f); + renderer.render(entityRenderState, poseStack, bufferSource, packedLight); if (entityRenderState.displayFireAnimation) { - this.renderFlame(poseStack, multiBufferSource, entityRenderState, Mth.rotationAroundAxis(Mth.Y_AXIS, this.cameraOrientation, new Quaternionf())); + this.renderFlame(poseStack, bufferSource, entityRenderState, Mth.rotationAroundAxis(Mth.Y_AXIS, this.cameraOrientation, new Quaternionf())); } if (entity instanceof Player) { @@ -174,12 +184,12 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { } if (this.options.entityShadows().get() && this.shouldRenderShadow && !entityRenderState.isInvisible) { - float l = entityRenderer.getShadowRadius(entityRenderState); - if (l > 0.0F) { - double m = entityRenderState.distanceToCameraSq; - float n = (float)((1.0 - m / 256.0) * entityRenderer.shadowStrength); - if (n > 0.0F) { - renderShadow(poseStack, multiBufferSource, entityRenderState, n, g, this.level, Math.min(l, 32.0F)); + float g = renderer.getShadowRadius(entityRenderState); + if (g > 0.0F) { + double h = entityRenderState.distanceToCameraSq; + float i = (float)((1.0 - h / 256.0) * renderer.shadowStrength); + if (i > 0.0F) { + renderShadow(poseStack, bufferSource, entityRenderState, i, partialTick, this.level, Math.min(g, 32.0F)); } } } @@ -189,7 +199,7 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { } if (this.renderHitBoxes && !entityRenderState.isInvisible && !Minecraft.getInstance().showOnlyReducedInfo()) { - renderHitbox(poseStack, multiBufferSource.getBuffer(RenderType.lines()), entity, g, 1.0F, 1.0F, 1.0F); + renderHitbox(poseStack, bufferSource.getBuffer(RenderType.lines()), entity, partialTick, 1.0F, 1.0F, 1.0F); } poseStack.popPose(); @@ -198,9 +208,9 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being rendered"); entity.fillCrashReportCategory(crashReportCategory); CrashReportCategory crashReportCategory2 = crashReport.addCategory("Renderer details"); - crashReportCategory2.setDetail("Assigned renderer", entityRenderer); - crashReportCategory2.setDetail("Location", CrashReportCategory.formatLocation(this.level, d, e, f)); - crashReportCategory2.setDetail("Delta", g); + crashReportCategory2.setDetail("Assigned renderer", renderer); + crashReportCategory2.setDetail("Location", CrashReportCategory.formatLocation(this.level, xOffset, yOffset, zOffset)); + crashReportCategory2.setDetail("Delta", partialTick); throw new ReportedException(crashReport); } } @@ -276,21 +286,21 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { ShapeRenderer.renderVector(poseStack, buffer, new Vector3f(0.0F, entity.getEyeHeight(), 0.0F), entity.getViewVector(red).scale(2.0), -16776961); } - private void renderFlame(PoseStack poseStack, MultiBufferSource multiBufferSource, EntityRenderState entityRenderState, Quaternionf quaternionf) { + private void renderFlame(PoseStack poseStack, MultiBufferSource bufferSource, EntityRenderState renderState, Quaternionf quaternion) { TextureAtlasSprite textureAtlasSprite = ModelBakery.FIRE_0.sprite(); TextureAtlasSprite textureAtlasSprite2 = ModelBakery.FIRE_1.sprite(); poseStack.pushPose(); - float f = entityRenderState.boundingBoxWidth * 1.4F; + float f = renderState.boundingBoxWidth * 1.4F; poseStack.scale(f, f, f); float g = 0.5F; float h = 0.0F; - float i = entityRenderState.boundingBoxHeight / f; + float i = renderState.boundingBoxHeight / f; float j = 0.0F; - poseStack.mulPose(quaternionf); + poseStack.mulPose(quaternion); poseStack.translate(0.0F, 0.0F, 0.3F - (int)i * 0.02F); float k = 0.0F; int l = 0; - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(Sheets.cutoutBlockSheet()); + VertexConsumer vertexConsumer = bufferSource.getBuffer(Sheets.cutoutBlockSheet()); for (PoseStack.Pose pose = poseStack.last(); i > 0.0F; l++) { TextureAtlasSprite textureAtlasSprite3 = l % 2 == 0 ? textureAtlasSprite : textureAtlasSprite2; @@ -322,44 +332,35 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { } private static void renderShadow( - PoseStack poseStack, MultiBufferSource multiBufferSource, EntityRenderState entityRenderState, float f, float g, LevelReader levelReader, float h + PoseStack poseStack, MultiBufferSource bufferSource, EntityRenderState renderState, float shadowStrength, float partialTick, LevelReader level, float size ) { - float i = Math.min(f / 0.5F, h); - int j = Mth.floor(entityRenderState.x - h); - int k = Mth.floor(entityRenderState.x + h); - int l = Mth.floor(entityRenderState.y - i); - int m = Mth.floor(entityRenderState.y); - int n = Mth.floor(entityRenderState.z - h); - int o = Mth.floor(entityRenderState.z + h); + float f = Math.min(shadowStrength / 0.5F, size); + int i = Mth.floor(renderState.x - size); + int j = Mth.floor(renderState.x + size); + int k = Mth.floor(renderState.y - f); + int l = Mth.floor(renderState.y); + int m = Mth.floor(renderState.z - size); + int n = Mth.floor(renderState.z + size); PoseStack.Pose pose = poseStack.last(); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(SHADOW_RENDER_TYPE); + VertexConsumer vertexConsumer = bufferSource.getBuffer(SHADOW_RENDER_TYPE); BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); - for (int p = n; p <= o; p++) { - for (int q = j; q <= k; q++) { - mutableBlockPos.set(q, 0, p); - ChunkAccess chunkAccess = levelReader.getChunk(mutableBlockPos); + for (int o = m; o <= n; o++) { + for (int p = i; p <= j; p++) { + mutableBlockPos.set(p, 0, o); + ChunkAccess chunkAccess = level.getChunk(mutableBlockPos); - for (int r = l; r <= m; r++) { - mutableBlockPos.setY(r); - float s = f - (float)(entityRenderState.y - mutableBlockPos.getY()) * 0.5F; - renderBlockShadow(pose, vertexConsumer, chunkAccess, levelReader, mutableBlockPos, entityRenderState.x, entityRenderState.y, entityRenderState.z, h, s); + for (int q = k; q <= l; q++) { + mutableBlockPos.setY(q); + float g = shadowStrength - (float)(renderState.y - mutableBlockPos.getY()) * 0.5F; + renderBlockShadow(pose, vertexConsumer, chunkAccess, level, mutableBlockPos, renderState.x, renderState.y, renderState.z, size, g); } } } } private static void renderBlockShadow( - PoseStack.Pose pose, - VertexConsumer vertexConsumer, - ChunkAccess chunk, - LevelReader level, - BlockPos pos, - double x, - double y, - double z, - float size, - float weight + PoseStack.Pose pose, VertexConsumer buffer, ChunkAccess chunk, LevelReader level, BlockPos pos, double x, double y, double z, float size, float weight ) { BlockPos blockPos = pos.below(); BlockState blockState = chunk.getBlockState(blockPos); @@ -390,10 +391,10 @@ public class EntityRenderDispatcher implements ResourceManagerReloadListener { float r = -m / 2.0F / size + 0.5F; float s = -o / 2.0F / size + 0.5F; float t = -p / 2.0F / size + 0.5F; - shadowVertex(pose, vertexConsumer, i, l, n, o, q, s); - shadowVertex(pose, vertexConsumer, i, l, n, p, q, t); - shadowVertex(pose, vertexConsumer, i, m, n, p, r, t); - shadowVertex(pose, vertexConsumer, i, m, n, o, r, s); + shadowVertex(pose, buffer, i, l, n, o, q, s); + shadowVertex(pose, buffer, i, l, n, p, q, t); + shadowVertex(pose, buffer, i, m, n, p, r, t); + shadowVertex(pose, buffer, i, m, n, o, r, s); } } } diff --git a/net/minecraft/client/renderer/entity/EntityRenderer.java b/net/minecraft/client/renderer/entity/EntityRenderer.java index ad5fd913..a5997ed4 100644 --- a/net/minecraft/client/renderer/entity/EntityRenderer.java +++ b/net/minecraft/client/renderer/entity/EntityRenderer.java @@ -11,6 +11,7 @@ import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.culling.Frustum; import net.minecraft.client.renderer.entity.state.EntityRenderState; +import net.minecraft.client.renderer.entity.state.EntityRenderState.LeashState; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; import net.minecraft.util.Mth; @@ -86,30 +87,30 @@ public abstract class EntityRenderer { MapRenderer mapRenderer, BlockRenderDispatcher blockRenderDispatcher, ResourceManager resourceManager, - EntityModelSet entityModelSet, - EquipmentModelSet equipmentModelSet, + EntityModelSet modelSet, + EquipmentModelSet equipmentModels, Font font ) { this.entityRenderDispatcher = entityRenderDispatcher; @@ -47,10 +47,10 @@ public interface EntityRendererProvider { this.mapRenderer = mapRenderer; this.blockRenderDispatcher = blockRenderDispatcher; this.resourceManager = resourceManager; - this.modelSet = entityModelSet; - this.equipmentModels = equipmentModelSet; + this.modelSet = modelSet; + this.equipmentModels = equipmentModels; this.font = font; - this.equipmentRenderer = new EquipmentLayerRenderer(equipmentModelSet, this.getModelManager().getAtlas(Sheets.ARMOR_TRIMS_SHEET)); + this.equipmentRenderer = new EquipmentLayerRenderer(equipmentModels, this.getModelManager().getAtlas(Sheets.ARMOR_TRIMS_SHEET)); } public EntityRenderDispatcher getEntityRenderDispatcher() { diff --git a/net/minecraft/client/renderer/entity/ExperienceOrbRenderer.java b/net/minecraft/client/renderer/entity/ExperienceOrbRenderer.java index 888d0086..b25994d5 100644 --- a/net/minecraft/client/renderer/entity/ExperienceOrbRenderer.java +++ b/net/minecraft/client/renderer/entity/ExperienceOrbRenderer.java @@ -28,33 +28,33 @@ public class ExperienceOrbRenderer extends EntityRenderer { } @Override - public ResourceLocation getTextureLocation(SquidRenderState squidRenderState) { + public ResourceLocation getTextureLocation(SquidRenderState renderState) { return GLOW_SQUID_LOCATION; } diff --git a/net/minecraft/client/renderer/entity/GuardianRenderer.java b/net/minecraft/client/renderer/entity/GuardianRenderer.java index 5a138cf1..df8616b5 100644 --- a/net/minecraft/client/renderer/entity/GuardianRenderer.java +++ b/net/minecraft/client/renderer/entity/GuardianRenderer.java @@ -61,73 +61,66 @@ public class GuardianRenderer extends MobRenderer(this, context.getModelSet(), transforms, context.getItemRenderer())); this.addLayer(new WingsLayer<>(this, context.getModelSet(), context.getEquipmentRenderer())); this.addLayer(new ItemInHandLayer<>(this, context.getItemRenderer())); } - public void extractRenderState(T mob, S humanoidRenderState, float f) { - super.extractRenderState(mob, humanoidRenderState, f); - extractHumanoidRenderState(mob, humanoidRenderState, f); + public void extractRenderState(T entity, S reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + extractHumanoidRenderState(entity, reusedState, partialTick); } - public static void extractHumanoidRenderState(LivingEntity livingEntity, HumanoidRenderState humanoidRenderState, float f) { - humanoidRenderState.isCrouching = livingEntity.isCrouching(); - humanoidRenderState.isFallFlying = livingEntity.isFallFlying(); - humanoidRenderState.isVisuallySwimming = livingEntity.isVisuallySwimming(); - humanoidRenderState.isPassenger = livingEntity.isPassenger(); - humanoidRenderState.speedValue = 1.0F; - if (humanoidRenderState.isFallFlying) { - humanoidRenderState.speedValue = (float)livingEntity.getDeltaMovement().lengthSqr(); - humanoidRenderState.speedValue /= 0.2F; - humanoidRenderState.speedValue = humanoidRenderState.speedValue * (humanoidRenderState.speedValue * humanoidRenderState.speedValue); + public static void extractHumanoidRenderState(LivingEntity entity, HumanoidRenderState reusedState, float partialTick) { + reusedState.isCrouching = entity.isCrouching(); + reusedState.isFallFlying = entity.isFallFlying(); + reusedState.isVisuallySwimming = entity.isVisuallySwimming(); + reusedState.isPassenger = entity.isPassenger(); + reusedState.speedValue = 1.0F; + if (reusedState.isFallFlying) { + reusedState.speedValue = (float)entity.getDeltaMovement().lengthSqr(); + reusedState.speedValue /= 0.2F; + reusedState.speedValue = reusedState.speedValue * (reusedState.speedValue * reusedState.speedValue); } - if (humanoidRenderState.speedValue < 1.0F) { - humanoidRenderState.speedValue = 1.0F; + if (reusedState.speedValue < 1.0F) { + reusedState.speedValue = 1.0F; } - humanoidRenderState.attackTime = livingEntity.getAttackAnim(f); - humanoidRenderState.swimAmount = livingEntity.getSwimAmount(f); - humanoidRenderState.attackArm = getAttackArm(livingEntity); - humanoidRenderState.useItemHand = livingEntity.getUsedItemHand(); - humanoidRenderState.maxCrossbowChargeDuration = CrossbowItem.getChargeDuration(livingEntity.getUseItem(), livingEntity); - humanoidRenderState.ticksUsingItem = livingEntity.getTicksUsingItem(); - humanoidRenderState.isUsingItem = livingEntity.isUsingItem(); - humanoidRenderState.elytraRotX = livingEntity.elytraAnimationState.getRotX(f); - humanoidRenderState.elytraRotY = livingEntity.elytraAnimationState.getRotY(f); - humanoidRenderState.elytraRotZ = livingEntity.elytraAnimationState.getRotZ(f); - humanoidRenderState.chestItem = livingEntity.getItemBySlot(EquipmentSlot.CHEST).copy(); - humanoidRenderState.legsItem = livingEntity.getItemBySlot(EquipmentSlot.LEGS).copy(); - humanoidRenderState.feetItem = livingEntity.getItemBySlot(EquipmentSlot.FEET).copy(); + reusedState.attackTime = entity.getAttackAnim(partialTick); + reusedState.swimAmount = entity.getSwimAmount(partialTick); + reusedState.attackArm = getAttackArm(entity); + reusedState.useItemHand = entity.getUsedItemHand(); + reusedState.maxCrossbowChargeDuration = CrossbowItem.getChargeDuration(entity.getUseItem(), entity); + reusedState.ticksUsingItem = entity.getTicksUsingItem(); + reusedState.isUsingItem = entity.isUsingItem(); + reusedState.elytraRotX = entity.elytraAnimationState.getRotX(partialTick); + reusedState.elytraRotY = entity.elytraAnimationState.getRotY(partialTick); + reusedState.elytraRotZ = entity.elytraAnimationState.getRotZ(partialTick); + reusedState.chestItem = entity.getItemBySlot(EquipmentSlot.CHEST).copy(); + reusedState.legsItem = entity.getItemBySlot(EquipmentSlot.LEGS).copy(); + reusedState.feetItem = entity.getItemBySlot(EquipmentSlot.FEET).copy(); } - private static HumanoidArm getAttackArm(LivingEntity livingEntity) { - HumanoidArm humanoidArm = livingEntity.getMainArm(); - return livingEntity.swingingArm == InteractionHand.MAIN_HAND ? humanoidArm : humanoidArm.getOpposite(); + private static HumanoidArm getAttackArm(LivingEntity entity) { + HumanoidArm humanoidArm = entity.getMainArm(); + return entity.swingingArm == InteractionHand.MAIN_HAND ? humanoidArm : humanoidArm.getOpposite(); } } diff --git a/net/minecraft/client/renderer/entity/HuskRenderer.java b/net/minecraft/client/renderer/entity/HuskRenderer.java index 18a5be6b..055144ca 100644 --- a/net/minecraft/client/renderer/entity/HuskRenderer.java +++ b/net/minecraft/client/renderer/entity/HuskRenderer.java @@ -23,7 +23,7 @@ public class HuskRenderer extends ZombieRenderer { } @Override - public ResourceLocation getTextureLocation(ZombieRenderState zombieRenderState) { + public ResourceLocation getTextureLocation(ZombieRenderState renderState) { return HUSK_LOCATION; } } diff --git a/net/minecraft/client/renderer/entity/IllagerRenderer.java b/net/minecraft/client/renderer/entity/IllagerRenderer.java index f1e156c4..a2e44112 100644 --- a/net/minecraft/client/renderer/entity/IllagerRenderer.java +++ b/net/minecraft/client/renderer/entity/IllagerRenderer.java @@ -15,16 +15,16 @@ public abstract class IllagerRenderer(this, context.getModelSet(), context.getItemRenderer())); } - public void extractRenderState(T abstractIllager, S illagerRenderState, float f) { - super.extractRenderState(abstractIllager, illagerRenderState, f); - illagerRenderState.isRiding = abstractIllager.isPassenger(); - illagerRenderState.mainArm = abstractIllager.getMainArm(); - illagerRenderState.armPose = abstractIllager.getArmPose(); - illagerRenderState.maxCrossbowChargeDuration = illagerRenderState.armPose == AbstractIllager.IllagerArmPose.CROSSBOW_CHARGE - ? CrossbowItem.getChargeDuration(abstractIllager.getUseItem(), abstractIllager) + public void extractRenderState(T entity, S reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + reusedState.isRiding = entity.isPassenger(); + reusedState.mainArm = entity.getMainArm(); + reusedState.armPose = entity.getArmPose(); + reusedState.maxCrossbowChargeDuration = reusedState.armPose == AbstractIllager.IllagerArmPose.CROSSBOW_CHARGE + ? CrossbowItem.getChargeDuration(entity.getUseItem(), entity) : 0; - illagerRenderState.ticksUsingItem = abstractIllager.getTicksUsingItem(); - illagerRenderState.attackAnim = abstractIllager.getAttackAnim(f); - illagerRenderState.isAggressive = abstractIllager.isAggressive(); + reusedState.ticksUsingItem = entity.getTicksUsingItem(); + reusedState.attackAnim = entity.getAttackAnim(partialTick); + reusedState.isAggressive = entity.isAggressive(); } } diff --git a/net/minecraft/client/renderer/entity/ItemEntityRenderer.java b/net/minecraft/client/renderer/entity/ItemEntityRenderer.java index 516efbe2..08d5a18b 100644 --- a/net/minecraft/client/renderer/entity/ItemEntityRenderer.java +++ b/net/minecraft/client/renderer/entity/ItemEntityRenderer.java @@ -37,31 +37,31 @@ public class ItemEntityRenderer extends EntityRenderer extends EntityRenderer extends EntityRenderer= 0; j--) { - fs[j] = f; - gs[j] = g; + for (int i = 7; i >= 0; i--) { + fs[i] = f; + gs[i] = g; f += randomSource.nextInt(11) - 5; g += randomSource.nextInt(11) - 5; } - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.lightning()); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.lightning()); Matrix4f matrix4f = poseStack.last().pose(); - for (int k = 0; k < 4; k++) { - RandomSource randomSource2 = RandomSource.create(lightningBoltRenderState.seed); + for (int j = 0; j < 4; j++) { + RandomSource randomSource2 = RandomSource.create(renderState.seed); - for (int l = 0; l < 3; l++) { - int m = 7; - int n = 0; - if (l > 0) { - m = 7 - l; + for (int k = 0; k < 3; k++) { + int l = 7; + int m = 0; + if (k > 0) { + l = 7 - k; } - if (l > 0) { - n = m - 2; + if (k > 0) { + m = l - 2; } - float h = fs[m] - f; - float o = gs[m] - g; + float h = fs[l] - f; + float n = gs[l] - g; - for (int p = m; p >= n; p--) { - float q = h; - float r = o; - if (l == 0) { + for (int o = l; o >= m; o--) { + float p = h; + float q = n; + if (k == 0) { h += randomSource2.nextInt(11) - 5; - o += randomSource2.nextInt(11) - 5; + n += randomSource2.nextInt(11) - 5; } else { h += randomSource2.nextInt(31) - 15; - o += randomSource2.nextInt(31) - 15; + n += randomSource2.nextInt(31) - 15; } - float s = 0.5F; + float r = 0.5F; + float s = 0.45F; float t = 0.45F; - float u = 0.45F; - float v = 0.5F; - float w = 0.1F + k * 0.2F; - if (l == 0) { - w *= p * 0.1F + 1.0F; + float u = 0.5F; + float v = 0.1F + j * 0.2F; + if (k == 0) { + v *= o * 0.1F + 1.0F; } - float x = 0.1F + k * 0.2F; - if (l == 0) { - x *= (p - 1.0F) * 0.1F + 1.0F; + float w = 0.1F + j * 0.2F; + if (k == 0) { + w *= (o - 1.0F) * 0.1F + 1.0F; } - quad(matrix4f, vertexConsumer, h, o, p, q, r, 0.45F, 0.45F, 0.5F, w, x, false, false, true, false); - quad(matrix4f, vertexConsumer, h, o, p, q, r, 0.45F, 0.45F, 0.5F, w, x, true, false, true, true); - quad(matrix4f, vertexConsumer, h, o, p, q, r, 0.45F, 0.45F, 0.5F, w, x, true, true, false, true); - quad(matrix4f, vertexConsumer, h, o, p, q, r, 0.45F, 0.45F, 0.5F, w, x, false, true, false, false); + quad(matrix4f, vertexConsumer, h, n, o, p, q, 0.45F, 0.45F, 0.5F, v, w, false, false, true, false); + quad(matrix4f, vertexConsumer, h, n, o, p, q, 0.45F, 0.45F, 0.5F, v, w, true, false, true, true); + quad(matrix4f, vertexConsumer, h, n, o, p, q, 0.45F, 0.45F, 0.5F, v, w, true, true, false, true); + quad(matrix4f, vertexConsumer, h, n, o, p, q, 0.45F, 0.45F, 0.5F, v, w, false, true, false, false); } } } } private static void quad( - Matrix4f matrix, - VertexConsumer consumer, + Matrix4f pose, + VertexConsumer buffer, float x1, float z1, - int index, + int sectionY, float x2, float z2, float red, float green, float blue, - float f, - float g, - boolean bl, - boolean bl2, - boolean bl3, - boolean bl4 + float innerThickness, + float outerThickness, + boolean addThicknessLeftSideX, + boolean addThicknessLeftSideZ, + boolean addThicknessRightSideX, + boolean addThicknessRightSideZ ) { - consumer.addVertex(matrix, x1 + (bl ? g : -g), (float)(index * 16), z1 + (bl2 ? g : -g)).setColor(red, green, blue, 0.3F); - consumer.addVertex(matrix, x2 + (bl ? f : -f), (float)((index + 1) * 16), z2 + (bl2 ? f : -f)).setColor(red, green, blue, 0.3F); - consumer.addVertex(matrix, x2 + (bl3 ? f : -f), (float)((index + 1) * 16), z2 + (bl4 ? f : -f)).setColor(red, green, blue, 0.3F); - consumer.addVertex(matrix, x1 + (bl3 ? g : -g), (float)(index * 16), z1 + (bl4 ? g : -g)).setColor(red, green, blue, 0.3F); + buffer.addVertex( + pose, + x1 + (addThicknessLeftSideX ? outerThickness : -outerThickness), + (float)(sectionY * 16), + z1 + (addThicknessLeftSideZ ? outerThickness : -outerThickness) + ) + .setColor(red, green, blue, 0.3F); + buffer.addVertex( + pose, + x2 + (addThicknessLeftSideX ? innerThickness : -innerThickness), + (float)((sectionY + 1) * 16), + z2 + (addThicknessLeftSideZ ? innerThickness : -innerThickness) + ) + .setColor(red, green, blue, 0.3F); + buffer.addVertex( + pose, + x2 + (addThicknessRightSideX ? innerThickness : -innerThickness), + (float)((sectionY + 1) * 16), + z2 + (addThicknessRightSideZ ? innerThickness : -innerThickness) + ) + .setColor(red, green, blue, 0.3F); + buffer.addVertex( + pose, + x1 + (addThicknessRightSideX ? outerThickness : -outerThickness), + (float)(sectionY * 16), + z1 + (addThicknessRightSideZ ? outerThickness : -outerThickness) + ) + .setColor(red, green, blue, 0.3F); } public LightningBoltRenderState createRenderState() { return new LightningBoltRenderState(); } - public void extractRenderState(LightningBolt lightningBolt, LightningBoltRenderState lightningBoltRenderState, float f) { - super.extractRenderState(lightningBolt, lightningBoltRenderState, f); - lightningBoltRenderState.seed = lightningBolt.seed; + public void extractRenderState(LightningBolt entity, LightningBoltRenderState reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + reusedState.seed = entity.seed; } - protected boolean affectedByCulling(LightningBolt lightningBolt) { + protected boolean affectedByCulling(LightningBolt display) { return false; } } diff --git a/net/minecraft/client/renderer/entity/LivingEntityRenderer.java b/net/minecraft/client/renderer/entity/LivingEntityRenderer.java index 6cd85cb1..9e973328 100644 --- a/net/minecraft/client/renderer/entity/LivingEntityRenderer.java +++ b/net/minecraft/client/renderer/entity/LivingEntityRenderer.java @@ -59,9 +59,9 @@ public abstract class LivingEntityRenderer renderLayer : this.layers) { - renderLayer.render(poseStack, multiBufferSource, i, livingEntityRenderState, livingEntityRenderState.yRot, livingEntityRenderState.xRot); + renderLayer.render(poseStack, bufferSource, packedLight, renderState, renderState.yRot, renderState.xRot); } } poseStack.popPose(); - super.render(livingEntityRenderState, poseStack, multiBufferSource, i); + super.render(renderState, poseStack, bufferSource, packedLight); } - protected boolean shouldRenderLayers(S livingEntityRenderState) { + protected boolean shouldRenderLayers(S renderState) { return true; } - protected int getModelTint(S livingEntityRenderState) { + protected int getModelTint(S renderState) { return -1; } - public abstract ResourceLocation getTextureLocation(S livingEntityRenderState); + public abstract ResourceLocation getTextureLocation(S renderState); @Nullable - protected RenderType getRenderType(S livingEntityRenderState, boolean bl, boolean bl2, boolean bl3) { - ResourceLocation resourceLocation = this.getTextureLocation(livingEntityRenderState); - if (bl2) { + protected RenderType getRenderType(S renderState, boolean isVisible, boolean renderTranslucent, boolean appearsGlowing) { + ResourceLocation resourceLocation = this.getTextureLocation(renderState); + if (renderTranslucent) { return RenderType.itemEntityTranslucentCull(resourceLocation); - } else if (bl) { + } else if (isVisible) { return this.model.renderType(resourceLocation); } else { - return bl3 ? RenderType.outline(resourceLocation) : null; + return appearsGlowing ? RenderType.outline(resourceLocation) : null; } } - public static int getOverlayCoords(LivingEntityRenderState livingEntityRenderState, float f) { - return OverlayTexture.pack(OverlayTexture.u(f), OverlayTexture.v(livingEntityRenderState.hasRedOverlay)); + public static int getOverlayCoords(LivingEntityRenderState renderState, float overlay) { + return OverlayTexture.pack(OverlayTexture.u(overlay), OverlayTexture.v(renderState.hasRedOverlay)); } - protected boolean isBodyVisible(S livingEntityRenderState) { - return !livingEntityRenderState.isInvisible; + protected boolean isBodyVisible(S renderState) { + return !renderState.isInvisible; } private static float sleepDirectionToRotation(Direction facing) { @@ -152,38 +152,38 @@ public abstract class LivingEntityRenderer 0.0F) { - float h = (livingEntityRenderState.deathTime - 1.0F) / 20.0F * 1.6F; - h = Mth.sqrt(h); - if (h > 1.0F) { - h = 1.0F; + if (renderState.deathTime > 0.0F) { + float f = (renderState.deathTime - 1.0F) / 20.0F * 1.6F; + f = Mth.sqrt(f); + if (f > 1.0F) { + f = 1.0F; } - poseStack.mulPose(Axis.ZP.rotationDegrees(h * this.getFlipDegrees())); - } else if (livingEntityRenderState.isAutoSpinAttack) { - poseStack.mulPose(Axis.XP.rotationDegrees(-90.0F - livingEntityRenderState.xRot)); - poseStack.mulPose(Axis.YP.rotationDegrees(livingEntityRenderState.ageInTicks * -75.0F)); - } else if (livingEntityRenderState.hasPose(Pose.SLEEPING)) { - Direction direction = livingEntityRenderState.bedOrientation; - float i = direction != null ? sleepDirectionToRotation(direction) : f; - poseStack.mulPose(Axis.YP.rotationDegrees(i)); + poseStack.mulPose(Axis.ZP.rotationDegrees(f * this.getFlipDegrees())); + } else if (renderState.isAutoSpinAttack) { + poseStack.mulPose(Axis.XP.rotationDegrees(-90.0F - renderState.xRot)); + poseStack.mulPose(Axis.YP.rotationDegrees(renderState.ageInTicks * -75.0F)); + } else if (renderState.hasPose(Pose.SLEEPING)) { + Direction direction = renderState.bedOrientation; + float g = direction != null ? sleepDirectionToRotation(direction) : bodyRot; + poseStack.mulPose(Axis.YP.rotationDegrees(g)); poseStack.mulPose(Axis.ZP.rotationDegrees(this.getFlipDegrees())); poseStack.mulPose(Axis.YP.rotationDegrees(270.0F)); - } else if (livingEntityRenderState.isUpsideDown) { - poseStack.translate(0.0F, (livingEntityRenderState.boundingBoxHeight + 0.1F) / g, 0.0F); + } else if (renderState.isUpsideDown) { + poseStack.translate(0.0F, (renderState.boundingBoxHeight + 0.1F) / scale, 0.0F); poseStack.mulPose(Axis.ZP.rotationDegrees(180.0F)); } } @@ -192,26 +192,26 @@ public abstract class LivingEntityRenderer= 1024.0) { + if (distanceToCameraSq >= 1024.0) { return false; } } Minecraft minecraft = Minecraft.getInstance(); LocalPlayer localPlayer = minecraft.player; - boolean bl = !livingEntity.isInvisibleTo(localPlayer); - if (livingEntity != localPlayer) { - Team team = livingEntity.getTeam(); + boolean bl = !entity.isInvisibleTo(localPlayer); + if (entity != localPlayer) { + Team team = entity.getTeam(); Team team2 = localPlayer.getTeam(); if (team != null) { Visibility visibility = team.getNameTagVisibility(); @@ -230,7 +230,7 @@ public abstract class LivingEntityRenderer 0 || livingEntity.deathTime > 0; - ItemStack itemStack = livingEntity.getItemBySlot(EquipmentSlot.HEAD); - livingEntityRenderState.headItem = itemStack.copy(); - livingEntityRenderState.headItemModel = this.itemRenderer.resolveItemModel(itemStack, livingEntity, ItemDisplayContext.HEAD); - livingEntityRenderState.mainArm = livingEntity.getMainArm(); - ItemStack itemStack2 = livingEntity.getItemHeldByArm(HumanoidArm.RIGHT); - ItemStack itemStack3 = livingEntity.getItemHeldByArm(HumanoidArm.LEFT); - livingEntityRenderState.rightHandItem = itemStack2.copy(); - livingEntityRenderState.leftHandItem = itemStack3.copy(); - livingEntityRenderState.rightHandItemModel = this.itemRenderer.resolveItemModel(itemStack2, livingEntity, ItemDisplayContext.THIRD_PERSON_RIGHT_HAND); - livingEntityRenderState.leftHandItemModel = this.itemRenderer.resolveItemModel(itemStack3, livingEntity, ItemDisplayContext.THIRD_PERSON_LEFT_HAND); - livingEntityRenderState.deathTime = livingEntity.deathTime > 0 ? livingEntity.deathTime + f : 0.0F; + reusedState.isFullyFrozen = entity.isFullyFrozen(); + reusedState.isBaby = entity.isBaby(); + reusedState.isInWater = entity.isInWater(); + reusedState.isAutoSpinAttack = entity.isAutoSpinAttack(); + reusedState.hasRedOverlay = entity.hurtTime > 0 || entity.deathTime > 0; + ItemStack itemStack = entity.getItemBySlot(EquipmentSlot.HEAD); + reusedState.headItem = itemStack.copy(); + reusedState.headItemModel = this.itemRenderer.resolveItemModel(itemStack, entity, ItemDisplayContext.HEAD); + reusedState.mainArm = entity.getMainArm(); + ItemStack itemStack2 = entity.getItemHeldByArm(HumanoidArm.RIGHT); + ItemStack itemStack3 = entity.getItemHeldByArm(HumanoidArm.LEFT); + reusedState.rightHandItem = itemStack2.copy(); + reusedState.leftHandItem = itemStack3.copy(); + reusedState.rightHandItemModel = this.itemRenderer.resolveItemModel(itemStack2, entity, ItemDisplayContext.THIRD_PERSON_RIGHT_HAND); + reusedState.leftHandItemModel = this.itemRenderer.resolveItemModel(itemStack3, entity, ItemDisplayContext.THIRD_PERSON_LEFT_HAND); + reusedState.deathTime = entity.deathTime > 0 ? entity.deathTime + partialTick : 0.0F; Minecraft minecraft = Minecraft.getInstance(); - livingEntityRenderState.isInvisibleToPlayer = livingEntityRenderState.isInvisible && livingEntity.isInvisibleTo(minecraft.player); - livingEntityRenderState.appearsGlowing = minecraft.shouldEntityAppearGlowing(livingEntity); + reusedState.isInvisibleToPlayer = reusedState.isInvisible && entity.isInvisibleTo(minecraft.player); + reusedState.appearsGlowing = minecraft.shouldEntityAppearGlowing(entity); } - private static float solveBodyRot(LivingEntity livingEntity, float f, float g) { - if (livingEntity.getVehicle() instanceof LivingEntity livingEntity2) { - float h = Mth.rotLerp(g, livingEntity2.yBodyRotO, livingEntity2.yBodyRot); - float i = 85.0F; - float j = Mth.clamp(Mth.wrapDegrees(f - h), -85.0F, 85.0F); - h = f - j; - if (Math.abs(j) > 50.0F) { - h += j * 0.2F; + private static float solveBodyRot(LivingEntity entity, float yHeadRot, float partialTick) { + if (entity.getVehicle() instanceof LivingEntity livingEntity) { + float f = Mth.rotLerp(partialTick, livingEntity.yBodyRotO, livingEntity.yBodyRot); + float g = 85.0F; + float h = Mth.clamp(Mth.wrapDegrees(yHeadRot - f), -85.0F, 85.0F); + f = yHeadRot - h; + if (Math.abs(h) > 50.0F) { + f += h * 0.2F; } - return h; + return f; } else { - return Mth.rotLerp(g, livingEntity.yBodyRotO, livingEntity.yBodyRot); + return Mth.rotLerp(partialTick, entity.yBodyRotO, entity.yBodyRot); } } } diff --git a/net/minecraft/client/renderer/entity/LlamaRenderer.java b/net/minecraft/client/renderer/entity/LlamaRenderer.java index 362099fd..5ce5d645 100644 --- a/net/minecraft/client/renderer/entity/LlamaRenderer.java +++ b/net/minecraft/client/renderer/entity/LlamaRenderer.java @@ -16,13 +16,13 @@ public class LlamaRenderer extends AgeableMobRenderer CREAMY; case WHITE -> WHITE; case BROWN -> BROWN; @@ -34,11 +34,11 @@ public class LlamaRenderer extends AgeableMobRenderer> extends LivingEntityRenderer { - public MobRenderer(EntityRendererProvider.Context context, M model, float shadowRadius) { - super(context, model, shadowRadius); + public MobRenderer(EntityRendererProvider.Context context, M entityModel, float f) { + super(context, entityModel, f); } protected boolean shouldShowName(T mob, double d) { @@ -17,7 +17,7 @@ public abstract class MobRenderer 0; - pandaRenderState.isSneezing = panda.isSneezing(); - pandaRenderState.sneezeTime = panda.getSneezeCounter(); - pandaRenderState.isEating = panda.isEating(); - pandaRenderState.isScared = panda.isScared(); - pandaRenderState.isSitting = panda.isSitting(); - pandaRenderState.sitAmount = panda.getSitAmount(f); - pandaRenderState.lieOnBackAmount = panda.getLieOnBackAmount(f); - pandaRenderState.rollAmount = panda.isBaby() ? 0.0F : panda.getRollAmount(f); - pandaRenderState.rollTime = panda.rollCounter > 0 ? panda.rollCounter + f : 0.0F; + public void extractRenderState(Panda entity, PandaRenderState reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + reusedState.variant = entity.getVariant(); + reusedState.isUnhappy = entity.getUnhappyCounter() > 0; + reusedState.isSneezing = entity.isSneezing(); + reusedState.sneezeTime = entity.getSneezeCounter(); + reusedState.isEating = entity.isEating(); + reusedState.isScared = entity.isScared(); + reusedState.isSitting = entity.isSitting(); + reusedState.sitAmount = entity.getSitAmount(partialTick); + reusedState.lieOnBackAmount = entity.getLieOnBackAmount(partialTick); + reusedState.rollAmount = entity.isBaby() ? 0.0F : entity.getRollAmount(partialTick); + reusedState.rollTime = entity.rollCounter > 0 ? entity.rollCounter + partialTick : 0.0F; } - protected void setupRotations(PandaRenderState pandaRenderState, PoseStack poseStack, float f, float g) { - super.setupRotations(pandaRenderState, poseStack, f, g); - if (pandaRenderState.rollTime > 0.0F) { - float h = Mth.frac(pandaRenderState.rollTime); - int i = Mth.floor(pandaRenderState.rollTime); + protected void setupRotations(PandaRenderState renderState, PoseStack poseStack, float bodyRot, float scale) { + super.setupRotations(renderState, poseStack, bodyRot, scale); + if (renderState.rollTime > 0.0F) { + float f = Mth.frac(renderState.rollTime); + int i = Mth.floor(renderState.rollTime); int j = i + 1; - float k = 7.0F; - float l = pandaRenderState.isBaby ? 0.3F : 0.8F; + float g = 7.0F; + float h = renderState.isBaby ? 0.3F : 0.8F; if (i < 8.0F) { - float m = 90.0F * i / 7.0F; - float n = 90.0F * j / 7.0F; - float o = this.getAngle(m, n, j, h, 8.0F); - poseStack.translate(0.0F, (l + 0.2F) * (o / 90.0F), 0.0F); - poseStack.mulPose(Axis.XP.rotationDegrees(-o)); + float k = 90.0F * i / 7.0F; + float l = 90.0F * j / 7.0F; + float m = this.getAngle(k, l, j, f, 8.0F); + poseStack.translate(0.0F, (h + 0.2F) * (m / 90.0F), 0.0F); + poseStack.mulPose(Axis.XP.rotationDegrees(-m)); } else if (i < 16.0F) { - float m = (i - 8.0F) / 7.0F; - float n = 90.0F + 90.0F * m; - float p = 90.0F + 90.0F * (j - 8.0F) / 7.0F; - float o = this.getAngle(n, p, j, h, 16.0F); - poseStack.translate(0.0F, l + 0.2F + (l - 0.2F) * (o - 90.0F) / 90.0F, 0.0F); - poseStack.mulPose(Axis.XP.rotationDegrees(-o)); + float k = (i - 8.0F) / 7.0F; + float l = 90.0F + 90.0F * k; + float n = 90.0F + 90.0F * (j - 8.0F) / 7.0F; + float m = this.getAngle(l, n, j, f, 16.0F); + poseStack.translate(0.0F, h + 0.2F + (h - 0.2F) * (m - 90.0F) / 90.0F, 0.0F); + poseStack.mulPose(Axis.XP.rotationDegrees(-m)); } else if (i < 24.0F) { - float m = (i - 16.0F) / 7.0F; - float n = 180.0F + 90.0F * m; - float p = 180.0F + 90.0F * (j - 16.0F) / 7.0F; - float o = this.getAngle(n, p, j, h, 24.0F); - poseStack.translate(0.0F, l + l * (270.0F - o) / 90.0F, 0.0F); - poseStack.mulPose(Axis.XP.rotationDegrees(-o)); + float k = (i - 16.0F) / 7.0F; + float l = 180.0F + 90.0F * k; + float n = 180.0F + 90.0F * (j - 16.0F) / 7.0F; + float m = this.getAngle(l, n, j, f, 24.0F); + poseStack.translate(0.0F, h + h * (270.0F - m) / 90.0F, 0.0F); + poseStack.mulPose(Axis.XP.rotationDegrees(-m)); } else if (i < 32) { - float m = (i - 24.0F) / 7.0F; - float n = 270.0F + 90.0F * m; - float p = 270.0F + 90.0F * (j - 24.0F) / 7.0F; - float o = this.getAngle(n, p, j, h, 32.0F); - poseStack.translate(0.0F, l * ((360.0F - o) / 90.0F), 0.0F); - poseStack.mulPose(Axis.XP.rotationDegrees(-o)); + float k = (i - 24.0F) / 7.0F; + float l = 270.0F + 90.0F * k; + float n = 270.0F + 90.0F * (j - 24.0F) / 7.0F; + float m = this.getAngle(l, n, j, f, 32.0F); + poseStack.translate(0.0F, h * ((360.0F - m) / 90.0F), 0.0F); + poseStack.mulPose(Axis.XP.rotationDegrees(-m)); } } - float h = pandaRenderState.sitAmount; - if (h > 0.0F) { - poseStack.translate(0.0F, 0.8F * h, 0.0F); - poseStack.mulPose(Axis.XP.rotationDegrees(Mth.lerp(h, pandaRenderState.xRot, pandaRenderState.xRot + 90.0F))); - poseStack.translate(0.0F, -1.0F * h, 0.0F); - if (pandaRenderState.isScared) { - float q = (float)(Math.cos(pandaRenderState.ageInTicks * 1.25F) * Math.PI * 0.05F); - poseStack.mulPose(Axis.YP.rotationDegrees(q)); - if (pandaRenderState.isBaby) { + float f = renderState.sitAmount; + if (f > 0.0F) { + poseStack.translate(0.0F, 0.8F * f, 0.0F); + poseStack.mulPose(Axis.XP.rotationDegrees(Mth.lerp(f, renderState.xRot, renderState.xRot + 90.0F))); + poseStack.translate(0.0F, -1.0F * f, 0.0F); + if (renderState.isScared) { + float o = (float)(Math.cos(renderState.ageInTicks * 1.25F) * Math.PI * 0.05F); + poseStack.mulPose(Axis.YP.rotationDegrees(o)); + if (renderState.isBaby) { poseStack.translate(0.0F, 0.8F, 0.55F); } } } - float q = pandaRenderState.lieOnBackAmount; - if (q > 0.0F) { - float r = pandaRenderState.isBaby ? 0.5F : 1.3F; - poseStack.translate(0.0F, r * q, 0.0F); - poseStack.mulPose(Axis.XP.rotationDegrees(Mth.lerp(q, pandaRenderState.xRot, pandaRenderState.xRot + 180.0F))); + float o = renderState.lieOnBackAmount; + if (o > 0.0F) { + float p = renderState.isBaby ? 0.5F : 1.3F; + poseStack.translate(0.0F, p * o, 0.0F); + poseStack.mulPose(Axis.XP.rotationDegrees(Mth.lerp(o, renderState.xRot, renderState.xRot + 180.0F))); } } diff --git a/net/minecraft/client/renderer/entity/ParrotRenderer.java b/net/minecraft/client/renderer/entity/ParrotRenderer.java index 3a4f8c32..70286326 100644 --- a/net/minecraft/client/renderer/entity/ParrotRenderer.java +++ b/net/minecraft/client/renderer/entity/ParrotRenderer.java @@ -21,21 +21,21 @@ public class ParrotRenderer extends MobRenderer( this, - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation3)), - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation4)), - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation5)), - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation6)), + new HumanoidArmorModel(context.bakeLayer(innerModel)), + new HumanoidArmorModel(context.bakeLayer(outerModel)), + new HumanoidArmorModel(context.bakeLayer(innerModelBaby)), + new HumanoidArmorModel(context.bakeLayer(outerModelBaby)), context.getEquipmentRenderer() ) ); } - public ResourceLocation getTextureLocation(PiglinRenderState piglinRenderState) { - return piglinRenderState.isBrute ? PIGLIN_BRUTE_LOCATION : PIGLIN_LOCATION; + public ResourceLocation getTextureLocation(PiglinRenderState renderState) { + return renderState.isBrute ? PIGLIN_BRUTE_LOCATION : PIGLIN_LOCATION; } public PiglinRenderState createRenderState() { return new PiglinRenderState(); } - public void extractRenderState(AbstractPiglin abstractPiglin, PiglinRenderState piglinRenderState, float f) { - super.extractRenderState(abstractPiglin, piglinRenderState, f); - piglinRenderState.isBrute = abstractPiglin.getType() == EntityType.PIGLIN_BRUTE; - piglinRenderState.armPose = abstractPiglin.getArmPose(); - piglinRenderState.maxCrossbowChageDuration = CrossbowItem.getChargeDuration(abstractPiglin.getUseItem(), abstractPiglin); - piglinRenderState.isConverting = abstractPiglin.isConverting(); + public void extractRenderState(AbstractPiglin entity, PiglinRenderState reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + reusedState.isBrute = entity.getType() == EntityType.PIGLIN_BRUTE; + reusedState.armPose = entity.getArmPose(); + reusedState.maxCrossbowChageDuration = CrossbowItem.getChargeDuration(entity.getUseItem(), entity); + reusedState.isConverting = entity.isConverting(); } - protected boolean isShaking(PiglinRenderState piglinRenderState) { - return super.isShaking(piglinRenderState) || piglinRenderState.isConverting; + protected boolean isShaking(PiglinRenderState renderState) { + return super.isShaking(renderState) || renderState.isConverting; } } diff --git a/net/minecraft/client/renderer/entity/RaftRenderer.java b/net/minecraft/client/renderer/entity/RaftRenderer.java index 512bba5b..a05e9b3b 100644 --- a/net/minecraft/client/renderer/entity/RaftRenderer.java +++ b/net/minecraft/client/renderer/entity/RaftRenderer.java @@ -15,10 +15,10 @@ public class RaftRenderer extends AbstractBoatRenderer { private final EntityModel model; private final ResourceLocation texture; - public RaftRenderer(EntityRendererProvider.Context context, ModelLayerLocation modelLayerLocation) { + public RaftRenderer(EntityRendererProvider.Context context, ModelLayerLocation modelLayer) { super(context); - this.texture = modelLayerLocation.model().withPath((UnaryOperator)(string -> "textures/entity/" + string + ".png")); - this.model = new RaftModel(context.bakeLayer(modelLayerLocation)); + this.texture = modelLayer.model().withPath((UnaryOperator)(string -> "textures/entity/" + string + ".png")); + this.model = new RaftModel(context.bakeLayer(modelLayer)); } @Override diff --git a/net/minecraft/client/renderer/entity/ShulkerBulletRenderer.java b/net/minecraft/client/renderer/entity/ShulkerBulletRenderer.java index 5a3ca11d..f063d122 100644 --- a/net/minecraft/client/renderer/entity/ShulkerBulletRenderer.java +++ b/net/minecraft/client/renderer/entity/ShulkerBulletRenderer.java @@ -31,31 +31,31 @@ public class ShulkerBulletRenderer extends EntityRenderer extends MobRenderer extends MobRenderer extends AgeableMobRenderer { private static final ResourceLocation SQUID_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/squid/squid.png"); - public SquidRenderer(EntityRendererProvider.Context context, SquidModel squidModel, SquidModel squidModel2) { - super(context, squidModel, squidModel2, 0.7F); + public SquidRenderer(EntityRendererProvider.Context context, SquidModel adultModel, SquidModel babyModel) { + super(context, adultModel, babyModel, 0.7F); } - public ResourceLocation getTextureLocation(SquidRenderState squidRenderState) { + public ResourceLocation getTextureLocation(SquidRenderState renderState) { return SQUID_LOCATION; } @@ -26,18 +26,18 @@ public class SquidRenderer extends AgeableMobRenderer extends EntityR return this.fullBright ? 15 : super.getBlockLightLevel(entity, pos); } - public void render(ThrownItemRenderState thrownItemRenderState, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { + public void render(ThrownItemRenderState renderState, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { poseStack.pushPose(); poseStack.scale(this.scale, this.scale, this.scale); poseStack.mulPose(this.entityRenderDispatcher.cameraOrientation()); - if (thrownItemRenderState.itemModel != null) { + if (renderState.itemModel != null) { this.itemRenderer - .render( - thrownItemRenderState.item, ItemDisplayContext.GROUND, false, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY, thrownItemRenderState.itemModel - ); + .render(renderState.item, ItemDisplayContext.GROUND, false, poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY, renderState.itemModel); } poseStack.popPose(); - super.render(thrownItemRenderState, poseStack, multiBufferSource, i); + super.render(renderState, poseStack, bufferSource, packedLight); } public ThrownItemRenderState createRenderState() { return new ThrownItemRenderState(); } - public void extractRenderState(T entity, ThrownItemRenderState thrownItemRenderState, float f) { - super.extractRenderState(entity, thrownItemRenderState, f); + public void extractRenderState(T entity, ThrownItemRenderState reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); ItemStack itemStack = entity.getItem(); - thrownItemRenderState.itemModel = !itemStack.isEmpty() ? this.itemRenderer.getModel(itemStack, entity.level(), null, entity.getId()) : null; - thrownItemRenderState.item = itemStack.copy(); + reusedState.itemModel = !itemStack.isEmpty() ? this.itemRenderer.getModel(itemStack, entity.level(), null, entity.getId()) : null; + reusedState.item = itemStack.copy(); } } diff --git a/net/minecraft/client/renderer/entity/TntMinecartRenderer.java b/net/minecraft/client/renderer/entity/TntMinecartRenderer.java index 8eccf01f..572e48dc 100644 --- a/net/minecraft/client/renderer/entity/TntMinecartRenderer.java +++ b/net/minecraft/client/renderer/entity/TntMinecartRenderer.java @@ -22,9 +22,9 @@ public class TntMinecartRenderer extends AbstractMinecartRenderer -1.0F && f < 10.0F) { float g = 1.0F - f / 10.0F; g = Mth.clamp(g, 0.0F, 1.0F); @@ -34,7 +34,7 @@ public class TntMinecartRenderer extends AbstractMinecartRenderer -1.0F && (int)f / 5 % 2 == 0); + renderWhiteSolidBlock(this.blockRenderer, state, poseStack, bufferSource, packedLight, f > -1.0F && (int)f / 5 % 2 == 0); } public static void renderWhiteSolidBlock( @@ -54,8 +54,8 @@ public class TntMinecartRenderer extends AbstractMinecartRenderer -1 ? minecartTNT.getFuse() - f + 1.0F : -1.0F; + public void extractRenderState(MinecartTNT entity, MinecartTntRenderState reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + reusedState.fuseRemainingInTicks = entity.getFuse() > -1 ? entity.getFuse() - partialTick + 1.0F : -1.0F; } } diff --git a/net/minecraft/client/renderer/entity/TropicalFishRenderer.java b/net/minecraft/client/renderer/entity/TropicalFishRenderer.java index 22484a84..3e6ad429 100644 --- a/net/minecraft/client/renderer/entity/TropicalFishRenderer.java +++ b/net/minecraft/client/renderer/entity/TropicalFishRenderer.java @@ -17,7 +17,13 @@ import net.minecraft.world.entity.animal.TropicalFish; @Environment(EnvType.CLIENT) public class TropicalFishRenderer extends MobRenderer> { + /** + * Breaking recompile intentionally since modelA/B incorrectly mapped. + */ private final EntityModel modelA = this.getModel(); + /** + * Breaking recompile intentionally since modelA/B incorrectly mapped. + */ private final EntityModel modelB; private static final ResourceLocation MODEL_A_TEXTURE = ResourceLocation.withDefaultNamespace("textures/entity/fish/tropical_a.png"); private static final ResourceLocation MODEL_B_TEXTURE = ResourceLocation.withDefaultNamespace("textures/entity/fish/tropical_b.png"); @@ -28,8 +34,8 @@ public class TropicalFishRenderer extends MobRenderer MODEL_A_TEXTURE; case LARGE -> MODEL_B_TEXTURE; }; @@ -39,30 +45,30 @@ public class TropicalFishRenderer extends MobRenderer this.modelA; case LARGE -> this.modelB; }; - super.render(tropicalFishRenderState, poseStack, multiBufferSource, i); + super.render(renderState, poseStack, bufferSource, packedLight); } - protected int getModelTint(TropicalFishRenderState tropicalFishRenderState) { - return tropicalFishRenderState.baseColor; + protected int getModelTint(TropicalFishRenderState renderState) { + return renderState.baseColor; } - protected void setupRotations(TropicalFishRenderState tropicalFishRenderState, PoseStack poseStack, float f, float g) { - super.setupRotations(tropicalFishRenderState, poseStack, f, g); - float h = 4.3F * Mth.sin(0.6F * tropicalFishRenderState.ageInTicks); - poseStack.mulPose(Axis.YP.rotationDegrees(h)); - if (!tropicalFishRenderState.isInWater) { + protected void setupRotations(TropicalFishRenderState renderState, PoseStack poseStack, float bodyRot, float scale) { + super.setupRotations(renderState, poseStack, bodyRot, scale); + float f = 4.3F * Mth.sin(0.6F * renderState.ageInTicks); + poseStack.mulPose(Axis.YP.rotationDegrees(f)); + if (!renderState.isInWater) { poseStack.translate(0.2F, 0.1F, 0.0F); poseStack.mulPose(Axis.ZP.rotationDegrees(90.0F)); } diff --git a/net/minecraft/client/renderer/entity/UndeadHorseRenderer.java b/net/minecraft/client/renderer/entity/UndeadHorseRenderer.java index 6cb5dbc2..7aa0b164 100644 --- a/net/minecraft/client/renderer/entity/UndeadHorseRenderer.java +++ b/net/minecraft/client/renderer/entity/UndeadHorseRenderer.java @@ -15,12 +15,14 @@ public class UndeadHorseRenderer extends AbstractHorseRenderer { return 15; } - public ResourceLocation getTextureLocation(VexRenderState vexRenderState) { - return vexRenderState.isCharging ? VEX_CHARGING_LOCATION : VEX_LOCATION; + public ResourceLocation getTextureLocation(VexRenderState renderState) { + return renderState.isCharging ? VEX_CHARGING_LOCATION : VEX_LOCATION; } public VexRenderState createRenderState() { return new VexRenderState(); } - public void extractRenderState(Vex vex, VexRenderState vexRenderState, float f) { - super.extractRenderState(vex, vexRenderState, f); - vexRenderState.isCharging = vex.isCharging(); + public void extractRenderState(Vex entity, VexRenderState reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + reusedState.isCharging = entity.isCharging(); } } diff --git a/net/minecraft/client/renderer/entity/WardenRenderer.java b/net/minecraft/client/renderer/entity/WardenRenderer.java index 5f6917c0..a3882ba1 100644 --- a/net/minecraft/client/renderer/entity/WardenRenderer.java +++ b/net/minecraft/client/renderer/entity/WardenRenderer.java @@ -62,7 +62,7 @@ public class WardenRenderer extends MobRenderer 0 && (i > 80 || i / 5 % 2 != 1) ? WITHER_INVULNERABLE_LOCATION : WITHER_LOCATION; } @@ -35,21 +35,21 @@ public class WitherBossRenderer extends MobRenderer 0.0F) { - f -= witherRenderState.invulnerableTicks / 220.0F * 0.5F; + if (renderState.invulnerableTicks > 0.0F) { + f -= renderState.invulnerableTicks / 220.0F * 0.5F; } poseStack.scale(f, f, f); } - public void extractRenderState(WitherBoss witherBoss, WitherRenderState witherRenderState, float f) { - super.extractRenderState(witherBoss, witherRenderState, f); - int i = witherBoss.getInvulnerableTicks(); - witherRenderState.invulnerableTicks = i > 0 ? i - f : 0.0F; - System.arraycopy(witherBoss.getHeadXRots(), 0, witherRenderState.xHeadRots, 0, witherRenderState.xHeadRots.length); - System.arraycopy(witherBoss.getHeadYRots(), 0, witherRenderState.yHeadRots, 0, witherRenderState.yHeadRots.length); - witherRenderState.isPowered = witherBoss.isPowered(); + public void extractRenderState(WitherBoss entity, WitherRenderState reusedState, float partialTick) { + super.extractRenderState(entity, reusedState, partialTick); + int i = entity.getInvulnerableTicks(); + reusedState.invulnerableTicks = i > 0 ? i - partialTick : 0.0F; + System.arraycopy(entity.getHeadXRots(), 0, reusedState.xHeadRots, 0, reusedState.xHeadRots.length); + System.arraycopy(entity.getHeadYRots(), 0, reusedState.yHeadRots, 0, reusedState.yHeadRots.length); + reusedState.isPowered = entity.isPowered(); } } diff --git a/net/minecraft/client/renderer/entity/WitherSkullRenderer.java b/net/minecraft/client/renderer/entity/WitherSkullRenderer.java index b6666ffd..9a7e71b2 100644 --- a/net/minecraft/client/renderer/entity/WitherSkullRenderer.java +++ b/net/minecraft/client/renderer/entity/WitherSkullRenderer.java @@ -40,28 +40,28 @@ public class WitherSkullRenderer extends EntityRenderer(context.bakeLayer(modelLayerLocation)), - new ZombieModel<>(context.bakeLayer(modelLayerLocation2)), - new ZombieModel<>(context.bakeLayer(modelLayerLocation3)), - new ZombieModel<>(context.bakeLayer(modelLayerLocation4)), - new ZombieModel<>(context.bakeLayer(modelLayerLocation5)), - new ZombieModel<>(context.bakeLayer(modelLayerLocation6)) + new ZombieModel<>(context.bakeLayer(adultModel)), + new ZombieModel<>(context.bakeLayer(babyModel)), + new ZombieModel<>(context.bakeLayer(innerModel)), + new ZombieModel<>(context.bakeLayer(outerModel)), + new ZombieModel<>(context.bakeLayer(innerModelBaby)), + new ZombieModel<>(context.bakeLayer(outerModelBaby)) ); } } diff --git a/net/minecraft/client/renderer/entity/ZombifiedPiglinRenderer.java b/net/minecraft/client/renderer/entity/ZombifiedPiglinRenderer.java index e887e9f0..c338f9a0 100644 --- a/net/minecraft/client/renderer/entity/ZombifiedPiglinRenderer.java +++ b/net/minecraft/client/renderer/entity/ZombifiedPiglinRenderer.java @@ -16,33 +16,33 @@ public class ZombifiedPiglinRenderer extends HumanoidMobRenderer( this, - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation3)), - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation4)), - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation5)), - new HumanoidArmorModel(context.bakeLayer(modelLayerLocation5)), + new HumanoidArmorModel(context.bakeLayer(innerArmorLayer)), + new HumanoidArmorModel(context.bakeLayer(outerArmorLayer)), + new HumanoidArmorModel(context.bakeLayer(innerArmorBaby)), + new HumanoidArmorModel(context.bakeLayer(innerArmorBaby)), context.getEquipmentRenderer() ) ); } - public ResourceLocation getTextureLocation(ZombifiedPiglinRenderState zombifiedPiglinRenderState) { + public ResourceLocation getTextureLocation(ZombifiedPiglinRenderState renderState) { return ZOMBIFIED_PIGLIN_LOCATION; } @@ -50,8 +50,8 @@ public class ZombifiedPiglinRenderer extends HumanoidMobRenderer extends StuckInBodyLayer { - public ArrowLayer(LivingEntityRenderer livingEntityRenderer, EntityRendererProvider.Context context) { - super( - livingEntityRenderer, - new ArrowModel(context.bakeLayer(ModelLayers.ARROW)), - TippableArrowRenderer.NORMAL_ARROW_LOCATION, - StuckInBodyLayer.PlacementStyle.IN_CUBE - ); + public ArrowLayer(LivingEntityRenderer renderer, EntityRendererProvider.Context context) { + super(renderer, new ArrowModel(context.bakeLayer(ModelLayers.ARROW)), TippableArrowRenderer.NORMAL_ARROW_LOCATION, StuckInBodyLayer.PlacementStyle.IN_CUBE); } @Override - protected int numStuck(PlayerRenderState playerRenderState) { - return playerRenderState.arrowCount; + protected int numStuck(PlayerRenderState renderState) { + return renderState.arrowCount; } } diff --git a/net/minecraft/client/renderer/entity/layers/BeeStingerLayer.java b/net/minecraft/client/renderer/entity/layers/BeeStingerLayer.java index 05ce3252..3eb4d21e 100644 --- a/net/minecraft/client/renderer/entity/layers/BeeStingerLayer.java +++ b/net/minecraft/client/renderer/entity/layers/BeeStingerLayer.java @@ -14,12 +14,12 @@ import net.minecraft.resources.ResourceLocation; public class BeeStingerLayer extends StuckInBodyLayer { private static final ResourceLocation BEE_STINGER_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/bee/bee_stinger.png"); - public BeeStingerLayer(LivingEntityRenderer livingEntityRenderer, EntityRendererProvider.Context context) { - super(livingEntityRenderer, new BeeStingerModel(context.bakeLayer(ModelLayers.BEE_STINGER)), BEE_STINGER_LOCATION, StuckInBodyLayer.PlacementStyle.ON_SURFACE); + public BeeStingerLayer(LivingEntityRenderer renderer, EntityRendererProvider.Context context) { + super(renderer, new BeeStingerModel(context.bakeLayer(ModelLayers.BEE_STINGER)), BEE_STINGER_LOCATION, StuckInBodyLayer.PlacementStyle.ON_SURFACE); } @Override - protected int numStuck(PlayerRenderState playerRenderState) { - return playerRenderState.stingerCount; + protected int numStuck(PlayerRenderState renderState) { + return renderState.stingerCount; } } diff --git a/net/minecraft/client/renderer/entity/layers/BreezeWindLayer.java b/net/minecraft/client/renderer/entity/layers/BreezeWindLayer.java index ff21ae97..105e0907 100644 --- a/net/minecraft/client/renderer/entity/layers/BreezeWindLayer.java +++ b/net/minecraft/client/renderer/entity/layers/BreezeWindLayer.java @@ -25,10 +25,10 @@ public class BreezeWindLayer extends RenderLayer this.model = new BreezeModel(context.bakeLayer(ModelLayers.BREEZE_WIND)); } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, BreezeRenderState breezeRenderState, float f, float g) { - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.breezeWind(TEXTURE_LOCATION, this.xOffset(breezeRenderState.ageInTicks) % 1.0F, 0.0F)); - this.model.setupAnim(breezeRenderState); - BreezeRenderer.enable(this.model, this.model.wind()).renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, BreezeRenderState renderState, float yRot, float xRot) { + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.breezeWind(TEXTURE_LOCATION, this.xOffset(renderState.ageInTicks) % 1.0F, 0.0F)); + this.model.setupAnim(renderState); + BreezeRenderer.enable(this.model, this.model.wind()).renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY); } private float xOffset(float tickCount) { diff --git a/net/minecraft/client/renderer/entity/layers/CapeLayer.java b/net/minecraft/client/renderer/entity/layers/CapeLayer.java index 77f9576e..e68f747b 100644 --- a/net/minecraft/client/renderer/entity/layers/CapeLayer.java +++ b/net/minecraft/client/renderer/entity/layers/CapeLayer.java @@ -27,14 +27,14 @@ public class CapeLayer extends RenderLayer { private final HumanoidModel model; private final EquipmentModelSet equipmentModels; - public CapeLayer(RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, EquipmentModelSet equipmentModelSet) { - super(renderLayerParent); - this.model = new PlayerCapeModel<>(entityModelSet.bakeLayer(ModelLayers.PLAYER_CAPE)); - this.equipmentModels = equipmentModelSet; + public CapeLayer(RenderLayerParent renderer, EntityModelSet entityModels, EquipmentModelSet equipmentModels) { + super(renderer); + this.model = new PlayerCapeModel<>(entityModels.bakeLayer(ModelLayers.PLAYER_CAPE)); + this.equipmentModels = equipmentModels; } - private boolean hasLayer(ItemStack itemStack, EquipmentModel.LayerType layerType) { - Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); + private boolean hasLayer(ItemStack stack, EquipmentModel.LayerType layerType) { + Equippable equippable = stack.get(DataComponents.EQUIPPABLE); if (equippable != null && !equippable.model().isEmpty()) { EquipmentModel equipmentModel = this.equipmentModels.get((ResourceLocation)equippable.model().get()); return !equipmentModel.getLayers(layerType).isEmpty(); @@ -43,20 +43,20 @@ public class CapeLayer extends RenderLayer { } } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, PlayerRenderState playerRenderState, float f, float g) { - if (!playerRenderState.isInvisible && playerRenderState.showCape) { - PlayerSkin playerSkin = playerRenderState.skin; + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, PlayerRenderState renderState, float yRot, float xRot) { + if (!renderState.isInvisible && renderState.showCape) { + PlayerSkin playerSkin = renderState.skin; if (playerSkin.capeTexture() != null) { - if (!this.hasLayer(playerRenderState.chestItem, EquipmentModel.LayerType.WINGS)) { + if (!this.hasLayer(renderState.chestItem, EquipmentModel.LayerType.WINGS)) { poseStack.pushPose(); - if (this.hasLayer(playerRenderState.chestItem, EquipmentModel.LayerType.HUMANOID)) { + if (this.hasLayer(renderState.chestItem, EquipmentModel.LayerType.HUMANOID)) { poseStack.translate(0.0F, -0.053125F, 0.06875F); } - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.entitySolid(playerSkin.capeTexture())); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.entitySolid(playerSkin.capeTexture())); this.getParentModel().copyPropertiesTo(this.model); - this.model.setupAnim(playerRenderState); - this.model.renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY); + this.model.setupAnim(renderState); + this.model.renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/entity/layers/CarriedBlockLayer.java b/net/minecraft/client/renderer/entity/layers/CarriedBlockLayer.java index c475142a..b1de564b 100644 --- a/net/minecraft/client/renderer/entity/layers/CarriedBlockLayer.java +++ b/net/minecraft/client/renderer/entity/layers/CarriedBlockLayer.java @@ -21,18 +21,18 @@ public class CarriedBlockLayer extends RenderLayer { this.babyModel = new CatModel(modelSet.bakeLayer(ModelLayers.CAT_BABY_COLLAR)); } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, CatRenderState catRenderState, float f, float g) { - DyeColor dyeColor = catRenderState.collarColor; + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, CatRenderState renderState, float yRot, float xRot) { + DyeColor dyeColor = renderState.collarColor; if (dyeColor != null) { - int j = dyeColor.getTextureDiffuseColor(); - CatModel catModel = catRenderState.isBaby ? this.babyModel : this.adultModel; - coloredCutoutModelCopyLayerRender(catModel, CAT_COLLAR_LOCATION, poseStack, multiBufferSource, i, catRenderState, j); + int i = dyeColor.getTextureDiffuseColor(); + CatModel catModel = renderState.isBaby ? this.babyModel : this.adultModel; + coloredCutoutModelCopyLayerRender(catModel, CAT_COLLAR_LOCATION, poseStack, bufferSource, packedLight, renderState, i); } } } diff --git a/net/minecraft/client/renderer/entity/layers/CreeperPowerLayer.java b/net/minecraft/client/renderer/entity/layers/CreeperPowerLayer.java index c9309c0a..056e74e1 100644 --- a/net/minecraft/client/renderer/entity/layers/CreeperPowerLayer.java +++ b/net/minecraft/client/renderer/entity/layers/CreeperPowerLayer.java @@ -19,8 +19,8 @@ public class CreeperPowerLayer extends EnergySwirlLayer> extends RenderLayer { private final ItemRenderer itemRenderer; - public CrossedArmsItemLayer(RenderLayerParent renderLayerParent, ItemRenderer itemRenderer) { - super(renderLayerParent); + public CrossedArmsItemLayer(RenderLayerParent renderer, ItemRenderer itemRenderer) { + super(renderer); this.itemRenderer = itemRenderer; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S livingEntityRenderState, float f, float g) { - BakedModel bakedModel = livingEntityRenderState.getMainHandItemModel(); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot) { + BakedModel bakedModel = renderState.getMainHandItemModel(); if (bakedModel != null) { poseStack.pushPose(); poseStack.translate(0.0F, 0.4F, -0.4F); poseStack.mulPose(Axis.XP.rotationDegrees(180.0F)); - ItemStack itemStack = livingEntityRenderState.getMainHandItem(); - this.itemRenderer.render(itemStack, ItemDisplayContext.GROUND, false, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY, bakedModel); + ItemStack itemStack = renderState.getMainHandItem(); + this.itemRenderer.render(itemStack, ItemDisplayContext.GROUND, false, poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY, bakedModel); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/entity/layers/CustomHeadLayer.java b/net/minecraft/client/renderer/entity/layers/CustomHeadLayer.java index 8270f777..d74a3153 100644 --- a/net/minecraft/client/renderer/entity/layers/CustomHeadLayer.java +++ b/net/minecraft/client/renderer/entity/layers/CustomHeadLayer.java @@ -35,22 +35,20 @@ public class CustomHeadLayer skullModels; private final ItemRenderer itemRenderer; - public CustomHeadLayer(RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, ItemRenderer itemRenderer) { - this(renderLayerParent, entityModelSet, CustomHeadLayer.Transforms.DEFAULT, itemRenderer); + public CustomHeadLayer(RenderLayerParent renderer, EntityModelSet modelSet, ItemRenderer itemRenderer) { + this(renderer, modelSet, CustomHeadLayer.Transforms.DEFAULT, itemRenderer); } - public CustomHeadLayer( - RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, CustomHeadLayer.Transforms transforms, ItemRenderer itemRenderer - ) { - super(renderLayerParent); + public CustomHeadLayer(RenderLayerParent renderer, EntityModelSet modelSet, CustomHeadLayer.Transforms transforms, ItemRenderer itemRenderer) { + super(renderer); this.transforms = transforms; - this.skullModels = SkullBlockRenderer.createSkullRenderers(entityModelSet); + this.skullModels = SkullBlockRenderer.createSkullRenderers(modelSet); this.itemRenderer = itemRenderer; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S livingEntityRenderState, float f, float g) { - ItemStack itemStack = livingEntityRenderState.headItem; - BakedModel bakedModel = livingEntityRenderState.headItemModel; + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot) { + ItemStack itemStack = renderState.headItem; + BakedModel bakedModel = renderState.headItemModel; if (!itemStack.isEmpty() && bakedModel != null) { Item item = itemStack.getItem(); poseStack.pushPose(); @@ -66,10 +64,10 @@ public class CustomHeadLayer { private final HumanoidModel model; - public Deadmau5EarsLayer(RenderLayerParent renderLayerParent, EntityModelSet entityModelSet) { - super(renderLayerParent); - this.model = new PlayerEarsModel(entityModelSet.bakeLayer(ModelLayers.PLAYER_EARS)); + public Deadmau5EarsLayer(RenderLayerParent renderer, EntityModelSet modelSet) { + super(renderer); + this.model = new PlayerEarsModel(modelSet.bakeLayer(ModelLayers.PLAYER_EARS)); } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, PlayerRenderState playerRenderState, float f, float g) { - if ("deadmau5".equals(playerRenderState.name) && !playerRenderState.isInvisible) { - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.entitySolid(playerRenderState.skin.texture())); - int j = LivingEntityRenderer.getOverlayCoords(playerRenderState, 0.0F); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, PlayerRenderState renderState, float yRot, float xRot) { + if ("deadmau5".equals(renderState.name) && !renderState.isInvisible) { + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.entitySolid(renderState.skin.texture())); + int i = LivingEntityRenderer.getOverlayCoords(renderState, 0.0F); this.getParentModel().copyPropertiesTo(this.model); - this.model.setupAnim(playerRenderState); - this.model.renderToBuffer(poseStack, vertexConsumer, i, j); + this.model.setupAnim(renderState); + this.model.renderToBuffer(poseStack, vertexConsumer, packedLight, i); } } } diff --git a/net/minecraft/client/renderer/entity/layers/DolphinCarryingItemLayer.java b/net/minecraft/client/renderer/entity/layers/DolphinCarryingItemLayer.java index 4404ec77..2c483886 100644 --- a/net/minecraft/client/renderer/entity/layers/DolphinCarryingItemLayer.java +++ b/net/minecraft/client/renderer/entity/layers/DolphinCarryingItemLayer.java @@ -18,26 +18,26 @@ import net.minecraft.world.item.ItemStack; public class DolphinCarryingItemLayer extends RenderLayer { private final ItemRenderer itemRenderer; - public DolphinCarryingItemLayer(RenderLayerParent renderLayerParent, ItemRenderer itemRenderer) { - super(renderLayerParent); + public DolphinCarryingItemLayer(RenderLayerParent renderer, ItemRenderer itemRenderer) { + super(renderer); this.itemRenderer = itemRenderer; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, DolphinRenderState dolphinRenderState, float f, float g) { - ItemStack itemStack = dolphinRenderState.getMainHandItem(); - BakedModel bakedModel = dolphinRenderState.getMainHandItemModel(); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, DolphinRenderState renderState, float yRot, float xRot) { + ItemStack itemStack = renderState.getMainHandItem(); + BakedModel bakedModel = renderState.getMainHandItemModel(); if (bakedModel != null) { poseStack.pushPose(); - float h = 1.0F; - float j = -1.0F; - float k = Mth.abs(dolphinRenderState.xRot) / 60.0F; - if (dolphinRenderState.xRot < 0.0F) { - poseStack.translate(0.0F, 1.0F - k * 0.5F, -1.0F + k * 0.5F); + float f = 1.0F; + float g = -1.0F; + float h = Mth.abs(renderState.xRot) / 60.0F; + if (renderState.xRot < 0.0F) { + poseStack.translate(0.0F, 1.0F - h * 0.5F, -1.0F + h * 0.5F); } else { - poseStack.translate(0.0F, 1.0F + k * 0.8F, -1.0F + k * 0.2F); + poseStack.translate(0.0F, 1.0F + h * 0.8F, -1.0F + h * 0.2F); } - this.itemRenderer.render(itemStack, ItemDisplayContext.GROUND, false, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY, bakedModel); + this.itemRenderer.render(itemStack, ItemDisplayContext.GROUND, false, poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY, bakedModel); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/entity/layers/DrownedOuterLayer.java b/net/minecraft/client/renderer/entity/layers/DrownedOuterLayer.java index e6f065e1..49fb06ba 100644 --- a/net/minecraft/client/renderer/entity/layers/DrownedOuterLayer.java +++ b/net/minecraft/client/renderer/entity/layers/DrownedOuterLayer.java @@ -23,8 +23,8 @@ public class DrownedOuterLayer extends RenderLayer layerTextureLookup; private final Function trimSpriteLookup; - public EquipmentLayerRenderer(EquipmentModelSet equipmentModelSet, TextureAtlas textureAtlas) { - this.equipmentModels = equipmentModelSet; + public EquipmentLayerRenderer(EquipmentModelSet equipmentModels, TextureAtlas trimsAtlas) { + this.equipmentModels = equipmentModels; this.layerTextureLookup = Util.memoize( (Function)(layerTextureKey -> layerTextureKey.layer.getTextureLocation(layerTextureKey.layerType)) ); this.trimSpriteLookup = Util.memoize((Function)(trimSpriteKey -> { ResourceLocation resourceLocation = trimSpriteKey.trim.getTexture(trimSpriteKey.layerType, trimSpriteKey.equipmentModelId); - return textureAtlas.getSprite(resourceLocation); + return trimsAtlas.getSprite(resourceLocation); })); } public void renderLayers( EquipmentModel.LayerType layerType, - ResourceLocation resourceLocation, - Model model, - ItemStack itemStack, + ResourceLocation equipmentModel, + Model armorModel, + ItemStack item, PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i + MultiBufferSource bufferSource, + int packedLight ) { - this.renderLayers(layerType, resourceLocation, model, itemStack, poseStack, multiBufferSource, i, null); + this.renderLayers(layerType, equipmentModel, armorModel, item, poseStack, bufferSource, packedLight, null); } public void renderLayers( EquipmentModel.LayerType layerType, - ResourceLocation resourceLocation, - Model model, - ItemStack itemStack, + ResourceLocation equipmentModel, + Model armorModel, + ItemStack item, PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i, - @Nullable ResourceLocation resourceLocation2 + MultiBufferSource bufferSource, + int packedLight, + @Nullable ResourceLocation playerTexture ) { - List list = this.equipmentModels.get(resourceLocation).getLayers(layerType); + List list = this.equipmentModels.get(equipmentModel).getLayers(layerType); if (!list.isEmpty()) { - int j = itemStack.is(ItemTags.DYEABLE) ? DyedItemColor.getOrDefault(itemStack, 0) : 0; - boolean bl = itemStack.hasFoil(); + int i = item.is(ItemTags.DYEABLE) ? DyedItemColor.getOrDefault(item, 0) : 0; + boolean bl = item.hasFoil(); for (EquipmentModel.Layer layer : list) { - int k = getColorForLayer(layer, j); - if (k != 0) { - ResourceLocation resourceLocation3 = layer.usePlayerTexture() && resourceLocation2 != null - ? resourceLocation2 + int j = getColorForLayer(layer, i); + if (j != 0) { + ResourceLocation resourceLocation = layer.usePlayerTexture() && playerTexture != null + ? playerTexture : (ResourceLocation)this.layerTextureLookup.apply(new EquipmentLayerRenderer.LayerTextureKey(layerType, layer)); - VertexConsumer vertexConsumer = ItemRenderer.getArmorFoilBuffer(multiBufferSource, RenderType.armorCutoutNoCull(resourceLocation3), bl); - model.renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY, k); + VertexConsumer vertexConsumer = ItemRenderer.getArmorFoilBuffer(bufferSource, RenderType.armorCutoutNoCull(resourceLocation), bl); + armorModel.renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY, j); bl = false; } } - ArmorTrim armorTrim = itemStack.get(DataComponents.TRIM); + ArmorTrim armorTrim = item.get(DataComponents.TRIM); if (armorTrim != null) { TextureAtlasSprite textureAtlasSprite = (TextureAtlasSprite)this.trimSpriteLookup - .apply(new EquipmentLayerRenderer.TrimSpriteKey(armorTrim, layerType, resourceLocation)); - VertexConsumer vertexConsumer2 = textureAtlasSprite.wrap(multiBufferSource.getBuffer(Sheets.armorTrimsSheet(armorTrim.pattern().value().decal()))); - model.renderToBuffer(poseStack, vertexConsumer2, i, OverlayTexture.NO_OVERLAY); + .apply(new EquipmentLayerRenderer.TrimSpriteKey(armorTrim, layerType, equipmentModel)); + VertexConsumer vertexConsumer2 = textureAtlasSprite.wrap(bufferSource.getBuffer(Sheets.armorTrimsSheet(armorTrim.pattern().value().decal()))); + armorModel.renderToBuffer(poseStack, vertexConsumer2, packedLight, OverlayTexture.NO_OVERLAY); } } } - private static int getColorForLayer(EquipmentModel.Layer layer, int i) { + private static int getColorForLayer(EquipmentModel.Layer layer, int color) { Optional optional = layer.dyeable(); if (optional.isPresent()) { - int j = (Integer)((EquipmentModel.Dyeable)optional.get()).colorWhenUndyed().map(ARGB::opaque).orElse(0); - return i != 0 ? i : j; + int i = (Integer)((EquipmentModel.Dyeable)optional.get()).colorWhenUndyed().map(ARGB::opaque).orElse(0); + return color != 0 ? color : i; } else { return -1; } diff --git a/net/minecraft/client/renderer/entity/layers/EyesLayer.java b/net/minecraft/client/renderer/entity/layers/EyesLayer.java index ed21707a..697aa248 100644 --- a/net/minecraft/client/renderer/entity/layers/EyesLayer.java +++ b/net/minecraft/client/renderer/entity/layers/EyesLayer.java @@ -13,14 +13,14 @@ import net.minecraft.client.renderer.texture.OverlayTexture; @Environment(EnvType.CLIENT) public abstract class EyesLayer> extends RenderLayer { - public EyesLayer(RenderLayerParent renderer) { - super(renderer); + public EyesLayer(RenderLayerParent renderLayerParent) { + super(renderLayerParent); } @Override - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S entityRenderState, float f, float g) { - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(this.renderType()); - this.getParentModel().renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot) { + VertexConsumer vertexConsumer = bufferSource.getBuffer(this.renderType()); + this.getParentModel().renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY); } public abstract RenderType renderType(); diff --git a/net/minecraft/client/renderer/entity/layers/FoxHeldItemLayer.java b/net/minecraft/client/renderer/entity/layers/FoxHeldItemLayer.java index 2da88d5b..c794cd49 100644 --- a/net/minecraft/client/renderer/entity/layers/FoxHeldItemLayer.java +++ b/net/minecraft/client/renderer/entity/layers/FoxHeldItemLayer.java @@ -18,28 +18,28 @@ import net.minecraft.world.item.ItemStack; public class FoxHeldItemLayer extends RenderLayer { private final ItemRenderer itemRenderer; - public FoxHeldItemLayer(RenderLayerParent renderLayerParent, ItemRenderer itemRenderer) { - super(renderLayerParent); + public FoxHeldItemLayer(RenderLayerParent renderer, ItemRenderer itemRenderer) { + super(renderer); this.itemRenderer = itemRenderer; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, FoxRenderState foxRenderState, float f, float g) { - BakedModel bakedModel = foxRenderState.getMainHandItemModel(); - ItemStack itemStack = foxRenderState.getMainHandItem(); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, FoxRenderState renderState, float yRot, float xRot) { + BakedModel bakedModel = renderState.getMainHandItemModel(); + ItemStack itemStack = renderState.getMainHandItem(); if (bakedModel != null && !itemStack.isEmpty()) { - boolean bl = foxRenderState.isSleeping; - boolean bl2 = foxRenderState.isBaby; + boolean bl = renderState.isSleeping; + boolean bl2 = renderState.isBaby; poseStack.pushPose(); poseStack.translate(this.getParentModel().head.x / 16.0F, this.getParentModel().head.y / 16.0F, this.getParentModel().head.z / 16.0F); if (bl2) { - float h = 0.75F; + float f = 0.75F; poseStack.scale(0.75F, 0.75F, 0.75F); } - poseStack.mulPose(Axis.ZP.rotation(foxRenderState.headRollAngle)); - poseStack.mulPose(Axis.YP.rotationDegrees(f)); - poseStack.mulPose(Axis.XP.rotationDegrees(g)); - if (foxRenderState.isBaby) { + poseStack.mulPose(Axis.ZP.rotation(renderState.headRollAngle)); + poseStack.mulPose(Axis.YP.rotationDegrees(yRot)); + poseStack.mulPose(Axis.XP.rotationDegrees(xRot)); + if (renderState.isBaby) { if (bl) { poseStack.translate(0.4F, 0.26F, 0.15F); } else { @@ -56,7 +56,7 @@ public class FoxHeldItemLayer extends RenderLayer { poseStack.mulPose(Axis.ZP.rotationDegrees(90.0F)); } - this.itemRenderer.render(itemStack, ItemDisplayContext.GROUND, false, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY, bakedModel); + this.itemRenderer.render(itemStack, ItemDisplayContext.GROUND, false, poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY, bakedModel); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/entity/layers/HorseArmorLayer.java b/net/minecraft/client/renderer/entity/layers/HorseArmorLayer.java index 42412743..bd7097ae 100644 --- a/net/minecraft/client/renderer/entity/layers/HorseArmorLayer.java +++ b/net/minecraft/client/renderer/entity/layers/HorseArmorLayer.java @@ -21,23 +21,21 @@ public class HorseArmorLayer extends RenderLayer { private final HorseModel babyModel; private final EquipmentLayerRenderer equipmentRenderer; - public HorseArmorLayer( - RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, EquipmentLayerRenderer equipmentLayerRenderer - ) { - super(renderLayerParent); - this.equipmentRenderer = equipmentLayerRenderer; - this.adultModel = new HorseModel(entityModelSet.bakeLayer(ModelLayers.HORSE_ARMOR)); - this.babyModel = new HorseModel(entityModelSet.bakeLayer(ModelLayers.HORSE_BABY_ARMOR)); + public HorseArmorLayer(RenderLayerParent renderer, EntityModelSet entityModels, EquipmentLayerRenderer equipmentRenderer) { + super(renderer); + this.equipmentRenderer = equipmentRenderer; + this.adultModel = new HorseModel(entityModels.bakeLayer(ModelLayers.HORSE_ARMOR)); + this.babyModel = new HorseModel(entityModels.bakeLayer(ModelLayers.HORSE_BABY_ARMOR)); } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, HorseRenderState horseRenderState, float f, float g) { - ItemStack itemStack = horseRenderState.bodyArmorItem; + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, HorseRenderState renderState, float yRot, float xRot) { + ItemStack itemStack = renderState.bodyArmorItem; Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); if (equippable != null && !equippable.model().isEmpty()) { - HorseModel horseModel = horseRenderState.isBaby ? this.babyModel : this.adultModel; + HorseModel horseModel = renderState.isBaby ? this.babyModel : this.adultModel; ResourceLocation resourceLocation = (ResourceLocation)equippable.model().get(); - horseModel.setupAnim(horseRenderState); - this.equipmentRenderer.renderLayers(EquipmentModel.LayerType.HORSE_BODY, resourceLocation, horseModel, itemStack, poseStack, multiBufferSource, i); + horseModel.setupAnim(renderState); + this.equipmentRenderer.renderLayers(EquipmentModel.LayerType.HORSE_BODY, resourceLocation, horseModel, itemStack, poseStack, bufferSource, packedLight); } } } diff --git a/net/minecraft/client/renderer/entity/layers/HorseMarkingLayer.java b/net/minecraft/client/renderer/entity/layers/HorseMarkingLayer.java index 43910213..54a4bc55 100644 --- a/net/minecraft/client/renderer/entity/layers/HorseMarkingLayer.java +++ b/net/minecraft/client/renderer/entity/layers/HorseMarkingLayer.java @@ -30,11 +30,11 @@ public class HorseMarkingLayer extends RenderLayer super(renderer); } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, HorseRenderState horseRenderState, float f, float g) { - ResourceLocation resourceLocation = (ResourceLocation)LOCATION_BY_MARKINGS.get(horseRenderState.markings); - if (resourceLocation != null && !horseRenderState.isInvisible) { - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.entityTranslucent(resourceLocation)); - this.getParentModel().renderToBuffer(poseStack, vertexConsumer, i, LivingEntityRenderer.getOverlayCoords(horseRenderState, 0.0F)); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, HorseRenderState renderState, float yRot, float xRot) { + ResourceLocation resourceLocation = (ResourceLocation)LOCATION_BY_MARKINGS.get(renderState.markings); + if (resourceLocation != null && !renderState.isInvisible) { + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.entityTranslucent(resourceLocation)); + this.getParentModel().renderToBuffer(poseStack, vertexConsumer, packedLight, LivingEntityRenderer.getOverlayCoords(renderState, 0.0F)); } } } diff --git a/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java b/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java index bfeb3fd5..45eba9e2 100644 --- a/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java +++ b/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java @@ -22,60 +22,45 @@ public class HumanoidArmorLayer renderLayerParent, A humanoidModel, A humanoidModel2, EquipmentLayerRenderer equipmentLayerRenderer) { - this(renderLayerParent, humanoidModel, humanoidModel2, humanoidModel, humanoidModel2, equipmentLayerRenderer); + public HumanoidArmorLayer(RenderLayerParent renderer, A innerModel, A outerModel, EquipmentLayerRenderer equipmentRenderer) { + this(renderer, innerModel, outerModel, innerModel, outerModel, equipmentRenderer); } public HumanoidArmorLayer( - RenderLayerParent renderLayerParent, - A humanoidModel, - A humanoidModel2, - A humanoidModel3, - A humanoidModel4, - EquipmentLayerRenderer equipmentLayerRenderer + RenderLayerParent renderer, A innerModel, A outerModel, A innerModelBaby, A outerModelBaby, EquipmentLayerRenderer equipmentRenderer ) { - super(renderLayerParent); - this.innerModel = humanoidModel; - this.outerModel = humanoidModel2; - this.innerModelBaby = humanoidModel3; - this.outerModelBaby = humanoidModel4; - this.equipmentRenderer = equipmentLayerRenderer; + super(renderer); + this.innerModel = innerModel; + this.outerModel = outerModel; + this.innerModelBaby = innerModelBaby; + this.outerModelBaby = outerModelBaby; + this.equipmentRenderer = equipmentRenderer; } - public static boolean shouldRender(ItemStack itemStack, EquipmentSlot equipmentSlot) { - Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); - return equippable != null && shouldRender(equippable, equipmentSlot); + public static boolean shouldRender(ItemStack stack, EquipmentSlot slot) { + Equippable equippable = stack.get(DataComponents.EQUIPPABLE); + return equippable != null && shouldRender(equippable, slot); } - private static boolean shouldRender(Equippable equippable, EquipmentSlot equipmentSlot) { - return equippable.model().isPresent() && equippable.slot() == equipmentSlot; + private static boolean shouldRender(Equippable equippable, EquipmentSlot slot) { + return equippable.model().isPresent() && equippable.slot() == slot; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S humanoidRenderState, float f, float g) { - this.renderArmorPiece( - poseStack, multiBufferSource, humanoidRenderState.chestItem, EquipmentSlot.CHEST, i, this.getArmorModel(humanoidRenderState, EquipmentSlot.CHEST) - ); - this.renderArmorPiece( - poseStack, multiBufferSource, humanoidRenderState.legsItem, EquipmentSlot.LEGS, i, this.getArmorModel(humanoidRenderState, EquipmentSlot.LEGS) - ); - this.renderArmorPiece( - poseStack, multiBufferSource, humanoidRenderState.feetItem, EquipmentSlot.FEET, i, this.getArmorModel(humanoidRenderState, EquipmentSlot.FEET) - ); - this.renderArmorPiece( - poseStack, multiBufferSource, humanoidRenderState.headItem, EquipmentSlot.HEAD, i, this.getArmorModel(humanoidRenderState, EquipmentSlot.HEAD) - ); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot) { + this.renderArmorPiece(poseStack, bufferSource, renderState.chestItem, EquipmentSlot.CHEST, packedLight, this.getArmorModel(renderState, EquipmentSlot.CHEST)); + this.renderArmorPiece(poseStack, bufferSource, renderState.legsItem, EquipmentSlot.LEGS, packedLight, this.getArmorModel(renderState, EquipmentSlot.LEGS)); + this.renderArmorPiece(poseStack, bufferSource, renderState.feetItem, EquipmentSlot.FEET, packedLight, this.getArmorModel(renderState, EquipmentSlot.FEET)); + this.renderArmorPiece(poseStack, bufferSource, renderState.headItem, EquipmentSlot.HEAD, packedLight, this.getArmorModel(renderState, EquipmentSlot.HEAD)); } - private void renderArmorPiece( - PoseStack poseStack, MultiBufferSource multiBufferSource, ItemStack itemStack, EquipmentSlot equipmentSlot, int i, A humanoidModel - ) { - Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); - if (equippable != null && shouldRender(equippable, equipmentSlot)) { - this.getParentModel().copyPropertiesTo(humanoidModel); - this.setPartVisibility(humanoidModel, equipmentSlot); + private void renderArmorPiece(PoseStack poseStack, MultiBufferSource bufferSource, ItemStack armorItem, EquipmentSlot slot, int packedLight, A model) { + Equippable equippable = armorItem.get(DataComponents.EQUIPPABLE); + if (equippable != null && shouldRender(equippable, slot)) { + this.getParentModel().copyPropertiesTo(model); + this.setPartVisibility(model, slot); ResourceLocation resourceLocation = (ResourceLocation)equippable.model().orElseThrow(); - EquipmentModel.LayerType layerType = this.usesInnerModel(equipmentSlot) ? EquipmentModel.LayerType.HUMANOID_LEGGINGS : EquipmentModel.LayerType.HUMANOID; - this.equipmentRenderer.renderLayers(layerType, resourceLocation, humanoidModel, itemStack, poseStack, multiBufferSource, i); + EquipmentModel.LayerType layerType = this.usesInnerModel(slot) ? EquipmentModel.LayerType.HUMANOID_LEGGINGS : EquipmentModel.LayerType.HUMANOID; + this.equipmentRenderer.renderLayers(layerType, resourceLocation, model, armorItem, poseStack, bufferSource, packedLight); } } @@ -102,11 +87,11 @@ public class HumanoidArmorLayer renderer) { - super(renderer); + public IronGolemCrackinessLayer(RenderLayerParent renderLayerParent) { + super(renderLayerParent); } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, IronGolemRenderState ironGolemRenderState, float f, float g) { diff --git a/net/minecraft/client/renderer/entity/layers/IronGolemFlowerLayer.java b/net/minecraft/client/renderer/entity/layers/IronGolemFlowerLayer.java index 827c9238..2991b2bc 100644 --- a/net/minecraft/client/renderer/entity/layers/IronGolemFlowerLayer.java +++ b/net/minecraft/client/renderer/entity/layers/IronGolemFlowerLayer.java @@ -22,18 +22,18 @@ public class IronGolemFlowerLayer extends RenderLayer & ArmedModel> extends RenderLayer { private final ItemRenderer itemRenderer; - public ItemInHandLayer(RenderLayerParent renderLayerParent, ItemRenderer itemRenderer) { - super(renderLayerParent); + public ItemInHandLayer(RenderLayerParent renderer, ItemRenderer itemRenderer) { + super(renderer); this.itemRenderer = itemRenderer; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S livingEntityRenderState, float f, float g) { + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot) { this.renderArmWithItem( - livingEntityRenderState, - livingEntityRenderState.rightHandItemModel, - livingEntityRenderState.rightHandItem, + renderState, + renderState.rightHandItemModel, + renderState.rightHandItem, ItemDisplayContext.THIRD_PERSON_RIGHT_HAND, HumanoidArm.RIGHT, poseStack, - multiBufferSource, - i + bufferSource, + packedLight ); this.renderArmWithItem( - livingEntityRenderState, - livingEntityRenderState.leftHandItemModel, - livingEntityRenderState.leftHandItem, + renderState, + renderState.leftHandItemModel, + renderState.leftHandItem, ItemDisplayContext.THIRD_PERSON_LEFT_HAND, HumanoidArm.LEFT, poseStack, - multiBufferSource, - i + bufferSource, + packedLight ); } protected void renderArmWithItem( - S livingEntityRenderState, - @Nullable BakedModel bakedModel, - ItemStack itemStack, - ItemDisplayContext itemDisplayContext, - HumanoidArm humanoidArm, + S renderState, + @Nullable BakedModel itemModel, + ItemStack item, + ItemDisplayContext displayContext, + HumanoidArm arm, PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i + MultiBufferSource bufferSource, + int packedLight ) { - if (bakedModel != null && !itemStack.isEmpty()) { + if (itemModel != null && !item.isEmpty()) { poseStack.pushPose(); - this.getParentModel().translateToHand(humanoidArm, poseStack); + this.getParentModel().translateToHand(arm, poseStack); poseStack.mulPose(Axis.XP.rotationDegrees(-90.0F)); poseStack.mulPose(Axis.YP.rotationDegrees(180.0F)); - boolean bl = humanoidArm == HumanoidArm.LEFT; + boolean bl = arm == HumanoidArm.LEFT; poseStack.translate((bl ? -1 : 1) / 16.0F, 0.125F, -0.625F); - this.itemRenderer.render(itemStack, itemDisplayContext, bl, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY, bakedModel); + this.itemRenderer.render(item, displayContext, bl, poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY, itemModel); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/entity/layers/LivingEntityEmissiveLayer.java b/net/minecraft/client/renderer/entity/layers/LivingEntityEmissiveLayer.java index f909a22f..118aff13 100644 --- a/net/minecraft/client/renderer/entity/layers/LivingEntityEmissiveLayer.java +++ b/net/minecraft/client/renderer/entity/layers/LivingEntityEmissiveLayer.java @@ -25,33 +25,33 @@ public class LivingEntityEmissiveLayer bufferProvider; public LivingEntityEmissiveLayer( - RenderLayerParent renderLayerParent, - ResourceLocation resourceLocation, + RenderLayerParent renderer, + ResourceLocation texture, LivingEntityEmissiveLayer.AlphaFunction alphaFunction, LivingEntityEmissiveLayer.DrawSelector drawSelector, - Function function + Function bufferProvider ) { - super(renderLayerParent); - this.texture = resourceLocation; + super(renderer); + this.texture = texture; this.alphaFunction = alphaFunction; this.drawSelector = drawSelector; - this.bufferProvider = function; + this.bufferProvider = bufferProvider; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S livingEntityRenderState, float f, float g) { - if (!livingEntityRenderState.isInvisible) { - if (this.onlyDrawSelectedParts(livingEntityRenderState)) { - VertexConsumer vertexConsumer = multiBufferSource.getBuffer((RenderType)this.bufferProvider.apply(this.texture)); - float h = this.alphaFunction.apply(livingEntityRenderState, livingEntityRenderState.ageInTicks); - int j = ARGB.color(Mth.floor(h * 255.0F), 255, 255, 255); - this.getParentModel().renderToBuffer(poseStack, vertexConsumer, i, LivingEntityRenderer.getOverlayCoords(livingEntityRenderState, 0.0F), j); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot) { + if (!renderState.isInvisible) { + if (this.onlyDrawSelectedParts(renderState)) { + VertexConsumer vertexConsumer = bufferSource.getBuffer((RenderType)this.bufferProvider.apply(this.texture)); + float f = this.alphaFunction.apply(renderState, renderState.ageInTicks); + int i = ARGB.color(Mth.floor(f * 255.0F), 255, 255, 255); + this.getParentModel().renderToBuffer(poseStack, vertexConsumer, packedLight, LivingEntityRenderer.getOverlayCoords(renderState, 0.0F), i); this.resetDrawForAllParts(); } } } - private boolean onlyDrawSelectedParts(S livingEntityRenderState) { - List list = this.drawSelector.getPartsToDraw(this.getParentModel(), livingEntityRenderState); + private boolean onlyDrawSelectedParts(S renderState) { + List list = this.drawSelector.getPartsToDraw(this.getParentModel(), renderState); if (list.isEmpty()) { return false; } else { diff --git a/net/minecraft/client/renderer/entity/layers/LlamaDecorLayer.java b/net/minecraft/client/renderer/entity/layers/LlamaDecorLayer.java index 1a856edf..a6db5901 100644 --- a/net/minecraft/client/renderer/entity/layers/LlamaDecorLayer.java +++ b/net/minecraft/client/renderer/entity/layers/LlamaDecorLayer.java @@ -22,30 +22,28 @@ public class LlamaDecorLayer extends RenderLayer { private final LlamaModel babyModel; private final EquipmentLayerRenderer equipmentRenderer; - public LlamaDecorLayer( - RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, EquipmentLayerRenderer equipmentLayerRenderer - ) { - super(renderLayerParent); - this.equipmentRenderer = equipmentLayerRenderer; - this.adultModel = new LlamaModel(entityModelSet.bakeLayer(ModelLayers.LLAMA_DECOR)); - this.babyModel = new LlamaModel(entityModelSet.bakeLayer(ModelLayers.LLAMA_BABY_DECOR)); + public LlamaDecorLayer(RenderLayerParent renderer, EntityModelSet models, EquipmentLayerRenderer equipmentRenderer) { + super(renderer); + this.equipmentRenderer = equipmentRenderer; + this.adultModel = new LlamaModel(models.bakeLayer(ModelLayers.LLAMA_DECOR)); + this.babyModel = new LlamaModel(models.bakeLayer(ModelLayers.LLAMA_BABY_DECOR)); } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, LlamaRenderState llamaRenderState, float f, float g) { - ItemStack itemStack = llamaRenderState.bodyItem; + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, LlamaRenderState renderState, float yRot, float xRot) { + ItemStack itemStack = renderState.bodyItem; Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); if (equippable != null && equippable.model().isPresent()) { - this.renderEquipment(poseStack, multiBufferSource, llamaRenderState, itemStack, (ResourceLocation)equippable.model().get(), i); - } else if (llamaRenderState.isTraderLlama) { - this.renderEquipment(poseStack, multiBufferSource, llamaRenderState, ItemStack.EMPTY, EquipmentModels.TRADER_LLAMA, i); + this.renderEquipment(poseStack, bufferSource, renderState, itemStack, (ResourceLocation)equippable.model().get(), packedLight); + } else if (renderState.isTraderLlama) { + this.renderEquipment(poseStack, bufferSource, renderState, ItemStack.EMPTY, EquipmentModels.TRADER_LLAMA, packedLight); } } private void renderEquipment( - PoseStack poseStack, MultiBufferSource multiBufferSource, LlamaRenderState llamaRenderState, ItemStack itemStack, ResourceLocation resourceLocation, int i + PoseStack poseStack, MultiBufferSource bufferSource, LlamaRenderState renderState, ItemStack item, ResourceLocation equipmentModel, int packedLight ) { - LlamaModel llamaModel = llamaRenderState.isBaby ? this.babyModel : this.adultModel; - llamaModel.setupAnim(llamaRenderState); - this.equipmentRenderer.renderLayers(EquipmentModel.LayerType.LLAMA_BODY, resourceLocation, llamaModel, itemStack, poseStack, multiBufferSource, i); + LlamaModel llamaModel = renderState.isBaby ? this.babyModel : this.adultModel; + llamaModel.setupAnim(renderState); + this.equipmentRenderer.renderLayers(EquipmentModel.LayerType.LLAMA_BODY, equipmentModel, llamaModel, item, poseStack, bufferSource, packedLight); } } diff --git a/net/minecraft/client/renderer/entity/layers/MushroomCowMushroomLayer.java b/net/minecraft/client/renderer/entity/layers/MushroomCowMushroomLayer.java index 14be15b4..1510b126 100644 --- a/net/minecraft/client/renderer/entity/layers/MushroomCowMushroomLayer.java +++ b/net/minecraft/client/renderer/entity/layers/MushroomCowMushroomLayer.java @@ -24,19 +24,19 @@ public class MushroomCowMushroomLayer extends RenderLayer { private final ItemRenderer itemRenderer; - public PandaHoldsItemLayer(RenderLayerParent renderLayerParent, ItemRenderer itemRenderer) { - super(renderLayerParent); + public PandaHoldsItemLayer(RenderLayerParent renderer, ItemRenderer itemRenderer) { + super(renderer); this.itemRenderer = itemRenderer; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, PandaRenderState pandaRenderState, float f, float g) { - BakedModel bakedModel = pandaRenderState.getMainHandItemModel(); - if (bakedModel != null && pandaRenderState.isSitting && !pandaRenderState.isScared) { - float h = -0.6F; - float j = 1.4F; - if (pandaRenderState.isEating) { - h -= 0.2F * Mth.sin(pandaRenderState.ageInTicks * 0.6F) + 0.2F; - j -= 0.09F * Mth.sin(pandaRenderState.ageInTicks * 0.6F); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, PandaRenderState renderState, float yRot, float xRot) { + BakedModel bakedModel = renderState.getMainHandItemModel(); + if (bakedModel != null && renderState.isSitting && !renderState.isScared) { + float f = -0.6F; + float g = 1.4F; + if (renderState.isEating) { + f -= 0.2F * Mth.sin(renderState.ageInTicks * 0.6F) + 0.2F; + g -= 0.09F * Mth.sin(renderState.ageInTicks * 0.6F); } poseStack.pushPose(); - poseStack.translate(0.1F, j, h); - ItemStack itemStack = pandaRenderState.getMainHandItem(); - this.itemRenderer.render(itemStack, ItemDisplayContext.GROUND, false, poseStack, multiBufferSource, i, OverlayTexture.NO_OVERLAY, bakedModel); + poseStack.translate(0.1F, g, f); + ItemStack itemStack = renderState.getMainHandItem(); + this.itemRenderer.render(itemStack, ItemDisplayContext.GROUND, false, poseStack, bufferSource, packedLight, OverlayTexture.NO_OVERLAY, bakedModel); poseStack.popPose(); } } diff --git a/net/minecraft/client/renderer/entity/layers/ParrotOnShoulderLayer.java b/net/minecraft/client/renderer/entity/layers/ParrotOnShoulderLayer.java index 87cd7f72..7ba63fcb 100644 --- a/net/minecraft/client/renderer/entity/layers/ParrotOnShoulderLayer.java +++ b/net/minecraft/client/renderer/entity/layers/ParrotOnShoulderLayer.java @@ -26,31 +26,38 @@ public class ParrotOnShoulderLayer extends RenderLayer renderLayerParent, ItemRenderer itemRenderer) { - super(renderLayerParent, itemRenderer); + public PlayerItemInHandLayer(RenderLayerParent renderer, ItemRenderer itemRenderer) { + super(renderer, itemRenderer); this.itemRenderer = itemRenderer; } protected void renderArmWithItem( - S playerRenderState, - @Nullable BakedModel bakedModel, - ItemStack itemStack, - ItemDisplayContext itemDisplayContext, - HumanoidArm humanoidArm, + S renderState, + @Nullable BakedModel itemModel, + ItemStack item, + ItemDisplayContext displayContext, + HumanoidArm arm, PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i + MultiBufferSource bufferSource, + int packedLight ) { - if (bakedModel != null) { - InteractionHand interactionHand = humanoidArm == playerRenderState.mainArm ? InteractionHand.MAIN_HAND : InteractionHand.OFF_HAND; - if (playerRenderState.isUsingItem - && playerRenderState.useItemHand == interactionHand - && playerRenderState.attackTime < 1.0E-5F - && itemStack.is(Items.SPYGLASS)) { - this.renderArmWithSpyglass(bakedModel, itemStack, humanoidArm, poseStack, multiBufferSource, i); + if (itemModel != null) { + InteractionHand interactionHand = arm == renderState.mainArm ? InteractionHand.MAIN_HAND : InteractionHand.OFF_HAND; + if (renderState.isUsingItem && renderState.useItemHand == interactionHand && renderState.attackTime < 1.0E-5F && item.is(Items.SPYGLASS)) { + this.renderArmWithSpyglass(itemModel, item, arm, poseStack, bufferSource, packedLight); } else { - super.renderArmWithItem(playerRenderState, bakedModel, itemStack, itemDisplayContext, humanoidArm, poseStack, multiBufferSource, i); + super.renderArmWithItem(renderState, itemModel, item, displayContext, arm, poseStack, bufferSource, packedLight); } } } - private void renderArmWithSpyglass( - BakedModel bakedModel, ItemStack itemStack, HumanoidArm humanoidArm, PoseStack poseStack, MultiBufferSource multiBufferSource, int i - ) { + private void renderArmWithSpyglass(BakedModel model, ItemStack item, HumanoidArm arm, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight) { poseStack.pushPose(); this.getParentModel().root().translateAndRotate(poseStack); ModelPart modelPart = this.getParentModel().getHead(); @@ -66,9 +61,9 @@ public class PlayerItemInHandLayer void coloredCutoutModelCopyLayerRender( - EntityModel entityModel, - ResourceLocation resourceLocation, - PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i, - S livingEntityRenderState, - int j + EntityModel model, ResourceLocation textureLocation, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, int color ) { - if (!livingEntityRenderState.isInvisible) { - entityModel.setupAnim(livingEntityRenderState); - renderColoredCutoutModel(entityModel, resourceLocation, poseStack, multiBufferSource, i, livingEntityRenderState, j); + if (!renderState.isInvisible) { + model.setupAnim(renderState); + renderColoredCutoutModel(model, textureLocation, poseStack, bufferSource, packedLight, renderState, color); } } protected static void renderColoredCutoutModel( - EntityModel entityModel, - ResourceLocation resourceLocation, + EntityModel model, + ResourceLocation textureLocation, PoseStack poseStack, - MultiBufferSource multiBufferSource, - int i, - LivingEntityRenderState livingEntityRenderState, - int j + MultiBufferSource bufferSource, + int packedLight, + LivingEntityRenderState renderState, + int color ) { - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.entityCutoutNoCull(resourceLocation)); - entityModel.renderToBuffer(poseStack, vertexConsumer, i, LivingEntityRenderer.getOverlayCoords(livingEntityRenderState, 0.0F), j); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.entityCutoutNoCull(textureLocation)); + model.renderToBuffer(poseStack, vertexConsumer, packedLight, LivingEntityRenderer.getOverlayCoords(renderState, 0.0F), color); } public M getParentModel() { return this.renderer.getModel(); } - public abstract void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S entityRenderState, float f, float g); + public abstract void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot); } diff --git a/net/minecraft/client/renderer/entity/layers/SaddleLayer.java b/net/minecraft/client/renderer/entity/layers/SaddleLayer.java index b320f866..051a83b7 100644 --- a/net/minecraft/client/renderer/entity/layers/SaddleLayer.java +++ b/net/minecraft/client/renderer/entity/layers/SaddleLayer.java @@ -19,23 +19,23 @@ public class SaddleLayer renderLayerParent, M entityModel, M entityModel2, ResourceLocation resourceLocation) { - super(renderLayerParent); - this.adultModel = entityModel; - this.babyModel = entityModel2; - this.textureLocation = resourceLocation; + public SaddleLayer(RenderLayerParent renderer, M adultModel, M babyModel, ResourceLocation textureLocation) { + super(renderer); + this.adultModel = adultModel; + this.babyModel = babyModel; + this.textureLocation = textureLocation; } public SaddleLayer(RenderLayerParent renderer, M model, ResourceLocation textureLocation) { this(renderer, model, model, textureLocation); } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S livingEntityRenderState, float f, float g) { - if (livingEntityRenderState.isSaddled()) { - M entityModel = livingEntityRenderState.isBaby ? this.babyModel : this.adultModel; - entityModel.setupAnim(livingEntityRenderState); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.entityCutoutNoCull(this.textureLocation)); - entityModel.renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot) { + if (renderState.isSaddled()) { + M entityModel = renderState.isBaby ? this.babyModel : this.adultModel; + entityModel.setupAnim(renderState); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.entityCutoutNoCull(this.textureLocation)); + entityModel.renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY); } } } diff --git a/net/minecraft/client/renderer/entity/layers/SheepWoolLayer.java b/net/minecraft/client/renderer/entity/layers/SheepWoolLayer.java index cd9b7dd8..515df62a 100644 --- a/net/minecraft/client/renderer/entity/layers/SheepWoolLayer.java +++ b/net/minecraft/client/renderer/entity/layers/SheepWoolLayer.java @@ -26,39 +26,39 @@ public class SheepWoolLayer extends RenderLayer { private final EntityModel adultModel; private final EntityModel babyModel; - public SheepWoolLayer(RenderLayerParent renderLayerParent, EntityModelSet entityModelSet) { - super(renderLayerParent); - this.adultModel = new SheepFurModel(entityModelSet.bakeLayer(ModelLayers.SHEEP_WOOL)); - this.babyModel = new SheepFurModel(entityModelSet.bakeLayer(ModelLayers.SHEEP_BABY_WOOL)); + public SheepWoolLayer(RenderLayerParent renderer, EntityModelSet modelSet) { + super(renderer); + this.adultModel = new SheepFurModel(modelSet.bakeLayer(ModelLayers.SHEEP_WOOL)); + this.babyModel = new SheepFurModel(modelSet.bakeLayer(ModelLayers.SHEEP_BABY_WOOL)); } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, SheepRenderState sheepRenderState, float f, float g) { - if (!sheepRenderState.isSheared) { - EntityModel entityModel = sheepRenderState.isBaby ? this.babyModel : this.adultModel; - if (sheepRenderState.isInvisible) { - if (sheepRenderState.appearsGlowing) { - entityModel.setupAnim(sheepRenderState); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.outline(SHEEP_FUR_LOCATION)); - entityModel.renderToBuffer(poseStack, vertexConsumer, i, LivingEntityRenderer.getOverlayCoords(sheepRenderState, 0.0F), -16777216); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, SheepRenderState renderState, float yRot, float xRot) { + if (!renderState.isSheared) { + EntityModel entityModel = renderState.isBaby ? this.babyModel : this.adultModel; + if (renderState.isInvisible) { + if (renderState.appearsGlowing) { + entityModel.setupAnim(renderState); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.outline(SHEEP_FUR_LOCATION)); + entityModel.renderToBuffer(poseStack, vertexConsumer, packedLight, LivingEntityRenderer.getOverlayCoords(renderState, 0.0F), -16777216); } } else { - int r; - if (sheepRenderState.customName != null && "jeb_".equals(sheepRenderState.customName.getString())) { - int j = 25; - int k = Mth.floor(sheepRenderState.ageInTicks); - int l = k / 25 + sheepRenderState.id; - int m = DyeColor.values().length; - int n = l % m; - int o = (l + 1) % m; - float h = (k % 25 + Mth.frac(sheepRenderState.ageInTicks)) / 25.0F; + int q; + if (renderState.customName != null && "jeb_".equals(renderState.customName.getString())) { + int i = 25; + int j = Mth.floor(renderState.ageInTicks); + int k = j / 25 + renderState.id; + int l = DyeColor.values().length; + int m = k % l; + int n = (k + 1) % l; + float f = (j % 25 + Mth.frac(renderState.ageInTicks)) / 25.0F; + int o = Sheep.getColor(DyeColor.byId(m)); int p = Sheep.getColor(DyeColor.byId(n)); - int q = Sheep.getColor(DyeColor.byId(o)); - r = ARGB.lerp(h, p, q); + q = ARGB.lerp(f, o, p); } else { - r = Sheep.getColor(sheepRenderState.woolColor); + q = Sheep.getColor(renderState.woolColor); } - coloredCutoutModelCopyLayerRender(entityModel, SHEEP_FUR_LOCATION, poseStack, multiBufferSource, i, sheepRenderState, r); + coloredCutoutModelCopyLayerRender(entityModel, SHEEP_FUR_LOCATION, poseStack, bufferSource, packedLight, renderState, q); } } } diff --git a/net/minecraft/client/renderer/entity/layers/SkeletonClothingLayer.java b/net/minecraft/client/renderer/entity/layers/SkeletonClothingLayer.java index 5334b36d..5865bbbf 100644 --- a/net/minecraft/client/renderer/entity/layers/SkeletonClothingLayer.java +++ b/net/minecraft/client/renderer/entity/layers/SkeletonClothingLayer.java @@ -23,7 +23,7 @@ public class SkeletonClothingLayer(models.bakeLayer(modelLayerLocation)); } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S skeletonRenderState, float f, float g) { - coloredCutoutModelCopyLayerRender(this.layerModel, this.clothesLocation, poseStack, multiBufferSource, i, skeletonRenderState, -1); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot) { + coloredCutoutModelCopyLayerRender(this.layerModel, this.clothesLocation, poseStack, bufferSource, packedLight, renderState, -1); } } diff --git a/net/minecraft/client/renderer/entity/layers/SlimeOuterLayer.java b/net/minecraft/client/renderer/entity/layers/SlimeOuterLayer.java index 5cef6861..19cb69be 100644 --- a/net/minecraft/client/renderer/entity/layers/SlimeOuterLayer.java +++ b/net/minecraft/client/renderer/entity/layers/SlimeOuterLayer.java @@ -23,18 +23,18 @@ public class SlimeOuterLayer extends RenderLayer { this.model = new SlimeModel(modelSet.bakeLayer(ModelLayers.SLIME_OUTER)); } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, SlimeRenderState slimeRenderState, float f, float g) { - boolean bl = slimeRenderState.appearsGlowing && slimeRenderState.isInvisible; - if (!slimeRenderState.isInvisible || bl) { + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, SlimeRenderState renderState, float yRot, float xRot) { + boolean bl = renderState.appearsGlowing && renderState.isInvisible; + if (!renderState.isInvisible || bl) { VertexConsumer vertexConsumer; if (bl) { - vertexConsumer = multiBufferSource.getBuffer(RenderType.outline(SlimeRenderer.SLIME_LOCATION)); + vertexConsumer = bufferSource.getBuffer(RenderType.outline(SlimeRenderer.SLIME_LOCATION)); } else { - vertexConsumer = multiBufferSource.getBuffer(RenderType.entityTranslucent(SlimeRenderer.SLIME_LOCATION)); + vertexConsumer = bufferSource.getBuffer(RenderType.entityTranslucent(SlimeRenderer.SLIME_LOCATION)); } - this.model.setupAnim(slimeRenderState); - this.model.renderToBuffer(poseStack, vertexConsumer, i, LivingEntityRenderer.getOverlayCoords(slimeRenderState, 0.0F)); + this.model.setupAnim(renderState); + this.model.renderToBuffer(poseStack, vertexConsumer, packedLight, LivingEntityRenderer.getOverlayCoords(renderState, 0.0F)); } } } diff --git a/net/minecraft/client/renderer/entity/layers/SnowGolemHeadLayer.java b/net/minecraft/client/renderer/entity/layers/SnowGolemHeadLayer.java index 81c3b5c2..e0e68edf 100644 --- a/net/minecraft/client/renderer/entity/layers/SnowGolemHeadLayer.java +++ b/net/minecraft/client/renderer/entity/layers/SnowGolemHeadLayer.java @@ -30,39 +30,32 @@ public class SnowGolemHeadLayer extends RenderLayer extends RenderLaye private final StuckInBodyLayer.PlacementStyle placementStyle; public StuckInBodyLayer( - LivingEntityRenderer livingEntityRenderer, - Model model, - ResourceLocation resourceLocation, - StuckInBodyLayer.PlacementStyle placementStyle + LivingEntityRenderer renderer, Model model, ResourceLocation texture, StuckInBodyLayer.PlacementStyle placementStyle ) { - super(livingEntityRenderer); + super(renderer); this.model = model; - this.texture = resourceLocation; + this.texture = texture; this.placementStyle = placementStyle; } - protected abstract int numStuck(PlayerRenderState playerRenderState); + protected abstract int numStuck(PlayerRenderState renderState); - private void renderStuckItem(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, float f, float g, float h) { - float j = Mth.sqrt(f * f + h * h); - float k = (float)(Math.atan2(f, h) * 180.0F / (float)Math.PI); - float l = (float)(Math.atan2(g, j) * 180.0F / (float)Math.PI); - poseStack.mulPose(Axis.YP.rotationDegrees(k - 90.0F)); - poseStack.mulPose(Axis.ZP.rotationDegrees(l)); - this.model.renderToBuffer(poseStack, multiBufferSource.getBuffer(this.model.renderType(this.texture)), i, OverlayTexture.NO_OVERLAY); + private void renderStuckItem(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, float x, float y, float z) { + float f = Mth.sqrt(x * x + z * z); + float g = (float)(Math.atan2(x, z) * 180.0F / (float)Math.PI); + float h = (float)(Math.atan2(y, f) * 180.0F / (float)Math.PI); + poseStack.mulPose(Axis.YP.rotationDegrees(g - 90.0F)); + poseStack.mulPose(Axis.ZP.rotationDegrees(h)); + this.model.renderToBuffer(poseStack, bufferSource.getBuffer(this.model.renderType(this.texture)), packedLight, OverlayTexture.NO_OVERLAY); } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, PlayerRenderState playerRenderState, float f, float g) { - int j = this.numStuck(playerRenderState); - if (j > 0) { - RandomSource randomSource = RandomSource.create(playerRenderState.id); + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, PlayerRenderState renderState, float yRot, float xRot) { + int i = this.numStuck(renderState); + if (i > 0) { + RandomSource randomSource = RandomSource.create(renderState.id); - for (int k = 0; k < j; k++) { + for (int j = 0; j < i; j++) { poseStack.pushPose(); ModelPart modelPart = this.getParentModel().getRandomBodyPart(randomSource); ModelPart.Cube cube = modelPart.getRandomCube(randomSource); modelPart.translateAndRotate(poseStack); + float f = randomSource.nextFloat(); + float g = randomSource.nextFloat(); float h = randomSource.nextFloat(); - float l = randomSource.nextFloat(); - float m = randomSource.nextFloat(); if (this.placementStyle == StuckInBodyLayer.PlacementStyle.ON_SURFACE) { - int n = randomSource.nextInt(3); - switch (n) { + int k = randomSource.nextInt(3); + switch (k) { case 0: - h = snapToFace(h); + f = snapToFace(f); break; case 1: - l = snapToFace(l); + g = snapToFace(g); break; default: - m = snapToFace(m); + h = snapToFace(h); } } - poseStack.translate(Mth.lerp(h, cube.minX, cube.maxX) / 16.0F, Mth.lerp(l, cube.minY, cube.maxY) / 16.0F, Mth.lerp(m, cube.minZ, cube.maxZ) / 16.0F); - this.renderStuckItem(poseStack, multiBufferSource, i, -(h * 2.0F - 1.0F), -(l * 2.0F - 1.0F), -(m * 2.0F - 1.0F)); + poseStack.translate(Mth.lerp(f, cube.minX, cube.maxX) / 16.0F, Mth.lerp(g, cube.minY, cube.maxY) / 16.0F, Mth.lerp(h, cube.minZ, cube.maxZ) / 16.0F); + this.renderStuckItem(poseStack, bufferSource, packedLight, -(f * 2.0F - 1.0F), -(g * 2.0F - 1.0F), -(h * 2.0F - 1.0F)); poseStack.popPose(); } } } - private static float snapToFace(float f) { - return f > 0.5F ? 1.0F : 0.5F; + private static float snapToFace(float value) { + return value > 0.5F ? 1.0F : 0.5F; } @Environment(EnvType.CLIENT) diff --git a/net/minecraft/client/renderer/entity/layers/TropicalFishPatternLayer.java b/net/minecraft/client/renderer/entity/layers/TropicalFishPatternLayer.java index c0142b0f..c851903d 100644 --- a/net/minecraft/client/renderer/entity/layers/TropicalFishPatternLayer.java +++ b/net/minecraft/client/renderer/entity/layers/TropicalFishPatternLayer.java @@ -37,8 +37,8 @@ public class TropicalFishPatternLayer extends RenderLayer entityModel = (EntityModel)(switch (pattern.base()) { case SMALL -> this.modelA; @@ -59,8 +59,6 @@ public class TropicalFishPatternLayer extends RenderLayer BETTY_TEXTURE; case CLAYFISH -> CLAYFISH_TEXTURE; }; - coloredCutoutModelCopyLayerRender( - entityModel, resourceLocation, poseStack, multiBufferSource, i, tropicalFishRenderState, tropicalFishRenderState.patternColor - ); + coloredCutoutModelCopyLayerRender(entityModel, resourceLocation, poseStack, bufferSource, packedLight, renderState, renderState.patternColor); } } diff --git a/net/minecraft/client/renderer/entity/layers/VillagerProfessionLayer.java b/net/minecraft/client/renderer/entity/layers/VillagerProfessionLayer.java index b05ec4f7..dc50a938 100644 --- a/net/minecraft/client/renderer/entity/layers/VillagerProfessionLayer.java +++ b/net/minecraft/client/renderer/entity/layers/VillagerProfessionLayer.java @@ -49,9 +49,9 @@ public class VillagerProfessionLayer> private final ElytraModel elytraBabyModel; private final EquipmentLayerRenderer equipmentRenderer; - public WingsLayer(RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, EquipmentLayerRenderer equipmentLayerRenderer) { - super(renderLayerParent); - this.elytraModel = new ElytraModel(entityModelSet.bakeLayer(ModelLayers.ELYTRA)); - this.elytraBabyModel = new ElytraModel(entityModelSet.bakeLayer(ModelLayers.ELYTRA_BABY)); - this.equipmentRenderer = equipmentLayerRenderer; + public WingsLayer(RenderLayerParent renderer, EntityModelSet models, EquipmentLayerRenderer equipmentRenderer) { + super(renderer); + this.elytraModel = new ElytraModel(models.bakeLayer(ModelLayers.ELYTRA)); + this.elytraBabyModel = new ElytraModel(models.bakeLayer(ModelLayers.ELYTRA_BABY)); + this.equipmentRenderer = equipmentRenderer; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, S humanoidRenderState, float f, float g) { - ItemStack itemStack = humanoidRenderState.chestItem; + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot) { + ItemStack itemStack = renderState.chestItem; Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); if (equippable != null && !equippable.model().isEmpty()) { - ResourceLocation resourceLocation = getPlayerElytraTexture(humanoidRenderState); - ElytraModel elytraModel = humanoidRenderState.isBaby ? this.elytraBabyModel : this.elytraModel; + ResourceLocation resourceLocation = getPlayerElytraTexture(renderState); + ElytraModel elytraModel = renderState.isBaby ? this.elytraBabyModel : this.elytraModel; ResourceLocation resourceLocation2 = (ResourceLocation)equippable.model().get(); poseStack.pushPose(); poseStack.translate(0.0F, 0.0F, 0.125F); - elytraModel.setupAnim(humanoidRenderState); + elytraModel.setupAnim(renderState); this.equipmentRenderer - .renderLayers(EquipmentModel.LayerType.WINGS, resourceLocation2, elytraModel, itemStack, poseStack, multiBufferSource, i, resourceLocation); + .renderLayers(EquipmentModel.LayerType.WINGS, resourceLocation2, elytraModel, itemStack, poseStack, bufferSource, packedLight, resourceLocation); poseStack.popPose(); } } @Nullable - private static ResourceLocation getPlayerElytraTexture(HumanoidRenderState humanoidRenderState) { - if (humanoidRenderState instanceof PlayerRenderState playerRenderState) { + private static ResourceLocation getPlayerElytraTexture(HumanoidRenderState renderState) { + if (renderState instanceof PlayerRenderState playerRenderState) { PlayerSkin playerSkin = playerRenderState.skin; if (playerSkin.elytraTexture() != null) { return playerSkin.elytraTexture(); diff --git a/net/minecraft/client/renderer/entity/layers/WitherArmorLayer.java b/net/minecraft/client/renderer/entity/layers/WitherArmorLayer.java index 2b444175..5c4051a4 100644 --- a/net/minecraft/client/renderer/entity/layers/WitherArmorLayer.java +++ b/net/minecraft/client/renderer/entity/layers/WitherArmorLayer.java @@ -20,8 +20,8 @@ public class WitherArmorLayer extends EnergySwirlLayer { ResourceLocation.withDefaultNamespace("textures/entity/wolf/wolf_armor_crackiness_high.png") ); - public WolfArmorLayer( - RenderLayerParent renderLayerParent, EntityModelSet entityModelSet, EquipmentLayerRenderer equipmentLayerRenderer - ) { - super(renderLayerParent); - this.adultModel = new WolfModel(entityModelSet.bakeLayer(ModelLayers.WOLF_ARMOR)); - this.babyModel = new WolfModel(entityModelSet.bakeLayer(ModelLayers.WOLF_BABY_ARMOR)); - this.equipmentRenderer = equipmentLayerRenderer; + public WolfArmorLayer(RenderLayerParent renderer, EntityModelSet entityModels, EquipmentLayerRenderer equipmentRenderer) { + super(renderer); + this.adultModel = new WolfModel(entityModels.bakeLayer(ModelLayers.WOLF_ARMOR)); + this.babyModel = new WolfModel(entityModels.bakeLayer(ModelLayers.WOLF_BABY_ARMOR)); + this.equipmentRenderer = equipmentRenderer; } - public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, WolfRenderState wolfRenderState, float f, float g) { - ItemStack itemStack = wolfRenderState.bodyArmorItem; + public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, WolfRenderState renderState, float yRot, float xRot) { + ItemStack itemStack = renderState.bodyArmorItem; Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); if (equippable != null && !equippable.model().isEmpty()) { - WolfModel wolfModel = wolfRenderState.isBaby ? this.babyModel : this.adultModel; + WolfModel wolfModel = renderState.isBaby ? this.babyModel : this.adultModel; ResourceLocation resourceLocation = (ResourceLocation)equippable.model().get(); - wolfModel.setupAnim(wolfRenderState); - this.equipmentRenderer.renderLayers(EquipmentModel.LayerType.WOLF_BODY, resourceLocation, wolfModel, itemStack, poseStack, multiBufferSource, i); - this.maybeRenderCracks(poseStack, multiBufferSource, i, itemStack, wolfModel); + wolfModel.setupAnim(renderState); + this.equipmentRenderer.renderLayers(EquipmentModel.LayerType.WOLF_BODY, resourceLocation, wolfModel, itemStack, poseStack, bufferSource, packedLight); + this.maybeRenderCracks(poseStack, bufferSource, packedLight, itemStack, wolfModel); } } - private void maybeRenderCracks(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, ItemStack itemStack, Model model) { - Level level = Crackiness.WOLF_ARMOR.byDamage(itemStack); + private void maybeRenderCracks(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, ItemStack armorItem, Model model) { + Level level = Crackiness.WOLF_ARMOR.byDamage(armorItem); if (level != Level.NONE) { ResourceLocation resourceLocation = (ResourceLocation)ARMOR_CRACK_LOCATIONS.get(level); - VertexConsumer vertexConsumer = multiBufferSource.getBuffer(RenderType.armorTranslucent(resourceLocation)); - model.renderToBuffer(poseStack, vertexConsumer, i, OverlayTexture.NO_OVERLAY); + VertexConsumer vertexConsumer = bufferSource.getBuffer(RenderType.armorTranslucent(resourceLocation)); + model.renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY); } } } diff --git a/net/minecraft/client/renderer/entity/layers/WolfCollarLayer.java b/net/minecraft/client/renderer/entity/layers/WolfCollarLayer.java index 6ad13f8c..b56055e8 100644 --- a/net/minecraft/client/renderer/entity/layers/WolfCollarLayer.java +++ b/net/minecraft/client/renderer/entity/layers/WolfCollarLayer.java @@ -17,8 +17,8 @@ import net.minecraft.world.item.DyeColor; public class WolfCollarLayer extends RenderLayer { private static final ResourceLocation WOLF_COLLAR_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/wolf/wolf_collar.png"); - public WolfCollarLayer(RenderLayerParent renderer) { - super(renderer); + public WolfCollarLayer(RenderLayerParent renderLayerParent) { + super(renderLayerParent); } public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, WolfRenderState wolfRenderState, float f, float g) { diff --git a/net/minecraft/client/renderer/entity/player/PlayerRenderer.java b/net/minecraft/client/renderer/entity/player/PlayerRenderer.java index 887e2126..ca521055 100644 --- a/net/minecraft/client/renderer/entity/player/PlayerRenderer.java +++ b/net/minecraft/client/renderer/entity/player/PlayerRenderer.java @@ -26,6 +26,7 @@ import net.minecraft.client.renderer.entity.layers.PlayerItemInHandLayer; import net.minecraft.client.renderer.entity.layers.SpinAttackEffectLayer; import net.minecraft.client.renderer.entity.layers.WingsLayer; import net.minecraft.client.renderer.entity.state.PlayerRenderState; +import net.minecraft.client.renderer.entity.state.PlayerRenderState.HandState; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.CommonComponents; @@ -72,30 +73,30 @@ public class PlayerRenderer extends LivingEntityRenderer(this, context)); } - protected boolean shouldRenderLayers(PlayerRenderState playerRenderState) { - return !playerRenderState.isSpectator; + protected boolean shouldRenderLayers(PlayerRenderState renderState) { + return !renderState.isSpectator; } - public Vec3 getRenderOffset(PlayerRenderState playerRenderState) { - Vec3 vec3 = super.getRenderOffset(playerRenderState); - return playerRenderState.isCrouching ? vec3.add(0.0, playerRenderState.scale * -2.0F / 16.0, 0.0) : vec3; + public Vec3 getRenderOffset(PlayerRenderState renderState) { + Vec3 vec3 = super.getRenderOffset(renderState); + return renderState.isCrouching ? vec3.add(0.0, renderState.scale * -2.0F / 16.0, 0.0) : vec3; } - public static HumanoidModel.ArmPose getArmPose(PlayerRenderState playerRenderState, HumanoidArm humanoidArm) { - HumanoidModel.ArmPose armPose = getArmPose(playerRenderState, playerRenderState.mainHandState, InteractionHand.MAIN_HAND); - HumanoidModel.ArmPose armPose2 = getArmPose(playerRenderState, playerRenderState.offhandState, InteractionHand.OFF_HAND); + public static HumanoidModel.ArmPose getArmPose(PlayerRenderState renderState, HumanoidArm arm) { + HumanoidModel.ArmPose armPose = getArmPose(renderState, renderState.mainHandState, InteractionHand.MAIN_HAND); + HumanoidModel.ArmPose armPose2 = getArmPose(renderState, renderState.offhandState, InteractionHand.OFF_HAND); if (armPose.isTwoHanded()) { - armPose2 = playerRenderState.offhandState.isEmpty ? HumanoidModel.ArmPose.EMPTY : HumanoidModel.ArmPose.ITEM; + armPose2 = renderState.offhandState.isEmpty ? HumanoidModel.ArmPose.EMPTY : HumanoidModel.ArmPose.ITEM; } - return playerRenderState.mainArm == humanoidArm ? armPose : armPose2; + return renderState.mainArm == arm ? armPose : armPose2; } - private static HumanoidModel.ArmPose getArmPose(PlayerRenderState playerRenderState, PlayerRenderState.HandState handState, InteractionHand interactionHand) { + private static HumanoidModel.ArmPose getArmPose(PlayerRenderState renderState, HandState handState, InteractionHand hand) { if (handState.isEmpty) { return HumanoidModel.ArmPose.EMPTY; } else { - if (playerRenderState.useItemHand == interactionHand && playerRenderState.useItemRemainingTicks > 0) { + if (renderState.useItemHand == hand && renderState.useItemRemainingTicks > 0) { ItemUseAnimation itemUseAnimation = handState.useAnimation; if (itemUseAnimation == ItemUseAnimation.BLOCK) { return HumanoidModel.ArmPose.BLOCK; @@ -124,7 +125,7 @@ public class PlayerRenderer extends LivingEntityRenderer 0.0 && e > 0.0) { - playerRenderState.shouldApplyFlyingYRot = true; - double g = (vec32.x * vec3.x + vec32.z * vec3.z) / Math.sqrt(d * e); - double h = vec32.x * vec3.z - vec32.z * vec3.x; - playerRenderState.flyingYRot = (float)(Math.signum(h) * Math.acos(g)); + renderState.shouldApplyFlyingYRot = true; + double f = (vec32.x * vec3.x + vec32.z * vec3.z) / Math.sqrt(d * e); + double g = vec32.x * vec3.z - vec32.z * vec3.x; + renderState.flyingYRot = (float)(Math.signum(g) * Math.acos(f)); } else { - playerRenderState.shouldApplyFlyingYRot = false; - playerRenderState.flyingYRot = 0.0F; + renderState.shouldApplyFlyingYRot = false; + renderState.flyingYRot = 0.0F; } } - private void extractHandState(AbstractClientPlayer abstractClientPlayer, PlayerRenderState.HandState handState, InteractionHand interactionHand) { - ItemStack itemStack = abstractClientPlayer.getItemInHand(interactionHand); - handState.isEmpty = itemStack.isEmpty(); - handState.useAnimation = !itemStack.isEmpty() ? itemStack.getUseAnimation() : null; - handState.holdsChargedCrossbow = itemStack.is(Items.CROSSBOW) && CrossbowItem.isCharged(itemStack); + private void extractHandState(AbstractClientPlayer player, HandState reusedState, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); + reusedState.isEmpty = itemStack.isEmpty(); + reusedState.useAnimation = !itemStack.isEmpty() ? itemStack.getUseAnimation() : null; + reusedState.holdsChargedCrossbow = itemStack.is(Items.CROSSBOW) && CrossbowItem.isCharged(itemStack); } - private static void extractCapeState(AbstractClientPlayer abstractClientPlayer, PlayerRenderState playerRenderState, float f) { - double d = Mth.lerp((double)f, abstractClientPlayer.xCloakO, abstractClientPlayer.xCloak) - - Mth.lerp((double)f, abstractClientPlayer.xo, abstractClientPlayer.getX()); - double e = Mth.lerp((double)f, abstractClientPlayer.yCloakO, abstractClientPlayer.yCloak) - - Mth.lerp((double)f, abstractClientPlayer.yo, abstractClientPlayer.getY()); - double g = Mth.lerp((double)f, abstractClientPlayer.zCloakO, abstractClientPlayer.zCloak) - - Mth.lerp((double)f, abstractClientPlayer.zo, abstractClientPlayer.getZ()); - float h = Mth.rotLerp(f, abstractClientPlayer.yBodyRotO, abstractClientPlayer.yBodyRot); - double i = Mth.sin(h * (float) (Math.PI / 180.0)); - double j = -Mth.cos(h * (float) (Math.PI / 180.0)); - playerRenderState.capeFlap = (float)e * 10.0F; - playerRenderState.capeFlap = Mth.clamp(playerRenderState.capeFlap, -6.0F, 32.0F); - playerRenderState.capeLean = (float)(d * i + g * j) * 100.0F; - playerRenderState.capeLean = playerRenderState.capeLean * (1.0F - playerRenderState.fallFlyingScale()); - playerRenderState.capeLean = Mth.clamp(playerRenderState.capeLean, 0.0F, 150.0F); - playerRenderState.capeLean2 = (float)(d * j - g * i) * 100.0F; - playerRenderState.capeLean2 = Mth.clamp(playerRenderState.capeLean2, -20.0F, 20.0F); - float k = Mth.lerp(f, abstractClientPlayer.oBob, abstractClientPlayer.bob); - float l = Mth.lerp(f, abstractClientPlayer.walkDistO, abstractClientPlayer.walkDist); - playerRenderState.capeFlap = playerRenderState.capeFlap + Mth.sin(l * 6.0F) * 32.0F * k; + private static void extractCapeState(AbstractClientPlayer player, PlayerRenderState renderState, float partialTick) { + double d = Mth.lerp((double)partialTick, player.xCloakO, player.xCloak) - Mth.lerp((double)partialTick, player.xo, player.getX()); + double e = Mth.lerp((double)partialTick, player.yCloakO, player.yCloak) - Mth.lerp((double)partialTick, player.yo, player.getY()); + double f = Mth.lerp((double)partialTick, player.zCloakO, player.zCloak) - Mth.lerp((double)partialTick, player.zo, player.getZ()); + float g = Mth.rotLerp(partialTick, player.yBodyRotO, player.yBodyRot); + double h = Mth.sin(g * (float) (Math.PI / 180.0)); + double i = -Mth.cos(g * (float) (Math.PI / 180.0)); + renderState.capeFlap = (float)e * 10.0F; + renderState.capeFlap = Mth.clamp(renderState.capeFlap, -6.0F, 32.0F); + renderState.capeLean = (float)(d * h + f * i) * 100.0F; + renderState.capeLean = renderState.capeLean * (1.0F - renderState.fallFlyingScale()); + renderState.capeLean = Mth.clamp(renderState.capeLean, 0.0F, 150.0F); + renderState.capeLean2 = (float)(d * i - f * h) * 100.0F; + renderState.capeLean2 = Mth.clamp(renderState.capeLean2, -20.0F, 20.0F); + float j = Mth.lerp(partialTick, player.oBob, player.bob); + float k = Mth.lerp(partialTick, player.walkDistO, player.walkDist); + renderState.capeFlap = renderState.capeFlap + Mth.sin(k * 6.0F) * 32.0F * j; } @Nullable - private static Parrot.Variant getParrotOnShoulder(AbstractClientPlayer abstractClientPlayer, boolean bl) { - CompoundTag compoundTag = bl ? abstractClientPlayer.getShoulderEntityLeft() : abstractClientPlayer.getShoulderEntityRight(); + private static Parrot.Variant getParrotOnShoulder(AbstractClientPlayer player, boolean leftShoulder) { + CompoundTag compoundTag = leftShoulder ? player.getShoulderEntityLeft() : player.getShoulderEntityRight(); return EntityType.byString(compoundTag.getString("id")).filter(entityType -> entityType == EntityType.PARROT).isPresent() ? Parrot.Variant.byId(compoundTag.getInt("Variant")) : null; } - public void renderRightHand(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, ResourceLocation resourceLocation, boolean bl) { - this.renderHand(poseStack, multiBufferSource, i, resourceLocation, this.model.rightArm, bl); + public void renderRightHand(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, ResourceLocation skinTexture, boolean isSleeveVisible) { + this.renderHand(poseStack, bufferSource, packedLight, skinTexture, this.model.rightArm, isSleeveVisible); } - public void renderLeftHand(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, ResourceLocation resourceLocation, boolean bl) { - this.renderHand(poseStack, multiBufferSource, i, resourceLocation, this.model.leftArm, bl); + public void renderLeftHand(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, ResourceLocation skinTexture, boolean isSleeveVisible) { + this.renderHand(poseStack, bufferSource, packedLight, skinTexture, this.model.leftArm, isSleeveVisible); } - private void renderHand(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, ResourceLocation resourceLocation, ModelPart modelPart, boolean bl) { + private void renderHand( + PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, ResourceLocation skinTexture, ModelPart arm, boolean isSleeveVisible + ) { PlayerModel playerModel = this.getModel(); - modelPart.resetPose(); - modelPart.visible = true; - playerModel.leftSleeve.visible = bl; - playerModel.rightSleeve.visible = bl; + arm.resetPose(); + arm.visible = true; + playerModel.leftSleeve.visible = isSleeveVisible; + playerModel.rightSleeve.visible = isSleeveVisible; playerModel.leftArm.zRot = -0.1F; playerModel.rightArm.zRot = 0.1F; - modelPart.render(poseStack, multiBufferSource.getBuffer(RenderType.entityTranslucent(resourceLocation)), i, OverlayTexture.NO_OVERLAY); + arm.render(poseStack, bufferSource.getBuffer(RenderType.entityTranslucent(skinTexture)), packedLight, OverlayTexture.NO_OVERLAY); } - protected void setupRotations(PlayerRenderState playerRenderState, PoseStack poseStack, float f, float g) { - float h = playerRenderState.swimAmount; - float i = playerRenderState.xRot; - if (playerRenderState.isFallFlying) { - super.setupRotations(playerRenderState, poseStack, f, g); - float j = playerRenderState.fallFlyingScale(); - if (!playerRenderState.isAutoSpinAttack) { - poseStack.mulPose(Axis.XP.rotationDegrees(j * (-90.0F - i))); + protected void setupRotations(PlayerRenderState renderState, PoseStack poseStack, float bodyRot, float scale) { + float f = renderState.swimAmount; + float g = renderState.xRot; + if (renderState.isFallFlying) { + super.setupRotations(renderState, poseStack, bodyRot, scale); + float h = renderState.fallFlyingScale(); + if (!renderState.isAutoSpinAttack) { + poseStack.mulPose(Axis.XP.rotationDegrees(h * (-90.0F - g))); } - if (playerRenderState.shouldApplyFlyingYRot) { - poseStack.mulPose(Axis.YP.rotation(playerRenderState.flyingYRot)); + if (renderState.shouldApplyFlyingYRot) { + poseStack.mulPose(Axis.YP.rotation(renderState.flyingYRot)); } - } else if (h > 0.0F) { - super.setupRotations(playerRenderState, poseStack, f, g); - float jx = playerRenderState.isInWater ? -90.0F - i : -90.0F; - float k = Mth.lerp(h, 0.0F, jx); - poseStack.mulPose(Axis.XP.rotationDegrees(k)); - if (playerRenderState.isVisuallySwimming) { + } else if (f > 0.0F) { + super.setupRotations(renderState, poseStack, bodyRot, scale); + float hx = renderState.isInWater ? -90.0F - g : -90.0F; + float i = Mth.lerp(f, 0.0F, hx); + poseStack.mulPose(Axis.XP.rotationDegrees(i)); + if (renderState.isVisuallySwimming) { poseStack.translate(0.0F, -1.0F, 0.3F); } } else { - super.setupRotations(playerRenderState, poseStack, f, g); + super.setupRotations(renderState, poseStack, bodyRot, scale); } } } diff --git a/net/minecraft/client/renderer/entity/state/EnderDragonRenderState.java b/net/minecraft/client/renderer/entity/state/EnderDragonRenderState.java index 0eedc9bb..4447a7ff 100644 --- a/net/minecraft/client/renderer/entity/state/EnderDragonRenderState.java +++ b/net/minecraft/client/renderer/entity/state/EnderDragonRenderState.java @@ -19,20 +19,20 @@ public class EnderDragonRenderState extends EntityRenderState { public float partialTicks; public final DragonFlightHistory flightHistory = new DragonFlightHistory(); - public DragonFlightHistory.Sample getHistoricalPos(int i) { - return this.flightHistory.get(i, this.partialTicks); + public DragonFlightHistory.Sample getHistoricalPos(int index) { + return this.flightHistory.get(index, this.partialTicks); } - public float getHeadPartYOffset(int i, DragonFlightHistory.Sample sample, DragonFlightHistory.Sample sample2) { + public float getHeadPartYOffset(int part, DragonFlightHistory.Sample start, DragonFlightHistory.Sample current) { double d; if (this.isLandingOrTakingOff) { - d = i / Math.max(this.distanceToEgg / 4.0, 1.0); + d = part / Math.max(this.distanceToEgg / 4.0, 1.0); } else if (this.isSitting) { - d = i; - } else if (i == 6) { + d = part; + } else if (part == 6) { d = 0.0; } else { - d = sample2.y() - sample.y(); + d = current.y() - start.y(); } return (float)d; diff --git a/net/minecraft/client/renderer/entity/state/WolfRenderState.java b/net/minecraft/client/renderer/entity/state/WolfRenderState.java index 38674fc0..2a1fc00f 100644 --- a/net/minecraft/client/renderer/entity/state/WolfRenderState.java +++ b/net/minecraft/client/renderer/entity/state/WolfRenderState.java @@ -22,14 +22,14 @@ public class WolfRenderState extends LivingEntityRenderState { public DyeColor collarColor; public ItemStack bodyArmorItem = ItemStack.EMPTY; - public float getBodyRollAngle(float f) { - float g = (this.shakeAnim + f) / 1.8F; - if (g < 0.0F) { - g = 0.0F; - } else if (g > 1.0F) { - g = 1.0F; + public float getBodyRollAngle(float angle) { + float f = (this.shakeAnim + angle) / 1.8F; + if (f < 0.0F) { + f = 0.0F; + } else if (f > 1.0F) { + f = 1.0F; } - return Mth.sin(g * (float) Math.PI) * Mth.sin(g * (float) Math.PI * 11.0F) * 0.15F * (float) Math.PI; + return Mth.sin(f * (float) Math.PI) * Mth.sin(f * (float) Math.PI * 11.0F) * 0.15F * (float) Math.PI; } } diff --git a/net/minecraft/client/renderer/item/ItemProperties.java b/net/minecraft/client/renderer/item/ItemProperties.java index 5a69b3ac..27378755 100644 --- a/net/minecraft/client/renderer/item/ItemProperties.java +++ b/net/minecraft/client/renderer/item/ItemProperties.java @@ -55,8 +55,8 @@ public class ItemProperties { ((Map)PROPERTIES.computeIfAbsent(item, itemx -> Maps.newHashMap())).put(name, property); } - private static int honeyLevelProperty(ItemStack itemStack) { - BlockItemStateProperties blockItemStateProperties = itemStack.getOrDefault(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY); + private static int honeyLevelProperty(ItemStack stack) { + BlockItemStateProperties blockItemStateProperties = stack.getOrDefault(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY); Integer integer = blockItemStateProperties.get(BeehiveBlock.HONEY_LEVEL); return integer != null && integer == 5 ? 1 : 0; } diff --git a/net/minecraft/client/renderer/texture/TextureManager.java b/net/minecraft/client/renderer/texture/TextureManager.java index 89385a2f..c6de4d96 100644 --- a/net/minecraft/client/renderer/texture/TextureManager.java +++ b/net/minecraft/client/renderer/texture/TextureManager.java @@ -153,10 +153,10 @@ public class TextureManager implements PreparableReloadListener, Tickable, AutoC @Override public CompletableFuture reload( - PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor executor, Executor executor2 + PreparableReloadListener.PreparationBarrier barrier, ResourceManager manager, Executor backgroundExecutor, Executor gameExecutor ) { CompletableFuture completableFuture = new CompletableFuture(); - TitleScreen.preloadResources(this, executor).thenCompose(preparationBarrier::wait).thenAcceptAsync(void_ -> { + TitleScreen.preloadResources(this, backgroundExecutor).thenCompose(barrier::wait).thenAcceptAsync(void_ -> { MissingTextureAtlasSprite.getTexture(); AddRealmPopupScreen.updateCarouselImages(this.resourceManager); Iterator> iterator = this.byPath.entrySet().iterator(); @@ -168,7 +168,7 @@ public class TextureManager implements PreparableReloadListener, Tickable, AutoC if (abstractTexture == MissingTextureAtlasSprite.getTexture() && !resourceLocation.equals(MissingTextureAtlasSprite.getLocation())) { iterator.remove(); } else { - abstractTexture.reset(this, resourceManager, resourceLocation, executor2); + abstractTexture.reset(this, manager, resourceLocation, gameExecutor); } } diff --git a/net/minecraft/client/renderer/texture/atlas/sources/PalettedPermutations.java b/net/minecraft/client/renderer/texture/atlas/sources/PalettedPermutations.java index 755843f1..0c087050 100644 --- a/net/minecraft/client/renderer/texture/atlas/sources/PalettedPermutations.java +++ b/net/minecraft/client/renderer/texture/atlas/sources/PalettedPermutations.java @@ -85,17 +85,17 @@ public class PalettedPermutations implements SpriteSource { } } - private static IntUnaryOperator createPaletteMapping(int[] is, int[] js) { - if (js.length != is.length) { - LOGGER.warn("Palette mapping has different sizes: {} and {}", is.length, js.length); + private static IntUnaryOperator createPaletteMapping(int[] keys, int[] values) { + if (values.length != keys.length) { + LOGGER.warn("Palette mapping has different sizes: {} and {}", keys.length, values.length); throw new IllegalArgumentException(); } else { - Int2IntMap int2IntMap = new Int2IntOpenHashMap(js.length); + Int2IntMap int2IntMap = new Int2IntOpenHashMap(values.length); - for (int i = 0; i < is.length; i++) { - int j = is[i]; + for (int i = 0; i < keys.length; i++) { + int j = keys[i]; if (ARGB.alpha(j) != 0) { - int2IntMap.put(ARGB.transparent(j), js[i]); + int2IntMap.put(ARGB.transparent(j), values[i]); } } diff --git a/net/minecraft/client/resources/MapTextureManager.java b/net/minecraft/client/resources/MapTextureManager.java index e2d68820..15c42d7b 100644 --- a/net/minecraft/client/resources/MapTextureManager.java +++ b/net/minecraft/client/resources/MapTextureManager.java @@ -21,12 +21,12 @@ public class MapTextureManager implements AutoCloseable { this.textureManager = textureManager; } - public void update(MapId mapId, MapItemSavedData mapItemSavedData) { - this.getOrCreateMapInstance(mapId, mapItemSavedData).forceUpload(); + public void update(MapId id, MapItemSavedData data) { + this.getOrCreateMapInstance(id, data).forceUpload(); } - public ResourceLocation prepareMapTexture(MapId mapId, MapItemSavedData mapItemSavedData) { - MapTextureManager.MapInstance mapInstance = this.getOrCreateMapInstance(mapId, mapItemSavedData); + public ResourceLocation prepareMapTexture(MapId id, MapItemSavedData data) { + MapTextureManager.MapInstance mapInstance = this.getOrCreateMapInstance(id, data); mapInstance.updateTextureIfNeeded(); return mapInstance.location; } @@ -39,12 +39,12 @@ public class MapTextureManager implements AutoCloseable { this.maps.clear(); } - private MapTextureManager.MapInstance getOrCreateMapInstance(MapId mapId, MapItemSavedData mapItemSavedData) { - return this.maps.compute(mapId.id(), (integer, mapInstance) -> { + private MapTextureManager.MapInstance getOrCreateMapInstance(MapId id, MapItemSavedData data) { + return this.maps.compute(id.id(), (integer, mapInstance) -> { if (mapInstance == null) { - return new MapTextureManager.MapInstance(integer, mapItemSavedData); + return new MapTextureManager.MapInstance(integer, data); } else { - mapInstance.replaceMapData(mapItemSavedData); + mapInstance.replaceMapData(data); return mapInstance; } }); @@ -61,15 +61,15 @@ public class MapTextureManager implements AutoCloseable { private boolean requiresUpload = true; final ResourceLocation location; - MapInstance(final int i, final MapItemSavedData mapItemSavedData) { - this.data = mapItemSavedData; + MapInstance(final int id, final MapItemSavedData data) { + this.data = data; this.texture = new DynamicTexture(128, 128, true); - this.location = MapTextureManager.this.textureManager.register("map/" + i, this.texture); + this.location = MapTextureManager.this.textureManager.register("map/" + id, this.texture); } - void replaceMapData(MapItemSavedData mapItemSavedData) { - boolean bl = this.data != mapItemSavedData; - this.data = mapItemSavedData; + void replaceMapData(MapItemSavedData data) { + boolean bl = this.data != data; + this.data = data; this.requiresUpload |= bl; } diff --git a/net/minecraft/client/resources/TextureAtlasHolder.java b/net/minecraft/client/resources/TextureAtlasHolder.java index 34396086..c068aa7d 100644 --- a/net/minecraft/client/resources/TextureAtlasHolder.java +++ b/net/minecraft/client/resources/TextureAtlasHolder.java @@ -45,18 +45,18 @@ public abstract class TextureAtlasHolder implements PreparableReloadListener, Au @Override public final CompletableFuture reload( - PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor executor, Executor executor2 + PreparableReloadListener.PreparationBarrier barrier, ResourceManager manager, Executor backgroundExecutor, Executor gameExecutor ) { return SpriteLoader.create(this.textureAtlas) - .loadAndStitch(resourceManager, this.atlasInfoLocation, 0, executor, this.metadataSections) + .loadAndStitch(manager, this.atlasInfoLocation, 0, backgroundExecutor, this.metadataSections) .thenCompose(Preparations::waitForUpload) - .thenCompose(preparationBarrier::wait) - .thenAcceptAsync(this::apply, executor2); + .thenCompose(barrier::wait) + .thenAcceptAsync(this::apply, gameExecutor); } - private void apply(Preparations preparations) { + private void apply(Preparations preperations) { try (Zone zone = Profiler.get().zone("upload")) { - this.textureAtlas.upload(preparations); + this.textureAtlas.upload(preperations); } } diff --git a/net/minecraft/client/resources/model/BlockStateModelLoader.java b/net/minecraft/client/resources/model/BlockStateModelLoader.java index da588da1..24b77de3 100644 --- a/net/minecraft/client/resources/model/BlockStateModelLoader.java +++ b/net/minecraft/client/resources/model/BlockStateModelLoader.java @@ -16,6 +16,7 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BooleanProperty; import org.slf4j.Logger; @@ -25,7 +26,7 @@ public class BlockStateModelLoader { private static final String FRAME_MAP_PROPERTY = "map"; private static final String FRAME_MAP_PROPERTY_TRUE = "map=true"; private static final String FRAME_MAP_PROPERTY_FALSE = "map=false"; - private static final StateDefinition ITEM_FRAME_FAKE_DEFINITION = new StateDefinition.Builder(Blocks.AIR) + private static final StateDefinition ITEM_FRAME_FAKE_DEFINITION = new Builder(Blocks.AIR) .add(BooleanProperty.create("map")) .create(Block::defaultBlockState, BlockState::new); private static final ResourceLocation GLOW_ITEM_FRAME_LOCATION = ResourceLocation.withDefaultNamespace("glow_item_frame"); @@ -39,8 +40,8 @@ public class BlockStateModelLoader { public static final ModelResourceLocation FRAME_LOCATION = new ModelResourceLocation(ITEM_FRAME_LOCATION, "map=false"); private final UnbakedModel missingModel; - public BlockStateModelLoader(UnbakedModel unbakedModel) { - this.missingModel = unbakedModel; + public BlockStateModelLoader(UnbakedModel missingModel) { + this.missingModel = missingModel; } public static Function> definitionLocationToBlockMapper() { @@ -54,30 +55,30 @@ public class BlockStateModelLoader { } public BlockStateModelLoader.LoadedModels loadBlockStateDefinitionStack( - ResourceLocation resourceLocation, StateDefinition stateDefinition, List list + ResourceLocation blockStateId, StateDefinition stateDefinition, List modelDefinitions ) { - List list2 = stateDefinition.getPossibleStates(); + List list = stateDefinition.getPossibleStates(); Map map = new HashMap(); Map map2 = new HashMap(); try { - for (BlockStateModelLoader.LoadedBlockModelDefinition loadedBlockModelDefinition : list) { + for (BlockStateModelLoader.LoadedBlockModelDefinition loadedBlockModelDefinition : modelDefinitions) { loadedBlockModelDefinition.contents - .instantiate(stateDefinition, resourceLocation + "/" + loadedBlockModelDefinition.source) + .instantiate(stateDefinition, blockStateId + "/" + loadedBlockModelDefinition.source) .forEach((blockStatex, unbakedBlockStateModel) -> map.put(blockStatex, new BlockStateModelLoader.LoadedModel(blockStatex, unbakedBlockStateModel))); } } finally { - Iterator var12 = list2.iterator(); + Iterator var12 = list.iterator(); while (true) { if (!var12.hasNext()) { ; } else { BlockState blockState2 = (BlockState)var12.next(); - ModelResourceLocation modelResourceLocation2 = BlockModelShaper.stateToModelLocation(resourceLocation, blockState2); + ModelResourceLocation modelResourceLocation2 = BlockModelShaper.stateToModelLocation(blockStateId, blockState2); BlockStateModelLoader.LoadedModel loadedModel2 = (BlockStateModelLoader.LoadedModel)map.get(blockState2); if (loadedModel2 == null) { - LOGGER.warn("Missing blockstate definition: '{}' missing model for variant: '{}'", resourceLocation, modelResourceLocation2); + LOGGER.warn("Missing blockstate definition: '{}' missing model for variant: '{}'", blockStateId, modelResourceLocation2); loadedModel2 = new BlockStateModelLoader.LoadedModel(blockState2, this.missingModel); } diff --git a/net/minecraft/client/resources/model/BuiltInModel.java b/net/minecraft/client/resources/model/BuiltInModel.java index f712b2b2..71d28227 100644 --- a/net/minecraft/client/resources/model/BuiltInModel.java +++ b/net/minecraft/client/resources/model/BuiltInModel.java @@ -18,10 +18,10 @@ public class BuiltInModel implements BakedModel { private final TextureAtlasSprite particleTexture; private final boolean usesBlockLight; - public BuiltInModel(ItemTransforms itemTransforms, TextureAtlasSprite textureAtlasSprite, boolean bl) { + public BuiltInModel(ItemTransforms itemTransforms, TextureAtlasSprite particleTexture, boolean usesBlockLight) { this.itemTransforms = itemTransforms; - this.particleTexture = textureAtlasSprite; - this.usesBlockLight = bl; + this.particleTexture = particleTexture; + this.usesBlockLight = usesBlockLight; } @Override diff --git a/net/minecraft/client/resources/model/DelegateBakedModel.java b/net/minecraft/client/resources/model/DelegateBakedModel.java index e019c896..3b20942a 100644 --- a/net/minecraft/client/resources/model/DelegateBakedModel.java +++ b/net/minecraft/client/resources/model/DelegateBakedModel.java @@ -15,8 +15,8 @@ import org.jetbrains.annotations.Nullable; public abstract class DelegateBakedModel implements BakedModel { protected final BakedModel parent; - public DelegateBakedModel(BakedModel bakedModel) { - this.parent = bakedModel; + public DelegateBakedModel(BakedModel parent) { + this.parent = parent; } @Override diff --git a/net/minecraft/client/resources/model/EquipmentModelSet.java b/net/minecraft/client/resources/model/EquipmentModelSet.java index 9e1194b5..9246cc28 100644 --- a/net/minecraft/client/resources/model/EquipmentModelSet.java +++ b/net/minecraft/client/resources/model/EquipmentModelSet.java @@ -18,11 +18,11 @@ public class EquipmentModelSet extends SimpleJsonResourceReloadListener map, ResourceManager resourceManager, ProfilerFiller profilerFiller) { - this.models = Map.copyOf(map); + protected void apply(Map object, ResourceManager resourceManager, ProfilerFiller profiler) { + this.models = Map.copyOf(object); } - public EquipmentModel get(ResourceLocation resourceLocation) { - return (EquipmentModel)this.models.getOrDefault(resourceLocation, MISSING_MODEL); + public EquipmentModel get(ResourceLocation name) { + return (EquipmentModel)this.models.getOrDefault(name, MISSING_MODEL); } } diff --git a/net/minecraft/client/resources/model/ItemModel.java b/net/minecraft/client/resources/model/ItemModel.java index 25eb90a5..a66a8da6 100644 --- a/net/minecraft/client/resources/model/ItemModel.java +++ b/net/minecraft/client/resources/model/ItemModel.java @@ -15,8 +15,8 @@ public class ItemModel implements UnbakedModel { private final ResourceLocation id; private List overrides = List.of(); - public ItemModel(ResourceLocation resourceLocation) { - this.id = resourceLocation; + public ItemModel(ResourceLocation id) { + this.id = id; } @Override @@ -42,9 +42,9 @@ public class ItemModel implements UnbakedModel { static class BakedModelWithOverrides extends DelegateBakedModel { private final BakedOverrides overrides; - public BakedModelWithOverrides(BakedModel bakedModel, BakedOverrides bakedOverrides) { - super(bakedModel); - this.overrides = bakedOverrides; + public BakedModelWithOverrides(BakedModel parent, BakedOverrides overrides) { + super(parent); + this.overrides = overrides; } @Override diff --git a/net/minecraft/client/resources/model/Material.java b/net/minecraft/client/resources/model/Material.java index b18121eb..6991074c 100644 --- a/net/minecraft/client/resources/model/Material.java +++ b/net/minecraft/client/resources/model/Material.java @@ -47,12 +47,12 @@ public class Material { return this.renderType; } - public VertexConsumer buffer(MultiBufferSource buffer, Function renderTypeGetter) { - return this.sprite().wrap(buffer.getBuffer(this.renderType(renderTypeGetter))); + public VertexConsumer buffer(MultiBufferSource bufferSource, Function renderTypeGetter) { + return this.sprite().wrap(bufferSource.getBuffer(this.renderType(renderTypeGetter))); } - public VertexConsumer buffer(MultiBufferSource multiBufferSource, Function function, boolean bl, boolean bl2) { - return this.sprite().wrap(ItemRenderer.getFoilBuffer(multiBufferSource, this.renderType(function), bl, bl2)); + public VertexConsumer buffer(MultiBufferSource bufferSource, Function renderTypeGetter, boolean noEntity, boolean withGlint) { + return this.sprite().wrap(ItemRenderer.getFoilBuffer(bufferSource, this.renderType(renderTypeGetter), noEntity, withGlint)); } public boolean equals(Object object) { diff --git a/net/minecraft/client/resources/model/ModelBakery.java b/net/minecraft/client/resources/model/ModelBakery.java index 04698f8a..74f5c797 100644 --- a/net/minecraft/client/resources/model/ModelBakery.java +++ b/net/minecraft/client/resources/model/ModelBakery.java @@ -46,10 +46,10 @@ public class ModelBakery { final Map unbakedModels; final UnbakedModel missingModel; - public ModelBakery(Map map, Map map2, UnbakedModel unbakedModel) { - this.topModels = map; - this.unbakedModels = map2; - this.missingModel = unbakedModel; + public ModelBakery(Map topModels, Map unbackedModels, UnbakedModel missingModel) { + this.topModels = topModels; + this.unbakedModels = unbackedModels; + this.missingModel = missingModel; } public void bakeModels(ModelBakery.TextureGetter textureGetter) { @@ -84,10 +84,10 @@ public class ModelBakery { this.modelTextureGetter = material -> textureGetter.get(modelLocation, material); } - private UnbakedModel getModel(ResourceLocation location) { - UnbakedModel unbakedModel = (UnbakedModel)ModelBakery.this.unbakedModels.get(location); + private UnbakedModel getModel(ResourceLocation name) { + UnbakedModel unbakedModel = (UnbakedModel)ModelBakery.this.unbakedModels.get(name); if (unbakedModel == null) { - ModelBakery.LOGGER.warn("Requested a model that was not discovered previously: {}", location); + ModelBakery.LOGGER.warn("Requested a model that was not discovered previously: {}", name); return ModelBakery.this.missingModel; } else { return unbakedModel; diff --git a/net/minecraft/client/resources/model/ModelDiscovery.java b/net/minecraft/client/resources/model/ModelDiscovery.java index 21a56118..8a54e4cd 100644 --- a/net/minecraft/client/resources/model/ModelDiscovery.java +++ b/net/minecraft/client/resources/model/ModelDiscovery.java @@ -28,11 +28,11 @@ public class ModelDiscovery { private final Map topModels = new HashMap(); private final Map referencedModels = new HashMap(); - public ModelDiscovery(Map map, UnbakedModel unbakedModel) { - this.inputModels = map; - this.missingModel = unbakedModel; - this.registerTopModel(MissingBlockModel.VARIANT, unbakedModel); - this.referencedModels.put(MissingBlockModel.LOCATION, unbakedModel); + public ModelDiscovery(Map inputModels, UnbakedModel missingModel) { + this.inputModels = inputModels; + this.missingModel = missingModel; + this.registerTopModel(MissingBlockModel.VARIANT, missingModel); + this.referencedModels.put(MissingBlockModel.LOCATION, missingModel); } private static Set listMandatoryModels() { @@ -53,8 +53,8 @@ public class ModelDiscovery { return set; } - private void registerTopModel(ModelResourceLocation modelResourceLocation, UnbakedModel unbakedModel) { - this.topModels.put(modelResourceLocation, unbakedModel); + private void registerTopModel(ModelResourceLocation id, UnbakedModel model) { + this.topModels.put(id, model); } public void registerStandardModels(BlockStateModelLoader.LoadedModels loadedModels) { @@ -95,14 +95,14 @@ public class ModelDiscovery { return this.referencedModels; } - UnbakedModel getBlockModel(ResourceLocation resourceLocation) { - return (UnbakedModel)this.referencedModels.computeIfAbsent(resourceLocation, this::loadBlockModel); + UnbakedModel getBlockModel(ResourceLocation modelLocation) { + return (UnbakedModel)this.referencedModels.computeIfAbsent(modelLocation, this::loadBlockModel); } - private UnbakedModel loadBlockModel(ResourceLocation resourceLocation) { - UnbakedModel unbakedModel = (UnbakedModel)this.inputModels.get(resourceLocation); + private UnbakedModel loadBlockModel(ResourceLocation modelLocation) { + UnbakedModel unbakedModel = (UnbakedModel)this.inputModels.get(modelLocation); if (unbakedModel == null) { - LOGGER.warn("Missing block model: '{}'", resourceLocation); + LOGGER.warn("Missing block model: '{}'", modelLocation); return this.missingModel; } else { return unbakedModel; @@ -115,16 +115,16 @@ public class ModelDiscovery { private final Set resolvedModels = new HashSet(); @Override - public UnbakedModel resolve(ResourceLocation resourceLocation) { - if (this.stack.contains(resourceLocation)) { - ModelDiscovery.LOGGER.warn("Detected model loading loop: {}->{}", this.stacktraceToString(), resourceLocation); + public UnbakedModel resolve(ResourceLocation modelLocation) { + if (this.stack.contains(modelLocation)) { + ModelDiscovery.LOGGER.warn("Detected model loading loop: {}->{}", this.stacktraceToString(), modelLocation); return ModelDiscovery.this.missingModel; } else { - UnbakedModel unbakedModel = ModelDiscovery.this.getBlockModel(resourceLocation); - if (this.resolvedModels.add(resourceLocation)) { - this.stack.add(resourceLocation); + UnbakedModel unbakedModel = ModelDiscovery.this.getBlockModel(modelLocation); + if (this.resolvedModels.add(modelLocation)) { + this.stack.add(modelLocation); unbakedModel.resolveDependencies(this); - this.stack.remove(resourceLocation); + this.stack.remove(modelLocation); } return unbakedModel; diff --git a/net/minecraft/client/resources/model/ModelGroupCollector.java b/net/minecraft/client/resources/model/ModelGroupCollector.java index cf8ed09a..ab196c8a 100644 --- a/net/minecraft/client/resources/model/ModelGroupCollector.java +++ b/net/minecraft/client/resources/model/ModelGroupCollector.java @@ -61,19 +61,17 @@ public class ModelGroupCollector { @Environment(EnvType.CLIENT) record GroupKey(Object equalityGroup, List coloringValues) { - public static ModelGroupCollector.GroupKey create(BlockState blockState, UnbakedModel unbakedModel, List> list) { - List list2 = getColoringValues(blockState, list); - Object object = unbakedModel instanceof UnbakedBlockStateModel unbakedBlockStateModel - ? unbakedBlockStateModel.visualEqualityGroup(blockState) - : unbakedModel; - return new ModelGroupCollector.GroupKey(object, list2); + public static ModelGroupCollector.GroupKey create(BlockState state, UnbakedModel model, List> properties) { + List list = getColoringValues(state, properties); + Object object = model instanceof UnbakedBlockStateModel unbakedBlockStateModel ? unbakedBlockStateModel.visualEqualityGroup(state) : model; + return new ModelGroupCollector.GroupKey(object, list); } - private static List getColoringValues(BlockState blockState, List> list) { - Object[] objects = new Object[list.size()]; + private static List getColoringValues(BlockState state, List> properties) { + Object[] objects = new Object[properties.size()]; - for (int i = 0; i < list.size(); i++) { - objects[i] = blockState.getValue((Property)list.get(i)); + for (int i = 0; i < properties.size(); i++) { + objects[i] = state.getValue((Property)properties.get(i)); } return List.of(objects); diff --git a/net/minecraft/client/resources/model/ModelManager.java b/net/minecraft/client/resources/model/ModelManager.java index 8b1800f3..ce9a33f5 100644 --- a/net/minecraft/client/resources/model/ModelManager.java +++ b/net/minecraft/client/resources/model/ModelManager.java @@ -100,19 +100,19 @@ public class ModelManager implements PreparableReloadListener, AutoCloseable { @Override public final CompletableFuture reload( - PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor executor, Executor executor2 + PreparableReloadListener.PreparationBarrier barrier, ResourceManager manager, Executor backgroundExecutor, Executor gameExecutor ) { UnbakedModel unbakedModel = MissingBlockModel.missingModel(); BlockStateModelLoader blockStateModelLoader = new BlockStateModelLoader(unbakedModel); - CompletableFuture> completableFuture = loadBlockModels(resourceManager, executor); - CompletableFuture completableFuture2 = loadBlockStates(blockStateModelLoader, resourceManager, executor); + CompletableFuture> completableFuture = loadBlockModels(manager, backgroundExecutor); + CompletableFuture completableFuture2 = loadBlockStates(blockStateModelLoader, manager, backgroundExecutor); CompletableFuture completableFuture3 = completableFuture2.thenCombineAsync( - completableFuture, (loadedModels, mapx) -> this.discoverModelDependencies(unbakedModel, mapx, loadedModels), executor + completableFuture, (loadedModels, mapx) -> this.discoverModelDependencies(unbakedModel, mapx, loadedModels), backgroundExecutor ); CompletableFuture> completableFuture4 = completableFuture2.thenApplyAsync( - loadedModels -> buildModelGroups(this.blockColors, loadedModels), executor + loadedModels -> buildModelGroups(this.blockColors, loadedModels), backgroundExecutor ); - Map> map = this.atlases.scheduleLoad(resourceManager, this.maxMipmapLevels, executor); + Map> map = this.atlases.scheduleLoad(manager, this.maxMipmapLevels, backgroundExecutor); return CompletableFuture.allOf( (CompletableFuture[])Stream.concat(map.values().stream(), Stream.of(completableFuture3, completableFuture4)).toArray(CompletableFuture[]::new) ) @@ -127,11 +127,11 @@ public class ModelManager implements PreparableReloadListener, AutoCloseable { Profiler.get(), map2, new ModelBakery(modelDiscovery.getTopModels(), modelDiscovery.getReferencedModels(), unbakedModel), object2IntMap ); }, - executor + backgroundExecutor ) .thenCompose(reloadState -> reloadState.readyForUpload.thenApply(void_ -> reloadState)) - .thenCompose(preparationBarrier::wait) - .thenAcceptAsync(reloadState -> this.apply(reloadState, Profiler.get()), executor2); + .thenCompose(barrier::wait) + .thenAcceptAsync(reloadState -> this.apply(reloadState, Profiler.get()), gameExecutor); } private static CompletableFuture> loadBlockModels(ResourceManager resourceManager, Executor executor) { @@ -183,19 +183,19 @@ public class ModelManager implements PreparableReloadListener, AutoCloseable { } private ModelDiscovery discoverModelDependencies( - UnbakedModel unbakedModel, Map map, BlockStateModelLoader.LoadedModels loadedModels + UnbakedModel missingModel, Map inputModels, BlockStateModelLoader.LoadedModels loadedModels ) { - ModelDiscovery modelDiscovery = new ModelDiscovery(map, unbakedModel); + ModelDiscovery modelDiscovery = new ModelDiscovery(inputModels, missingModel); modelDiscovery.registerStandardModels(loadedModels); modelDiscovery.discoverDependencies(); return modelDiscovery; } private static CompletableFuture loadBlockStates( - BlockStateModelLoader blockStateModelLoader, ResourceManager resourceManager, Executor executor + BlockStateModelLoader modelLoader, ResourceManager resourceManager, Executor backgroundExecutor ) { Function> function = BlockStateModelLoader.definitionLocationToBlockMapper(); - return CompletableFuture.supplyAsync(() -> BLOCKSTATE_LISTER.listMatchingResourceStacks(resourceManager), executor).thenCompose(map -> { + return CompletableFuture.supplyAsync(() -> BLOCKSTATE_LISTER.listMatchingResourceStacks(resourceManager), backgroundExecutor).thenCompose(map -> { List> list = new ArrayList(map.size()); for (Entry> entry : map.entrySet()) { @@ -238,13 +238,13 @@ public class ModelManager implements PreparableReloadListener, AutoCloseable { } try { - return blockStateModelLoader.loadBlockStateDefinitionStack(resourceLocation, stateDefinition, list2); + return modelLoader.loadBlockStateDefinitionStack(resourceLocation, stateDefinition, list2); } catch (Exception var12) { LOGGER.error("Failed to load blockstate definition {}", resourceLocation, var12); return null; } } - }, executor)); + }, backgroundExecutor)); } return Util.sequence(list).thenApply(listx -> { @@ -262,12 +262,12 @@ public class ModelManager implements PreparableReloadListener, AutoCloseable { } private ModelManager.ReloadState loadModels( - ProfilerFiller profilerFiller, Map map, ModelBakery modelBakery, Object2IntMap object2IntMap + ProfilerFiller profiler, Map stitchResults, ModelBakery modelBakery, Object2IntMap modelGroups ) { - profilerFiller.push("baking"); + profiler.push("baking"); Multimap multimap = HashMultimap.create(); modelBakery.bakeModels((modelResourceLocation, material) -> { - StitchResult stitchResult = (StitchResult)map.get(material.atlasLocation()); + StitchResult stitchResult = (StitchResult)stitchResults.get(material.atlasLocation()); TextureAtlasSprite textureAtlasSprite = stitchResult.getSprite(material.texture()); if (textureAtlasSprite != null) { return textureAtlasSprite; @@ -287,24 +287,24 @@ public class ModelManager implements PreparableReloadListener, AutoCloseable { .collect(Collectors.joining("\n")) ) ); - profilerFiller.popPush("dispatch"); - Map map2 = modelBakery.getBakedTopLevelModels(); - BakedModel bakedModel = (BakedModel)map2.get(MissingBlockModel.VARIANT); - Map map3 = new IdentityHashMap(); + profiler.popPush("dispatch"); + Map map = modelBakery.getBakedTopLevelModels(); + BakedModel bakedModel = (BakedModel)map.get(MissingBlockModel.VARIANT); + Map map2 = new IdentityHashMap(); for (Block block : BuiltInRegistries.BLOCK) { block.getStateDefinition().getPossibleStates().forEach(blockState -> { ResourceLocation resourceLocation = blockState.getBlock().builtInRegistryHolder().key().location(); - BakedModel bakedModel2 = (BakedModel)map2.getOrDefault(BlockModelShaper.stateToModelLocation(resourceLocation, blockState), bakedModel); - map3.put(blockState, bakedModel2); + BakedModel bakedModel2 = (BakedModel)map.getOrDefault(BlockModelShaper.stateToModelLocation(resourceLocation, blockState), bakedModel); + map2.put(blockState, bakedModel2); }); } CompletableFuture completableFuture = CompletableFuture.allOf( - (CompletableFuture[])map.values().stream().map(StitchResult::readyForUpload).toArray(CompletableFuture[]::new) + (CompletableFuture[])stitchResults.values().stream().map(StitchResult::readyForUpload).toArray(CompletableFuture[]::new) ); - profilerFiller.pop(); - return new ModelManager.ReloadState(modelBakery, object2IntMap, bakedModel, map3, map, completableFuture); + profiler.pop(); + return new ModelManager.ReloadState(modelBakery, modelGroups, bakedModel, map2, stitchResults, completableFuture); } private static Object2IntMap buildModelGroups(BlockColors blockColors, BlockStateModelLoader.LoadedModels loadedModels) { diff --git a/net/minecraft/client/resources/model/MultiPartBakedModel.java b/net/minecraft/client/resources/model/MultiPartBakedModel.java index 5cfc8d62..83952ba3 100644 --- a/net/minecraft/client/resources/model/MultiPartBakedModel.java +++ b/net/minecraft/client/resources/model/MultiPartBakedModel.java @@ -20,11 +20,11 @@ public class MultiPartBakedModel extends DelegateBakedModel { private final List selectors; private final Map selectorCache = new Reference2ObjectOpenHashMap<>(); - private static BakedModel getFirstModel(List list) { - if (list.isEmpty()) { + private static BakedModel getFirstModel(List selectors) { + if (selectors.isEmpty()) { throw new IllegalArgumentException("Model must have at least one selector"); } else { - return ((MultiPartBakedModel.Selector)list.getFirst()).model(); + return ((MultiPartBakedModel.Selector)selectors.getFirst()).model(); } } diff --git a/net/minecraft/client/resources/model/SimpleBakedModel.java b/net/minecraft/client/resources/model/SimpleBakedModel.java index 27043189..c3b4adfa 100644 --- a/net/minecraft/client/resources/model/SimpleBakedModel.java +++ b/net/minecraft/client/resources/model/SimpleBakedModel.java @@ -27,21 +27,21 @@ public class SimpleBakedModel implements BakedModel { protected final ItemTransforms transforms; public SimpleBakedModel( - List list, - Map> map, - boolean bl, - boolean bl2, - boolean bl3, - TextureAtlasSprite textureAtlasSprite, - ItemTransforms itemTransforms + List unculledFaces, + Map> culledFaces, + boolean hasAmbientOcclusion, + boolean useBlockLight, + boolean isGui3d, + TextureAtlasSprite particleIcon, + ItemTransforms transforms ) { - this.unculledFaces = list; - this.culledFaces = map; - this.hasAmbientOcclusion = bl; - this.isGui3d = bl3; - this.usesBlockLight = bl2; - this.particleIcon = textureAtlasSprite; - this.transforms = itemTransforms; + this.unculledFaces = unculledFaces; + this.culledFaces = culledFaces; + this.hasAmbientOcclusion = hasAmbientOcclusion; + this.isGui3d = isGui3d; + this.usesBlockLight = useBlockLight; + this.particleIcon = particleIcon; + this.transforms = transforms; } @Override @@ -90,15 +90,15 @@ public class SimpleBakedModel implements BakedModel { private final boolean isGui3d; private final ItemTransforms transforms; - public Builder(BlockModel blockModel, boolean bl) { - this(blockModel.hasAmbientOcclusion(), blockModel.getGuiLight().lightLikeBlock(), bl, blockModel.getTransforms()); + public Builder(BlockModel model, boolean isGui3d) { + this(model.hasAmbientOcclusion(), model.getGuiLight().lightLikeBlock(), isGui3d, model.getTransforms()); } - private Builder(boolean bl, boolean bl2, boolean bl3, ItemTransforms itemTransforms) { - this.hasAmbientOcclusion = bl; - this.usesBlockLight = bl2; - this.isGui3d = bl3; - this.transforms = itemTransforms; + private Builder(boolean hasAmbientOcclusion, boolean useBlockLight, boolean isGui3d, ItemTransforms trnsforms) { + this.hasAmbientOcclusion = hasAmbientOcclusion; + this.usesBlockLight = useBlockLight; + this.isGui3d = isGui3d; + this.transforms = trnsforms; for (Direction direction : Direction.values()) { this.culledFaces.put(direction, ImmutableList.builder()); diff --git a/net/minecraft/client/resources/model/SpecialModels.java b/net/minecraft/client/resources/model/SpecialModels.java index b5185e83..426084f7 100644 --- a/net/minecraft/client/resources/model/SpecialModels.java +++ b/net/minecraft/client/resources/model/SpecialModels.java @@ -15,13 +15,13 @@ public class SpecialModels { public static final UnbakedModel GENERATED_MARKER = createMarker("generation marker", BlockModel.GuiLight.FRONT); public static final UnbakedModel BLOCK_ENTITY_MARKER = createMarker("block entity marker", BlockModel.GuiLight.SIDE); - public static ResourceLocation builtinModelId(String string) { - return ResourceLocation.withDefaultNamespace("builtin/" + string); + public static ResourceLocation builtinModelId(String name) { + return ResourceLocation.withDefaultNamespace("builtin/" + name); } - private static UnbakedModel createMarker(String string, BlockModel.GuiLight guiLight) { + private static UnbakedModel createMarker(String name, BlockModel.GuiLight guiLight) { BlockModel blockModel = new BlockModel(null, List.of(), Map.of(), null, guiLight, ItemTransforms.NO_TRANSFORMS, List.of()); - blockModel.name = string; + blockModel.name = name; return blockModel; } } diff --git a/net/minecraft/client/resources/model/UnbakedModel.java b/net/minecraft/client/resources/model/UnbakedModel.java index f9e4a131..c68106ed 100644 --- a/net/minecraft/client/resources/model/UnbakedModel.java +++ b/net/minecraft/client/resources/model/UnbakedModel.java @@ -14,6 +14,6 @@ public interface UnbakedModel { @Environment(EnvType.CLIENT) public interface Resolver { - UnbakedModel resolve(ResourceLocation resourceLocation); + UnbakedModel resolve(ResourceLocation modelLocation); } } diff --git a/net/minecraft/client/resources/model/WeightedBakedModel.java b/net/minecraft/client/resources/model/WeightedBakedModel.java index 234e8e36..c954b60f 100644 --- a/net/minecraft/client/resources/model/WeightedBakedModel.java +++ b/net/minecraft/client/resources/model/WeightedBakedModel.java @@ -16,9 +16,9 @@ import org.jetbrains.annotations.Nullable; public class WeightedBakedModel extends DelegateBakedModel { private final SimpleWeightedRandomList list; - public WeightedBakedModel(SimpleWeightedRandomList simpleWeightedRandomList) { - super((BakedModel)((Wrapper)simpleWeightedRandomList.unwrap().getFirst()).data()); - this.list = simpleWeightedRandomList; + public WeightedBakedModel(SimpleWeightedRandomList list) { + super((BakedModel)((Wrapper)list.unwrap().getFirst()).data()); + this.list = list; } @Override diff --git a/net/minecraft/client/searchtree/SuffixArray.java b/net/minecraft/client/searchtree/SuffixArray.java index f9a62680..1544e8ef 100644 --- a/net/minecraft/client/searchtree/SuffixArray.java +++ b/net/minecraft/client/searchtree/SuffixArray.java @@ -119,39 +119,39 @@ public class SuffixArray { LOGGER.debug(""); } - private String getString(int i) { - int j = this.offsets.getInt(i); - int k = this.wordStarts.getInt(this.suffixToT.getInt(i)); + private String getString(int index) { + int i = this.offsets.getInt(index); + int j = this.wordStarts.getInt(this.suffixToT.getInt(index)); StringBuilder stringBuilder = new StringBuilder(); - for (int l = 0; k + l < this.chars.size(); l++) { - if (l == j) { + for (int k = 0; j + k < this.chars.size(); k++) { + if (k == i) { stringBuilder.append('^'); } - int m = this.chars.getInt(k + l); - if (m == -1) { + int l = this.chars.getInt(j + k); + if (l == -1) { break; } - stringBuilder.append((char)m); + stringBuilder.append((char)l); } return stringBuilder.toString(); } - private int compare(String string, int i) { - int j = this.wordStarts.getInt(this.suffixToT.getInt(i)); - int k = this.offsets.getInt(i); + private int compare(String string, int index) { + int i = this.wordStarts.getInt(this.suffixToT.getInt(index)); + int j = this.offsets.getInt(index); - for (int l = 0; l < string.length(); l++) { - int m = this.chars.getInt(j + k + l); - if (m == -1) { + for (int k = 0; k < string.length(); k++) { + int l = this.chars.getInt(i + j + k); + if (l == -1) { return 1; } - char c = string.charAt(l); - char d = (char)m; + char c = string.charAt(k); + char d = (char)l; if (c < d) { return -1; } diff --git a/net/minecraft/client/tutorial/MovementTutorialStepInstance.java b/net/minecraft/client/tutorial/MovementTutorialStepInstance.java index 97f2dc15..0dabaff3 100644 --- a/net/minecraft/client/tutorial/MovementTutorialStepInstance.java +++ b/net/minecraft/client/tutorial/MovementTutorialStepInstance.java @@ -109,12 +109,8 @@ public class MovementTutorialStepInstance implements TutorialStepInstance { } @Override - public void onInput(ClientInput clientInput) { - if (clientInput.keyPresses.forward() - || clientInput.keyPresses.backward() - || clientInput.keyPresses.left() - || clientInput.keyPresses.right() - || clientInput.keyPresses.jump()) { + public void onInput(ClientInput input) { + if (input.keyPresses.forward() || input.keyPresses.backward() || input.keyPresses.left() || input.keyPresses.right() || input.keyPresses.jump()) { this.moved = true; } } diff --git a/net/minecraft/client/tutorial/Tutorial.java b/net/minecraft/client/tutorial/Tutorial.java index c3e7c4e0..39247696 100644 --- a/net/minecraft/client/tutorial/Tutorial.java +++ b/net/minecraft/client/tutorial/Tutorial.java @@ -26,9 +26,9 @@ public class Tutorial { this.minecraft = minecraft; } - public void onInput(ClientInput clientInput) { + public void onInput(ClientInput input) { if (this.instance != null) { - this.instance.onInput(clientInput); + this.instance.onInput(input); } } diff --git a/net/minecraft/client/tutorial/TutorialStepInstance.java b/net/minecraft/client/tutorial/TutorialStepInstance.java index d266a4b8..26e4adcd 100644 --- a/net/minecraft/client/tutorial/TutorialStepInstance.java +++ b/net/minecraft/client/tutorial/TutorialStepInstance.java @@ -17,7 +17,7 @@ public interface TutorialStepInstance { default void tick() { } - default void onInput(ClientInput clientInput) { + default void onInput(ClientInput input) { } default void onMouse(double velocityX, double velocityY) { diff --git a/net/minecraft/commands/arguments/ResourceKeyArgument.java b/net/minecraft/commands/arguments/ResourceKeyArgument.java index 93d1bc7e..aa2a6328 100644 --- a/net/minecraft/commands/arguments/ResourceKeyArgument.java +++ b/net/minecraft/commands/arguments/ResourceKeyArgument.java @@ -16,9 +16,10 @@ import net.minecraft.advancements.Advancement; import net.minecraft.advancements.AdvancementHolder; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.SharedSuggestionProvider; +import net.minecraft.commands.SharedSuggestionProvider.ElementSuggestionType; import net.minecraft.commands.synchronization.ArgumentTypeInfo; -import net.minecraft.core.Holder; import net.minecraft.core.Registry; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.Registries; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; @@ -70,34 +71,34 @@ public class ResourceKeyArgument implements ArgumentType> { return context.getSource().getServer().registryAccess().lookupOrThrow(registryKey); } - private static Holder.Reference resolveKey( + private static Reference resolveKey( CommandContext context, String argument, ResourceKey> registryKey, DynamicCommandExceptionType exception ) throws CommandSyntaxException { ResourceKey resourceKey = getRegistryKey(context, argument, registryKey, exception); - return (Holder.Reference)getRegistry(context, registryKey).get(resourceKey).orElseThrow(() -> exception.create(resourceKey.location())); + return (Reference)getRegistry(context, registryKey).get(resourceKey).orElseThrow(() -> exception.create(resourceKey.location())); } - public static Holder.Reference> getConfiguredFeature(CommandContext context, String argument) throws CommandSyntaxException { + public static Reference> getConfiguredFeature(CommandContext context, String argument) throws CommandSyntaxException { return resolveKey(context, argument, Registries.CONFIGURED_FEATURE, ERROR_INVALID_FEATURE); } - public static Holder.Reference getStructure(CommandContext context, String argument) throws CommandSyntaxException { + public static Reference getStructure(CommandContext context, String argument) throws CommandSyntaxException { return resolveKey(context, argument, Registries.STRUCTURE, ERROR_INVALID_STRUCTURE); } - public static Holder.Reference getStructureTemplatePool(CommandContext context, String argument) throws CommandSyntaxException { + public static Reference getStructureTemplatePool(CommandContext context, String argument) throws CommandSyntaxException { return resolveKey(context, argument, Registries.TEMPLATE_POOL, ERROR_INVALID_TEMPLATE_POOL); } - public static RecipeHolder getRecipe(CommandContext commandContext, String string) throws CommandSyntaxException { - RecipeManager recipeManager = commandContext.getSource().getServer().getRecipeManager(); - ResourceKey> resourceKey = getRegistryKey(commandContext, string, Registries.RECIPE, ERROR_INVALID_RECIPE); + public static RecipeHolder getRecipe(CommandContext context, String argument) throws CommandSyntaxException { + RecipeManager recipeManager = context.getSource().getServer().getRecipeManager(); + ResourceKey> resourceKey = getRegistryKey(context, argument, Registries.RECIPE, ERROR_INVALID_RECIPE); return (RecipeHolder)recipeManager.byKey(resourceKey).orElseThrow(() -> ERROR_INVALID_RECIPE.create(resourceKey.location())); } - public static AdvancementHolder getAdvancement(CommandContext commandContext, String string) throws CommandSyntaxException { - ResourceKey resourceKey = getRegistryKey(commandContext, string, Registries.ADVANCEMENT, ERROR_INVALID_ADVANCEMENT); - AdvancementHolder advancementHolder = commandContext.getSource().getServer().getAdvancements().get(resourceKey.location()); + public static AdvancementHolder getAdvancement(CommandContext context, String argument) throws CommandSyntaxException { + ResourceKey resourceKey = getRegistryKey(context, argument, Registries.ADVANCEMENT, ERROR_INVALID_ADVANCEMENT); + AdvancementHolder advancementHolder = context.getSource().getServer().getAdvancements().get(resourceKey.location()); if (advancementHolder == null) { throw ERROR_INVALID_ADVANCEMENT.create(resourceKey.location()); } else { @@ -113,9 +114,7 @@ public class ResourceKeyArgument implements ArgumentType> { @Override public CompletableFuture listSuggestions(CommandContext commandContext, SuggestionsBuilder suggestionsBuilder) { return commandContext.getSource() instanceof SharedSuggestionProvider sharedSuggestionProvider - ? sharedSuggestionProvider.suggestRegistryElements( - this.registryKey, SharedSuggestionProvider.ElementSuggestionType.ELEMENTS, suggestionsBuilder, commandContext - ) + ? sharedSuggestionProvider.suggestRegistryElements(this.registryKey, ElementSuggestionType.ELEMENTS, suggestionsBuilder, commandContext) : suggestionsBuilder.buildFuture(); } diff --git a/net/minecraft/commands/arguments/ScoreHolderArgument.java b/net/minecraft/commands/arguments/ScoreHolderArgument.java index 7a1d0ae6..1c964618 100644 --- a/net/minecraft/commands/arguments/ScoreHolderArgument.java +++ b/net/minecraft/commands/arguments/ScoreHolderArgument.java @@ -14,7 +14,6 @@ import java.util.Collections; import java.util.List; import java.util.UUID; import java.util.function.Supplier; -import net.minecraft.commands.CommandBuildContext; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.SharedSuggestionProvider; import net.minecraft.commands.arguments.selector.EntitySelector; @@ -94,8 +93,8 @@ public class ScoreHolderArgument implements ArgumentType ScoreHolderArgument.Result parse(StringReader stringReader, S object) throws CommandSyntaxException { - return this.parse(stringReader, EntitySelectorParser.allowSelectors(object)); + public ScoreHolderArgument.Result parse(StringReader reader, S suggestionProvider) throws CommandSyntaxException { + return this.parse(reader, EntitySelectorParser.allowSelectors(suggestionProvider)); } private ScoreHolderArgument.Result parse(StringReader reader, boolean allowSelectors) throws CommandSyntaxException { @@ -175,10 +174,10 @@ public class ScoreHolderArgument implements ArgumentType { + public static class Info implements ArgumentTypeInfo { private static final byte FLAG_MULTIPLE = 1; - public void serializeToNetwork(ScoreHolderArgument.Info.Template template, FriendlyByteBuf buffer) { + public void serializeToNetwork(net.minecraft.commands.arguments.ScoreHolderArgument.Info.Template template, FriendlyByteBuf buffer) { int i = 0; if (template.multiple) { i |= 1; @@ -187,35 +186,18 @@ public class ScoreHolderArgument implements ArgumentType { - final boolean multiple; - - Template(final boolean multiple) { - this.multiple = multiple; - } - - public ScoreHolderArgument instantiate(CommandBuildContext context) { - return new ScoreHolderArgument(this.multiple); - } - - @Override - public ArgumentTypeInfo type() { - return Info.this; - } + public net.minecraft.commands.arguments.ScoreHolderArgument.Info.Template unpack(ScoreHolderArgument argument) { + return new net.minecraft.commands.arguments.ScoreHolderArgument.Info.Template(this, argument.multiple); } } diff --git a/net/minecraft/commands/arguments/selector/SelectorPattern.java b/net/minecraft/commands/arguments/selector/SelectorPattern.java index 81d601ef..00230bbb 100644 --- a/net/minecraft/commands/arguments/selector/SelectorPattern.java +++ b/net/minecraft/commands/arguments/selector/SelectorPattern.java @@ -8,12 +8,12 @@ import com.mojang.serialization.DataResult; public record SelectorPattern(String pattern, EntitySelector resolved) { public static final Codec CODEC = Codec.STRING.comapFlatMap(SelectorPattern::parse, SelectorPattern::pattern); - public static DataResult parse(String string) { + public static DataResult parse(String pattern) { try { - EntitySelectorParser entitySelectorParser = new EntitySelectorParser(new StringReader(string), true); - return DataResult.success(new SelectorPattern(string, entitySelectorParser.parse())); + EntitySelectorParser entitySelectorParser = new EntitySelectorParser(new StringReader(pattern), true); + return DataResult.success(new SelectorPattern(pattern, entitySelectorParser.parse())); } catch (CommandSyntaxException var2) { - return DataResult.error(() -> "Invalid selector component: " + string + ": " + var2.getMessage()); + return DataResult.error(() -> "Invalid selector component: " + pattern + ": " + var2.getMessage()); } } diff --git a/net/minecraft/core/BlockPos.java b/net/minecraft/core/BlockPos.java index a707f628..6c5ba92f 100644 --- a/net/minecraft/core/BlockPos.java +++ b/net/minecraft/core/BlockPos.java @@ -395,9 +395,9 @@ public class BlockPos extends Vec3i { return StreamSupport.stream(withinManhattan(pos, xSize, ySize, zSize).spliterator(), false); } - public static Iterable betweenClosed(AABB aABB) { - BlockPos blockPos = containing(aABB.minX, aABB.minY, aABB.minZ); - BlockPos blockPos2 = containing(aABB.maxX, aABB.maxY, aABB.maxZ); + public static Iterable betweenClosed(AABB box) { + BlockPos blockPos = containing(box.minX, box.minY, box.minZ); + BlockPos blockPos2 = containing(box.maxX, box.maxY, box.maxZ); return betweenClosed(blockPos, blockPos2); } diff --git a/net/minecraft/core/DefaultedMappedRegistry.java b/net/minecraft/core/DefaultedMappedRegistry.java index bd819851..61a20192 100644 --- a/net/minecraft/core/DefaultedMappedRegistry.java +++ b/net/minecraft/core/DefaultedMappedRegistry.java @@ -2,6 +2,7 @@ package net.minecraft.core; import com.mojang.serialization.Lifecycle; import java.util.Optional; +import net.minecraft.core.Holder.Reference; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.RandomSource; @@ -10,7 +11,7 @@ import org.jetbrains.annotations.Nullable; public class DefaultedMappedRegistry extends MappedRegistry implements DefaultedRegistry { private final ResourceLocation defaultKey; - private Holder.Reference defaultValue; + private Reference defaultValue; public DefaultedMappedRegistry(String defaultKey, ResourceKey> key, Lifecycle registryLifecycle, boolean hasIntrusiveHolders) { super(key, registryLifecycle, hasIntrusiveHolders); @@ -18,8 +19,8 @@ public class DefaultedMappedRegistry extends MappedRegistry implements Def } @Override - public Holder.Reference register(ResourceKey key, T value, RegistrationInfo registrationInfo) { - Holder.Reference reference = super.register(key, value, registrationInfo); + public Reference register(ResourceKey key, T value, RegistrationInfo registrationInfo) { + Reference reference = super.register(key, value, registrationInfo); if (this.defaultKey.equals(key.location())) { this.defaultValue = reference; } @@ -42,8 +43,8 @@ public class DefaultedMappedRegistry extends MappedRegistry implements Def @NotNull @Override - public T getValue(@Nullable ResourceLocation resourceLocation) { - T object = super.getValue(resourceLocation); + public T getValue(@Nullable ResourceLocation key) { + T object = super.getValue(key); return object == null ? this.defaultValue.value() : object; } @@ -53,7 +54,7 @@ public class DefaultedMappedRegistry extends MappedRegistry implements Def } @Override - public Optional> getAny() { + public Optional> getAny() { return Optional.ofNullable(this.defaultValue); } @@ -65,7 +66,7 @@ public class DefaultedMappedRegistry extends MappedRegistry implements Def } @Override - public Optional> getRandom(RandomSource random) { + public Optional> getRandom(RandomSource random) { return super.getRandom(random).or(() -> Optional.of(this.defaultValue)); } diff --git a/net/minecraft/core/DefaultedRegistry.java b/net/minecraft/core/DefaultedRegistry.java index dcad439d..719605bd 100644 --- a/net/minecraft/core/DefaultedRegistry.java +++ b/net/minecraft/core/DefaultedRegistry.java @@ -11,7 +11,7 @@ public interface DefaultedRegistry extends Registry { @NotNull @Override - T getValue(@Nullable ResourceLocation resourceLocation); + T getValue(@Nullable ResourceLocation key); @NotNull @Override diff --git a/net/minecraft/core/Direction.java b/net/minecraft/core/Direction.java index 5be1b05d..85e71d5b 100644 --- a/net/minecraft/core/Direction.java +++ b/net/minecraft/core/Direction.java @@ -365,18 +365,18 @@ public enum Direction implements StringRepresentable { return Util.getRandom(VALUES, random); } - public static Direction getApproximateNearest(double d, double e, double f) { - return getApproximateNearest((float)d, (float)e, (float)f); + public static Direction getApproximateNearest(double x, double y, double z) { + return getApproximateNearest((float)x, (float)y, (float)z); } - public static Direction getApproximateNearest(float f, float g, float h) { + public static Direction getApproximateNearest(float x, float y, float z) { Direction direction = NORTH; - float i = Float.MIN_VALUE; + float f = Float.MIN_VALUE; for (Direction direction2 : VALUES) { - float j = f * direction2.normal.getX() + g * direction2.normal.getY() + h * direction2.normal.getZ(); - if (j > i) { - i = j; + float g = x * direction2.normal.getX() + y * direction2.normal.getY() + z * direction2.normal.getZ(); + if (g > f) { + f = g; direction = direction2; } } @@ -384,31 +384,31 @@ public enum Direction implements StringRepresentable { return direction; } - public static Direction getApproximateNearest(Vec3 vec3) { - return getApproximateNearest(vec3.x, vec3.y, vec3.z); + public static Direction getApproximateNearest(Vec3 vector) { + return getApproximateNearest(vector.x, vector.y, vector.z); } @Nullable @Contract("_,_,_,!null->!null;_,_,_,_->_") - public static Direction getNearest(int i, int j, int k, @Nullable Direction direction) { - int l = Math.abs(i); - int m = Math.abs(j); - int n = Math.abs(k); - if (l > n && l > m) { - return i < 0 ? WEST : EAST; - } else if (n > l && n > m) { - return k < 0 ? NORTH : SOUTH; - } else if (m > l && m > n) { - return j < 0 ? DOWN : UP; + public static Direction getNearest(int x, int y, int z, @Nullable Direction defaultValue) { + int i = Math.abs(x); + int j = Math.abs(y); + int k = Math.abs(z); + if (i > k && i > j) { + return x < 0 ? WEST : EAST; + } else if (k > i && k > j) { + return z < 0 ? NORTH : SOUTH; + } else if (j > i && j > k) { + return y < 0 ? DOWN : UP; } else { - return direction; + return defaultValue; } } @Nullable @Contract("_,!null->!null;_,_->_") - public static Direction getNearest(Vec3i vec3i, @Nullable Direction direction) { - return getNearest(vec3i.getX(), vec3i.getY(), vec3i.getZ(), direction); + public static Direction getNearest(Vec3i vector, @Nullable Direction defaultValue) { + return getNearest(vector.getX(), vector.getY(), vector.getZ(), defaultValue); } public String toString() { diff --git a/net/minecraft/core/GlobalPos.java b/net/minecraft/core/GlobalPos.java index e40e7d68..2334c2bd 100644 --- a/net/minecraft/core/GlobalPos.java +++ b/net/minecraft/core/GlobalPos.java @@ -29,7 +29,7 @@ public record GlobalPos(ResourceKey dimension, BlockPos pos) { return this.dimension + " " + this.pos; } - public boolean isCloseEnough(ResourceKey resourceKey, BlockPos blockPos, int i) { - return this.dimension.equals(resourceKey) && this.pos.distChessboard(blockPos) <= i; + public boolean isCloseEnough(ResourceKey dimension, BlockPos pos, int maxDistance) { + return this.dimension.equals(dimension) && this.pos.distChessboard(pos) <= maxDistance; } } diff --git a/net/minecraft/core/HolderGetter.java b/net/minecraft/core/HolderGetter.java index 215fcca4..a86f036a 100644 --- a/net/minecraft/core/HolderGetter.java +++ b/net/minecraft/core/HolderGetter.java @@ -1,20 +1,22 @@ package net.minecraft.core; import java.util.Optional; +import net.minecraft.core.Holder.Reference; +import net.minecraft.core.HolderSet.Named; import net.minecraft.resources.ResourceKey; import net.minecraft.tags.TagKey; public interface HolderGetter { - Optional> get(ResourceKey resourceKey); + Optional> get(ResourceKey resourceKey); - default Holder.Reference getOrThrow(ResourceKey resourceKey) { - return (Holder.Reference)this.get(resourceKey).orElseThrow(() -> new IllegalStateException("Missing element " + resourceKey)); + default Reference getOrThrow(ResourceKey resourceKey) { + return (Reference)this.get(resourceKey).orElseThrow(() -> new IllegalStateException("Missing element " + resourceKey)); } - Optional> get(TagKey tagKey); + Optional> get(TagKey tagKey); - default HolderSet.Named getOrThrow(TagKey tagKey) { - return (HolderSet.Named)this.get(tagKey).orElseThrow(() -> new IllegalStateException("Missing tag " + tagKey)); + default Named getOrThrow(TagKey tagKey) { + return (Named)this.get(tagKey).orElseThrow(() -> new IllegalStateException("Missing tag " + tagKey)); } public interface Provider { @@ -24,8 +26,8 @@ public interface HolderGetter { return (HolderGetter)this.lookup(registryKey).orElseThrow(() -> new IllegalStateException("Registry " + registryKey.location() + " not found")); } - default Optional> get(ResourceKey resourceKey) { - return this.lookup(resourceKey.registryKey()).flatMap(holderGetter -> holderGetter.get(resourceKey)); + default Optional> get(ResourceKey key) { + return this.lookup(key.registryKey()).flatMap(holderGetter -> holderGetter.get(key)); } } } diff --git a/net/minecraft/core/HolderLookup.java b/net/minecraft/core/HolderLookup.java index 724628b7..f00c4e2c 100644 --- a/net/minecraft/core/HolderLookup.java +++ b/net/minecraft/core/HolderLookup.java @@ -7,7 +7,9 @@ import java.util.Optional; import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.stream.Stream; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.HolderLookup.Provider.1; +import net.minecraft.core.HolderSet.Named; import net.minecraft.resources.RegistryOps; import net.minecraft.resources.ResourceKey; import net.minecraft.tags.TagKey; @@ -15,16 +17,16 @@ import net.minecraft.world.flag.FeatureElement; import net.minecraft.world.flag.FeatureFlagSet; public interface HolderLookup extends HolderGetter { - Stream> listElements(); + Stream> listElements(); default Stream> listElementIds() { - return this.listElements().map(Holder.Reference::key); + return this.listElements().map(Reference::key); } - Stream> listTags(); + Stream> listTags(); default Stream> listTagIds() { - return this.listTags().map(HolderSet.Named::key); + return this.listTags().map(Named::key); } public interface Provider extends HolderGetter.Provider { diff --git a/net/minecraft/core/MappedRegistry.java b/net/minecraft/core/MappedRegistry.java index 51735b84..9eef02b1 100644 --- a/net/minecraft/core/MappedRegistry.java +++ b/net/minecraft/core/MappedRegistry.java @@ -23,7 +23,9 @@ import java.util.Map.Entry; import java.util.function.BiConsumer; import java.util.stream.Stream; import net.minecraft.Util; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.HolderLookup.RegistryLookup.Delegate; +import net.minecraft.core.HolderSet.Named; import net.minecraft.core.MappedRegistry.TagSet.1; import net.minecraft.core.MappedRegistry.TagSet.2; import net.minecraft.resources.ResourceKey; @@ -35,23 +37,23 @@ import org.jetbrains.annotations.Nullable; public class MappedRegistry implements WritableRegistry { private final ResourceKey> key; - private final ObjectList> byId = new ObjectArrayList<>(256); + private final ObjectList> byId = new ObjectArrayList<>(256); private final Reference2IntMap toId = Util.make( new Reference2IntOpenHashMap<>(), reference2IntOpenHashMap -> reference2IntOpenHashMap.defaultReturnValue(-1) ); - private final Map> byLocation = new HashMap(); - private final Map, Holder.Reference> byKey = new HashMap(); - private final Map> byValue = new IdentityHashMap(); + private final Map> byLocation = new HashMap(); + private final Map, Reference> byKey = new HashMap(); + private final Map> byValue = new IdentityHashMap(); private final Map, RegistrationInfo> registrationInfos = new IdentityHashMap(); private Lifecycle registryLifecycle; - private final Map, HolderSet.Named> frozenTags = new IdentityHashMap(); + private final Map, Named> frozenTags = new IdentityHashMap(); MappedRegistry.TagSet allTags = MappedRegistry.TagSet.unbound(); private boolean frozen; @Nullable - private Map> unregisteredIntrusiveHolders; + private Map> unregisteredIntrusiveHolders; @Override - public Stream> listTags() { + public Stream> listTags() { return this.getTags(); } @@ -89,7 +91,7 @@ public class MappedRegistry implements WritableRegistry { } @Override - public Holder.Reference register(ResourceKey key, T value, RegistrationInfo registrationInfo) { + public Reference register(ResourceKey key, T value, RegistrationInfo registrationInfo) { this.validateWrite(key); Objects.requireNonNull(key); Objects.requireNonNull(value); @@ -98,16 +100,16 @@ public class MappedRegistry implements WritableRegistry { } else if (this.byValue.containsKey(value)) { throw (IllegalStateException)Util.pauseInIde((T)(new IllegalStateException("Adding duplicate value '" + value + "' to registry"))); } else { - Holder.Reference reference; + Reference reference; if (this.unregisteredIntrusiveHolders != null) { - reference = (Holder.Reference)this.unregisteredIntrusiveHolders.remove(value); + reference = (Reference)this.unregisteredIntrusiveHolders.remove(value); if (reference == null) { throw new AssertionError("Missing intrusive holder for " + key + ":" + value); } reference.bindKey(key); } else { - reference = (Holder.Reference)this.byKey.computeIfAbsent(key, resourceKey -> Holder.Reference.createStandAlone(this, resourceKey)); + reference = (Reference)this.byKey.computeIfAbsent(key, resourceKey -> Reference.createStandAlone(this, resourceKey)); } this.byKey.put(key, reference); @@ -125,13 +127,13 @@ public class MappedRegistry implements WritableRegistry { @Nullable @Override public ResourceLocation getKey(T value) { - Holder.Reference reference = (Holder.Reference)this.byValue.get(value); + Reference reference = (Reference)this.byValue.get(value); return reference != null ? reference.key().location() : null; } @Override public Optional> getResourceKey(T value) { - return Optional.ofNullable((Holder.Reference)this.byValue.get(value)).map(Holder.Reference::key); + return Optional.ofNullable((Reference)this.byValue.get(value)).map(Reference::key); } @Override @@ -141,49 +143,49 @@ public class MappedRegistry implements WritableRegistry { @Nullable @Override - public T getValue(@Nullable ResourceKey resourceKey) { - return getValueFromNullable((Holder.Reference)this.byKey.get(resourceKey)); + public T getValue(@Nullable ResourceKey key) { + return getValueFromNullable((Reference)this.byKey.get(key)); } @Nullable @Override public T byId(int id) { - return (T)(id >= 0 && id < this.byId.size() ? ((Holder.Reference)this.byId.get(id)).value() : null); + return (T)(id >= 0 && id < this.byId.size() ? ((Reference)this.byId.get(id)).value() : null); } @Override - public Optional> get(int i) { - return i >= 0 && i < this.byId.size() ? Optional.ofNullable((Holder.Reference)this.byId.get(i)) : Optional.empty(); + public Optional> get(int index) { + return index >= 0 && index < this.byId.size() ? Optional.ofNullable((Reference)this.byId.get(index)) : Optional.empty(); } @Override - public Optional> get(ResourceLocation resourceLocation) { - return Optional.ofNullable((Holder.Reference)this.byLocation.get(resourceLocation)); + public Optional> get(ResourceLocation key) { + return Optional.ofNullable((Reference)this.byLocation.get(key)); } @Override - public Optional> get(ResourceKey resourceKey) { - return Optional.ofNullable((Holder.Reference)this.byKey.get(resourceKey)); + public Optional> get(ResourceKey resourceKey) { + return Optional.ofNullable((Reference)this.byKey.get(resourceKey)); } @Override - public Optional> getAny() { - return this.byId.isEmpty() ? Optional.empty() : Optional.of((Holder.Reference)this.byId.getFirst()); + public Optional> getAny() { + return this.byId.isEmpty() ? Optional.empty() : Optional.of((Reference)this.byId.getFirst()); } @Override public Holder wrapAsHolder(T value) { - Holder.Reference reference = (Holder.Reference)this.byValue.get(value); + Reference reference = (Reference)this.byValue.get(value); return (Holder)(reference != null ? reference : Holder.direct(value)); } - Holder.Reference getOrCreateHolderOrThrow(ResourceKey key) { - return (Holder.Reference)this.byKey.computeIfAbsent(key, resourceKey -> { + Reference getOrCreateHolderOrThrow(ResourceKey key) { + return (Reference)this.byKey.computeIfAbsent(key, resourceKey -> { if (this.unregisteredIntrusiveHolders != null) { throw new IllegalStateException("This registry can't create new holders without value"); } else { this.validateWrite(resourceKey); - return Holder.Reference.createStandAlone(this, resourceKey); + return Reference.createStandAlone(this, resourceKey); } }); } @@ -209,13 +211,13 @@ public class MappedRegistry implements WritableRegistry { @Nullable @Override - public T getValue(@Nullable ResourceLocation resourceLocation) { - Holder.Reference reference = (Holder.Reference)this.byLocation.get(resourceLocation); + public T getValue(@Nullable ResourceLocation key) { + Reference reference = (Reference)this.byLocation.get(key); return getValueFromNullable(reference); } @Nullable - private static T getValueFromNullable(@Nullable Holder.Reference holder) { + private static T getValueFromNullable(@Nullable Reference holder) { return holder != null ? holder.value() : null; } @@ -235,21 +237,21 @@ public class MappedRegistry implements WritableRegistry { } @Override - public Stream> listElements() { + public Stream> listElements() { return this.byId.stream(); } @Override - public Stream> getTags() { + public Stream> getTags() { return this.allTags.getTags(); } - HolderSet.Named getOrCreateTagForRegistration(TagKey tagKey) { - return (HolderSet.Named)this.frozenTags.computeIfAbsent(tagKey, this::createTag); + Named getOrCreateTagForRegistration(TagKey key) { + return (Named)this.frozenTags.computeIfAbsent(key, this::createTag); } - private HolderSet.Named createTag(TagKey key) { - return new HolderSet.Named<>(this, key); + private Named createTag(TagKey key) { + return new Named<>(this, key); } @Override @@ -258,7 +260,7 @@ public class MappedRegistry implements WritableRegistry { } @Override - public Optional> getRandom(RandomSource random) { + public Optional> getRandom(RandomSource random) { return Util.getRandomSafe(this.byId, random); } @@ -282,7 +284,7 @@ public class MappedRegistry implements WritableRegistry { List list = this.byKey .entrySet() .stream() - .filter(entry -> !((Holder.Reference)entry.getValue()).isBound()) + .filter(entry -> !((Reference)entry.getValue()).isBound()) .map(entry -> ((ResourceKey)entry.getKey()).location()) .sorted() .toList(); @@ -303,7 +305,7 @@ public class MappedRegistry implements WritableRegistry { List list2 = this.frozenTags .entrySet() .stream() - .filter(entry -> !((HolderSet.Named)entry.getValue()).isBound()) + .filter(entry -> !((Named)entry.getValue()).isBound()) .map(entry -> ((TagKey)entry.getKey()).location()) .sorted() .toList(); @@ -320,46 +322,46 @@ public class MappedRegistry implements WritableRegistry { } @Override - public Holder.Reference createIntrusiveHolder(T value) { + public Reference createIntrusiveHolder(T value) { if (this.unregisteredIntrusiveHolders == null) { throw new IllegalStateException("This registry can't create intrusive holders"); } else { this.validateWrite(); - return (Holder.Reference)this.unregisteredIntrusiveHolders.computeIfAbsent(value, object -> Holder.Reference.createIntrusive(this, (T)object)); + return (Reference)this.unregisteredIntrusiveHolders.computeIfAbsent(value, object -> Reference.createIntrusive(this, (T)object)); } } @Override - public Optional> get(TagKey tagKey) { + public Optional> get(TagKey tagKey) { return this.allTags.get(tagKey); } - private Holder.Reference validateAndUnwrapTagElement(TagKey tagKey, Holder holder) { - if (!holder.canSerializeIn(this)) { - throw new IllegalStateException("Can't create named set " + tagKey + " containing value " + holder + " from outside registry " + this); - } else if (holder instanceof Holder.Reference reference) { + private Reference validateAndUnwrapTagElement(TagKey key, Holder value) { + if (!value.canSerializeIn(this)) { + throw new IllegalStateException("Can't create named set " + key + " containing value " + value + " from outside registry " + this); + } else if (value instanceof Reference reference) { return reference; } else { - throw new IllegalStateException("Found direct holder " + holder + " value in tag " + tagKey); + throw new IllegalStateException("Found direct holder " + value + " value in tag " + key); } } @Override - public void bindTag(TagKey tagKey, List> list) { + public void bindTag(TagKey tag, List> values) { this.validateWrite(); - this.getOrCreateTagForRegistration(tagKey).bind(list); + this.getOrCreateTagForRegistration(tag).bind(values); } void refreshTagsInHolders() { - Map, List>> map = new IdentityHashMap(); + Map, List>> map = new IdentityHashMap(); this.byKey.values().forEach(reference -> map.put(reference, new ArrayList())); this.allTags.forEach((tagKey, named) -> { for (Holder holder : named) { - Holder.Reference reference = this.validateAndUnwrapTagElement(tagKey, holder); + Reference reference = this.validateAndUnwrapTagElement(tagKey, holder); ((List)map.get(reference)).add(tagKey); } }); - map.forEach(Holder.Reference::bindTags); + map.forEach(Reference::bindTags); } public void bindAllTagsToEmpty() { @@ -372,22 +374,22 @@ public class MappedRegistry implements WritableRegistry { this.validateWrite(); return new HolderGetter() { @Override - public Optional> get(ResourceKey resourceKey) { + public Optional> get(ResourceKey resourceKey) { return Optional.of(this.getOrThrow(resourceKey)); } @Override - public Holder.Reference getOrThrow(ResourceKey resourceKey) { + public Reference getOrThrow(ResourceKey resourceKey) { return MappedRegistry.this.getOrCreateHolderOrThrow(resourceKey); } @Override - public Optional> get(TagKey tagKey) { + public Optional> get(TagKey tagKey) { return Optional.of(this.getOrThrow(tagKey)); } @Override - public HolderSet.Named getOrThrow(TagKey tagKey) { + public Named getOrThrow(TagKey tagKey) { return MappedRegistry.this.getOrCreateTagForRegistration(tagKey); } }; @@ -398,10 +400,10 @@ public class MappedRegistry implements WritableRegistry { if (!this.frozen) { throw new IllegalStateException("Invalid method used for tag loading"); } else { - Builder, HolderSet.Named> builder = ImmutableMap.builder(); + Builder, Named> builder = ImmutableMap.builder(); final Map, List>> map = new HashMap(); loadResult.tags().forEach((tagKey, list) -> { - HolderSet.Named named = (HolderSet.Named)this.frozenTags.get(tagKey); + Named named = (Named)this.frozenTags.get(tagKey); if (named == null) { named = this.createTag(tagKey); } @@ -409,17 +411,17 @@ public class MappedRegistry implements WritableRegistry { builder.put(tagKey, named); map.put(tagKey, List.copyOf(list)); }); - final ImmutableMap, HolderSet.Named> immutableMap = builder.build(); + final ImmutableMap, Named> immutableMap = builder.build(); final HolderLookup.RegistryLookup registryLookup = new Delegate() { public HolderLookup.RegistryLookup parent() { return MappedRegistry.this; } - public Optional> get(TagKey tagKey) { + public Optional> get(TagKey tagKey) { return Optional.ofNullable(immutableMap.get(tagKey)); } - public Stream> listTags() { + public Stream> listTags() { return immutableMap.values().stream(); } }; @@ -457,16 +459,16 @@ public class MappedRegistry implements WritableRegistry { return new 1(); } - static MappedRegistry.TagSet fromMap(Map, HolderSet.Named> map) { + static MappedRegistry.TagSet fromMap(Map, Named> map) { return new 2(map); } boolean isBound(); - Optional> get(TagKey tagKey); + Optional> get(TagKey key); - void forEach(BiConsumer, ? super HolderSet.Named> biConsumer); + void forEach(BiConsumer, ? super Named> action); - Stream> getTags(); + Stream> getTags(); } } diff --git a/net/minecraft/core/Registry.java b/net/minecraft/core/Registry.java index 4e06ca5d..418dded3 100644 --- a/net/minecraft/core/Registry.java +++ b/net/minecraft/core/Registry.java @@ -13,6 +13,8 @@ import java.util.Set; import java.util.Map.Entry; import java.util.stream.Stream; import java.util.stream.StreamSupport; +import net.minecraft.core.Holder.Reference; +import net.minecraft.core.HolderSet.Named; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; @@ -26,15 +28,15 @@ public interface Registry extends Keyable, HolderLookup.RegistryLookup, Id ResourceKey> key(); default Codec byNameCodec() { - return this.referenceHolderWithLifecycle().flatComapMap(Holder.Reference::value, object -> this.safeCastToReference(this.wrapAsHolder((T)object))); + return this.referenceHolderWithLifecycle().flatComapMap(Reference::value, object -> this.safeCastToReference(this.wrapAsHolder((T)object))); } default Codec> holderByNameCodec() { return this.referenceHolderWithLifecycle().flatComapMap(reference -> reference, this::safeCastToReference); } - private Codec> referenceHolderWithLifecycle() { - Codec> codec = ResourceLocation.CODEC + private Codec> referenceHolderWithLifecycle() { + Codec> codec = ResourceLocation.CODEC .comapFlatMap( resourceLocation -> (DataResult)this.get(resourceLocation) .map(DataResult::success) @@ -46,8 +48,8 @@ public interface Registry extends Keyable, HolderLookup.RegistryLookup, Id ); } - private DataResult> safeCastToReference(Holder value) { - return value instanceof Holder.Reference reference + private DataResult> safeCastToReference(Holder value) { + return value instanceof Reference reference ? DataResult.success(reference) : DataResult.error(() -> "Unregistered holder in " + this.key() + ": " + value); } @@ -69,10 +71,10 @@ public interface Registry extends Keyable, HolderLookup.RegistryLookup, Id int getId(@Nullable T value); @Nullable - T getValue(@Nullable ResourceKey resourceKey); + T getValue(@Nullable ResourceKey key); @Nullable - T getValue(@Nullable ResourceLocation resourceLocation); + T getValue(@Nullable ResourceLocation key); Optional registrationInfo(ResourceKey key); @@ -84,12 +86,12 @@ public interface Registry extends Keyable, HolderLookup.RegistryLookup, Id return Optional.ofNullable(this.getValue(registryKey)); } - Optional> getAny(); + Optional> getAny(); - default T getValueOrThrow(ResourceKey resourceKey) { - T object = this.getValue(resourceKey); + default T getValueOrThrow(ResourceKey key) { + T object = this.getValue(key); if (object == null) { - throw new IllegalStateException("Missing key in " + this.key() + ": " + resourceKey); + throw new IllegalStateException("Missing key in " + this.key() + ": " + key); } else { return object; } @@ -104,7 +106,7 @@ public interface Registry extends Keyable, HolderLookup.RegistryLookup, Id Set> registryKeySet(); - Optional> getRandom(RandomSource random); + Optional> getRandom(RandomSource random); default Stream stream() { return StreamSupport.stream(this.spliterator(), false); @@ -127,21 +129,21 @@ public interface Registry extends Keyable, HolderLookup.RegistryLookup, Id return value; } - static Holder.Reference registerForHolder(Registry registry, ResourceKey key, T value) { + static Reference registerForHolder(Registry registry, ResourceKey key, T value) { return ((WritableRegistry)registry).register(key, value, RegistrationInfo.BUILT_IN); } - static Holder.Reference registerForHolder(Registry registry, ResourceLocation name, T value) { + static Reference registerForHolder(Registry registry, ResourceLocation name, T value) { return registerForHolder(registry, ResourceKey.create(registry.key(), name), value); } Registry freeze(); - Holder.Reference createIntrusiveHolder(T value); + Reference createIntrusiveHolder(T value); - Optional> get(int i); + Optional> get(int index); - Optional> get(ResourceLocation resourceLocation); + Optional> get(ResourceLocation key); Holder wrapAsHolder(T value); @@ -153,7 +155,7 @@ public interface Registry extends Keyable, HolderLookup.RegistryLookup, Id return this.get(key).flatMap(named -> named.getRandomElement(random)); } - Stream> getTags(); + Stream> getTags(); default IdMap> asHolderIdMap() { return new IdMap>() { diff --git a/net/minecraft/core/RegistryAccess.java b/net/minecraft/core/RegistryAccess.java index 4ae4fb15..5259acbb 100644 --- a/net/minecraft/core/RegistryAccess.java +++ b/net/minecraft/core/RegistryAccess.java @@ -21,8 +21,8 @@ public interface RegistryAccess extends HolderLookup.Provider { @Override Optional> lookup(ResourceKey> registryKey); - default Registry lookupOrThrow(ResourceKey> resourceKey) { - return (Registry)this.lookup(resourceKey).orElseThrow(() -> new IllegalStateException("Missing registry: " + resourceKey)); + default Registry lookupOrThrow(ResourceKey> registryKey) { + return (Registry)this.lookup(registryKey).orElseThrow(() -> new IllegalStateException("Missing registry: " + registryKey)); } Stream> registries(); diff --git a/net/minecraft/core/RegistrySetBuilder.java b/net/minecraft/core/RegistrySetBuilder.java index caf43c6e..c757fc62 100644 --- a/net/minecraft/core/RegistrySetBuilder.java +++ b/net/minecraft/core/RegistrySetBuilder.java @@ -15,8 +15,10 @@ import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.Stream; import net.minecraft.core.Cloner.Factory; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.Holder.Reference.Type; import net.minecraft.core.HolderLookup.RegistryLookup.Delegate; +import net.minecraft.core.HolderSet.Named; import net.minecraft.core.RegistrySetBuilder.3.1; import net.minecraft.data.worldgen.BootstrapContext; import net.minecraft.resources.RegistryOps; @@ -33,17 +35,14 @@ public class RegistrySetBuilder { static HolderGetter wrapContextLookup(HolderLookup.RegistryLookup owner) { return new RegistrySetBuilder.EmptyTagLookup(owner) { @Override - public Optional> get(ResourceKey resourceKey) { + public Optional> get(ResourceKey resourceKey) { return owner.get(resourceKey); } }; } static HolderLookup.RegistryLookup lookupFromMap( - ResourceKey> registryKey, - Lifecycle registryLifecycle, - HolderOwner owner, - Map, Holder.Reference> elements + ResourceKey> registryKey, Lifecycle registryLifecycle, HolderOwner owner, Map, Reference> elements ) { return new RegistrySetBuilder.EmptyTagRegistryLookup(owner) { @Override @@ -57,12 +56,12 @@ public class RegistrySetBuilder { } @Override - public Optional> get(ResourceKey resourceKey) { - return Optional.ofNullable((Holder.Reference)elements.get(resourceKey)); + public Optional> get(ResourceKey resourceKey) { + return Optional.ofNullable((Reference)elements.get(resourceKey)); } @Override - public Stream> listElements() { + public Stream> listElements() { return elements.values().stream(); } }; @@ -167,7 +166,7 @@ public class RegistrySetBuilder { if (cloner == null) { throw new NullPointerException("No cloner for " + registryKey.location()); } else { - Map, Holder.Reference> map = new HashMap(); + Map, Reference> map = new HashMap(); HolderLookup.RegistryLookup registryLookup = registryLookupProvider.lookupOrThrow(registryKey); registryLookup.listElements().forEach(reference -> { ResourceKey resourceKey = reference.key(); @@ -264,7 +263,7 @@ public class RegistrySetBuilder { } @Override - public Optional> get(TagKey tagKey) { + public Optional> get(TagKey tagKey) { return Optional.of(HolderSet.emptyNamed(this.owner, tagKey)); } } @@ -288,12 +287,12 @@ public class RegistrySetBuilder { } @Override - public Stream> listTags() { + public Stream> listTags() { throw new UnsupportedOperationException("Tags are not available in datagen"); } } - static class LazyHolder extends Holder.Reference { + static class LazyHolder extends Reference { @Nullable Supplier supplier; @@ -333,21 +332,15 @@ public class RegistrySetBuilder { ) { public HolderLookup.RegistryLookup buildAsLookup(RegistrySetBuilder.UniversalOwner owner) { - Map, Holder.Reference> map = (Map, Holder.Reference>)this.values + Map, Reference> map = (Map, Reference>)this.values .entrySet() .stream() - .collect( - Collectors.toUnmodifiableMap( - java.util.Map.Entry::getKey, - entry -> { - RegistrySetBuilder.ValueAndHolder valueAndHolder = (RegistrySetBuilder.ValueAndHolder)entry.getValue(); - Holder.Reference reference = (Holder.Reference)valueAndHolder.holder() - .orElseGet(() -> Holder.Reference.createStandAlone(owner.cast(), (ResourceKey)entry.getKey())); - reference.bindValue(valueAndHolder.value().value()); - return reference; - } - ) - ); + .collect(Collectors.toUnmodifiableMap(java.util.Map.Entry::getKey, entry -> { + RegistrySetBuilder.ValueAndHolder valueAndHolder = (RegistrySetBuilder.ValueAndHolder)entry.getValue(); + Reference reference = (Reference)valueAndHolder.holder().orElseGet(() -> Reference.createStandAlone(owner.cast(), (ResourceKey)entry.getKey())); + reference.bindValue(valueAndHolder.value().value()); + return reference; + })); return RegistrySetBuilder.lookupFromMap(this.key, this.lifecycle, owner.cast(), map); } } @@ -366,7 +359,7 @@ public class RegistrySetBuilder { ResourceKey resourceKey = (ResourceKey)entry.getKey(); if (resourceKey.isFor(this.key)) { RegistrySetBuilder.RegisteredValue registeredValue = (RegistrySetBuilder.RegisteredValue)entry.getValue(); - Holder.Reference reference = (Holder.Reference)buildState.lookup.holders.remove(resourceKey); + Reference reference = (Reference)buildState.lookup.holders.remove(resourceKey); map.put(resourceKey, new RegistrySetBuilder.ValueAndHolder<>(registeredValue, Optional.ofNullable(reference))); iterator.remove(); } @@ -377,19 +370,19 @@ public class RegistrySetBuilder { } static class UniversalLookup extends RegistrySetBuilder.EmptyTagLookup { - final Map, Holder.Reference> holders = new HashMap(); + final Map, Reference> holders = new HashMap(); public UniversalLookup(HolderOwner owner) { super(owner); } @Override - public Optional> get(ResourceKey resourceKey) { + public Optional> get(ResourceKey resourceKey) { return Optional.of(this.getOrCreate(resourceKey)); } - Holder.Reference getOrCreate(ResourceKey key) { - return (Holder.Reference)this.holders.computeIfAbsent(key, resourceKey -> Holder.Reference.createStandAlone(this.owner, resourceKey)); + Reference getOrCreate(ResourceKey key) { + return (Reference)this.holders.computeIfAbsent(key, resourceKey -> Reference.createStandAlone(this.owner, resourceKey)); } } @@ -399,6 +392,6 @@ public class RegistrySetBuilder { } } - record ValueAndHolder(RegistrySetBuilder.RegisteredValue value, Optional> holder) { + record ValueAndHolder(RegistrySetBuilder.RegisteredValue value, Optional> holder) { } } diff --git a/net/minecraft/core/RegistrySynchronization.java b/net/minecraft/core/RegistrySynchronization.java index f745f6ac..2ec2dc50 100644 --- a/net/minecraft/core/RegistrySynchronization.java +++ b/net/minecraft/core/RegistrySynchronization.java @@ -80,8 +80,8 @@ public class RegistrySynchronization { return Stream.concat(stream2, stream); } - public static boolean isNetworkable(ResourceKey> resourceKey) { - return NETWORKABLE_REGISTRIES.contains(resourceKey); + public static boolean isNetworkable(ResourceKey> registryKey) { + return NETWORKABLE_REGISTRIES.contains(registryKey); } public record PackedRegistryEntry(ResourceLocation id, Optional data) { diff --git a/net/minecraft/core/Vec3i.java b/net/minecraft/core/Vec3i.java index 6a150cd8..1768d6bd 100644 --- a/net/minecraft/core/Vec3i.java +++ b/net/minecraft/core/Vec3i.java @@ -243,10 +243,10 @@ public class Vec3i implements Comparable { return (int)(f + g + h); } - public int distChessboard(Vec3i vec3i) { - int i = Math.abs(this.getX() - vec3i.getX()); - int j = Math.abs(this.getY() - vec3i.getY()); - int k = Math.abs(this.getZ() - vec3i.getZ()); + public int distChessboard(Vec3i vector) { + int i = Math.abs(this.getX() - vector.getX()); + int j = Math.abs(this.getY() - vector.getY()); + int k = Math.abs(this.getZ() - vector.getZ()); return Math.max(Math.max(i, j), k); } diff --git a/net/minecraft/core/WritableRegistry.java b/net/minecraft/core/WritableRegistry.java index 7a9a5568..66d74daa 100644 --- a/net/minecraft/core/WritableRegistry.java +++ b/net/minecraft/core/WritableRegistry.java @@ -1,13 +1,14 @@ package net.minecraft.core; import java.util.List; +import net.minecraft.core.Holder.Reference; import net.minecraft.resources.ResourceKey; import net.minecraft.tags.TagKey; public interface WritableRegistry extends Registry { - Holder.Reference register(ResourceKey key, T value, RegistrationInfo registrationInfo); + Reference register(ResourceKey key, T value, RegistrationInfo registrationInfo); - void bindTag(TagKey tagKey, List> list); + void bindTag(TagKey tag, List> values); boolean isEmpty(); diff --git a/net/minecraft/core/cauldron/CauldronInteraction.java b/net/minecraft/core/cauldron/CauldronInteraction.java index 76a30935..49f5b50c 100644 --- a/net/minecraft/core/cauldron/CauldronInteraction.java +++ b/net/minecraft/core/cauldron/CauldronInteraction.java @@ -192,27 +192,27 @@ public interface CauldronInteraction { } static InteractionResult fillBucket( - BlockState blockState, + BlockState state, Level level, - BlockPos blockPos, + BlockPos pos, Player player, - InteractionHand interactionHand, - ItemStack itemStack, - ItemStack itemStack2, - Predicate predicate, - SoundEvent soundEvent + InteractionHand hand, + ItemStack emptyStack, + ItemStack filledStack, + Predicate statePredicate, + SoundEvent fillSound ) { - if (!predicate.test(blockState)) { + if (!statePredicate.test(state)) { return InteractionResult.TRY_WITH_EMPTY_HAND; } else { if (!level.isClientSide) { - Item item = itemStack.getItem(); - player.setItemInHand(interactionHand, ItemUtils.createFilledResult(itemStack, player, itemStack2)); + Item item = emptyStack.getItem(); + player.setItemInHand(hand, ItemUtils.createFilledResult(emptyStack, player, filledStack)); player.awardStat(Stats.USE_CAULDRON); player.awardStat(Stats.ITEM_USED.get(item)); - level.setBlockAndUpdate(blockPos, Blocks.CAULDRON.defaultBlockState()); - level.playSound(null, blockPos, soundEvent, SoundSource.BLOCKS, 1.0F, 1.0F); - level.gameEvent(null, GameEvent.FLUID_PICKUP, blockPos); + level.setBlockAndUpdate(pos, Blocks.CAULDRON.defaultBlockState()); + level.playSound(null, pos, fillSound, SoundSource.BLOCKS, 1.0F, 1.0F); + level.gameEvent(null, GameEvent.FLUID_PICKUP, pos); } return InteractionResult.SUCCESS; @@ -220,116 +220,100 @@ public interface CauldronInteraction { } static InteractionResult emptyBucket( - Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, ItemStack itemStack, BlockState blockState, SoundEvent soundEvent + Level level, BlockPos pos, Player player, InteractionHand hand, ItemStack filledStackl, BlockState state, SoundEvent emptySound ) { if (!level.isClientSide) { - Item item = itemStack.getItem(); - player.setItemInHand(interactionHand, ItemUtils.createFilledResult(itemStack, player, new ItemStack(Items.BUCKET))); + Item item = filledStackl.getItem(); + player.setItemInHand(hand, ItemUtils.createFilledResult(filledStackl, player, new ItemStack(Items.BUCKET))); player.awardStat(Stats.FILL_CAULDRON); player.awardStat(Stats.ITEM_USED.get(item)); - level.setBlockAndUpdate(blockPos, blockState); - level.playSound(null, blockPos, soundEvent, SoundSource.BLOCKS, 1.0F, 1.0F); - level.gameEvent(null, GameEvent.FLUID_PLACE, blockPos); + level.setBlockAndUpdate(pos, state); + level.playSound(null, pos, emptySound, SoundSource.BLOCKS, 1.0F, 1.0F); + level.gameEvent(null, GameEvent.FLUID_PLACE, pos); } return InteractionResult.SUCCESS; } - private static InteractionResult fillWaterInteraction( - BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, ItemStack itemStack - ) { + private static InteractionResult fillWaterInteraction(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, ItemStack filledStack) { return emptyBucket( - level, - blockPos, - player, - interactionHand, - itemStack, - Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, 3), - SoundEvents.BUCKET_EMPTY + level, pos, player, hand, filledStack, Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, 3), SoundEvents.BUCKET_EMPTY ); } - private static InteractionResult fillLavaInteraction( - BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, ItemStack itemStack - ) { - return (InteractionResult)(isUnderWater(level, blockPos) + private static InteractionResult fillLavaInteraction(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, ItemStack filledStack) { + return (InteractionResult)(isUnderWater(level, pos) ? InteractionResult.CONSUME - : emptyBucket(level, blockPos, player, interactionHand, itemStack, Blocks.LAVA_CAULDRON.defaultBlockState(), SoundEvents.BUCKET_EMPTY_LAVA)); + : emptyBucket(level, pos, player, hand, filledStack, Blocks.LAVA_CAULDRON.defaultBlockState(), SoundEvents.BUCKET_EMPTY_LAVA)); } private static InteractionResult fillPowderSnowInteraction( - BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, ItemStack itemStack + BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, ItemStack filledStack ) { - return (InteractionResult)(isUnderWater(level, blockPos) + return (InteractionResult)(isUnderWater(level, pos) ? InteractionResult.CONSUME : emptyBucket( level, - blockPos, + pos, player, - interactionHand, - itemStack, + hand, + filledStack, Blocks.POWDER_SNOW_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, 3), SoundEvents.BUCKET_EMPTY_POWDER_SNOW )); } - private static InteractionResult shulkerBoxInteraction( - BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, ItemStack itemStack - ) { - Block block = Block.byItem(itemStack.getItem()); + private static InteractionResult shulkerBoxInteraction(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, ItemStack stack) { + Block block = Block.byItem(stack.getItem()); if (!(block instanceof ShulkerBoxBlock)) { return InteractionResult.TRY_WITH_EMPTY_HAND; } else { if (!level.isClientSide) { - ItemStack itemStack2 = itemStack.transmuteCopy(Blocks.SHULKER_BOX, 1); - player.setItemInHand(interactionHand, ItemUtils.createFilledResult(itemStack, player, itemStack2, false)); + ItemStack itemStack = stack.transmuteCopy(Blocks.SHULKER_BOX, 1); + player.setItemInHand(hand, ItemUtils.createFilledResult(stack, player, itemStack, false)); player.awardStat(Stats.CLEAN_SHULKER_BOX); - LayeredCauldronBlock.lowerFillLevel(blockState, level, blockPos); + LayeredCauldronBlock.lowerFillLevel(state, level, pos); } return InteractionResult.SUCCESS; } } - private static InteractionResult bannerInteraction( - BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, ItemStack itemStack - ) { - BannerPatternLayers bannerPatternLayers = itemStack.getOrDefault(DataComponents.BANNER_PATTERNS, BannerPatternLayers.EMPTY); + private static InteractionResult bannerInteraction(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, ItemStack stack) { + BannerPatternLayers bannerPatternLayers = stack.getOrDefault(DataComponents.BANNER_PATTERNS, BannerPatternLayers.EMPTY); if (bannerPatternLayers.layers().isEmpty()) { return InteractionResult.TRY_WITH_EMPTY_HAND; } else { if (!level.isClientSide) { - ItemStack itemStack2 = itemStack.copyWithCount(1); - itemStack2.set(DataComponents.BANNER_PATTERNS, bannerPatternLayers.removeLast()); - player.setItemInHand(interactionHand, ItemUtils.createFilledResult(itemStack, player, itemStack2, false)); + ItemStack itemStack = stack.copyWithCount(1); + itemStack.set(DataComponents.BANNER_PATTERNS, bannerPatternLayers.removeLast()); + player.setItemInHand(hand, ItemUtils.createFilledResult(stack, player, itemStack, false)); player.awardStat(Stats.CLEAN_BANNER); - LayeredCauldronBlock.lowerFillLevel(blockState, level, blockPos); + LayeredCauldronBlock.lowerFillLevel(state, level, pos); } return InteractionResult.SUCCESS; } } - private static InteractionResult dyedItemIteration( - BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, ItemStack itemStack - ) { - if (!itemStack.is(ItemTags.DYEABLE)) { + private static InteractionResult dyedItemIteration(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, ItemStack stack) { + if (!stack.is(ItemTags.DYEABLE)) { return InteractionResult.TRY_WITH_EMPTY_HAND; - } else if (!itemStack.has(DataComponents.DYED_COLOR)) { + } else if (!stack.has(DataComponents.DYED_COLOR)) { return InteractionResult.TRY_WITH_EMPTY_HAND; } else { if (!level.isClientSide) { - itemStack.remove(DataComponents.DYED_COLOR); + stack.remove(DataComponents.DYED_COLOR); player.awardStat(Stats.CLEAN_ARMOR); - LayeredCauldronBlock.lowerFillLevel(blockState, level, blockPos); + LayeredCauldronBlock.lowerFillLevel(state, level, pos); } return InteractionResult.SUCCESS; } } - private static boolean isUnderWater(Level level, BlockPos blockPos) { - FluidState fluidState = level.getFluidState(blockPos.above()); + private static boolean isUnderWater(Level level, BlockPos pos) { + FluidState fluidState = level.getFluidState(pos.above()); return fluidState.is(FluidTags.WATER); } diff --git a/net/minecraft/core/component/DataComponentHolder.java b/net/minecraft/core/component/DataComponentHolder.java index 6ae333b0..7cc116af 100644 --- a/net/minecraft/core/component/DataComponentHolder.java +++ b/net/minecraft/core/component/DataComponentHolder.java @@ -11,8 +11,8 @@ public interface DataComponentHolder { return this.getComponents().get(component); } - default Stream getAllOfType(Class class_) { - return this.getComponents().stream().map(TypedDataComponent::value).filter(object -> class_.isAssignableFrom(object.getClass())).map(object -> object); + default Stream getAllOfType(Class type) { + return this.getComponents().stream().map(TypedDataComponent::value).filter(object -> type.isAssignableFrom(object.getClass())).map(object -> object); } default T getOrDefault(DataComponentType component, T defaultValue) { diff --git a/net/minecraft/core/component/DataComponentPredicate.java b/net/minecraft/core/component/DataComponentPredicate.java index beb7d6f9..b0f1591c 100644 --- a/net/minecraft/core/component/DataComponentPredicate.java +++ b/net/minecraft/core/component/DataComponentPredicate.java @@ -41,11 +41,11 @@ public final class DataComponentPredicate implements Predicate return new DataComponentPredicate(ImmutableList.copyOf(expectedComponents)); } - public static DataComponentPredicate someOf(DataComponentMap dataComponentMap, DataComponentType... dataComponentTypes) { + public static DataComponentPredicate someOf(DataComponentMap expectedComponents, DataComponentType... types) { DataComponentPredicate.Builder builder = new DataComponentPredicate.Builder(); - for (DataComponentType dataComponentType : dataComponentTypes) { - TypedDataComponent typedDataComponent = dataComponentMap.getTyped(dataComponentType); + for (DataComponentType dataComponentType : types) { + TypedDataComponent typedDataComponent = expectedComponents.getTyped(dataComponentType); if (typedDataComponent != null) { builder.expect(typedDataComponent); } @@ -101,8 +101,8 @@ public final class DataComponentPredicate implements Predicate Builder() { } - public DataComponentPredicate.Builder expect(TypedDataComponent typedDataComponent) { - return this.expect(typedDataComponent.type(), typedDataComponent.value()); + public DataComponentPredicate.Builder expect(TypedDataComponent component) { + return this.expect(component.type(), component.value()); } public DataComponentPredicate.Builder expect(DataComponentType component, T value) { diff --git a/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java b/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java index b7669f01..9a90d5e0 100644 --- a/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java +++ b/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java @@ -15,8 +15,8 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior { private final DefaultDispenseItemBehavior defaultDispenseItemBehavior = new DefaultDispenseItemBehavior(); private final EntityType type; - public BoatDispenseItemBehavior(EntityType entityType) { - this.type = entityType; + public BoatDispenseItemBehavior(EntityType type) { + this.type = type; } @Override diff --git a/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java b/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java index 5d5d77ca..3026056c 100644 --- a/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java +++ b/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java @@ -17,17 +17,17 @@ public class EquipmentDispenseItemBehavior extends DefaultDispenseItemBehavior { return dispenseEquipment(blockSource, item) ? item : super.execute(blockSource, item); } - public static boolean dispenseEquipment(BlockSource blockSource, ItemStack itemStack) { + public static boolean dispenseEquipment(BlockSource blockSource, ItemStack item) { BlockPos blockPos = blockSource.pos().relative(blockSource.state().getValue(DispenserBlock.FACING)); List list = blockSource.level() - .getEntitiesOfClass(LivingEntity.class, new AABB(blockPos), livingEntityx -> livingEntityx.canEquipWithDispenser(itemStack)); + .getEntitiesOfClass(LivingEntity.class, new AABB(blockPos), livingEntityx -> livingEntityx.canEquipWithDispenser(item)); if (list.isEmpty()) { return false; } else { LivingEntity livingEntity = (LivingEntity)list.getFirst(); - EquipmentSlot equipmentSlot = livingEntity.getEquipmentSlotForItem(itemStack); - ItemStack itemStack2 = itemStack.split(1); - livingEntity.setItemSlot(equipmentSlot, itemStack2); + EquipmentSlot equipmentSlot = livingEntity.getEquipmentSlotForItem(item); + ItemStack itemStack = item.split(1); + livingEntity.setItemSlot(equipmentSlot, itemStack); if (livingEntity instanceof Mob mob) { mob.setDropChance(equipmentSlot, 2.0F); mob.setPersistenceRequired(); diff --git a/net/minecraft/core/dispenser/MinecartDispenseItemBehavior.java b/net/minecraft/core/dispenser/MinecartDispenseItemBehavior.java index ccfaa75b..124a3a6d 100644 --- a/net/minecraft/core/dispenser/MinecartDispenseItemBehavior.java +++ b/net/minecraft/core/dispenser/MinecartDispenseItemBehavior.java @@ -68,8 +68,8 @@ public class MinecartDispenseItemBehavior extends DefaultDispenseItemBehavior { return item; } - private static RailShape getRailShape(BlockState blockState) { - return blockState.getBlock() instanceof BaseRailBlock baseRailBlock ? blockState.getValue(baseRailBlock.getShapeProperty()) : RailShape.NORTH_SOUTH; + private static RailShape getRailShape(BlockState state) { + return state.getBlock() instanceof BaseRailBlock baseRailBlock ? state.getValue(baseRailBlock.getShapeProperty()) : RailShape.NORTH_SOUTH; } @Override diff --git a/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java b/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java index f102baf4..fb4d8a49 100644 --- a/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java +++ b/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java @@ -49,11 +49,11 @@ public class ShearsDispenseItemBehavior extends OptionalDispenseItemBehavior { return false; } - private static boolean tryShearLivingEntity(ServerLevel serverLevel, BlockPos blockPos, ItemStack itemStack) { - for (LivingEntity livingEntity : serverLevel.getEntitiesOfClass(LivingEntity.class, new AABB(blockPos), EntitySelector.NO_SPECTATORS)) { + private static boolean tryShearLivingEntity(ServerLevel level, BlockPos pos, ItemStack stack) { + for (LivingEntity livingEntity : level.getEntitiesOfClass(LivingEntity.class, new AABB(pos), EntitySelector.NO_SPECTATORS)) { if (livingEntity instanceof Shearable shearable && shearable.readyForShearing()) { - shearable.shear(serverLevel, SoundSource.BLOCKS, itemStack); - serverLevel.gameEvent(null, GameEvent.SHEAR, blockPos); + shearable.shear(level, SoundSource.BLOCKS, stack); + level.gameEvent(null, GameEvent.SHEAR, pos); return true; } } diff --git a/net/minecraft/core/particles/DustColorTransitionOptions.java b/net/minecraft/core/particles/DustColorTransitionOptions.java index 71720a27..3aae9a84 100644 --- a/net/minecraft/core/particles/DustColorTransitionOptions.java +++ b/net/minecraft/core/particles/DustColorTransitionOptions.java @@ -32,10 +32,10 @@ public class DustColorTransitionOptions extends ScalableParticleOptionsBase { private final int fromColor; private final int toColor; - public DustColorTransitionOptions(int i, int j, float f) { - super(f); - this.fromColor = i; - this.toColor = j; + public DustColorTransitionOptions(int fromColor, int toColor, float scale) { + super(scale); + this.fromColor = fromColor; + this.toColor = toColor; } public Vector3f getFromColor() { diff --git a/net/minecraft/core/particles/DustParticleOptions.java b/net/minecraft/core/particles/DustParticleOptions.java index ca70e604..f835e968 100644 --- a/net/minecraft/core/particles/DustParticleOptions.java +++ b/net/minecraft/core/particles/DustParticleOptions.java @@ -24,9 +24,9 @@ public class DustParticleOptions extends ScalableParticleOptionsBase { ); private final int color; - public DustParticleOptions(int i, float f) { - super(f); - this.color = i; + public DustParticleOptions(int color, float scale) { + super(scale); + this.color = color; } @Override diff --git a/net/minecraft/data/DataProvider.java b/net/minecraft/data/DataProvider.java index d063cb01..fa788ef9 100644 --- a/net/minecraft/data/DataProvider.java +++ b/net/minecraft/data/DataProvider.java @@ -42,11 +42,11 @@ public interface DataProvider { */ String getName(); - static CompletableFuture saveAll(CachedOutput cachedOutput, Codec codec, PathProvider pathProvider, Map map) { + static CompletableFuture saveAll(CachedOutput output, Codec codec, PathProvider pathProvider, Map entries) { return CompletableFuture.allOf( - (CompletableFuture[])map.entrySet() + (CompletableFuture[])entries.entrySet() .stream() - .map(entry -> saveStable(cachedOutput, codec, (T)entry.getValue(), pathProvider.json((ResourceLocation)entry.getKey()))) + .map(entry -> saveStable(output, codec, (T)entry.getValue(), pathProvider.json((ResourceLocation)entry.getKey()))) .toArray(CompletableFuture[]::new) ); } @@ -56,13 +56,13 @@ public interface DataProvider { return saveStable(output, registryOps, codec, value, path); } - static CompletableFuture saveStable(CachedOutput cachedOutput, Codec codec, T object, Path path) { - return saveStable(cachedOutput, JsonOps.INSTANCE, codec, object, path); + static CompletableFuture saveStable(CachedOutput output, Codec codec, T value, Path path) { + return saveStable(output, JsonOps.INSTANCE, codec, value, path); } - private static CompletableFuture saveStable(CachedOutput cachedOutput, DynamicOps dynamicOps, Codec codec, T object, Path path) { - JsonElement jsonElement = codec.encodeStart(dynamicOps, object).getOrThrow(); - return saveStable(cachedOutput, jsonElement, path); + private static CompletableFuture saveStable(CachedOutput output, DynamicOps ops, Codec codec, T value, Path path) { + JsonElement jsonElement = codec.encodeStart(ops, value).getOrThrow(); + return saveStable(output, jsonElement, path); } static CompletableFuture saveStable(CachedOutput output, JsonElement json, Path path) { diff --git a/net/minecraft/data/advancements/packs/VanillaAdventureAdvancements.java b/net/minecraft/data/advancements/packs/VanillaAdventureAdvancements.java index c8a2346b..ba59350d 100644 --- a/net/minecraft/data/advancements/packs/VanillaAdventureAdvancements.java +++ b/net/minecraft/data/advancements/packs/VanillaAdventureAdvancements.java @@ -20,17 +20,15 @@ import net.minecraft.advancements.critereon.EntityPredicate; import net.minecraft.advancements.critereon.ItemJukeboxPlayablePredicate; import net.minecraft.advancements.critereon.ItemPredicate; import net.minecraft.advancements.critereon.ItemSubPredicates; -import net.minecraft.advancements.critereon.ItemUsedOnLocationTrigger; import net.minecraft.advancements.critereon.KilledByArrowTrigger; import net.minecraft.advancements.critereon.LightningBoltPredicate; -import net.minecraft.advancements.critereon.LootTableTrigger; import net.minecraft.advancements.critereon.PlayerPredicate; import net.minecraft.advancements.critereon.PlayerTrigger; import net.minecraft.advancements.critereon.RecipeCraftedTrigger; import net.minecraft.advancements.critereon.ShotCrossbowTrigger; import net.minecraft.advancements.critereon.TagPredicate; import net.minecraft.advancements.critereon.UsedTotemTrigger; -import net.minecraft.advancements.critereon.LightningStrikeTrigger.TriggerInstance; +import net.minecraft.advancements.critereon.LootTableTrigger.TriggerInstance; import net.minecraft.advancements.critereon.MinMaxBounds.Doubles; import net.minecraft.advancements.critereon.MinMaxBounds.Ints; import net.minecraft.core.BlockPos; @@ -69,7 +67,6 @@ import net.minecraft.world.level.storage.loot.predicates.AllOfCondition; import net.minecraft.world.level.storage.loot.predicates.AnyOfCondition; import net.minecraft.world.level.storage.loot.predicates.LocationCheck; import net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition; -import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; public class VanillaAdventureAdvancements implements AdvancementSubProvider { private static final int DISTANCE_FROM_BOTTOM_TO_TOP = 384; @@ -115,8 +112,10 @@ public class VanillaAdventureAdvancements implements AdvancementSubProvider { EntityType.ZOMBIFIED_PIGLIN ); - private static Criterion fireCountAndBystander(Ints fireCount, Optional bystander) { - return TriggerInstance.lightningStrike( + private static Criterion fireCountAndBystander( + Ints fireCount, Optional bystander + ) { + return net.minecraft.advancements.critereon.LightningStrikeTrigger.TriggerInstance.lightningStrike( Optional.of( EntityPredicate.Builder.entity() .distance(DistancePredicate.absolute(Doubles.atMost(30.0))) @@ -128,10 +127,10 @@ public class VanillaAdventureAdvancements implements AdvancementSubProvider { } private static Criterion lookAtThroughItem( - EntityPredicate.Builder builder, ItemPredicate.Builder builder2 + EntityPredicate.Builder builder, ItemPredicate.Builder item ) { return net.minecraft.advancements.critereon.UsingItemTrigger.TriggerInstance.lookingAt( - EntityPredicate.Builder.entity().subPredicate(PlayerPredicate.Builder.player().setLookingAt(builder).build()), builder2 + EntityPredicate.Builder.entity().subPredicate(PlayerPredicate.Builder.player().setLookingAt(builder).build()), item ); } @@ -545,7 +544,7 @@ public class VanillaAdventureAdvancements implements AdvancementSubProvider { ) .addCriterion( "play_jukebox_in_meadows", - ItemUsedOnLocationTrigger.TriggerInstance.itemUsedOnBlock( + net.minecraft.advancements.critereon.ItemUsedOnLocationTrigger.TriggerInstance.itemUsedOnBlock( net.minecraft.advancements.critereon.LocationPredicate.Builder.location() .setBiomes(HolderSet.direct(registries.lookupOrThrow(Registries.BIOME).getOrThrow(Biomes.MEADOW))) .setBlock(BlockPredicate.Builder.block().of(holderGetter3, Blocks.JUKEBOX)), @@ -759,7 +758,7 @@ public class VanillaAdventureAdvancements implements AdvancementSubProvider { ) .addCriterion( "lighten_up", - ItemUsedOnLocationTrigger.TriggerInstance.itemUsedOnBlock( + net.minecraft.advancements.critereon.ItemUsedOnLocationTrigger.TriggerInstance.itemUsedOnBlock( net.minecraft.advancements.critereon.LocationPredicate.Builder.location() .setBlock( BlockPredicate.Builder.block() @@ -792,7 +791,7 @@ public class VanillaAdventureAdvancements implements AdvancementSubProvider { ) .addCriterion( "under_lock_and_key", - ItemUsedOnLocationTrigger.TriggerInstance.itemUsedOnBlock( + net.minecraft.advancements.critereon.ItemUsedOnLocationTrigger.TriggerInstance.itemUsedOnBlock( net.minecraft.advancements.critereon.LocationPredicate.Builder.location() .setBlock( BlockPredicate.Builder.block() @@ -817,7 +816,7 @@ public class VanillaAdventureAdvancements implements AdvancementSubProvider { ) .addCriterion( "revaulting", - ItemUsedOnLocationTrigger.TriggerInstance.itemUsedOnBlock( + net.minecraft.advancements.critereon.ItemUsedOnLocationTrigger.TriggerInstance.itemUsedOnBlock( net.minecraft.advancements.critereon.LocationPredicate.Builder.location() .setBlock( BlockPredicate.Builder.block() @@ -920,10 +919,10 @@ public class VanillaAdventureAdvancements implements AdvancementSubProvider { } public static AdvancementHolder createMonsterHunterAdvancement( - AdvancementHolder advancementHolder, Consumer consumer, HolderGetter> holderGetter, List> list + AdvancementHolder parent, Consumer output, HolderGetter> entityTypeRegistry, List> typesRequired ) { - AdvancementHolder advancementHolder2 = addMobsToKill(Builder.advancement(), holderGetter, list) - .parent(advancementHolder) + AdvancementHolder advancementHolder = addMobsToKill(Builder.advancement(), entityTypeRegistry, typesRequired) + .parent(parent) .display( Items.IRON_SWORD, Component.translatable("advancements.adventure.kill_a_mob.title"), @@ -935,9 +934,9 @@ public class VanillaAdventureAdvancements implements AdvancementSubProvider { false ) .requirements(Strategy.OR) - .save(consumer, "adventure/kill_a_mob"); - addMobsToKill(Builder.advancement(), holderGetter, list) - .parent(advancementHolder2) + .save(output, "adventure/kill_a_mob"); + addMobsToKill(Builder.advancement(), entityTypeRegistry, typesRequired) + .parent(advancementHolder) .display( Items.DIAMOND_SWORD, Component.translatable("advancements.adventure.kill_all_mobs.title"), @@ -949,48 +948,55 @@ public class VanillaAdventureAdvancements implements AdvancementSubProvider { false ) .rewards(AdvancementRewards.Builder.experience(100)) - .save(consumer, "adventure/kill_all_mobs"); - return advancementHolder2; + .save(output, "adventure/kill_all_mobs"); + return advancementHolder; } - private static Criterion placedBlockReadByComparator(HolderGetter holderGetter, Block block) { - LootItemCondition.Builder[] builders = (LootItemCondition.Builder[])ComparatorBlock.FACING + private static Criterion placedBlockReadByComparator( + HolderGetter blockRegistry, Block block + ) { + net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder[] builders = (net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder[])ComparatorBlock.FACING .getPossibleValues() .stream() .map( direction -> { net.minecraft.advancements.critereon.StatePropertiesPredicate.Builder builder = net.minecraft.advancements.critereon.StatePropertiesPredicate.Builder.properties() .hasProperty(ComparatorBlock.FACING, direction); - BlockPredicate.Builder builder2 = BlockPredicate.Builder.block().of(holderGetter, Blocks.COMPARATOR).setProperties(builder); + BlockPredicate.Builder builder2 = BlockPredicate.Builder.block().of(blockRegistry, Blocks.COMPARATOR).setProperties(builder); return LocationCheck.checkLocation( net.minecraft.advancements.critereon.LocationPredicate.Builder.location().setBlock(builder2), new BlockPos(direction.getOpposite().getUnitVec3i()) ); } ) - .toArray(LootItemCondition.Builder[]::new); - return ItemUsedOnLocationTrigger.TriggerInstance.placedBlock( + .toArray(net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder[]::new); + return net.minecraft.advancements.critereon.ItemUsedOnLocationTrigger.TriggerInstance.placedBlock( LootItemBlockStatePropertyCondition.hasBlockStateProperties(block), AnyOfCondition.anyOf(builders) ); } - private static Criterion placedComparatorReadingBlock(HolderGetter holderGetter, Block block) { - LootItemCondition.Builder[] builders = (LootItemCondition.Builder[])ComparatorBlock.FACING + private static Criterion placedComparatorReadingBlock( + HolderGetter blockRegistry, Block block + ) { + net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder[] builders = (net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder[])ComparatorBlock.FACING .getPossibleValues() .stream() .map( direction -> { net.minecraft.advancements.critereon.StatePropertiesPredicate.Builder builder = net.minecraft.advancements.critereon.StatePropertiesPredicate.Builder.properties() .hasProperty(ComparatorBlock.FACING, direction); - LootItemBlockStatePropertyCondition.Builder builder2 = new LootItemBlockStatePropertyCondition.Builder(Blocks.COMPARATOR).setProperties(builder); - LootItemCondition.Builder builder3 = LocationCheck.checkLocation( - net.minecraft.advancements.critereon.LocationPredicate.Builder.location().setBlock(BlockPredicate.Builder.block().of(holderGetter, block)), + net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition.Builder builder2 = new net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition.Builder( + Blocks.COMPARATOR + ) + .setProperties(builder); + net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder builder3 = LocationCheck.checkLocation( + net.minecraft.advancements.critereon.LocationPredicate.Builder.location().setBlock(BlockPredicate.Builder.block().of(blockRegistry, block)), new BlockPos(direction.getUnitVec3i()) ); return AllOfCondition.allOf(builder2, builder3); } ) - .toArray(LootItemCondition.Builder[]::new); - return ItemUsedOnLocationTrigger.TriggerInstance.placedBlock(AnyOfCondition.anyOf(builders)); + .toArray(net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder[]::new); + return net.minecraft.advancements.critereon.ItemUsedOnLocationTrigger.TriggerInstance.placedBlock(AnyOfCondition.anyOf(builders)); } private static Builder smithingWithStyle(Builder builder) { @@ -1021,21 +1027,21 @@ public class VanillaAdventureAdvancements implements AdvancementSubProvider { return builder; } - private static Builder respectingTheRemnantsCriterions(HolderGetter holderGetter, Builder builder) { - List>> list = List.of( - Pair.of("desert_pyramid", LootTableTrigger.TriggerInstance.lootTableUsed(BuiltInLootTables.DESERT_PYRAMID_ARCHAEOLOGY)), - Pair.of("desert_well", LootTableTrigger.TriggerInstance.lootTableUsed(BuiltInLootTables.DESERT_WELL_ARCHAEOLOGY)), - Pair.of("ocean_ruin_cold", LootTableTrigger.TriggerInstance.lootTableUsed(BuiltInLootTables.OCEAN_RUIN_COLD_ARCHAEOLOGY)), - Pair.of("ocean_ruin_warm", LootTableTrigger.TriggerInstance.lootTableUsed(BuiltInLootTables.OCEAN_RUIN_WARM_ARCHAEOLOGY)), - Pair.of("trail_ruins_rare", LootTableTrigger.TriggerInstance.lootTableUsed(BuiltInLootTables.TRAIL_RUINS_ARCHAEOLOGY_RARE)), - Pair.of("trail_ruins_common", LootTableTrigger.TriggerInstance.lootTableUsed(BuiltInLootTables.TRAIL_RUINS_ARCHAEOLOGY_COMMON)) + private static Builder respectingTheRemnantsCriterions(HolderGetter itemRegistry, Builder builder) { + List>> list = List.of( + Pair.of("desert_pyramid", TriggerInstance.lootTableUsed(BuiltInLootTables.DESERT_PYRAMID_ARCHAEOLOGY)), + Pair.of("desert_well", TriggerInstance.lootTableUsed(BuiltInLootTables.DESERT_WELL_ARCHAEOLOGY)), + Pair.of("ocean_ruin_cold", TriggerInstance.lootTableUsed(BuiltInLootTables.OCEAN_RUIN_COLD_ARCHAEOLOGY)), + Pair.of("ocean_ruin_warm", TriggerInstance.lootTableUsed(BuiltInLootTables.OCEAN_RUIN_WARM_ARCHAEOLOGY)), + Pair.of("trail_ruins_rare", TriggerInstance.lootTableUsed(BuiltInLootTables.TRAIL_RUINS_ARCHAEOLOGY_RARE)), + Pair.of("trail_ruins_common", TriggerInstance.lootTableUsed(BuiltInLootTables.TRAIL_RUINS_ARCHAEOLOGY_COMMON)) ); list.forEach(pair -> builder.addCriterion((String)pair.getFirst(), (Criterion)pair.getSecond())); String string = "has_sherd"; builder.addCriterion( "has_sherd", net.minecraft.advancements.critereon.InventoryChangeTrigger.TriggerInstance.hasItems( - ItemPredicate.Builder.item().of(holderGetter, ItemTags.DECORATED_POT_SHERDS) + ItemPredicate.Builder.item().of(itemRegistry, ItemTags.DECORATED_POT_SHERDS) ) ); builder.requirements(new AdvancementRequirements(List.of(list.stream().map(Pair::getFirst).toList(), List.of("has_sherd")))); @@ -1061,11 +1067,11 @@ public class VanillaAdventureAdvancements implements AdvancementSubProvider { .save(writer, "adventure/adventuring_time"); } - private static Builder addMobsToKill(Builder builder, HolderGetter> holderGetter, List> list) { - list.forEach( + private static Builder addMobsToKill(Builder builder, HolderGetter> entityTypeRegistry, List> mobsToKill) { + mobsToKill.forEach( entityType -> builder.addCriterion( BuiltInRegistries.ENTITY_TYPE.getKey(entityType).toString(), - net.minecraft.advancements.critereon.KilledTrigger.TriggerInstance.playerKilledEntity(EntityPredicate.Builder.entity().of(holderGetter, entityType)) + net.minecraft.advancements.critereon.KilledTrigger.TriggerInstance.playerKilledEntity(EntityPredicate.Builder.entity().of(entityTypeRegistry, entityType)) ) ); return builder; diff --git a/net/minecraft/data/advancements/packs/VanillaHusbandryAdvancements.java b/net/minecraft/data/advancements/packs/VanillaHusbandryAdvancements.java index dd6d50d3..77f9c3dd 100644 --- a/net/minecraft/data/advancements/packs/VanillaHusbandryAdvancements.java +++ b/net/minecraft/data/advancements/packs/VanillaHusbandryAdvancements.java @@ -17,12 +17,10 @@ import net.minecraft.advancements.critereon.EnchantmentPredicate; import net.minecraft.advancements.critereon.EntityEquipmentPredicate; import net.minecraft.advancements.critereon.EntityPredicate; import net.minecraft.advancements.critereon.EntitySubPredicates; -import net.minecraft.advancements.critereon.FishingRodHookedTrigger; import net.minecraft.advancements.critereon.ItemEnchantmentsPredicate; import net.minecraft.advancements.critereon.ItemPredicate; import net.minecraft.advancements.critereon.ItemSubPredicates; -import net.minecraft.advancements.critereon.ItemUsedOnLocationTrigger; -import net.minecraft.advancements.critereon.BredAnimalsTrigger.TriggerInstance; +import net.minecraft.advancements.critereon.ItemUsedOnLocationTrigger.TriggerInstance; import net.minecraft.advancements.critereon.MinMaxBounds.Ints; import net.minecraft.core.Holder; import net.minecraft.core.HolderGetter; @@ -155,13 +153,13 @@ public class VanillaHusbandryAdvancements implements AdvancementSubProvider { false ) .requirements(Strategy.OR) - .addCriterion("wheat", ItemUsedOnLocationTrigger.TriggerInstance.placedBlock(Blocks.WHEAT)) - .addCriterion("pumpkin_stem", ItemUsedOnLocationTrigger.TriggerInstance.placedBlock(Blocks.PUMPKIN_STEM)) - .addCriterion("melon_stem", ItemUsedOnLocationTrigger.TriggerInstance.placedBlock(Blocks.MELON_STEM)) - .addCriterion("beetroots", ItemUsedOnLocationTrigger.TriggerInstance.placedBlock(Blocks.BEETROOTS)) - .addCriterion("nether_wart", ItemUsedOnLocationTrigger.TriggerInstance.placedBlock(Blocks.NETHER_WART)) - .addCriterion("torchflower", ItemUsedOnLocationTrigger.TriggerInstance.placedBlock(Blocks.TORCHFLOWER_CROP)) - .addCriterion("pitcher_pod", ItemUsedOnLocationTrigger.TriggerInstance.placedBlock(Blocks.PITCHER_CROP)) + .addCriterion("wheat", TriggerInstance.placedBlock(Blocks.WHEAT)) + .addCriterion("pumpkin_stem", TriggerInstance.placedBlock(Blocks.PUMPKIN_STEM)) + .addCriterion("melon_stem", TriggerInstance.placedBlock(Blocks.MELON_STEM)) + .addCriterion("beetroots", TriggerInstance.placedBlock(Blocks.BEETROOTS)) + .addCriterion("nether_wart", TriggerInstance.placedBlock(Blocks.NETHER_WART)) + .addCriterion("torchflower", TriggerInstance.placedBlock(Blocks.TORCHFLOWER_CROP)) + .addCriterion("pitcher_pod", TriggerInstance.placedBlock(Blocks.PITCHER_CROP)) .save(writer, "husbandry/plant_seed"); AdvancementHolder advancementHolder3 = Builder.advancement() .parent(advancementHolder) @@ -176,7 +174,7 @@ public class VanillaHusbandryAdvancements implements AdvancementSubProvider { false ) .requirements(Strategy.OR) - .addCriterion("bred", TriggerInstance.bredAnimals()) + .addCriterion("bred", net.minecraft.advancements.critereon.BredAnimalsTrigger.TriggerInstance.bredAnimals()) .save(writer, "husbandry/breed_an_animal"); createBreedAllAnimalsAdvancement(advancementHolder3, writer, holderGetter, BREEDABLE_ANIMALS.stream(), INDIRECTLY_BREEDABLE_ANIMALS.stream()); addFood(Builder.advancement(), holderGetter2) @@ -319,7 +317,7 @@ public class VanillaHusbandryAdvancements implements AdvancementSubProvider { .parent(advancementHolder) .addCriterion( "safely_harvest_honey", - ItemUsedOnLocationTrigger.TriggerInstance.itemUsedOnBlock( + TriggerInstance.itemUsedOnBlock( net.minecraft.advancements.critereon.LocationPredicate.Builder.location() .setBlock(BlockPredicate.Builder.block().of(holderGetter3, BlockTags.BEEHIVES)) .setSmokey(true), @@ -351,7 +349,7 @@ public class VanillaHusbandryAdvancements implements AdvancementSubProvider { ) .addCriterion( "wax_on", - ItemUsedOnLocationTrigger.TriggerInstance.itemUsedOnBlock( + TriggerInstance.itemUsedOnBlock( net.minecraft.advancements.critereon.LocationPredicate.Builder.location() .setBlock(BlockPredicate.Builder.block().of(holderGetter3, ((BiMap)HoneycombItem.WAXABLES.get()).keySet())), ItemPredicate.Builder.item().of(holderGetter2, Items.HONEYCOMB) @@ -372,7 +370,7 @@ public class VanillaHusbandryAdvancements implements AdvancementSubProvider { ) .addCriterion( "wax_off", - ItemUsedOnLocationTrigger.TriggerInstance.itemUsedOnBlock( + TriggerInstance.itemUsedOnBlock( net.minecraft.advancements.critereon.LocationPredicate.Builder.location() .setBlock(BlockPredicate.Builder.block().of(holderGetter3, ((BiMap)HoneycombItem.WAX_OFF_BY_BLOCK.get()).keySet())), ItemPredicate.Builder.item().of(holderGetter2, WAX_SCRAPING_TOOLS) @@ -489,7 +487,7 @@ public class VanillaHusbandryAdvancements implements AdvancementSubProvider { ) .addCriterion( "make_a_sign_glow", - ItemUsedOnLocationTrigger.TriggerInstance.itemUsedOnBlock( + TriggerInstance.itemUsedOnBlock( net.minecraft.advancements.critereon.LocationPredicate.Builder.location().setBlock(BlockPredicate.Builder.block().of(holderGetter3, BlockTags.ALL_SIGNS)), ItemPredicate.Builder.item().of(holderGetter2, Items.GLOW_INK_SAC) ) @@ -528,7 +526,7 @@ public class VanillaHusbandryAdvancements implements AdvancementSubProvider { ) .addCriterion( "allay_deliver_cake_to_note_block", - ItemUsedOnLocationTrigger.TriggerInstance.allayDropItemOnBlock( + TriggerInstance.allayDropItemOnBlock( net.minecraft.advancements.critereon.LocationPredicate.Builder.location().setBlock(BlockPredicate.Builder.block().of(holderGetter3, Blocks.NOTE_BLOCK)), ItemPredicate.Builder.item().of(holderGetter2, Items.CAKE) ) @@ -587,8 +585,8 @@ public class VanillaHusbandryAdvancements implements AdvancementSubProvider { true ) .requirements(Strategy.OR) - .addCriterion("torchflower", ItemUsedOnLocationTrigger.TriggerInstance.placedBlock(Blocks.TORCHFLOWER_CROP)) - .addCriterion("pitcher_pod", ItemUsedOnLocationTrigger.TriggerInstance.placedBlock(Blocks.PITCHER_CROP)) + .addCriterion("torchflower", TriggerInstance.placedBlock(Blocks.TORCHFLOWER_CROP)) + .addCriterion("pitcher_pod", TriggerInstance.placedBlock(Blocks.PITCHER_CROP)) .save(writer, "husbandry/plant_any_sniffer_seed"); Builder.advancement() .parent(advancementHolder4) @@ -646,14 +644,14 @@ public class VanillaHusbandryAdvancements implements AdvancementSubProvider { } public static AdvancementHolder createBreedAllAnimalsAdvancement( - AdvancementHolder advancementHolder, - Consumer consumer, - HolderGetter> holderGetter, - Stream> stream, - Stream> stream2 + AdvancementHolder parent, + Consumer writer, + HolderGetter> entityTypeRegistry, + Stream> breedableAnimals, + Stream> indirectlyBreedableAnimals ) { - return addBreedable(Builder.advancement(), stream, holderGetter, stream2) - .parent(advancementHolder) + return addBreedable(Builder.advancement(), breedableAnimals, entityTypeRegistry, indirectlyBreedableAnimals) + .parent(parent) .display( Items.GOLDEN_CARROT, Component.translatable("advancements.husbandry.breed_all_animals.title"), @@ -665,19 +663,19 @@ public class VanillaHusbandryAdvancements implements AdvancementSubProvider { false ) .rewards(AdvancementRewards.Builder.experience(100)) - .save(consumer, "husbandry/bred_all_animals"); + .save(writer, "husbandry/bred_all_animals"); } - private static Builder addLeashedFrogVariants(HolderGetter> holderGetter, HolderGetter holderGetter2, Builder builder) { + private static Builder addLeashedFrogVariants(HolderGetter> entityTypeRegistry, HolderGetter items, Builder builder) { BuiltInRegistries.FROG_VARIANT .listElements() .forEach( reference -> builder.addCriterion( reference.key().location().toString(), net.minecraft.advancements.critereon.PlayerInteractTrigger.TriggerInstance.itemUsedOnEntity( - ItemPredicate.Builder.item().of(holderGetter2, Items.LEAD), + ItemPredicate.Builder.item().of(items, Items.LEAD), Optional.of( - EntityPredicate.wrap(EntityPredicate.Builder.entity().of(holderGetter, EntityType.FROG).subPredicate(EntitySubPredicates.frogVariant(reference))) + EntityPredicate.wrap(EntityPredicate.Builder.entity().of(entityTypeRegistry, EntityType.FROG).subPredicate(EntitySubPredicates.frogVariant(reference))) ) ) ) @@ -685,26 +683,29 @@ public class VanillaHusbandryAdvancements implements AdvancementSubProvider { return builder; } - private static Builder addFood(Builder builder, HolderGetter holderGetter) { + private static Builder addFood(Builder builder, HolderGetter food) { for (Item item : EDIBLE_ITEMS) { - builder.addCriterion(BuiltInRegistries.ITEM.getKey(item).getPath(), ConsumeItemTrigger.TriggerInstance.usedItem(holderGetter, item)); + builder.addCriterion(BuiltInRegistries.ITEM.getKey(item).getPath(), ConsumeItemTrigger.TriggerInstance.usedItem(food, item)); } return builder; } - private static Builder addBreedable(Builder builder, Stream> stream, HolderGetter> holderGetter, Stream> stream2) { - stream.forEach( - entityType -> builder.addCriterion( - EntityType.getKey(entityType).toString(), TriggerInstance.bredAnimals(EntityPredicate.Builder.entity().of(holderGetter, entityType)) - ) - ); - stream2.forEach( + private static Builder addBreedable( + Builder builder, Stream> breedableAnimals, HolderGetter> entityTypeRegistry, Stream> indirectlyBreedableAnimals + ) { + breedableAnimals.forEach( entityType -> builder.addCriterion( EntityType.getKey(entityType).toString(), - TriggerInstance.bredAnimals( - Optional.of(EntityPredicate.Builder.entity().of(holderGetter, entityType).build()), - Optional.of(EntityPredicate.Builder.entity().of(holderGetter, entityType).build()), + net.minecraft.advancements.critereon.BredAnimalsTrigger.TriggerInstance.bredAnimals(EntityPredicate.Builder.entity().of(entityTypeRegistry, entityType)) + ) + ); + indirectlyBreedableAnimals.forEach( + entityType -> builder.addCriterion( + EntityType.getKey(entityType).toString(), + net.minecraft.advancements.critereon.BredAnimalsTrigger.TriggerInstance.bredAnimals( + Optional.of(EntityPredicate.Builder.entity().of(entityTypeRegistry, entityType).build()), + Optional.of(EntityPredicate.Builder.entity().of(entityTypeRegistry, entityType).build()), Optional.empty() ) ) @@ -712,23 +713,23 @@ public class VanillaHusbandryAdvancements implements AdvancementSubProvider { return builder; } - private static Builder addFishBuckets(Builder builder, HolderGetter holderGetter) { + private static Builder addFishBuckets(Builder builder, HolderGetter itemRegistry) { for (Item item : FISH_BUCKETS) { builder.addCriterion( BuiltInRegistries.ITEM.getKey(item).getPath(), - net.minecraft.advancements.critereon.FilledBucketTrigger.TriggerInstance.filledBucket(ItemPredicate.Builder.item().of(holderGetter, item)) + net.minecraft.advancements.critereon.FilledBucketTrigger.TriggerInstance.filledBucket(ItemPredicate.Builder.item().of(itemRegistry, item)) ); } return builder; } - private static Builder addFish(Builder builder, HolderGetter holderGetter) { + private static Builder addFish(Builder builder, HolderGetter itemRegistry) { for (Item item : FISH) { builder.addCriterion( BuiltInRegistries.ITEM.getKey(item).getPath(), - FishingRodHookedTrigger.TriggerInstance.fishedItem( - Optional.empty(), Optional.empty(), Optional.of(ItemPredicate.Builder.item().of(holderGetter, item).build()) + net.minecraft.advancements.critereon.FishingRodHookedTrigger.TriggerInstance.fishedItem( + Optional.empty(), Optional.empty(), Optional.of(ItemPredicate.Builder.item().of(itemRegistry, item).build()) ) ); } diff --git a/net/minecraft/data/advancements/packs/WinterDropAdvancementProvider.java b/net/minecraft/data/advancements/packs/WinterDropAdvancementProvider.java index d89ee38a..dcbff284 100644 --- a/net/minecraft/data/advancements/packs/WinterDropAdvancementProvider.java +++ b/net/minecraft/data/advancements/packs/WinterDropAdvancementProvider.java @@ -7,7 +7,7 @@ import net.minecraft.data.PackOutput; import net.minecraft.data.advancements.AdvancementProvider; public class WinterDropAdvancementProvider { - public static AdvancementProvider create(PackOutput packOutput, CompletableFuture completableFuture) { - return new AdvancementProvider(packOutput, completableFuture, List.of(new WinterDropAdventureAdvancements())); + public static AdvancementProvider create(PackOutput packOutput, CompletableFuture registries) { + return new AdvancementProvider(packOutput, registries, List.of(new WinterDropAdventureAdvancements())); } } diff --git a/net/minecraft/data/info/BiomeParametersDumpReport.java b/net/minecraft/data/info/BiomeParametersDumpReport.java index ebe6005e..5177cc2d 100644 --- a/net/minecraft/data/info/BiomeParametersDumpReport.java +++ b/net/minecraft/data/info/BiomeParametersDumpReport.java @@ -21,8 +21,8 @@ import net.minecraft.data.PackOutput.Target; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.biome.Biome; -import net.minecraft.world.level.biome.Climate; import net.minecraft.world.level.biome.MultiNoiseBiomeSourceParameterList; +import net.minecraft.world.level.biome.Climate.ParameterList; import org.slf4j.Logger; public class BiomeParametersDumpReport implements DataProvider { @@ -30,7 +30,7 @@ public class BiomeParametersDumpReport implements DataProvider { private final Path topPath; private final CompletableFuture registries; private static final MapCodec> ENTRY_CODEC = ResourceKey.codec(Registries.BIOME).fieldOf("biome"); - private static final Codec>> CODEC = Climate.ParameterList.codec(ENTRY_CODEC).fieldOf("biomes").codec(); + private static final Codec>> CODEC = ParameterList.codec(ENTRY_CODEC).fieldOf("biomes").codec(); public BiomeParametersDumpReport(PackOutput output, CompletableFuture registries) { this.topPath = output.getOutputFolder(Target.REPORTS).resolve("biome_parameters"); diff --git a/net/minecraft/data/info/CommandsReport.java b/net/minecraft/data/info/CommandsReport.java index cadd12da..165c9b26 100644 --- a/net/minecraft/data/info/CommandsReport.java +++ b/net/minecraft/data/info/CommandsReport.java @@ -5,6 +5,7 @@ import java.nio.file.Path; import java.util.concurrent.CompletableFuture; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; +import net.minecraft.commands.Commands.CommandSelection; import net.minecraft.commands.synchronization.ArgumentUtils; import net.minecraft.core.HolderLookup; import net.minecraft.data.CachedOutput; @@ -24,14 +25,10 @@ public class CommandsReport implements DataProvider { @Override public CompletableFuture run(CachedOutput output) { Path path = this.output.getOutputFolder(Target.REPORTS).resolve("commands.json"); - return this.registries - .thenCompose( - provider -> { - CommandDispatcher commandDispatcher = new Commands(Commands.CommandSelection.ALL, Commands.createValidationContext(provider)) - .getDispatcher(); - return DataProvider.saveStable(output, ArgumentUtils.serializeNodeToJson(commandDispatcher, commandDispatcher.getRoot()), path); - } - ); + return this.registries.thenCompose(provider -> { + CommandDispatcher commandDispatcher = new Commands(CommandSelection.ALL, Commands.createValidationContext(provider)).getDispatcher(); + return DataProvider.saveStable(output, ArgumentUtils.serializeNodeToJson(commandDispatcher, commandDispatcher.getRoot()), path); + }); } @Override diff --git a/net/minecraft/data/info/DatapackStructureReport.java b/net/minecraft/data/info/DatapackStructureReport.java index dd86d548..255f5b08 100644 --- a/net/minecraft/data/info/DatapackStructureReport.java +++ b/net/minecraft/data/info/DatapackStructureReport.java @@ -46,8 +46,8 @@ public class DatapackStructureReport implements DataProvider { ); static final Codec>> REGISTRY_KEY_CODEC = ResourceLocation.CODEC.xmap(ResourceKey::createRegistryKey, ResourceKey::location); - public DatapackStructureReport(PackOutput packOutput) { - this.output = packOutput; + public DatapackStructureReport(PackOutput output) { + this.output = output; } @Override @@ -64,12 +64,12 @@ public class DatapackStructureReport implements DataProvider { private void putIfNotPresent( Map>, DatapackStructureReport.Entry> map, - ResourceKey> resourceKey, + ResourceKey> registryKey, DatapackStructureReport.Entry entry ) { - DatapackStructureReport.Entry entry2 = (DatapackStructureReport.Entry)map.putIfAbsent(resourceKey, entry); + DatapackStructureReport.Entry entry2 = (DatapackStructureReport.Entry)map.putIfAbsent(registryKey, entry); if (entry2 != null) { - throw new IllegalStateException("Duplicate entry for key " + resourceKey.location()); + throw new IllegalStateException("Duplicate entry for key " + registryKey.location()); } } @@ -111,8 +111,8 @@ public class DatapackStructureReport implements DataProvider { public static final Codec CODEC = StringRepresentable.fromEnum(DatapackStructureReport.Format::values); private final String name; - private Format(final String string2) { - this.name = string2; + private Format(final String name) { + this.name = name; } @Override diff --git a/net/minecraft/data/loot/BlockLootSubProvider.java b/net/minecraft/data/loot/BlockLootSubProvider.java index cdcf663e..134d5248 100644 --- a/net/minecraft/data/loot/BlockLootSubProvider.java +++ b/net/minecraft/data/loot/BlockLootSubProvider.java @@ -62,7 +62,6 @@ import net.minecraft.world.level.storage.loot.predicates.ConditionUserBuilder; import net.minecraft.world.level.storage.loot.predicates.ExplosionCondition; import net.minecraft.world.level.storage.loot.predicates.LocationCheck; import net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition; -import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition; import net.minecraft.world.level.storage.loot.predicates.MatchTool; import net.minecraft.world.level.storage.loot.providers.number.BinomialDistributionGenerator; @@ -78,7 +77,7 @@ public abstract class BlockLootSubProvider implements LootTableSubProvider { protected static final float[] NORMAL_LEAVES_SAPLING_CHANCES = new float[]{0.05F, 0.0625F, 0.083333336F, 0.1F}; private static final float[] NORMAL_LEAVES_STICK_CHANCES = new float[]{0.02F, 0.022222223F, 0.025F, 0.033333335F, 0.1F}; - protected LootItemCondition.Builder hasSilkTouch() { + protected net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder hasSilkTouch() { HolderLookup.RegistryLookup registryLookup = this.registries.lookupOrThrow(Registries.ENCHANTMENT); return MatchTool.toolMatches( ItemPredicate.Builder.item() @@ -89,19 +88,19 @@ public abstract class BlockLootSubProvider implements LootTableSubProvider { ); } - protected LootItemCondition.Builder doesNotHaveSilkTouch() { + protected net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder doesNotHaveSilkTouch() { return this.hasSilkTouch().invert(); } - protected LootItemCondition.Builder hasShears() { + protected net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder hasShears() { return MatchTool.toolMatches(ItemPredicate.Builder.item().of(this.registries.lookupOrThrow(Registries.ITEM), Items.SHEARS)); } - private LootItemCondition.Builder hasShearsOrSilkTouch() { + private net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder hasShearsOrSilkTouch() { return this.hasShears().or(this.hasSilkTouch()); } - private LootItemCondition.Builder doesNotHaveShearsOrSilkTouch() { + private net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder doesNotHaveShearsOrSilkTouch() { return this.hasShearsOrSilkTouch().invert(); } @@ -135,7 +134,9 @@ public abstract class BlockLootSubProvider implements LootTableSubProvider { * If the condition from {@code conditionBuilder} succeeds, drops 1 {@code block}. * Otherwise, drops loot specified by {@code alternativeBuilder}. */ - private static LootTable.Builder createSelfDropDispatchTable(Block block, LootItemCondition.Builder conditionBuilder, Builder alternativeBuilder) { + private static LootTable.Builder createSelfDropDispatchTable( + Block block, net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder conditionBuilder, Builder alternativeBuilder + ) { return LootTable.lootTable() .withPool(LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).add(LootItem.lootTableItem(block).when(conditionBuilder).otherwise(alternativeBuilder))); } @@ -444,16 +445,16 @@ public abstract class BlockLootSubProvider implements LootTableSubProvider { ); } - protected LootTable.Builder createShearsOnlyDrop(ItemLike itemLike) { - return LootTable.lootTable().withPool(LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(this.hasShears()).add(LootItem.lootTableItem(itemLike))); + protected LootTable.Builder createShearsOnlyDrop(ItemLike item) { + return LootTable.lootTable().withPool(LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(this.hasShears()).add(LootItem.lootTableItem(item))); } - protected LootTable.Builder createShearsOrSilkTouchOnlyDrop(ItemLike itemLike) { + protected LootTable.Builder createShearsOrSilkTouchOnlyDrop(ItemLike item) { return LootTable.lootTable() - .withPool(LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(this.hasShearsOrSilkTouch()).add(LootItem.lootTableItem(itemLike))); + .withPool(LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)).when(this.hasShearsOrSilkTouch()).add(LootItem.lootTableItem(item))); } - protected LootTable.Builder createMultifaceBlockDrops(Block block, LootItemCondition.Builder builder) { + protected LootTable.Builder createMultifaceBlockDrops(Block block, net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder builder) { return LootTable.lootTable() .withPool( LootPool.lootPool() @@ -556,7 +557,9 @@ public abstract class BlockLootSubProvider implements LootTableSubProvider { * If {@code dropGrownCropCondition} fails (i.e. crop is not ready), drops 1 {@code seedsItem}. * If {@code dropGrownCropCondition} succeeds (i.e. crop is ready), drops 1 {@code grownCropItem}, and 0-3 {@code seedsItem} with fortune applied. */ - protected LootTable.Builder createCropDrops(Block cropBlock, Item grownCropItem, Item seedsItem, LootItemCondition.Builder dropGrownCropCondition) { + protected LootTable.Builder createCropDrops( + Block cropBlock, Item grownCropItem, Item seedsItem, net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder dropGrownCropCondition + ) { HolderLookup.RegistryLookup registryLookup = this.registries.lookupOrThrow(Registries.ENCHANTMENT); return this.applyExplosionDecay( cropBlock, diff --git a/net/minecraft/data/loot/EntityLootSubProvider.java b/net/minecraft/data/loot/EntityLootSubProvider.java index c7333063..75fb7fe3 100644 --- a/net/minecraft/data/loot/EntityLootSubProvider.java +++ b/net/minecraft/data/loot/EntityLootSubProvider.java @@ -38,7 +38,6 @@ import net.minecraft.world.level.storage.loot.entries.AlternativesEntry; import net.minecraft.world.level.storage.loot.entries.NestedLootTable; import net.minecraft.world.level.storage.loot.predicates.AnyOfCondition; import net.minecraft.world.level.storage.loot.predicates.DamageSourceCondition; -import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; import net.minecraft.world.level.storage.loot.predicates.LootItemEntityPropertyCondition; import net.minecraft.world.level.storage.loot.predicates.AnyOfCondition.Builder; @@ -82,10 +81,10 @@ public abstract class EntityLootSubProvider implements LootTableSubProvider { this.registries = registries; } - public static net.minecraft.world.level.storage.loot.LootPool.Builder createSheepDispatchPool(Map> map) { + public static net.minecraft.world.level.storage.loot.LootPool.Builder createSheepDispatchPool(Map> lootTables) { net.minecraft.world.level.storage.loot.entries.AlternativesEntry.Builder builder = AlternativesEntry.alternatives(); - for (Entry> entry : map.entrySet()) { + for (Entry> entry : lootTables.entrySet()) { builder = builder.otherwise( NestedLootTable.lootTableReference((ResourceKey)entry.getValue()) .when( @@ -148,19 +147,22 @@ public abstract class EntityLootSubProvider implements LootTableSubProvider { } } - protected LootItemCondition.Builder killedByFrog(HolderGetter> holderGetter) { + protected net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder killedByFrog(HolderGetter> entityTypeRegistry) { return DamageSourceCondition.hasDamageSource( - net.minecraft.advancements.critereon.DamageSourcePredicate.Builder.damageType().source(EntityPredicate.Builder.entity().of(holderGetter, EntityType.FROG)) + net.minecraft.advancements.critereon.DamageSourcePredicate.Builder.damageType() + .source(EntityPredicate.Builder.entity().of(entityTypeRegistry, EntityType.FROG)) ); } - protected LootItemCondition.Builder killedByFrogVariant(HolderGetter> holderGetter, ResourceKey resourceKey) { + protected net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder killedByFrogVariant( + HolderGetter> entityTypeRegistry, ResourceKey frogVariant + ) { return DamageSourceCondition.hasDamageSource( net.minecraft.advancements.critereon.DamageSourcePredicate.Builder.damageType() .source( EntityPredicate.Builder.entity() - .of(holderGetter, EntityType.FROG) - .subPredicate(EntitySubPredicates.frogVariant(BuiltInRegistries.FROG_VARIANT.getOrThrow(resourceKey))) + .of(entityTypeRegistry, EntityType.FROG) + .subPredicate(EntitySubPredicates.frogVariant(BuiltInRegistries.FROG_VARIANT.getOrThrow(frogVariant))) ) ); } diff --git a/net/minecraft/data/loot/packs/VanillaBlockLoot.java b/net/minecraft/data/loot/packs/VanillaBlockLoot.java index b14ee09b..7ea31f0b 100644 --- a/net/minecraft/data/loot/packs/VanillaBlockLoot.java +++ b/net/minecraft/data/loot/packs/VanillaBlockLoot.java @@ -50,7 +50,6 @@ import net.minecraft.world.level.storage.loot.functions.LimitCount; import net.minecraft.world.level.storage.loot.functions.SetItemCountFunction; import net.minecraft.world.level.storage.loot.predicates.BonusLevelTableCondition; import net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition; -import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; import net.minecraft.world.level.storage.loot.predicates.LootItemEntityPropertyCondition; import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition; import net.minecraft.world.level.storage.loot.predicates.MatchTool; @@ -1029,15 +1028,23 @@ public class VanillaBlockLoot extends BlockLootSubProvider { this.add(Blocks.CHERRY_LEAVES, block -> this.createLeavesDrops(block, Blocks.CHERRY_SAPLING, NORMAL_LEAVES_SAPLING_CHANCES)); this.add(Blocks.AZALEA_LEAVES, block -> this.createLeavesDrops(block, Blocks.AZALEA, NORMAL_LEAVES_SAPLING_CHANCES)); this.add(Blocks.FLOWERING_AZALEA_LEAVES, block -> this.createLeavesDrops(block, Blocks.FLOWERING_AZALEA, NORMAL_LEAVES_SAPLING_CHANCES)); - LootItemCondition.Builder builder = LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.BEETROOTS) + net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder builder = LootItemBlockStatePropertyCondition.hasBlockStateProperties( + Blocks.BEETROOTS + ) .setProperties(Builder.properties().hasProperty(BeetrootBlock.AGE, 3)); this.add(Blocks.BEETROOTS, this.createCropDrops(Blocks.BEETROOTS, Items.BEETROOT, Items.BEETROOT_SEEDS, builder)); - LootItemCondition.Builder builder2 = LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.WHEAT) + net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder builder2 = LootItemBlockStatePropertyCondition.hasBlockStateProperties( + Blocks.WHEAT + ) .setProperties(Builder.properties().hasProperty(CropBlock.AGE, 7)); this.add(Blocks.WHEAT, this.createCropDrops(Blocks.WHEAT, Items.WHEAT, Items.WHEAT_SEEDS, builder2)); - LootItemCondition.Builder builder3 = LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.CARROTS) + net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder builder3 = LootItemBlockStatePropertyCondition.hasBlockStateProperties( + Blocks.CARROTS + ) .setProperties(Builder.properties().hasProperty(CarrotBlock.AGE, 7)); - LootItemCondition.Builder builder4 = LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.MANGROVE_PROPAGULE) + net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder builder4 = LootItemBlockStatePropertyCondition.hasBlockStateProperties( + Blocks.MANGROVE_PROPAGULE + ) .setProperties(Builder.properties().hasProperty(MangrovePropaguleBlock.AGE, 4)); this.add( Blocks.MANGROVE_PROPAGULE, @@ -1085,7 +1092,9 @@ public class VanillaBlockLoot extends BlockLootSubProvider { ) ) ); - LootItemCondition.Builder builder5 = LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.POTATOES) + net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder builder5 = LootItemBlockStatePropertyCondition.hasBlockStateProperties( + Blocks.POTATOES + ) .setProperties(Builder.properties().hasProperty(PotatoBlock.AGE, 7)); this.add( Blocks.POTATOES, @@ -1489,9 +1498,13 @@ public class VanillaBlockLoot extends BlockLootSubProvider { AlternativesEntry.alternatives( PitcherCropBlock.AGE.getPossibleValues(), integer -> { - LootItemBlockStatePropertyCondition.Builder builder = LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.PITCHER_CROP) + net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition.Builder builder = LootItemBlockStatePropertyCondition.hasBlockStateProperties( + Blocks.PITCHER_CROP + ) .setProperties(Builder.properties().hasProperty(DoublePlantBlock.HALF, DoubleBlockHalf.LOWER)); - LootItemBlockStatePropertyCondition.Builder builder2 = LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.PITCHER_CROP) + net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition.Builder builder2 = LootItemBlockStatePropertyCondition.hasBlockStateProperties( + Blocks.PITCHER_CROP + ) .setProperties(Builder.properties().hasProperty(PitcherCropBlock.AGE, integer)); return integer == 4 ? LootItem.lootTableItem(Items.PITCHER_PLANT).when(builder2).when(builder).apply(SetItemCountFunction.setCount(ConstantValue.exactly(1.0F))) diff --git a/net/minecraft/data/loot/packs/VanillaEquipmentLoot.java b/net/minecraft/data/loot/packs/VanillaEquipmentLoot.java index bd968191..dfbe8bb9 100644 --- a/net/minecraft/data/loot/packs/VanillaEquipmentLoot.java +++ b/net/minecraft/data/loot/packs/VanillaEquipmentLoot.java @@ -21,7 +21,7 @@ import net.minecraft.world.level.storage.loot.LootTable; import net.minecraft.world.level.storage.loot.entries.LootItem; import net.minecraft.world.level.storage.loot.entries.NestedLootTable; import net.minecraft.world.level.storage.loot.functions.SetComponentsFunction; -import net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction; +import net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction.Builder; import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition; import net.minecraft.world.level.storage.loot.providers.number.ConstantValue; @@ -59,11 +59,11 @@ public record VanillaEquipmentLoot(HolderLookup.Provider registries) implements .add(LootItem.lootTableItem(Items.IRON_SWORD).setWeight(4)) .add( LootItem.lootTableItem(Items.IRON_SWORD) - .apply(new SetEnchantmentsFunction.Builder().withEnchantment(registryLookup3.getOrThrow(Enchantments.SHARPNESS), ConstantValue.exactly(1.0F))) + .apply(new Builder().withEnchantment(registryLookup3.getOrThrow(Enchantments.SHARPNESS), ConstantValue.exactly(1.0F))) ) .add( LootItem.lootTableItem(Items.IRON_SWORD) - .apply(new SetEnchantmentsFunction.Builder().withEnchantment(registryLookup3.getOrThrow(Enchantments.KNOCKBACK), ConstantValue.exactly(1.0F))) + .apply(new Builder().withEnchantment(registryLookup3.getOrThrow(Enchantments.KNOCKBACK), ConstantValue.exactly(1.0F))) ) .add(LootItem.lootTableItem(Items.DIAMOND_SWORD)) ) @@ -76,32 +76,28 @@ public record VanillaEquipmentLoot(HolderLookup.Provider registries) implements LootPool.lootPool() .setRolls(ConstantValue.exactly(1.0F)) .add(LootItem.lootTableItem(Items.BOW).setWeight(2)) - .add( - LootItem.lootTableItem(Items.BOW) - .apply(new SetEnchantmentsFunction.Builder().withEnchantment(registryLookup3.getOrThrow(Enchantments.POWER), ConstantValue.exactly(1.0F))) - ) - .add( - LootItem.lootTableItem(Items.BOW) - .apply(new SetEnchantmentsFunction.Builder().withEnchantment(registryLookup3.getOrThrow(Enchantments.PUNCH), ConstantValue.exactly(1.0F))) - ) + .add(LootItem.lootTableItem(Items.BOW).apply(new Builder().withEnchantment(registryLookup3.getOrThrow(Enchantments.POWER), ConstantValue.exactly(1.0F)))) + .add(LootItem.lootTableItem(Items.BOW).apply(new Builder().withEnchantment(registryLookup3.getOrThrow(Enchantments.PUNCH), ConstantValue.exactly(1.0F)))) ) ); } - public static LootTable.Builder trialChamberEquipment(Item item, Item item2, ArmorTrim armorTrim, HolderLookup.RegistryLookup registryLookup) { + public static LootTable.Builder trialChamberEquipment( + Item helmetItem, Item chestplateItem, ArmorTrim trim, HolderLookup.RegistryLookup enchantmentRegistry + ) { return LootTable.lootTable() .withPool( LootPool.lootPool() .setRolls(ConstantValue.exactly(1.0F)) .when(LootItemRandomChanceCondition.randomChance(0.5F)) .add( - LootItem.lootTableItem(item) - .apply(SetComponentsFunction.setComponent(DataComponents.TRIM, armorTrim)) + LootItem.lootTableItem(helmetItem) + .apply(SetComponentsFunction.setComponent(DataComponents.TRIM, trim)) .apply( - new SetEnchantmentsFunction.Builder() - .withEnchantment(registryLookup.getOrThrow(Enchantments.PROTECTION), ConstantValue.exactly(4.0F)) - .withEnchantment(registryLookup.getOrThrow(Enchantments.PROJECTILE_PROTECTION), ConstantValue.exactly(4.0F)) - .withEnchantment(registryLookup.getOrThrow(Enchantments.FIRE_PROTECTION), ConstantValue.exactly(4.0F)) + new Builder() + .withEnchantment(enchantmentRegistry.getOrThrow(Enchantments.PROTECTION), ConstantValue.exactly(4.0F)) + .withEnchantment(enchantmentRegistry.getOrThrow(Enchantments.PROJECTILE_PROTECTION), ConstantValue.exactly(4.0F)) + .withEnchantment(enchantmentRegistry.getOrThrow(Enchantments.FIRE_PROTECTION), ConstantValue.exactly(4.0F)) ) ) ) @@ -110,13 +106,13 @@ public record VanillaEquipmentLoot(HolderLookup.Provider registries) implements .setRolls(ConstantValue.exactly(1.0F)) .when(LootItemRandomChanceCondition.randomChance(0.5F)) .add( - LootItem.lootTableItem(item2) - .apply(SetComponentsFunction.setComponent(DataComponents.TRIM, armorTrim)) + LootItem.lootTableItem(chestplateItem) + .apply(SetComponentsFunction.setComponent(DataComponents.TRIM, trim)) .apply( - new SetEnchantmentsFunction.Builder() - .withEnchantment(registryLookup.getOrThrow(Enchantments.PROTECTION), ConstantValue.exactly(4.0F)) - .withEnchantment(registryLookup.getOrThrow(Enchantments.PROJECTILE_PROTECTION), ConstantValue.exactly(4.0F)) - .withEnchantment(registryLookup.getOrThrow(Enchantments.FIRE_PROTECTION), ConstantValue.exactly(4.0F)) + new Builder() + .withEnchantment(enchantmentRegistry.getOrThrow(Enchantments.PROTECTION), ConstantValue.exactly(4.0F)) + .withEnchantment(enchantmentRegistry.getOrThrow(Enchantments.PROJECTILE_PROTECTION), ConstantValue.exactly(4.0F)) + .withEnchantment(enchantmentRegistry.getOrThrow(Enchantments.FIRE_PROTECTION), ConstantValue.exactly(4.0F)) ) ) ); diff --git a/net/minecraft/data/loot/packs/WinterDropBlockLoot.java b/net/minecraft/data/loot/packs/WinterDropBlockLoot.java index e78d857e..aad7615f 100644 --- a/net/minecraft/data/loot/packs/WinterDropBlockLoot.java +++ b/net/minecraft/data/loot/packs/WinterDropBlockLoot.java @@ -8,8 +8,8 @@ import net.minecraft.world.flag.FeatureFlags; import net.minecraft.world.level.block.Blocks; public class WinterDropBlockLoot extends BlockLootSubProvider { - public WinterDropBlockLoot(HolderLookup.Provider provider) { - super(Set.of(), FeatureFlagSet.of(FeatureFlags.WINTER_DROP), provider); + public WinterDropBlockLoot(HolderLookup.Provider registries) { + super(Set.of(), FeatureFlagSet.of(FeatureFlags.WINTER_DROP), registries); } @Override diff --git a/net/minecraft/data/loot/packs/WinterDropLootTableProvider.java b/net/minecraft/data/loot/packs/WinterDropLootTableProvider.java index 89d5a520..5f9dcf12 100644 --- a/net/minecraft/data/loot/packs/WinterDropLootTableProvider.java +++ b/net/minecraft/data/loot/packs/WinterDropLootTableProvider.java @@ -9,9 +9,9 @@ import net.minecraft.data.loot.LootTableProvider; import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; public class WinterDropLootTableProvider { - public static LootTableProvider create(PackOutput packOutput, CompletableFuture completableFuture) { + public static LootTableProvider create(PackOutput output, CompletableFuture registries) { return new LootTableProvider( - packOutput, Set.of(), List.of(new LootTableProvider.SubProviderEntry(WinterDropBlockLoot::new, LootContextParamSets.BLOCK)), completableFuture + output, Set.of(), List.of(new LootTableProvider.SubProviderEntry(WinterDropBlockLoot::new, LootContextParamSets.BLOCK)), registries ); } } diff --git a/net/minecraft/data/models/ItemModelGenerators.java b/net/minecraft/data/models/ItemModelGenerators.java index 1691673d..2c2ee436 100644 --- a/net/minecraft/data/models/ItemModelGenerators.java +++ b/net/minecraft/data/models/ItemModelGenerators.java @@ -88,8 +88,8 @@ public class ItemModelGenerators { return modelLocation.withSuffix("_" + trimId + "_trim"); } - private JsonObject generateBaseArmorTrimTemplate(ResourceLocation resourceLocation, Map map, ResourceLocation resourceLocation2) { - JsonObject jsonObject = ModelTemplates.TWO_LAYERED_ITEM.createBaseTemplate(resourceLocation, map); + private JsonObject generateBaseArmorTrimTemplate(ResourceLocation modelLocation, Map modelGetter, ResourceLocation name) { + JsonObject jsonObject = ModelTemplates.TWO_LAYERED_ITEM.createBaseTemplate(modelLocation, modelGetter); JsonArray jsonArray = new JsonArray(); for (ItemModelGenerators.TrimModelData trimModelData : GENERATED_TRIM_MODELS) { @@ -97,7 +97,7 @@ public class ItemModelGenerators { JsonObject jsonObject3 = new JsonObject(); jsonObject3.addProperty(TRIM_TYPE_PREDICATE_ID.getPath(), trimModelData.itemModelIndex()); jsonObject2.add("predicate", jsonObject3); - jsonObject2.addProperty("model", this.getItemModelForTrimMaterial(resourceLocation, trimModelData.name(resourceLocation2)).toString()); + jsonObject2.addProperty("model", this.getItemModelForTrimMaterial(modelLocation, trimModelData.name(name)).toString()); jsonArray.add(jsonObject2); } @@ -105,31 +105,31 @@ public class ItemModelGenerators { return jsonObject; } - private void generateArmorTrims(Item item, ResourceLocation resourceLocation, EquipmentModel equipmentModel, EquipmentSlot equipmentSlot) { - List list = equipmentModel.getLayers(EquipmentModel.LayerType.HUMANOID); + private void generateArmorTrims(Item item, ResourceLocation modelId, EquipmentModel model, EquipmentSlot slot) { + List list = model.getLayers(EquipmentModel.LayerType.HUMANOID); if (!list.isEmpty()) { boolean bl = list.size() == 2 && ((EquipmentModel.Layer)list.getFirst()).dyeable().isPresent(); - ResourceLocation resourceLocation2 = ModelLocationUtils.getModelLocation(item); - ResourceLocation resourceLocation3 = TextureMapping.getItemTexture(item); - ResourceLocation resourceLocation4 = TextureMapping.getItemTexture(item, "_overlay"); + ResourceLocation resourceLocation = ModelLocationUtils.getModelLocation(item); + ResourceLocation resourceLocation2 = TextureMapping.getItemTexture(item); + ResourceLocation resourceLocation3 = TextureMapping.getItemTexture(item, "_overlay"); if (bl) { ModelTemplates.TWO_LAYERED_ITEM .create( - resourceLocation2, - TextureMapping.layered(resourceLocation3, resourceLocation4), + resourceLocation, + TextureMapping.layered(resourceLocation2, resourceLocation3), this.output, - (resourceLocation2x, map) -> this.generateBaseArmorTrimTemplate(resourceLocation2x, map, resourceLocation) + (resourceLocation2x, map) -> this.generateBaseArmorTrimTemplate(resourceLocation2x, map, modelId) ); } else { ModelTemplates.FLAT_ITEM .create( - resourceLocation2, - TextureMapping.layer0(resourceLocation3), + resourceLocation, + TextureMapping.layer0(resourceLocation2), this.output, - (resourceLocation2x, map) -> this.generateBaseArmorTrimTemplate(resourceLocation2x, map, resourceLocation) + (resourceLocation2x, map) -> this.generateBaseArmorTrimTemplate(resourceLocation2x, map, modelId) ); } - String string = switch (equipmentSlot) { + String string = switch (slot) { case HEAD -> "helmet"; case CHEST -> "chestplate"; case LEGS -> "leggings"; @@ -138,14 +138,14 @@ public class ItemModelGenerators { }; for (ItemModelGenerators.TrimModelData trimModelData : GENERATED_TRIM_MODELS) { - String string2 = trimModelData.name(resourceLocation); - ResourceLocation resourceLocation5 = this.getItemModelForTrimMaterial(resourceLocation2, string2); + String string2 = trimModelData.name(modelId); + ResourceLocation resourceLocation4 = this.getItemModelForTrimMaterial(resourceLocation, string2); String string3 = string + "_trim_" + string2; - ResourceLocation resourceLocation6 = ResourceLocation.withDefaultNamespace(string3).withPrefix("trims/items/"); + ResourceLocation resourceLocation5 = ResourceLocation.withDefaultNamespace(string3).withPrefix("trims/items/"); if (bl) { - this.generateLayeredItem(resourceLocation5, resourceLocation3, resourceLocation4, resourceLocation6); + this.generateLayeredItem(resourceLocation4, resourceLocation2, resourceLocation3, resourceLocation5); } else { - this.generateLayeredItem(resourceLocation5, resourceLocation3, resourceLocation6); + this.generateLayeredItem(resourceLocation4, resourceLocation2, resourceLocation5); } } } @@ -479,8 +479,8 @@ public class ItemModelGenerators { } record TrimModelData(String name, float itemModelIndex, Map overrideArmorMaterials) { - public String name(ResourceLocation resourceLocation) { - return (String)this.overrideArmorMaterials.getOrDefault(resourceLocation, this.name); + public String name(ResourceLocation name) { + return (String)this.overrideArmorMaterials.getOrDefault(name, this.name); } } } diff --git a/net/minecraft/data/recipes/RecipeBuilder.java b/net/minecraft/data/recipes/RecipeBuilder.java index 72f4b573..2d1d59a0 100644 --- a/net/minecraft/data/recipes/RecipeBuilder.java +++ b/net/minecraft/data/recipes/RecipeBuilder.java @@ -20,7 +20,7 @@ public interface RecipeBuilder { Item getResult(); - void save(RecipeOutput recipeOutput, ResourceKey> resourceKey); + void save(RecipeOutput output, ResourceKey> resourceKey); default void save(RecipeOutput recipeOutput) { this.save(recipeOutput, ResourceKey.create(Registries.RECIPE, getDefaultRecipeId(this.getResult()))); diff --git a/net/minecraft/data/recipes/RecipeOutput.java b/net/minecraft/data/recipes/RecipeOutput.java index c0c65f78..47a486ab 100644 --- a/net/minecraft/data/recipes/RecipeOutput.java +++ b/net/minecraft/data/recipes/RecipeOutput.java @@ -7,7 +7,7 @@ import net.minecraft.world.item.crafting.Recipe; import org.jetbrains.annotations.Nullable; public interface RecipeOutput { - void accept(ResourceKey> resourceKey, Recipe recipe, @Nullable AdvancementHolder advancementHolder); + void accept(ResourceKey> key, Recipe recipe, @Nullable AdvancementHolder advancement); Builder advancement(); diff --git a/net/minecraft/data/recipes/RecipeProvider.java b/net/minecraft/data/recipes/RecipeProvider.java index 00c4b9f0..33a34d24 100644 --- a/net/minecraft/data/recipes/RecipeProvider.java +++ b/net/minecraft/data/recipes/RecipeProvider.java @@ -83,109 +83,106 @@ public abstract class RecipeProvider { .put(Variant.WALL, (recipeProvider, itemLike, itemLike2) -> recipeProvider.wallBuilder(RecipeCategory.DECORATIONS, itemLike, Ingredient.of(itemLike2))) .build(); - protected RecipeProvider(HolderLookup.Provider provider, RecipeOutput recipeOutput) { - this.registries = provider; - this.items = provider.lookupOrThrow(Registries.ITEM); - this.output = recipeOutput; + protected RecipeProvider(HolderLookup.Provider registries, RecipeOutput output) { + this.registries = registries; + this.items = registries.lookupOrThrow(Registries.ITEM); + this.output = output; } protected abstract void buildRecipes(); - protected void generateForEnabledBlockFamilies(FeatureFlagSet featureFlagSet) { - BlockFamilies.getAllFamilies().filter(BlockFamily::shouldGenerateRecipe).forEach(blockFamily -> this.generateRecipes(blockFamily, featureFlagSet)); + protected void generateForEnabledBlockFamilies(FeatureFlagSet enabledFeatures) { + BlockFamilies.getAllFamilies().filter(BlockFamily::shouldGenerateRecipe).forEach(blockFamily -> this.generateRecipes(blockFamily, enabledFeatures)); } - protected void oneToOneConversionRecipe(ItemLike itemLike, ItemLike itemLike2, @Nullable String string) { - this.oneToOneConversionRecipe(itemLike, itemLike2, string, 1); + protected void oneToOneConversionRecipe(ItemLike result, ItemLike ingredient, @Nullable String group) { + this.oneToOneConversionRecipe(result, ingredient, group, 1); } - protected void oneToOneConversionRecipe(ItemLike itemLike, ItemLike itemLike2, @Nullable String string, int i) { - this.shapeless(RecipeCategory.MISC, itemLike, i) - .requires(itemLike2) - .group(string) - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) - .save(this.output, getConversionRecipeName(itemLike, itemLike2)); + protected void oneToOneConversionRecipe(ItemLike result, ItemLike ingredient, @Nullable String group, int resultCount) { + this.shapeless(RecipeCategory.MISC, result, resultCount) + .requires(ingredient) + .group(group) + .unlockedBy(getHasName(ingredient), this.has(ingredient)) + .save(this.output, getConversionRecipeName(result, ingredient)); } - protected void oreSmelting(List list, RecipeCategory recipeCategory, ItemLike itemLike, float f, int i, String string) { - this.oreCooking(RecipeSerializer.SMELTING_RECIPE, SmeltingRecipe::new, list, recipeCategory, itemLike, f, i, string, "_from_smelting"); + protected void oreSmelting(List ingredients, RecipeCategory category, ItemLike result, float experience, int cookingTime, String group) { + this.oreCooking(RecipeSerializer.SMELTING_RECIPE, SmeltingRecipe::new, ingredients, category, result, experience, cookingTime, group, "_from_smelting"); } - protected void oreBlasting(List list, RecipeCategory recipeCategory, ItemLike itemLike, float f, int i, String string) { - this.oreCooking(RecipeSerializer.BLASTING_RECIPE, BlastingRecipe::new, list, recipeCategory, itemLike, f, i, string, "_from_blasting"); + protected void oreBlasting(List ingredients, RecipeCategory category, ItemLike result, float experience, int cookingTime, String group) { + this.oreCooking(RecipeSerializer.BLASTING_RECIPE, BlastingRecipe::new, ingredients, category, result, experience, cookingTime, group, "_from_blasting"); } private void oreCooking( - RecipeSerializer recipeSerializer, - AbstractCookingRecipe.Factory factory, - List list, - RecipeCategory recipeCategory, - ItemLike itemLike, - float f, - int i, - String string, - String string2 + RecipeSerializer serializer, + AbstractCookingRecipe.Factory recipeFactory, + List ingredients, + RecipeCategory category, + ItemLike result, + float experience, + int cookingTime, + String group, + String suffix ) { - for (ItemLike itemLike2 : list) { - SimpleCookingRecipeBuilder.generic(Ingredient.of(itemLike2), recipeCategory, itemLike, f, i, recipeSerializer, factory) - .group(string) - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) - .save(this.output, getItemName(itemLike) + string2 + "_" + getItemName(itemLike2)); + for (ItemLike itemLike : ingredients) { + SimpleCookingRecipeBuilder.generic(Ingredient.of(itemLike), category, result, experience, cookingTime, serializer, recipeFactory) + .group(group) + .unlockedBy(getHasName(itemLike), this.has(itemLike)) + .save(this.output, getItemName(result) + suffix + "_" + getItemName(itemLike)); } } - protected void netheriteSmithing(Item item, RecipeCategory recipeCategory, Item item2) { + protected void netheriteSmithing(Item ingredientItem, RecipeCategory category, Item resultItem) { SmithingTransformRecipeBuilder.smithing( - Ingredient.of(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE), Ingredient.of(item), this.tag(ItemTags.NETHERITE_TOOL_MATERIALS), recipeCategory, item2 + Ingredient.of(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE), Ingredient.of(ingredientItem), this.tag(ItemTags.NETHERITE_TOOL_MATERIALS), category, resultItem ) .unlocks("has_netherite_ingot", this.has(ItemTags.NETHERITE_TOOL_MATERIALS)) - .save(this.output, getItemName(item2) + "_smithing"); + .save(this.output, getItemName(resultItem) + "_smithing"); } - protected void trimSmithing(Item item, ResourceKey> resourceKey) { - SmithingTrimRecipeBuilder.smithingTrim(Ingredient.of(item), this.tag(ItemTags.TRIMMABLE_ARMOR), this.tag(ItemTags.TRIM_MATERIALS), RecipeCategory.MISC) - .unlocks("has_smithing_trim_template", this.has(item)) - .save(this.output, resourceKey); + protected void trimSmithing(Item templateItem, ResourceKey> key) { + SmithingTrimRecipeBuilder.smithingTrim( + Ingredient.of(templateItem), this.tag(ItemTags.TRIMMABLE_ARMOR), this.tag(ItemTags.TRIM_MATERIALS), RecipeCategory.MISC + ) + .unlocks("has_smithing_trim_template", this.has(templateItem)) + .save(this.output, key); } - protected void twoByTwoPacker(RecipeCategory recipeCategory, ItemLike itemLike, ItemLike itemLike2) { - this.shaped(recipeCategory, itemLike, 1) - .define('#', itemLike2) - .pattern("##") - .pattern("##") - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) - .save(this.output); + protected void twoByTwoPacker(RecipeCategory category, ItemLike packed, ItemLike unpacked) { + this.shaped(category, packed, 1).define('#', unpacked).pattern("##").pattern("##").unlockedBy(getHasName(unpacked), this.has(unpacked)).save(this.output); } - protected void threeByThreePacker(RecipeCategory recipeCategory, ItemLike itemLike, ItemLike itemLike2, String string) { - this.shapeless(recipeCategory, itemLike).requires(itemLike2, 9).unlockedBy(string, this.has(itemLike2)).save(this.output); + protected void threeByThreePacker(RecipeCategory category, ItemLike packed, ItemLike unpacked, String criterionName) { + this.shapeless(category, packed).requires(unpacked, 9).unlockedBy(criterionName, this.has(unpacked)).save(this.output); } - protected void threeByThreePacker(RecipeCategory recipeCategory, ItemLike itemLike, ItemLike itemLike2) { - this.threeByThreePacker(recipeCategory, itemLike, itemLike2, getHasName(itemLike2)); + protected void threeByThreePacker(RecipeCategory category, ItemLike packed, ItemLike unpacked) { + this.threeByThreePacker(category, packed, unpacked, getHasName(unpacked)); } - protected void planksFromLog(ItemLike itemLike, TagKey tagKey, int i) { - this.shapeless(RecipeCategory.BUILDING_BLOCKS, itemLike, i).requires(tagKey).group("planks").unlockedBy("has_log", this.has(tagKey)).save(this.output); + protected void planksFromLog(ItemLike planks, TagKey logs, int resultCount) { + this.shapeless(RecipeCategory.BUILDING_BLOCKS, planks, resultCount).requires(logs).group("planks").unlockedBy("has_log", this.has(logs)).save(this.output); } - protected void planksFromLogs(ItemLike itemLike, TagKey tagKey, int i) { - this.shapeless(RecipeCategory.BUILDING_BLOCKS, itemLike, i).requires(tagKey).group("planks").unlockedBy("has_logs", this.has(tagKey)).save(this.output); + protected void planksFromLogs(ItemLike planks, TagKey logs, int result) { + this.shapeless(RecipeCategory.BUILDING_BLOCKS, planks, result).requires(logs).group("planks").unlockedBy("has_logs", this.has(logs)).save(this.output); } - protected void woodFromLogs(ItemLike itemLike, ItemLike itemLike2) { - this.shaped(RecipeCategory.BUILDING_BLOCKS, itemLike, 3) - .define('#', itemLike2) + protected void woodFromLogs(ItemLike wood, ItemLike log) { + this.shaped(RecipeCategory.BUILDING_BLOCKS, wood, 3) + .define('#', log) .pattern("##") .pattern("##") .group("bark") - .unlockedBy("has_log", this.has(itemLike2)) + .unlockedBy("has_log", this.has(log)) .save(this.output); } - protected void woodenBoat(ItemLike itemLike, ItemLike itemLike2) { - this.shaped(RecipeCategory.TRANSPORTATION, itemLike) - .define('#', itemLike2) + protected void woodenBoat(ItemLike boat, ItemLike material) { + this.shaped(RecipeCategory.TRANSPORTATION, boat) + .define('#', material) .pattern("# #") .pattern("###") .group("boat") @@ -193,139 +190,139 @@ public abstract class RecipeProvider { .save(this.output); } - protected void chestBoat(ItemLike itemLike, ItemLike itemLike2) { - this.shapeless(RecipeCategory.TRANSPORTATION, itemLike) + protected void chestBoat(ItemLike boat, ItemLike material) { + this.shapeless(RecipeCategory.TRANSPORTATION, boat) .requires(Blocks.CHEST) - .requires(itemLike2) + .requires(material) .group("chest_boat") .unlockedBy("has_boat", this.has(ItemTags.BOATS)) .save(this.output); } - private RecipeBuilder buttonBuilder(ItemLike material, Ingredient ingredient) { - return this.shapeless(RecipeCategory.REDSTONE, material).requires(ingredient); + private RecipeBuilder buttonBuilder(ItemLike button, Ingredient material) { + return this.shapeless(RecipeCategory.REDSTONE, button).requires(material); } - protected RecipeBuilder doorBuilder(ItemLike material, Ingredient ingredient) { - return this.shaped(RecipeCategory.REDSTONE, material, 3).define('#', ingredient).pattern("##").pattern("##").pattern("##"); + protected RecipeBuilder doorBuilder(ItemLike door, Ingredient material) { + return this.shaped(RecipeCategory.REDSTONE, door, 3).define('#', material).pattern("##").pattern("##").pattern("##"); } - private RecipeBuilder fenceBuilder(ItemLike material, Ingredient ingredient) { - int i = material == Blocks.NETHER_BRICK_FENCE ? 6 : 3; - Item item = material == Blocks.NETHER_BRICK_FENCE ? Items.NETHER_BRICK : Items.STICK; - return this.shaped(RecipeCategory.DECORATIONS, material, i).define('W', ingredient).define('#', item).pattern("W#W").pattern("W#W"); + private RecipeBuilder fenceBuilder(ItemLike fence, Ingredient material) { + int i = fence == Blocks.NETHER_BRICK_FENCE ? 6 : 3; + Item item = fence == Blocks.NETHER_BRICK_FENCE ? Items.NETHER_BRICK : Items.STICK; + return this.shaped(RecipeCategory.DECORATIONS, fence, i).define('W', material).define('#', item).pattern("W#W").pattern("W#W"); } - private RecipeBuilder fenceGateBuilder(ItemLike material, Ingredient ingredient) { - return this.shaped(RecipeCategory.REDSTONE, material).define('#', Items.STICK).define('W', ingredient).pattern("#W#").pattern("#W#"); + private RecipeBuilder fenceGateBuilder(ItemLike fenceGate, Ingredient material) { + return this.shaped(RecipeCategory.REDSTONE, fenceGate).define('#', Items.STICK).define('W', material).pattern("#W#").pattern("#W#"); } - protected void pressurePlate(ItemLike itemLike, ItemLike itemLike2) { - this.pressurePlateBuilder(RecipeCategory.REDSTONE, itemLike, Ingredient.of(itemLike2)) - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) + protected void pressurePlate(ItemLike pressurePlate, ItemLike material) { + this.pressurePlateBuilder(RecipeCategory.REDSTONE, pressurePlate, Ingredient.of(material)) + .unlockedBy(getHasName(material), this.has(material)) .save(this.output); } - private RecipeBuilder pressurePlateBuilder(RecipeCategory pressurePlate, ItemLike material, Ingredient ingredient) { - return this.shaped(pressurePlate, material).define('#', ingredient).pattern("##"); + private RecipeBuilder pressurePlateBuilder(RecipeCategory category, ItemLike pressurePlate, Ingredient material) { + return this.shaped(category, pressurePlate).define('#', material).pattern("##"); } - protected void slab(RecipeCategory recipeCategory, ItemLike itemLike, ItemLike itemLike2) { - this.slabBuilder(recipeCategory, itemLike, Ingredient.of(itemLike2)).unlockedBy(getHasName(itemLike2), this.has(itemLike2)).save(this.output); + protected void slab(RecipeCategory category, ItemLike slab, ItemLike material) { + this.slabBuilder(category, slab, Ingredient.of(material)).unlockedBy(getHasName(material), this.has(material)).save(this.output); } - protected RecipeBuilder slabBuilder(RecipeCategory slab, ItemLike material, Ingredient ingredient) { - return this.shaped(slab, material, 6).define('#', ingredient).pattern("###"); + protected RecipeBuilder slabBuilder(RecipeCategory category, ItemLike slab, Ingredient material) { + return this.shaped(category, slab, 6).define('#', material).pattern("###"); } - protected RecipeBuilder stairBuilder(ItemLike material, Ingredient ingredient) { - return this.shaped(RecipeCategory.BUILDING_BLOCKS, material, 4).define('#', ingredient).pattern("# ").pattern("## ").pattern("###"); + protected RecipeBuilder stairBuilder(ItemLike stairs, Ingredient material) { + return this.shaped(RecipeCategory.BUILDING_BLOCKS, stairs, 4).define('#', material).pattern("# ").pattern("## ").pattern("###"); } - protected RecipeBuilder trapdoorBuilder(ItemLike material, Ingredient ingredient) { - return this.shaped(RecipeCategory.REDSTONE, material, 2).define('#', ingredient).pattern("###").pattern("###"); + protected RecipeBuilder trapdoorBuilder(ItemLike trapdoor, Ingredient material) { + return this.shaped(RecipeCategory.REDSTONE, trapdoor, 2).define('#', material).pattern("###").pattern("###"); } - private RecipeBuilder signBuilder(ItemLike material, Ingredient ingredient) { - return this.shaped(RecipeCategory.DECORATIONS, material, 3) + private RecipeBuilder signBuilder(ItemLike sign, Ingredient material) { + return this.shaped(RecipeCategory.DECORATIONS, sign, 3) .group("sign") - .define('#', ingredient) + .define('#', material) .define('X', Items.STICK) .pattern("###") .pattern("###") .pattern(" X "); } - protected void hangingSign(ItemLike itemLike, ItemLike itemLike2) { - this.shaped(RecipeCategory.DECORATIONS, itemLike, 6) + protected void hangingSign(ItemLike sign, ItemLike material) { + this.shaped(RecipeCategory.DECORATIONS, sign, 6) .group("hanging_sign") - .define('#', itemLike2) + .define('#', material) .define('X', Items.CHAIN) .pattern("X X") .pattern("###") .pattern("###") - .unlockedBy("has_stripped_logs", this.has(itemLike2)) + .unlockedBy("has_stripped_logs", this.has(material)) .save(this.output); } - protected void colorBlockWithDye(List list, List list2, String string) { - this.colorWithDye(list, list2, null, string, RecipeCategory.BUILDING_BLOCKS); + protected void colorBlockWithDye(List dyes, List dyeableItems, String group) { + this.colorWithDye(dyes, dyeableItems, null, group, RecipeCategory.BUILDING_BLOCKS); } - protected void colorWithDye(List list, List list2, @Nullable Item item, String string, RecipeCategory recipeCategory) { - for (int i = 0; i < list.size(); i++) { - Item item2 = (Item)list.get(i); - Item item3 = (Item)list2.get(i); - Stream stream = list2.stream().filter(item2x -> !item2x.equals(item3)); - if (item != null) { - stream = Stream.concat(stream, Stream.of(item)); + protected void colorWithDye(List dyes, List dyeableItems, @Nullable Item dye, String group, RecipeCategory category) { + for (int i = 0; i < dyes.size(); i++) { + Item item = (Item)dyes.get(i); + Item item2 = (Item)dyeableItems.get(i); + Stream stream = dyeableItems.stream().filter(item2x -> !item2x.equals(item2)); + if (dye != null) { + stream = Stream.concat(stream, Stream.of(dye)); } - this.shapeless(recipeCategory, item3) - .requires(item2) + this.shapeless(category, item2) + .requires(item) .requires(Ingredient.of(stream)) - .group(string) - .unlockedBy("has_needed_dye", this.has(item2)) - .save(this.output, "dye_" + getItemName(item3)); + .group(group) + .unlockedBy("has_needed_dye", this.has(item)) + .save(this.output, "dye_" + getItemName(item2)); } } - protected void carpet(ItemLike itemLike, ItemLike itemLike2) { - this.shaped(RecipeCategory.DECORATIONS, itemLike, 3) - .define('#', itemLike2) + protected void carpet(ItemLike carpet, ItemLike material) { + this.shaped(RecipeCategory.DECORATIONS, carpet, 3) + .define('#', material) .pattern("##") .group("carpet") - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) + .unlockedBy(getHasName(material), this.has(material)) .save(this.output); } - protected void bedFromPlanksAndWool(ItemLike itemLike, ItemLike itemLike2) { - this.shaped(RecipeCategory.DECORATIONS, itemLike) - .define('#', itemLike2) + protected void bedFromPlanksAndWool(ItemLike bed, ItemLike wool) { + this.shaped(RecipeCategory.DECORATIONS, bed) + .define('#', wool) .define('X', ItemTags.PLANKS) .pattern("###") .pattern("XXX") .group("bed") - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) + .unlockedBy(getHasName(wool), this.has(wool)) .save(this.output); } - protected void banner(ItemLike itemLike, ItemLike itemLike2) { - this.shaped(RecipeCategory.DECORATIONS, itemLike) - .define('#', itemLike2) + protected void banner(ItemLike banner, ItemLike material) { + this.shaped(RecipeCategory.DECORATIONS, banner) + .define('#', material) .define('|', Items.STICK) .pattern("###") .pattern("###") .pattern(" | ") .group("banner") - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) + .unlockedBy(getHasName(material), this.has(material)) .save(this.output); } - protected void stainedGlassFromGlassAndDye(ItemLike itemLike, ItemLike itemLike2) { - this.shaped(RecipeCategory.BUILDING_BLOCKS, itemLike, 8) + protected void stainedGlassFromGlassAndDye(ItemLike stainedGlass, ItemLike dye) { + this.shaped(RecipeCategory.BUILDING_BLOCKS, stainedGlass, 8) .define('#', Blocks.GLASS) - .define('X', itemLike2) + .define('X', dye) .pattern("###") .pattern("#X#") .pattern("###") @@ -334,33 +331,33 @@ public abstract class RecipeProvider { .save(this.output); } - protected void stainedGlassPaneFromStainedGlass(ItemLike itemLike, ItemLike itemLike2) { - this.shaped(RecipeCategory.DECORATIONS, itemLike, 16) - .define('#', itemLike2) + protected void stainedGlassPaneFromStainedGlass(ItemLike stainedGlassPane, ItemLike stainedGlass) { + this.shaped(RecipeCategory.DECORATIONS, stainedGlassPane, 16) + .define('#', stainedGlass) .pattern("###") .pattern("###") .group("stained_glass_pane") - .unlockedBy("has_glass", this.has(itemLike2)) + .unlockedBy("has_glass", this.has(stainedGlass)) .save(this.output); } - protected void stainedGlassPaneFromGlassPaneAndDye(ItemLike itemLike, ItemLike itemLike2) { - this.shaped(RecipeCategory.DECORATIONS, itemLike, 8) + protected void stainedGlassPaneFromGlassPaneAndDye(ItemLike stainedGlassPane, ItemLike dye) { + this.shaped(RecipeCategory.DECORATIONS, stainedGlassPane, 8) .define('#', Blocks.GLASS_PANE) - .define('$', itemLike2) + .define('$', dye) .pattern("###") .pattern("#$#") .pattern("###") .group("stained_glass_pane") .unlockedBy("has_glass_pane", this.has(Blocks.GLASS_PANE)) - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) - .save(this.output, getConversionRecipeName(itemLike, Blocks.GLASS_PANE)); + .unlockedBy(getHasName(dye), this.has(dye)) + .save(this.output, getConversionRecipeName(stainedGlassPane, Blocks.GLASS_PANE)); } - protected void coloredTerracottaFromTerracottaAndDye(ItemLike itemLike, ItemLike itemLike2) { - this.shaped(RecipeCategory.BUILDING_BLOCKS, itemLike, 8) + protected void coloredTerracottaFromTerracottaAndDye(ItemLike terracotta, ItemLike dye) { + this.shaped(RecipeCategory.BUILDING_BLOCKS, terracotta, 8) .define('#', Blocks.TERRACOTTA) - .define('X', itemLike2) + .define('X', dye) .pattern("###") .pattern("#X#") .pattern("###") @@ -369,9 +366,9 @@ public abstract class RecipeProvider { .save(this.output); } - protected void concretePowder(ItemLike itemLike, ItemLike itemLike2) { - this.shapeless(RecipeCategory.BUILDING_BLOCKS, itemLike, 8) - .requires(itemLike2) + protected void concretePowder(ItemLike concretePowder, ItemLike dye) { + this.shapeless(RecipeCategory.BUILDING_BLOCKS, concretePowder, 8) + .requires(dye) .requires(Blocks.SAND, 4) .requires(Blocks.GRAVEL, 4) .group("concrete_powder") @@ -380,164 +377,165 @@ public abstract class RecipeProvider { .save(this.output); } - protected void candle(ItemLike itemLike, ItemLike itemLike2) { - this.shapeless(RecipeCategory.DECORATIONS, itemLike) + protected void candle(ItemLike candle, ItemLike dye) { + this.shapeless(RecipeCategory.DECORATIONS, candle) .requires(Blocks.CANDLE) - .requires(itemLike2) + .requires(dye) .group("dyed_candle") - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) + .unlockedBy(getHasName(dye), this.has(dye)) .save(this.output); } - protected void wall(RecipeCategory recipeCategory, ItemLike itemLike, ItemLike itemLike2) { - this.wallBuilder(recipeCategory, itemLike, Ingredient.of(itemLike2)).unlockedBy(getHasName(itemLike2), this.has(itemLike2)).save(this.output); + protected void wall(RecipeCategory category, ItemLike wall, ItemLike material) { + this.wallBuilder(category, wall, Ingredient.of(material)).unlockedBy(getHasName(material), this.has(material)).save(this.output); } - private RecipeBuilder wallBuilder(RecipeCategory wall, ItemLike material, Ingredient ingredient) { - return this.shaped(wall, material, 6).define('#', ingredient).pattern("###").pattern("###"); + private RecipeBuilder wallBuilder(RecipeCategory category, ItemLike wall, Ingredient material) { + return this.shaped(category, wall, 6).define('#', material).pattern("###").pattern("###"); } - protected void polished(RecipeCategory recipeCategory, ItemLike itemLike, ItemLike itemLike2) { - this.polishedBuilder(recipeCategory, itemLike, Ingredient.of(itemLike2)).unlockedBy(getHasName(itemLike2), this.has(itemLike2)).save(this.output); + protected void polished(RecipeCategory category, ItemLike result, ItemLike material) { + this.polishedBuilder(category, result, Ingredient.of(material)).unlockedBy(getHasName(material), this.has(material)).save(this.output); } - private RecipeBuilder polishedBuilder(RecipeCategory result, ItemLike material, Ingredient ingredient) { - return this.shaped(result, material, 4).define('S', ingredient).pattern("SS").pattern("SS"); + private RecipeBuilder polishedBuilder(RecipeCategory category, ItemLike result, Ingredient material) { + return this.shaped(category, result, 4).define('S', material).pattern("SS").pattern("SS"); } - protected void cut(RecipeCategory recipeCategory, ItemLike itemLike, ItemLike itemLike2) { - this.cutBuilder(recipeCategory, itemLike, Ingredient.of(itemLike2)).unlockedBy(getHasName(itemLike2), this.has(itemLike2)).save(this.output); + protected void cut(RecipeCategory category, ItemLike cutResult, ItemLike material) { + this.cutBuilder(category, cutResult, Ingredient.of(material)).unlockedBy(getHasName(material), this.has(material)).save(this.output); } - private ShapedRecipeBuilder cutBuilder(RecipeCategory cutResult, ItemLike material, Ingredient ingredient) { - return this.shaped(cutResult, material, 4).define('#', ingredient).pattern("##").pattern("##"); + private ShapedRecipeBuilder cutBuilder(RecipeCategory category, ItemLike cutResult, Ingredient material) { + return this.shaped(category, cutResult, 4).define('#', material).pattern("##").pattern("##"); } - protected void chiseled(RecipeCategory recipeCategory, ItemLike itemLike, ItemLike itemLike2) { - this.chiseledBuilder(recipeCategory, itemLike, Ingredient.of(itemLike2)).unlockedBy(getHasName(itemLike2), this.has(itemLike2)).save(this.output); + protected void chiseled(RecipeCategory category, ItemLike chiseledResult, ItemLike material) { + this.chiseledBuilder(category, chiseledResult, Ingredient.of(material)).unlockedBy(getHasName(material), this.has(material)).save(this.output); } - protected void mosaicBuilder(RecipeCategory recipeCategory, ItemLike itemLike, ItemLike itemLike2) { - this.shaped(recipeCategory, itemLike) - .define('#', itemLike2) - .pattern("#") - .pattern("#") - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) + protected void mosaicBuilder(RecipeCategory category, ItemLike result, ItemLike material) { + this.shaped(category, result).define('#', material).pattern("#").pattern("#").unlockedBy(getHasName(material), this.has(material)).save(this.output); + } + + protected ShapedRecipeBuilder chiseledBuilder(RecipeCategory category, ItemLike chiseledResult, Ingredient material) { + return this.shaped(category, chiseledResult).define('#', material).pattern("#").pattern("#"); + } + + protected void stonecutterResultFromBase(RecipeCategory category, ItemLike result, ItemLike material) { + this.stonecutterResultFromBase(category, result, material, 1); + } + + protected void stonecutterResultFromBase(RecipeCategory category, ItemLike result, ItemLike material, int resultCount) { + SingleItemRecipeBuilder.stonecutting(Ingredient.of(material), category, result, resultCount) + .unlockedBy(getHasName(material), this.has(material)) + .save(this.output, getConversionRecipeName(result, material) + "_stonecutting"); + } + + private void smeltingResultFromBase(ItemLike result, ItemLike ingredient) { + SimpleCookingRecipeBuilder.smelting(Ingredient.of(ingredient), RecipeCategory.BUILDING_BLOCKS, result, 0.1F, 200) + .unlockedBy(getHasName(ingredient), this.has(ingredient)) .save(this.output); } - protected ShapedRecipeBuilder chiseledBuilder(RecipeCategory chiseledResult, ItemLike material, Ingredient ingredient) { - return this.shaped(chiseledResult, material).define('#', ingredient).pattern("#").pattern("#"); - } - - protected void stonecutterResultFromBase(RecipeCategory recipeCategory, ItemLike itemLike, ItemLike itemLike2) { - this.stonecutterResultFromBase(recipeCategory, itemLike, itemLike2, 1); - } - - protected void stonecutterResultFromBase(RecipeCategory recipeCategory, ItemLike itemLike, ItemLike itemLike2, int i) { - SingleItemRecipeBuilder.stonecutting(Ingredient.of(itemLike2), recipeCategory, itemLike, i) - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) - .save(this.output, getConversionRecipeName(itemLike, itemLike2) + "_stonecutting"); - } - - private void smeltingResultFromBase(ItemLike itemLike, ItemLike itemLike2) { - SimpleCookingRecipeBuilder.smelting(Ingredient.of(itemLike2), RecipeCategory.BUILDING_BLOCKS, itemLike, 0.1F, 200) - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) - .save(this.output); - } - - protected void nineBlockStorageRecipes(RecipeCategory recipeCategory, ItemLike itemLike, RecipeCategory recipeCategory2, ItemLike itemLike2) { - this.nineBlockStorageRecipes(recipeCategory, itemLike, recipeCategory2, itemLike2, getSimpleRecipeName(itemLike2), null, getSimpleRecipeName(itemLike), null); + protected void nineBlockStorageRecipes(RecipeCategory unpackedCategory, ItemLike unpacked, RecipeCategory packedCategory, ItemLike packed) { + this.nineBlockStorageRecipes(unpackedCategory, unpacked, packedCategory, packed, getSimpleRecipeName(packed), null, getSimpleRecipeName(unpacked), null); } protected void nineBlockStorageRecipesWithCustomPacking( - RecipeCategory recipeCategory, ItemLike itemLike, RecipeCategory recipeCategory2, ItemLike itemLike2, String string, String string2 + RecipeCategory unpackedCategory, ItemLike unpacked, RecipeCategory packedCategory, ItemLike packed, String packedName, String packedGroup ) { - this.nineBlockStorageRecipes(recipeCategory, itemLike, recipeCategory2, itemLike2, string, string2, getSimpleRecipeName(itemLike), null); + this.nineBlockStorageRecipes(unpackedCategory, unpacked, packedCategory, packed, packedName, packedGroup, getSimpleRecipeName(unpacked), null); } protected void nineBlockStorageRecipesRecipesWithCustomUnpacking( - RecipeCategory recipeCategory, ItemLike itemLike, RecipeCategory recipeCategory2, ItemLike itemLike2, String string, String string2 + RecipeCategory unpackedCategory, ItemLike unpacked, RecipeCategory packedCategory, ItemLike packed, String unpackedName, String unpackedGroup ) { - this.nineBlockStorageRecipes(recipeCategory, itemLike, recipeCategory2, itemLike2, getSimpleRecipeName(itemLike2), null, string, string2); + this.nineBlockStorageRecipes(unpackedCategory, unpacked, packedCategory, packed, getSimpleRecipeName(packed), null, unpackedName, unpackedGroup); } private void nineBlockStorageRecipes( - RecipeCategory recipeCategory, - ItemLike itemLike, - RecipeCategory recipeCategory2, - ItemLike itemLike2, - String string, - @Nullable String string2, - String string3, - @Nullable String string4 + RecipeCategory unpackedCategory, + ItemLike unpacked, + RecipeCategory packedCategory, + ItemLike packed, + String packedName, + @Nullable String packedGroup, + String unpackedName, + @Nullable String unpackedGroup ) { - this.shapeless(recipeCategory, itemLike, 9) - .requires(itemLike2) - .group(string4) - .unlockedBy(getHasName(itemLike2), this.has(itemLike2)) - .save(this.output, ResourceKey.create(Registries.RECIPE, ResourceLocation.parse(string3))); - this.shaped(recipeCategory2, itemLike2) - .define('#', itemLike) + this.shapeless(unpackedCategory, unpacked, 9) + .requires(packed) + .group(unpackedGroup) + .unlockedBy(getHasName(packed), this.has(packed)) + .save(this.output, ResourceKey.create(Registries.RECIPE, ResourceLocation.parse(unpackedName))); + this.shaped(packedCategory, packed) + .define('#', unpacked) .pattern("###") .pattern("###") .pattern("###") - .group(string2) - .unlockedBy(getHasName(itemLike), this.has(itemLike)) - .save(this.output, ResourceKey.create(Registries.RECIPE, ResourceLocation.parse(string))); + .group(packedGroup) + .unlockedBy(getHasName(unpacked), this.has(unpacked)) + .save(this.output, ResourceKey.create(Registries.RECIPE, ResourceLocation.parse(packedName))); } - protected void copySmithingTemplate(ItemLike itemLike, ItemLike itemLike2) { - this.shaped(RecipeCategory.MISC, itemLike, 2) + protected void copySmithingTemplate(ItemLike template, ItemLike baseItem) { + this.shaped(RecipeCategory.MISC, template, 2) .define('#', Items.DIAMOND) - .define('C', itemLike2) - .define('S', itemLike) + .define('C', baseItem) + .define('S', template) .pattern("#S#") .pattern("#C#") .pattern("###") - .unlockedBy(getHasName(itemLike), this.has(itemLike)) + .unlockedBy(getHasName(template), this.has(template)) .save(this.output); } - protected void copySmithingTemplate(ItemLike itemLike, Ingredient ingredient) { - this.shaped(RecipeCategory.MISC, itemLike, 2) + protected void copySmithingTemplate(ItemLike template, Ingredient baseItem) { + this.shaped(RecipeCategory.MISC, template, 2) .define('#', Items.DIAMOND) - .define('C', ingredient) - .define('S', itemLike) + .define('C', baseItem) + .define('S', template) .pattern("#S#") .pattern("#C#") .pattern("###") - .unlockedBy(getHasName(itemLike), this.has(itemLike)) + .unlockedBy(getHasName(template), this.has(template)) .save(this.output); } protected void cookRecipes( - String string, RecipeSerializer recipeSerializer, AbstractCookingRecipe.Factory factory, int i + String cookingMethod, RecipeSerializer cookingSerializer, AbstractCookingRecipe.Factory recipeFactory, int cookingTime ) { - this.simpleCookingRecipe(string, recipeSerializer, factory, i, Items.BEEF, Items.COOKED_BEEF, 0.35F); - this.simpleCookingRecipe(string, recipeSerializer, factory, i, Items.CHICKEN, Items.COOKED_CHICKEN, 0.35F); - this.simpleCookingRecipe(string, recipeSerializer, factory, i, Items.COD, Items.COOKED_COD, 0.35F); - this.simpleCookingRecipe(string, recipeSerializer, factory, i, Items.KELP, Items.DRIED_KELP, 0.1F); - this.simpleCookingRecipe(string, recipeSerializer, factory, i, Items.SALMON, Items.COOKED_SALMON, 0.35F); - this.simpleCookingRecipe(string, recipeSerializer, factory, i, Items.MUTTON, Items.COOKED_MUTTON, 0.35F); - this.simpleCookingRecipe(string, recipeSerializer, factory, i, Items.PORKCHOP, Items.COOKED_PORKCHOP, 0.35F); - this.simpleCookingRecipe(string, recipeSerializer, factory, i, Items.POTATO, Items.BAKED_POTATO, 0.35F); - this.simpleCookingRecipe(string, recipeSerializer, factory, i, Items.RABBIT, Items.COOKED_RABBIT, 0.35F); + this.simpleCookingRecipe(cookingMethod, cookingSerializer, recipeFactory, cookingTime, Items.BEEF, Items.COOKED_BEEF, 0.35F); + this.simpleCookingRecipe(cookingMethod, cookingSerializer, recipeFactory, cookingTime, Items.CHICKEN, Items.COOKED_CHICKEN, 0.35F); + this.simpleCookingRecipe(cookingMethod, cookingSerializer, recipeFactory, cookingTime, Items.COD, Items.COOKED_COD, 0.35F); + this.simpleCookingRecipe(cookingMethod, cookingSerializer, recipeFactory, cookingTime, Items.KELP, Items.DRIED_KELP, 0.1F); + this.simpleCookingRecipe(cookingMethod, cookingSerializer, recipeFactory, cookingTime, Items.SALMON, Items.COOKED_SALMON, 0.35F); + this.simpleCookingRecipe(cookingMethod, cookingSerializer, recipeFactory, cookingTime, Items.MUTTON, Items.COOKED_MUTTON, 0.35F); + this.simpleCookingRecipe(cookingMethod, cookingSerializer, recipeFactory, cookingTime, Items.PORKCHOP, Items.COOKED_PORKCHOP, 0.35F); + this.simpleCookingRecipe(cookingMethod, cookingSerializer, recipeFactory, cookingTime, Items.POTATO, Items.BAKED_POTATO, 0.35F); + this.simpleCookingRecipe(cookingMethod, cookingSerializer, recipeFactory, cookingTime, Items.RABBIT, Items.COOKED_RABBIT, 0.35F); } private void simpleCookingRecipe( - String string, RecipeSerializer recipeSerializer, AbstractCookingRecipe.Factory factory, int i, ItemLike itemLike, ItemLike itemLike2, float f + String cookingMethod, + RecipeSerializer cookingSerializer, + AbstractCookingRecipe.Factory recipeFactory, + int cookingTime, + ItemLike material, + ItemLike result, + float experience ) { - SimpleCookingRecipeBuilder.generic(Ingredient.of(itemLike), RecipeCategory.FOOD, itemLike2, f, i, recipeSerializer, factory) - .unlockedBy(getHasName(itemLike), this.has(itemLike)) - .save(this.output, getItemName(itemLike2) + "_from_" + string); + SimpleCookingRecipeBuilder.generic(Ingredient.of(material), RecipeCategory.FOOD, result, experience, cookingTime, cookingSerializer, recipeFactory) + .unlockedBy(getHasName(material), this.has(material)) + .save(this.output, getItemName(result) + "_from_" + cookingMethod); } - protected void waxRecipes(FeatureFlagSet featureFlagSet) { + protected void waxRecipes(FeatureFlagSet requiredFeatures) { ((BiMap)HoneycombItem.WAXABLES.get()) .forEach( (block, block2) -> { - if (block2.requiredFeatures().isSubsetOf(featureFlagSet)) { + if (block2.requiredFeatures().isSubsetOf(requiredFeatures)) { this.shapeless(RecipeCategory.BUILDING_BLOCKS, block2) .requires(block) .requires(Items.HONEYCOMB) @@ -549,47 +547,47 @@ public abstract class RecipeProvider { ); } - protected void grate(Block block, Block block2) { - this.shaped(RecipeCategory.BUILDING_BLOCKS, block, 4) - .define('M', block2) + protected void grate(Block grateBlock, Block material) { + this.shaped(RecipeCategory.BUILDING_BLOCKS, grateBlock, 4) + .define('M', material) .pattern(" M ") .pattern("M M") .pattern(" M ") - .unlockedBy(getHasName(block2), this.has(block2)) + .unlockedBy(getHasName(material), this.has(material)) .save(this.output); } - protected void copperBulb(Block block, Block block2) { - this.shaped(RecipeCategory.REDSTONE, block, 4) - .define('C', block2) + protected void copperBulb(Block bulbBlock, Block material) { + this.shaped(RecipeCategory.REDSTONE, bulbBlock, 4) + .define('C', material) .define('R', Items.REDSTONE) .define('B', Items.BLAZE_ROD) .pattern(" C ") .pattern("CBC") .pattern(" R ") - .unlockedBy(getHasName(block2), this.has(block2)) + .unlockedBy(getHasName(material), this.has(material)) .save(this.output); } - protected void suspiciousStew(Item item, SuspiciousEffectHolder suspiciousEffectHolder) { + protected void suspiciousStew(Item flowerItem, SuspiciousEffectHolder effect) { ItemStack itemStack = new ItemStack( Items.SUSPICIOUS_STEW.builtInRegistryHolder(), 1, - DataComponentPatch.builder().set(DataComponents.SUSPICIOUS_STEW_EFFECTS, suspiciousEffectHolder.getSuspiciousEffects()).build() + DataComponentPatch.builder().set(DataComponents.SUSPICIOUS_STEW_EFFECTS, effect.getSuspiciousEffects()).build() ); this.shapeless(RecipeCategory.FOOD, itemStack) .requires(Items.BOWL) .requires(Items.BROWN_MUSHROOM) .requires(Items.RED_MUSHROOM) - .requires(item) + .requires(flowerItem) .group("suspicious_stew") - .unlockedBy(getHasName(item), this.has(item)) - .save(this.output, getItemName(itemStack.getItem()) + "_from_" + getItemName(item)); + .unlockedBy(getHasName(flowerItem), this.has(flowerItem)) + .save(this.output, getItemName(itemStack.getItem()) + "_from_" + getItemName(flowerItem)); } - protected void generateRecipes(BlockFamily blockFamily, FeatureFlagSet featureFlagSet) { + protected void generateRecipes(BlockFamily blockFamily, FeatureFlagSet requiredFeatures) { blockFamily.getVariants().forEach((variant, block) -> { - if (block.requiredFeatures().isSubsetOf(featureFlagSet)) { + if (block.requiredFeatures().isSubsetOf(requiredFeatures)) { RecipeProvider.FamilyRecipeProvider familyRecipeProvider = (RecipeProvider.FamilyRecipeProvider)SHAPE_BUILDERS.get(variant); ItemLike itemLike = this.getBaseBlock(blockFamily, variant); if (familyRecipeProvider != null) { @@ -606,15 +604,15 @@ public abstract class RecipeProvider { }); } - private Block getBaseBlock(BlockFamily variant, Variant variant2) { - if (variant2 == Variant.CHISELED) { - if (!variant.getVariants().containsKey(Variant.SLAB)) { + private Block getBaseBlock(BlockFamily family, Variant variant) { + if (variant == Variant.CHISELED) { + if (!family.getVariants().containsKey(Variant.SLAB)) { throw new IllegalStateException("Slab is not defined for the family."); } else { - return variant.get(Variant.SLAB); + return family.get(Variant.SLAB); } } else { - return variant.getBaseBlock(); + return family.getBaseBlock(); } } @@ -622,16 +620,16 @@ public abstract class RecipeProvider { return CriteriaTriggers.ENTER_BLOCK.createCriterion(new TriggerInstance(Optional.empty(), Optional.of(block.builtInRegistryHolder()), Optional.empty())); } - private Criterion has(Ints item, ItemLike itemLike) { - return inventoryTrigger(ItemPredicate.Builder.item().of(this.items, itemLike).withCount(item)); + private Criterion has(Ints count, ItemLike item) { + return inventoryTrigger(ItemPredicate.Builder.item().of(this.items, item).withCount(count)); } protected Criterion has(ItemLike itemLike) { return inventoryTrigger(ItemPredicate.Builder.item().of(this.items, itemLike)); } - protected Criterion has(TagKey tagKey) { - return inventoryTrigger(ItemPredicate.Builder.item().of(this.items, tagKey)); + protected Criterion has(TagKey tag) { + return inventoryTrigger(ItemPredicate.Builder.item().of(this.items, tag)); } private static Criterion inventoryTrigger(ItemPredicate.Builder... items) { @@ -667,28 +665,28 @@ public abstract class RecipeProvider { return getItemName(itemLike) + "_from_blasting"; } - protected Ingredient tag(TagKey tagKey) { - return Ingredient.of(this.items.getOrThrow(tagKey)); + protected Ingredient tag(TagKey tag) { + return Ingredient.of(this.items.getOrThrow(tag)); } - protected ShapedRecipeBuilder shaped(RecipeCategory recipeCategory, ItemLike itemLike) { - return ShapedRecipeBuilder.shaped(this.items, recipeCategory, itemLike); + protected ShapedRecipeBuilder shaped(RecipeCategory category, ItemLike result) { + return ShapedRecipeBuilder.shaped(this.items, category, result); } - protected ShapedRecipeBuilder shaped(RecipeCategory recipeCategory, ItemLike itemLike, int i) { - return ShapedRecipeBuilder.shaped(this.items, recipeCategory, itemLike, i); + protected ShapedRecipeBuilder shaped(RecipeCategory category, ItemLike result, int count) { + return ShapedRecipeBuilder.shaped(this.items, category, result, count); } - protected ShapelessRecipeBuilder shapeless(RecipeCategory recipeCategory, ItemStack itemStack) { - return ShapelessRecipeBuilder.shapeless(this.items, recipeCategory, itemStack); + protected ShapelessRecipeBuilder shapeless(RecipeCategory category, ItemStack result) { + return ShapelessRecipeBuilder.shapeless(this.items, category, result); } - protected ShapelessRecipeBuilder shapeless(RecipeCategory recipeCategory, ItemLike itemLike) { - return ShapelessRecipeBuilder.shapeless(this.items, recipeCategory, itemLike); + protected ShapelessRecipeBuilder shapeless(RecipeCategory category, ItemLike result) { + return ShapelessRecipeBuilder.shapeless(this.items, category, result); } - protected ShapelessRecipeBuilder shapeless(RecipeCategory recipeCategory, ItemLike itemLike, int i) { - return ShapelessRecipeBuilder.shapeless(this.items, recipeCategory, itemLike, i); + protected ShapelessRecipeBuilder shapeless(RecipeCategory category, ItemLike result, int count) { + return ShapelessRecipeBuilder.shapeless(this.items, category, result, count); } @FunctionalInterface @@ -700,9 +698,9 @@ public abstract class RecipeProvider { private final PackOutput packOutput; private final CompletableFuture registries; - protected Runner(PackOutput packOutput, CompletableFuture completableFuture) { + protected Runner(PackOutput packOutput, CompletableFuture registries) { this.packOutput = packOutput; - this.registries = completableFuture; + this.registries = registries; } @Override @@ -718,6 +716,6 @@ public abstract class RecipeProvider { }); } - protected abstract RecipeProvider createRecipeProvider(HolderLookup.Provider provider, RecipeOutput recipeOutput); + protected abstract RecipeProvider createRecipeProvider(HolderLookup.Provider registries, RecipeOutput output); } } diff --git a/net/minecraft/data/recipes/ShapedRecipeBuilder.java b/net/minecraft/data/recipes/ShapedRecipeBuilder.java index 375559e0..dcb17750 100644 --- a/net/minecraft/data/recipes/ShapedRecipeBuilder.java +++ b/net/minecraft/data/recipes/ShapedRecipeBuilder.java @@ -35,19 +35,19 @@ public class ShapedRecipeBuilder implements RecipeBuilder { private String group; private boolean showNotification = true; - private ShapedRecipeBuilder(HolderGetter holderGetter, RecipeCategory recipeCategory, ItemLike itemLike, int i) { - this.items = holderGetter; - this.category = recipeCategory; - this.result = itemLike.asItem(); - this.count = i; + private ShapedRecipeBuilder(HolderGetter items, RecipeCategory category, ItemLike result, int count) { + this.items = items; + this.category = category; + this.result = result.asItem(); + this.count = count; } - public static ShapedRecipeBuilder shaped(HolderGetter holderGetter, RecipeCategory recipeCategory, ItemLike itemLike) { - return shaped(holderGetter, recipeCategory, itemLike, 1); + public static ShapedRecipeBuilder shaped(HolderGetter items, RecipeCategory category, ItemLike result) { + return shaped(items, category, result, 1); } - public static ShapedRecipeBuilder shaped(HolderGetter holderGetter, RecipeCategory recipeCategory, ItemLike itemLike, int i) { - return new ShapedRecipeBuilder(holderGetter, recipeCategory, itemLike, i); + public static ShapedRecipeBuilder shaped(HolderGetter items, RecipeCategory category, ItemLike result, int count) { + return new ShapedRecipeBuilder(items, category, result, count); } /** @@ -111,9 +111,9 @@ public class ShapedRecipeBuilder implements RecipeBuilder { } @Override - public void save(RecipeOutput recipeOutput, ResourceKey> resourceKey) { + public void save(RecipeOutput output, ResourceKey> resourceKey) { ShapedRecipePattern shapedRecipePattern = this.ensureValid(resourceKey); - Builder builder = recipeOutput.advancement() + Builder builder = output.advancement() .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(resourceKey)) .rewards(AdvancementRewards.Builder.recipe(resourceKey)) .requirements(Strategy.OR); @@ -125,12 +125,12 @@ public class ShapedRecipeBuilder implements RecipeBuilder { new ItemStack(this.result, this.count), this.showNotification ); - recipeOutput.accept(resourceKey, shapedRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); + output.accept(resourceKey, shapedRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); } - private ShapedRecipePattern ensureValid(ResourceKey> resourceKey) { + private ShapedRecipePattern ensureValid(ResourceKey> recipe) { if (this.criteria.isEmpty()) { - throw new IllegalStateException("No way of obtaining recipe " + resourceKey.location()); + throw new IllegalStateException("No way of obtaining recipe " + recipe.location()); } else { return ShapedRecipePattern.of(this.key, this.rows); } diff --git a/net/minecraft/data/recipes/ShapelessRecipeBuilder.java b/net/minecraft/data/recipes/ShapelessRecipeBuilder.java index 2e17f1a8..c3e39d30 100644 --- a/net/minecraft/data/recipes/ShapelessRecipeBuilder.java +++ b/net/minecraft/data/recipes/ShapelessRecipeBuilder.java @@ -30,22 +30,22 @@ public class ShapelessRecipeBuilder implements RecipeBuilder { @Nullable private String group; - private ShapelessRecipeBuilder(HolderGetter holderGetter, RecipeCategory recipeCategory, ItemStack itemStack) { - this.items = holderGetter; - this.category = recipeCategory; - this.result = itemStack; + private ShapelessRecipeBuilder(HolderGetter items, RecipeCategory category, ItemStack result) { + this.items = items; + this.category = category; + this.result = result; } - public static ShapelessRecipeBuilder shapeless(HolderGetter holderGetter, RecipeCategory recipeCategory, ItemStack itemStack) { - return new ShapelessRecipeBuilder(holderGetter, recipeCategory, itemStack); + public static ShapelessRecipeBuilder shapeless(HolderGetter items, RecipeCategory category, ItemStack result) { + return new ShapelessRecipeBuilder(items, category, result); } - public static ShapelessRecipeBuilder shapeless(HolderGetter holderGetter, RecipeCategory recipeCategory, ItemLike itemLike) { - return shapeless(holderGetter, recipeCategory, itemLike, 1); + public static ShapelessRecipeBuilder shapeless(HolderGetter items, RecipeCategory category, ItemLike result) { + return shapeless(items, category, result, 1); } - public static ShapelessRecipeBuilder shapeless(HolderGetter holderGetter, RecipeCategory recipeCategory, ItemLike itemLike, int i) { - return new ShapelessRecipeBuilder(holderGetter, recipeCategory, itemLike.asItem().getDefaultInstance().copyWithCount(i)); + public static ShapelessRecipeBuilder shapeless(HolderGetter items, RecipeCategory category, ItemLike result, int count) { + return new ShapelessRecipeBuilder(items, category, result.asItem().getDefaultInstance().copyWithCount(count)); } /** @@ -107,9 +107,9 @@ public class ShapelessRecipeBuilder implements RecipeBuilder { } @Override - public void save(RecipeOutput recipeOutput, ResourceKey> resourceKey) { + public void save(RecipeOutput output, ResourceKey> resourceKey) { this.ensureValid(resourceKey); - Builder builder = recipeOutput.advancement() + Builder builder = output.advancement() .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(resourceKey)) .rewards(AdvancementRewards.Builder.recipe(resourceKey)) .requirements(Strategy.OR); @@ -117,12 +117,12 @@ public class ShapelessRecipeBuilder implements RecipeBuilder { ShapelessRecipe shapelessRecipe = new ShapelessRecipe( (String)Objects.requireNonNullElse(this.group, ""), RecipeBuilder.determineBookCategory(this.category), this.result, this.ingredients ); - recipeOutput.accept(resourceKey, shapelessRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); + output.accept(resourceKey, shapelessRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); } - private void ensureValid(ResourceKey> resourceKey) { + private void ensureValid(ResourceKey> recipe) { if (this.criteria.isEmpty()) { - throw new IllegalStateException("No way of obtaining recipe " + resourceKey.location()); + throw new IllegalStateException("No way of obtaining recipe " + recipe.location()); } } } diff --git a/net/minecraft/data/recipes/SimpleCookingRecipeBuilder.java b/net/minecraft/data/recipes/SimpleCookingRecipeBuilder.java index 6086101b..97125be6 100644 --- a/net/minecraft/data/recipes/SimpleCookingRecipeBuilder.java +++ b/net/minecraft/data/recipes/SimpleCookingRecipeBuilder.java @@ -99,9 +99,9 @@ public class SimpleCookingRecipeBuilder implements RecipeBuilder { } @Override - public void save(RecipeOutput recipeOutput, ResourceKey> resourceKey) { + public void save(RecipeOutput output, ResourceKey> resourceKey) { this.ensureValid(resourceKey); - Builder builder = recipeOutput.advancement() + Builder builder = output.advancement() .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(resourceKey)) .rewards(AdvancementRewards.Builder.recipe(resourceKey)) .requirements(Strategy.OR); @@ -110,7 +110,7 @@ public class SimpleCookingRecipeBuilder implements RecipeBuilder { .create( (String)Objects.requireNonNullElse(this.group, ""), this.bookCategory, this.ingredient, new ItemStack(this.result), this.experience, this.cookingTime ); - recipeOutput.accept(resourceKey, abstractCookingRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); + output.accept(resourceKey, abstractCookingRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); } private static CookingBookCategory determineSmeltingRecipeCategory(ItemLike result) { @@ -137,9 +137,9 @@ public class SimpleCookingRecipeBuilder implements RecipeBuilder { } } - private void ensureValid(ResourceKey> resourceKey) { + private void ensureValid(ResourceKey> recipe) { if (this.criteria.isEmpty()) { - throw new IllegalStateException("No way of obtaining recipe " + resourceKey.location()); + throw new IllegalStateException("No way of obtaining recipe " + recipe.location()); } } } diff --git a/net/minecraft/data/recipes/SingleItemRecipeBuilder.java b/net/minecraft/data/recipes/SingleItemRecipeBuilder.java index e4ea0daf..564e464e 100644 --- a/net/minecraft/data/recipes/SingleItemRecipeBuilder.java +++ b/net/minecraft/data/recipes/SingleItemRecipeBuilder.java @@ -60,21 +60,21 @@ public class SingleItemRecipeBuilder implements RecipeBuilder { } @Override - public void save(RecipeOutput recipeOutput, ResourceKey> resourceKey) { + public void save(RecipeOutput output, ResourceKey> resourceKey) { this.ensureValid(resourceKey); - Builder builder = recipeOutput.advancement() + Builder builder = output.advancement() .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(resourceKey)) .rewards(AdvancementRewards.Builder.recipe(resourceKey)) .requirements(Strategy.OR); this.criteria.forEach(builder::addCriterion); SingleItemRecipe singleItemRecipe = this.factory .create((String)Objects.requireNonNullElse(this.group, ""), this.ingredient, new ItemStack(this.result, this.count)); - recipeOutput.accept(resourceKey, singleItemRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); + output.accept(resourceKey, singleItemRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); } - private void ensureValid(ResourceKey> resourceKey) { + private void ensureValid(ResourceKey> recipe) { if (this.criteria.isEmpty()) { - throw new IllegalStateException("No way of obtaining recipe " + resourceKey.location()); + throw new IllegalStateException("No way of obtaining recipe " + recipe.location()); } } } diff --git a/net/minecraft/data/recipes/SmithingTransformRecipeBuilder.java b/net/minecraft/data/recipes/SmithingTransformRecipeBuilder.java index a935af00..eb6dc7d7 100644 --- a/net/minecraft/data/recipes/SmithingTransformRecipeBuilder.java +++ b/net/minecraft/data/recipes/SmithingTransformRecipeBuilder.java @@ -46,9 +46,9 @@ public class SmithingTransformRecipeBuilder { this.save(recipeOutput, ResourceKey.create(Registries.RECIPE, ResourceLocation.parse(recipeId))); } - public void save(RecipeOutput recipeOutput, ResourceKey> resourceKey) { + public void save(RecipeOutput output, ResourceKey> resourceKey) { this.ensureValid(resourceKey); - Builder builder = recipeOutput.advancement() + Builder builder = output.advancement() .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(resourceKey)) .rewards(AdvancementRewards.Builder.recipe(resourceKey)) .requirements(Strategy.OR); @@ -56,12 +56,12 @@ public class SmithingTransformRecipeBuilder { SmithingTransformRecipe smithingTransformRecipe = new SmithingTransformRecipe( Optional.of(this.template), Optional.of(this.base), Optional.of(this.addition), new ItemStack(this.result) ); - recipeOutput.accept(resourceKey, smithingTransformRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); + output.accept(resourceKey, smithingTransformRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); } - private void ensureValid(ResourceKey> resourceKey) { + private void ensureValid(ResourceKey> recipe) { if (this.criteria.isEmpty()) { - throw new IllegalStateException("No way of obtaining recipe " + resourceKey.location()); + throw new IllegalStateException("No way of obtaining recipe " + recipe.location()); } } } diff --git a/net/minecraft/data/recipes/SmithingTrimRecipeBuilder.java b/net/minecraft/data/recipes/SmithingTrimRecipeBuilder.java index 44afe6fc..bea28db5 100644 --- a/net/minecraft/data/recipes/SmithingTrimRecipeBuilder.java +++ b/net/minecraft/data/recipes/SmithingTrimRecipeBuilder.java @@ -36,20 +36,20 @@ public class SmithingTrimRecipeBuilder { return this; } - public void save(RecipeOutput recipeOutput, ResourceKey> resourceKey) { + public void save(RecipeOutput output, ResourceKey> resourceKey) { this.ensureValid(resourceKey); - Builder builder = recipeOutput.advancement() + Builder builder = output.advancement() .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(resourceKey)) .rewards(AdvancementRewards.Builder.recipe(resourceKey)) .requirements(Strategy.OR); this.criteria.forEach(builder::addCriterion); SmithingTrimRecipe smithingTrimRecipe = new SmithingTrimRecipe(Optional.of(this.template), Optional.of(this.base), Optional.of(this.addition)); - recipeOutput.accept(resourceKey, smithingTrimRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); + output.accept(resourceKey, smithingTrimRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); } - private void ensureValid(ResourceKey> resourceKey) { + private void ensureValid(ResourceKey> recipe) { if (this.criteria.isEmpty()) { - throw new IllegalStateException("No way of obtaining recipe " + resourceKey.location()); + throw new IllegalStateException("No way of obtaining recipe " + recipe.location()); } } } diff --git a/net/minecraft/data/recipes/SpecialRecipeBuilder.java b/net/minecraft/data/recipes/SpecialRecipeBuilder.java index 962620b3..15506398 100644 --- a/net/minecraft/data/recipes/SpecialRecipeBuilder.java +++ b/net/minecraft/data/recipes/SpecialRecipeBuilder.java @@ -22,7 +22,7 @@ public class SpecialRecipeBuilder { this.save(recipeOutput, ResourceKey.create(Registries.RECIPE, ResourceLocation.parse(recipeId))); } - public void save(RecipeOutput recipeOutput, ResourceKey> resourceKey) { - recipeOutput.accept(resourceKey, (Recipe)this.factory.apply(CraftingBookCategory.MISC), null); + public void save(RecipeOutput output, ResourceKey> resourceKey) { + output.accept(resourceKey, (Recipe)this.factory.apply(CraftingBookCategory.MISC), null); } } diff --git a/net/minecraft/data/recipes/TransmuteRecipeBuilder.java b/net/minecraft/data/recipes/TransmuteRecipeBuilder.java index 6809f4f9..095d4182 100644 --- a/net/minecraft/data/recipes/TransmuteRecipeBuilder.java +++ b/net/minecraft/data/recipes/TransmuteRecipeBuilder.java @@ -25,24 +25,24 @@ public class TransmuteRecipeBuilder implements RecipeBuilder { @Nullable private String group; - private TransmuteRecipeBuilder(RecipeCategory recipeCategory, Holder holder, Ingredient ingredient, Ingredient ingredient2) { - this.category = recipeCategory; - this.result = holder; - this.input = ingredient; - this.material = ingredient2; + private TransmuteRecipeBuilder(RecipeCategory category, Holder result, Ingredient input, Ingredient material) { + this.category = category; + this.result = result; + this.input = input; + this.material = material; } - public static TransmuteRecipeBuilder transmute(RecipeCategory recipeCategory, Ingredient ingredient, Ingredient ingredient2, Item item) { - return new TransmuteRecipeBuilder(recipeCategory, item.builtInRegistryHolder(), ingredient, ingredient2); + public static TransmuteRecipeBuilder transmute(RecipeCategory category, Ingredient input, Ingredient material, Item result) { + return new TransmuteRecipeBuilder(category, result.builtInRegistryHolder(), input, material); } - public TransmuteRecipeBuilder unlockedBy(String string, Criterion criterion) { - this.criteria.put(string, criterion); + public TransmuteRecipeBuilder unlockedBy(String name, Criterion criterion) { + this.criteria.put(name, criterion); return this; } - public TransmuteRecipeBuilder group(@Nullable String string) { - this.group = string; + public TransmuteRecipeBuilder group(@Nullable String groupName) { + this.group = groupName; return this; } @@ -52,9 +52,9 @@ public class TransmuteRecipeBuilder implements RecipeBuilder { } @Override - public void save(RecipeOutput recipeOutput, ResourceKey> resourceKey) { + public void save(RecipeOutput output, ResourceKey> resourceKey) { this.ensureValid(resourceKey); - Builder builder = recipeOutput.advancement() + Builder builder = output.advancement() .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(resourceKey)) .rewards(AdvancementRewards.Builder.recipe(resourceKey)) .requirements(Strategy.OR); @@ -62,12 +62,12 @@ public class TransmuteRecipeBuilder implements RecipeBuilder { TransmuteRecipe transmuteRecipe = new TransmuteRecipe( (String)Objects.requireNonNullElse(this.group, ""), RecipeBuilder.determineBookCategory(this.category), this.input, this.material, this.result ); - recipeOutput.accept(resourceKey, transmuteRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); + output.accept(resourceKey, transmuteRecipe, builder.build(resourceKey.location().withPrefix("recipes/" + this.category.getFolderName() + "/"))); } - private void ensureValid(ResourceKey> resourceKey) { + private void ensureValid(ResourceKey> recipe) { if (this.criteria.isEmpty()) { - throw new IllegalStateException("No way of obtaining recipe " + resourceKey.location()); + throw new IllegalStateException("No way of obtaining recipe " + recipe.location()); } } } diff --git a/net/minecraft/data/recipes/packs/VanillaRecipeProvider.java b/net/minecraft/data/recipes/packs/VanillaRecipeProvider.java index 3b0775e6..29db73cc 100644 --- a/net/minecraft/data/recipes/packs/VanillaRecipeProvider.java +++ b/net/minecraft/data/recipes/packs/VanillaRecipeProvider.java @@ -2781,8 +2781,8 @@ public class VanillaRecipeProvider extends RecipeProvider { } @Override - protected RecipeProvider createRecipeProvider(HolderLookup.Provider provider, RecipeOutput recipeOutput) { - return new VanillaRecipeProvider(provider, recipeOutput); + protected RecipeProvider createRecipeProvider(HolderLookup.Provider registries, RecipeOutput output) { + return new VanillaRecipeProvider(registries, output); } @Override diff --git a/net/minecraft/data/recipes/packs/WinterDropRecipeProvider.java b/net/minecraft/data/recipes/packs/WinterDropRecipeProvider.java index 0e117c9d..c8501b53 100644 --- a/net/minecraft/data/recipes/packs/WinterDropRecipeProvider.java +++ b/net/minecraft/data/recipes/packs/WinterDropRecipeProvider.java @@ -34,8 +34,8 @@ public class WinterDropRecipeProvider extends RecipeProvider { } @Override - protected RecipeProvider createRecipeProvider(HolderLookup.Provider provider, RecipeOutput recipeOutput) { - return new WinterDropRecipeProvider(provider, recipeOutput); + protected RecipeProvider createRecipeProvider(HolderLookup.Provider registries, RecipeOutput output) { + return new WinterDropRecipeProvider(registries, output); } @Override diff --git a/net/minecraft/data/registries/WinterDropRegistries.java b/net/minecraft/data/registries/WinterDropRegistries.java index 324a97d0..b5cf48ad 100644 --- a/net/minecraft/data/registries/WinterDropRegistries.java +++ b/net/minecraft/data/registries/WinterDropRegistries.java @@ -12,8 +12,8 @@ public class WinterDropRegistries { .add(Registries.BIOME, WinterDropBiomes::bootstrap) .add(Registries.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST, MultiNoiseBiomeSourceParameterLists::winterDrop); - public static CompletableFuture createLookup(CompletableFuture completableFuture) { - return RegistryPatchGenerator.createLookup(completableFuture, BUILDER) + public static CompletableFuture createLookup(CompletableFuture registries) { + return RegistryPatchGenerator.createLookup(registries, BUILDER) .thenApply( patchedRegistries -> { VanillaRegistries.validateThatAllBiomeFeaturesHaveBiomeFilter( diff --git a/net/minecraft/data/tags/WinterDropBiomeTagsProvider.java b/net/minecraft/data/tags/WinterDropBiomeTagsProvider.java index 83ce2c84..674bc515 100644 --- a/net/minecraft/data/tags/WinterDropBiomeTagsProvider.java +++ b/net/minecraft/data/tags/WinterDropBiomeTagsProvider.java @@ -10,9 +10,9 @@ import net.minecraft.world.level.biome.Biome; public class WinterDropBiomeTagsProvider extends TagsProvider { public WinterDropBiomeTagsProvider( - PackOutput packOutput, CompletableFuture completableFuture, CompletableFuture> completableFuture2 + PackOutput output, CompletableFuture lookupProvider, CompletableFuture> parentProvider ) { - super(packOutput, Registries.BIOME, completableFuture, completableFuture2); + super(output, Registries.BIOME, lookupProvider, parentProvider); } @Override diff --git a/net/minecraft/data/tags/WinterDropBlockTagsProvider.java b/net/minecraft/data/tags/WinterDropBlockTagsProvider.java index e61a825f..bb147445 100644 --- a/net/minecraft/data/tags/WinterDropBlockTagsProvider.java +++ b/net/minecraft/data/tags/WinterDropBlockTagsProvider.java @@ -10,9 +10,9 @@ import net.minecraft.world.level.block.Blocks; public class WinterDropBlockTagsProvider extends IntrinsicHolderTagsProvider { public WinterDropBlockTagsProvider( - PackOutput packOutput, CompletableFuture completableFuture, CompletableFuture> completableFuture2 + PackOutput output, CompletableFuture lookupProvider, CompletableFuture> parentProvider ) { - super(packOutput, Registries.BLOCK, completableFuture, completableFuture2, block -> block.builtInRegistryHolder().key()); + super(output, Registries.BLOCK, lookupProvider, parentProvider, block -> block.builtInRegistryHolder().key()); } @Override diff --git a/net/minecraft/data/tags/WinterDropEntityTypeTagsProvider.java b/net/minecraft/data/tags/WinterDropEntityTypeTagsProvider.java index d4d3aba5..5ea12f84 100644 --- a/net/minecraft/data/tags/WinterDropEntityTypeTagsProvider.java +++ b/net/minecraft/data/tags/WinterDropEntityTypeTagsProvider.java @@ -8,8 +8,8 @@ import net.minecraft.tags.EntityTypeTags; import net.minecraft.world.entity.EntityType; public class WinterDropEntityTypeTagsProvider extends IntrinsicHolderTagsProvider> { - public WinterDropEntityTypeTagsProvider(PackOutput packOutput, CompletableFuture completableFuture) { - super(packOutput, Registries.ENTITY_TYPE, completableFuture, entityType -> entityType.builtInRegistryHolder().key()); + public WinterDropEntityTypeTagsProvider(PackOutput output, CompletableFuture registries) { + super(output, Registries.ENTITY_TYPE, registries, entityType -> entityType.builtInRegistryHolder().key()); } @Override diff --git a/net/minecraft/data/worldgen/Pools.java b/net/minecraft/data/worldgen/Pools.java index 7ac306ad..9001c682 100644 --- a/net/minecraft/data/worldgen/Pools.java +++ b/net/minecraft/data/worldgen/Pools.java @@ -11,8 +11,8 @@ import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool; public class Pools { public static final ResourceKey EMPTY = createKey("empty"); - public static ResourceKey createKey(ResourceLocation resourceLocation) { - return ResourceKey.create(Registries.TEMPLATE_POOL, resourceLocation); + public static ResourceKey createKey(ResourceLocation location) { + return ResourceKey.create(Registries.TEMPLATE_POOL, location); } public static ResourceKey createKey(String name) { diff --git a/net/minecraft/data/worldgen/TerrainProvider.java b/net/minecraft/data/worldgen/TerrainProvider.java index 941edc16..cba74911 100644 --- a/net/minecraft/data/worldgen/TerrainProvider.java +++ b/net/minecraft/data/worldgen/TerrainProvider.java @@ -3,6 +3,7 @@ package net.minecraft.data.worldgen; import net.minecraft.util.CubicSpline; import net.minecraft.util.Mth; import net.minecraft.util.ToFloatFunction; +import net.minecraft.util.CubicSpline.Builder; import net.minecraft.world.level.levelgen.NoiseRouterData; public class TerrainProvider { @@ -57,11 +58,18 @@ public class TerrainProvider { } private static > CubicSpline buildErosionJaggednessSpline( - I erosion, I ridges, I ridgesFolded, float f, float g, float h, float i, ToFloatFunction transform + I erosion, + I ridges, + I ridgesFolded, + float highErosionHighWeirdness, + float lowErosionHighWeirdness, + float highErosionMidWeirdness, + float lowErosionMidWeirdness, + ToFloatFunction transform ) { - float j = -0.5775F; - CubicSpline cubicSpline = buildRidgeJaggednessSpline(ridges, ridgesFolded, f, h, transform); - CubicSpline cubicSpline2 = buildRidgeJaggednessSpline(ridges, ridgesFolded, g, i, transform); + float f = -0.5775F; + CubicSpline cubicSpline = buildRidgeJaggednessSpline(ridges, ridgesFolded, highErosionHighWeirdness, highErosionMidWeirdness, transform); + CubicSpline cubicSpline2 = buildRidgeJaggednessSpline(ridges, ridgesFolded, lowErosionHighWeirdness, lowErosionMidWeirdness, transform); return CubicSpline.builder(erosion, transform) .addPoint(-1.0F, cubicSpline) .addPoint(-0.78F, cubicSpline2) @@ -71,21 +79,21 @@ public class TerrainProvider { } private static > CubicSpline buildRidgeJaggednessSpline( - I ridges, I ridgesFolded, float f, float g, ToFloatFunction transform + I ridges, I ridgesFolded, float highWeirdnessMagnitude, float midWeirdnessMagnitude, ToFloatFunction transform ) { - float h = NoiseRouterData.peaksAndValleys(0.4F); - float i = NoiseRouterData.peaksAndValleys(0.56666666F); - float j = (h + i) / 2.0F; - CubicSpline.Builder builder = CubicSpline.builder(ridgesFolded, transform); - builder.addPoint(h, 0.0F); - if (g > 0.0F) { - builder.addPoint(j, buildWeirdnessJaggednessSpline(ridges, g, transform)); + float f = NoiseRouterData.peaksAndValleys(0.4F); + float g = NoiseRouterData.peaksAndValleys(0.56666666F); + float h = (f + g) / 2.0F; + Builder builder = CubicSpline.builder(ridgesFolded, transform); + builder.addPoint(f, 0.0F); + if (midWeirdnessMagnitude > 0.0F) { + builder.addPoint(h, buildWeirdnessJaggednessSpline(ridges, midWeirdnessMagnitude, transform)); } else { - builder.addPoint(j, 0.0F); + builder.addPoint(h, 0.0F); } - if (f > 0.0F) { - builder.addPoint(1.0F, buildWeirdnessJaggednessSpline(ridges, f, transform)); + if (highWeirdnessMagnitude > 0.0F) { + builder.addPoint(1.0F, buildWeirdnessJaggednessSpline(ridges, highWeirdnessMagnitude, transform)); } else { builder.addPoint(1.0F, 0.0F); } @@ -93,31 +101,31 @@ public class TerrainProvider { return builder.build(); } - private static > CubicSpline buildWeirdnessJaggednessSpline(I ridges, float f, ToFloatFunction transform) { - float g = 0.63F * f; - float h = 0.3F * f; - return CubicSpline.builder(ridges, transform).addPoint(-0.01F, g).addPoint(0.01F, h).build(); + private static > CubicSpline buildWeirdnessJaggednessSpline(I ridges, float magnitude, ToFloatFunction transform) { + float f = 0.63F * magnitude; + float g = 0.3F * magnitude; + return CubicSpline.builder(ridges, transform).addPoint(-0.01F, f).addPoint(0.01F, g).build(); } private static > CubicSpline getErosionFactor( - I erosion, I ridges, I ridgesFolded, float f, boolean bl, ToFloatFunction transform + I erosion, I ridges, I ridgesFolded, float value, boolean higherValues, ToFloatFunction transform ) { - CubicSpline cubicSpline = CubicSpline.builder(ridges, transform).addPoint(-0.2F, 6.3F).addPoint(0.2F, f).build(); - CubicSpline.Builder builder = CubicSpline.builder(erosion, transform) + CubicSpline cubicSpline = CubicSpline.builder(ridges, transform).addPoint(-0.2F, 6.3F).addPoint(0.2F, value).build(); + Builder builder = CubicSpline.builder(erosion, transform) .addPoint(-0.6F, cubicSpline) .addPoint(-0.5F, CubicSpline.builder(ridges, transform).addPoint(-0.05F, 6.3F).addPoint(0.05F, 2.67F).build()) .addPoint(-0.35F, cubicSpline) .addPoint(-0.25F, cubicSpline) .addPoint(-0.1F, CubicSpline.builder(ridges, transform).addPoint(-0.05F, 2.67F).addPoint(0.05F, 6.3F).build()) .addPoint(0.03F, cubicSpline); - if (bl) { - CubicSpline cubicSpline2 = CubicSpline.builder(ridges, transform).addPoint(0.0F, f).addPoint(0.1F, 0.625F).build(); - CubicSpline cubicSpline3 = CubicSpline.builder(ridgesFolded, transform).addPoint(-0.9F, f).addPoint(-0.69F, cubicSpline2).build(); - builder.addPoint(0.35F, f).addPoint(0.45F, cubicSpline3).addPoint(0.55F, cubicSpline3).addPoint(0.62F, f); + if (higherValues) { + CubicSpline cubicSpline2 = CubicSpline.builder(ridges, transform).addPoint(0.0F, value).addPoint(0.1F, 0.625F).build(); + CubicSpline cubicSpline3 = CubicSpline.builder(ridgesFolded, transform).addPoint(-0.9F, value).addPoint(-0.69F, cubicSpline2).build(); + builder.addPoint(0.35F, value).addPoint(0.45F, cubicSpline3).addPoint(0.55F, cubicSpline3).addPoint(0.62F, value); } else { CubicSpline cubicSpline2 = CubicSpline.builder(ridgesFolded, transform).addPoint(-0.7F, cubicSpline).addPoint(-0.15F, 1.37F).build(); CubicSpline cubicSpline3 = CubicSpline.builder(ridgesFolded, transform).addPoint(0.45F, cubicSpline).addPoint(0.7F, 1.56F).build(); - builder.addPoint(0.05F, cubicSpline3).addPoint(0.4F, cubicSpline3).addPoint(0.45F, cubicSpline2).addPoint(0.55F, cubicSpline2).addPoint(0.58F, f); + builder.addPoint(0.05F, cubicSpline3).addPoint(0.4F, cubicSpline3).addPoint(0.45F, cubicSpline2).addPoint(0.55F, cubicSpline2).addPoint(0.58F, value); } return builder.build(); @@ -128,90 +136,102 @@ public class TerrainProvider { } private static > CubicSpline buildMountainRidgeSplineWithPoints( - I ridgesFolded, float f, boolean bl, ToFloatFunction transform + I ridgesFolded, float magnitude, boolean useMaxSlope, ToFloatFunction transform ) { - CubicSpline.Builder builder = CubicSpline.builder(ridgesFolded, transform); - float g = -0.7F; - float h = -1.0F; - float i = mountainContinentalness(-1.0F, f, -0.7F); - float j = 1.0F; - float k = mountainContinentalness(1.0F, f, -0.7F); - float l = calculateMountainRidgeZeroContinentalnessPoint(f); - float m = -0.65F; - if (-0.65F < l && l < 1.0F) { - float n = mountainContinentalness(-0.65F, f, -0.7F); - float o = -0.75F; - float p = mountainContinentalness(-0.75F, f, -0.7F); - float q = calculateSlope(i, p, -1.0F, -0.75F); - builder.addPoint(-1.0F, i, q); - builder.addPoint(-0.75F, p); - builder.addPoint(-0.65F, n); - float r = mountainContinentalness(l, f, -0.7F); - float s = calculateSlope(r, k, l, 1.0F); - float t = 0.01F; - builder.addPoint(l - 0.01F, r); - builder.addPoint(l, r, s); - builder.addPoint(1.0F, k, s); + Builder builder = CubicSpline.builder(ridgesFolded, transform); + float f = -0.7F; + float g = -1.0F; + float h = mountainContinentalness(-1.0F, magnitude, -0.7F); + float i = 1.0F; + float j = mountainContinentalness(1.0F, magnitude, -0.7F); + float k = calculateMountainRidgeZeroContinentalnessPoint(magnitude); + float l = -0.65F; + if (-0.65F < k && k < 1.0F) { + float m = mountainContinentalness(-0.65F, magnitude, -0.7F); + float n = -0.75F; + float o = mountainContinentalness(-0.75F, magnitude, -0.7F); + float p = calculateSlope(h, o, -1.0F, -0.75F); + builder.addPoint(-1.0F, h, p); + builder.addPoint(-0.75F, o); + builder.addPoint(-0.65F, m); + float q = mountainContinentalness(k, magnitude, -0.7F); + float r = calculateSlope(q, j, k, 1.0F); + float s = 0.01F; + builder.addPoint(k - 0.01F, q); + builder.addPoint(k, q, r); + builder.addPoint(1.0F, j, r); } else { - float n = calculateSlope(i, k, -1.0F, 1.0F); - if (bl) { - builder.addPoint(-1.0F, Math.max(0.2F, i)); - builder.addPoint(0.0F, Mth.lerp(0.5F, i, k), n); + float m = calculateSlope(h, j, -1.0F, 1.0F); + if (useMaxSlope) { + builder.addPoint(-1.0F, Math.max(0.2F, h)); + builder.addPoint(0.0F, Mth.lerp(0.5F, h, j), m); } else { - builder.addPoint(-1.0F, i, n); + builder.addPoint(-1.0F, h, m); } - builder.addPoint(1.0F, k, n); + builder.addPoint(1.0F, j, m); } return builder.build(); } - private static float mountainContinentalness(float f, float g, float h) { - float i = 1.17F; - float j = 0.46082947F; - float k = 1.0F - (1.0F - g) * 0.5F; - float l = 0.5F * (1.0F - g); - float m = (f + 1.17F) * 0.46082947F; - float n = m * k - l; - return f < h ? Math.max(n, -0.2222F) : Math.max(n, 0.0F); + private static float mountainContinentalness(float heightFactor, float magnitude, float cutoffHeight) { + float f = 1.17F; + float g = 0.46082947F; + float h = 1.0F - (1.0F - magnitude) * 0.5F; + float i = 0.5F * (1.0F - magnitude); + float j = (heightFactor + 1.17F) * 0.46082947F; + float k = j * h - i; + return heightFactor < cutoffHeight ? Math.max(k, -0.2222F) : Math.max(k, 0.0F); } - private static float calculateMountainRidgeZeroContinentalnessPoint(float f) { - float g = 1.17F; - float h = 0.46082947F; - float i = 1.0F - (1.0F - f) * 0.5F; - float j = 0.5F * (1.0F - f); - return j / (0.46082947F * i) - 1.17F; + private static float calculateMountainRidgeZeroContinentalnessPoint(float input) { + float f = 1.17F; + float g = 0.46082947F; + float h = 1.0F - (1.0F - input) * 0.5F; + float i = 0.5F * (1.0F - input); + return i / (0.46082947F * h) - 1.17F; } public static > CubicSpline buildErosionOffsetSpline( - I erosion, I ridgesFolded, float f, float g, float h, float i, float j, float k, boolean bl, boolean bl2, ToFloatFunction transform + I erosion, + I ridgesFolded, + float f, + float g, + float h, + float magnitude, + float i, + float j, + boolean extended, + boolean useMaxSlope, + ToFloatFunction transform ) { - float l = 0.6F; + float k = 0.6F; + float l = 0.5F; float m = 0.5F; - float n = 0.5F; - CubicSpline cubicSpline = buildMountainRidgeSplineWithPoints(ridgesFolded, Mth.lerp(i, 0.6F, 1.5F), bl2, transform); - CubicSpline cubicSpline2 = buildMountainRidgeSplineWithPoints(ridgesFolded, Mth.lerp(i, 0.6F, 1.0F), bl2, transform); - CubicSpline cubicSpline3 = buildMountainRidgeSplineWithPoints(ridgesFolded, i, bl2, transform); - CubicSpline cubicSpline4 = ridgeSpline(ridgesFolded, f - 0.15F, 0.5F * i, Mth.lerp(0.5F, 0.5F, 0.5F) * i, 0.5F * i, 0.6F * i, 0.5F, transform); - CubicSpline cubicSpline5 = ridgeSpline(ridgesFolded, f, j * i, g * i, 0.5F * i, 0.6F * i, 0.5F, transform); - CubicSpline cubicSpline6 = ridgeSpline(ridgesFolded, f, j, j, g, h, 0.5F, transform); - CubicSpline cubicSpline7 = ridgeSpline(ridgesFolded, f, j, j, g, h, 0.5F, transform); + CubicSpline cubicSpline = buildMountainRidgeSplineWithPoints(ridgesFolded, Mth.lerp(magnitude, 0.6F, 1.5F), useMaxSlope, transform); + CubicSpline cubicSpline2 = buildMountainRidgeSplineWithPoints(ridgesFolded, Mth.lerp(magnitude, 0.6F, 1.0F), useMaxSlope, transform); + CubicSpline cubicSpline3 = buildMountainRidgeSplineWithPoints(ridgesFolded, magnitude, useMaxSlope, transform); + CubicSpline cubicSpline4 = ridgeSpline( + ridgesFolded, f - 0.15F, 0.5F * magnitude, Mth.lerp(0.5F, 0.5F, 0.5F) * magnitude, 0.5F * magnitude, 0.6F * magnitude, 0.5F, transform + ); + CubicSpline cubicSpline5 = ridgeSpline(ridgesFolded, f, i * magnitude, g * magnitude, 0.5F * magnitude, 0.6F * magnitude, 0.5F, transform); + CubicSpline cubicSpline6 = ridgeSpline(ridgesFolded, f, i, i, g, h, 0.5F, transform); + CubicSpline cubicSpline7 = ridgeSpline(ridgesFolded, f, i, i, g, h, 0.5F, transform); CubicSpline cubicSpline8 = CubicSpline.builder(ridgesFolded, transform) .addPoint(-1.0F, f) .addPoint(-0.4F, cubicSpline6) .addPoint(0.0F, h + 0.07F) .build(); - CubicSpline cubicSpline9 = ridgeSpline(ridgesFolded, -0.02F, k, k, g, h, 0.0F, transform); - CubicSpline.Builder builder = CubicSpline.builder(erosion, transform) + CubicSpline cubicSpline9 = ridgeSpline(ridgesFolded, -0.02F, j, j, g, h, 0.0F, transform); + Builder builder = CubicSpline.builder(erosion, transform) .addPoint(-0.85F, cubicSpline) .addPoint(-0.7F, cubicSpline2) .addPoint(-0.4F, cubicSpline3) .addPoint(-0.35F, cubicSpline4) .addPoint(-0.1F, cubicSpline5) .addPoint(0.2F, cubicSpline6); - if (bl) { + if (extended) { builder.addPoint(0.4F, cubicSpline7).addPoint(0.45F, cubicSpline8).addPoint(0.55F, cubicSpline8).addPoint(0.58F, cubicSpline7); } diff --git a/net/minecraft/data/worldgen/WinterDropBiomes.java b/net/minecraft/data/worldgen/WinterDropBiomes.java index 72d3bd1e..3a8270b3 100644 --- a/net/minecraft/data/worldgen/WinterDropBiomes.java +++ b/net/minecraft/data/worldgen/WinterDropBiomes.java @@ -12,17 +12,17 @@ import net.minecraft.world.level.levelgen.placement.PlacedFeature; public class WinterDropBiomes { public static final ResourceKey PALE_GARDEN = createKey("pale_garden"); - public static ResourceKey createKey(String string) { - return ResourceKey.create(Registries.BIOME, ResourceLocation.withDefaultNamespace(string)); + public static ResourceKey createKey(String name) { + return ResourceKey.create(Registries.BIOME, ResourceLocation.withDefaultNamespace(name)); } - public static void register(BootstrapContext bootstrapContext, String string, Biome biome) { - bootstrapContext.register(createKey(string), biome); + public static void register(BootstrapContext context, String name, Biome biome) { + context.register(createKey(name), biome); } - public static void bootstrap(BootstrapContext bootstrapContext) { - HolderGetter holderGetter = bootstrapContext.lookup(Registries.PLACED_FEATURE); - HolderGetter> holderGetter2 = bootstrapContext.lookup(Registries.CONFIGURED_CARVER); - bootstrapContext.register(PALE_GARDEN, OverworldBiomes.darkForest(holderGetter, holderGetter2, true)); + public static void bootstrap(BootstrapContext context) { + HolderGetter holderGetter = context.lookup(Registries.PLACED_FEATURE); + HolderGetter> holderGetter2 = context.lookup(Registries.CONFIGURED_CARVER); + context.register(PALE_GARDEN, OverworldBiomes.darkForest(holderGetter, holderGetter2, true)); } } diff --git a/net/minecraft/data/worldgen/biome/OverworldBiomes.java b/net/minecraft/data/worldgen/biome/OverworldBiomes.java index 6525e387..2af36115 100644 --- a/net/minecraft/data/worldgen/biome/OverworldBiomes.java +++ b/net/minecraft/data/worldgen/biome/OverworldBiomes.java @@ -557,30 +557,30 @@ public class OverworldBiomes { return biome(true, f, isCold ? 0.4F : 0.8F, isCold ? 4020182 : 4159204, 329011, null, null, builder, builder2, NORMAL_MUSIC); } - public static Biome darkForest(HolderGetter holderGetter, HolderGetter> holderGetter2, boolean bl) { + public static Biome darkForest(HolderGetter placedFeatures, HolderGetter> worldCarvers, boolean isPaleGarden) { Builder builder = new Builder(); - if (!bl) { + if (!isPaleGarden) { BiomeDefaultFeatures.farmAnimals(builder); } BiomeDefaultFeatures.commonSpawns(builder); - BiomeGenerationSettings.Builder builder2 = new BiomeGenerationSettings.Builder(holderGetter, holderGetter2); + BiomeGenerationSettings.Builder builder2 = new BiomeGenerationSettings.Builder(placedFeatures, worldCarvers); globalOverworldGeneration(builder2); builder2.addFeature( - GenerationStep.Decoration.VEGETAL_DECORATION, bl ? VegetationPlacements.PALE_GARDEN_VEGETATION : VegetationPlacements.DARK_FOREST_VEGETATION + GenerationStep.Decoration.VEGETAL_DECORATION, isPaleGarden ? VegetationPlacements.PALE_GARDEN_VEGETATION : VegetationPlacements.DARK_FOREST_VEGETATION ); - if (!bl) { + if (!isPaleGarden) { BiomeDefaultFeatures.addForestFlowers(builder2); } BiomeDefaultFeatures.addDefaultOres(builder2); BiomeDefaultFeatures.addDefaultSoftDisks(builder2); - if (!bl) { + if (!isPaleGarden) { BiomeDefaultFeatures.addDefaultFlowers(builder2); } BiomeDefaultFeatures.addForestGrass(builder2); - if (!bl) { + if (!isPaleGarden) { BiomeDefaultFeatures.addDefaultMushrooms(builder2); } @@ -591,7 +591,7 @@ public class OverworldBiomes { .temperature(0.7F) .downfall(0.8F) .specialEffects( - bl + isPaleGarden ? new BiomeSpecialEffects.Builder() .waterColor(7768221) .waterFogColor(5597568) diff --git a/net/minecraft/gametest/framework/GameTestHelper.java b/net/minecraft/gametest/framework/GameTestHelper.java index 6883914a..3dcf233f 100644 --- a/net/minecraft/gametest/framework/GameTestHelper.java +++ b/net/minecraft/gametest/framework/GameTestHelper.java @@ -138,8 +138,8 @@ public class GameTestHelper { } } - public void hurt(Entity entity, DamageSource damageSource, float f) { - entity.hurtServer(this.getLevel(), damageSource, f); + public void hurt(Entity entity, DamageSource damageSource, float amount) { + entity.hurtServer(this.getLevel(), damageSource, amount); } public void kill(Entity entity) { @@ -450,12 +450,12 @@ public class GameTestHelper { } } - public void assertEntityPresent(EntityType entityType, AABB aABB) { - AABB aABB2 = this.absoluteAABB(aABB); - List list = this.getLevel().getEntities(entityType, aABB2, Entity::isAlive); + public void assertEntityPresent(EntityType type, AABB box) { + AABB aABB = this.absoluteAABB(box); + List list = this.getLevel().getEntities(type, aABB, Entity::isAlive); if (list.isEmpty()) { throw new GameTestAssertPosException( - "Expected " + entityType.toShortString(), BlockPos.containing(aABB2.getCenter()), BlockPos.containing(aABB.getCenter()), this.testInfo.getTick() + "Expected " + type.toShortString(), BlockPos.containing(aABB.getCenter()), BlockPos.containing(box.getCenter()), this.testInfo.getTick() ); } } @@ -592,12 +592,12 @@ public class GameTestHelper { } } - public void assertEntityNotPresent(EntityType entityType, AABB aABB) { - AABB aABB2 = this.absoluteAABB(aABB); - List list = this.getLevel().getEntities(entityType, aABB2, Entity::isAlive); + public void assertEntityNotPresent(EntityType type, AABB box) { + AABB aABB = this.absoluteAABB(box); + List list = this.getLevel().getEntities(type, aABB, Entity::isAlive); if (!list.isEmpty()) { throw new GameTestAssertPosException( - "Did not expect " + entityType.toShortString(), BlockPos.containing(aABB2.getCenter()), BlockPos.containing(aABB.getCenter()), this.testInfo.getTick() + "Did not expect " + type.toShortString(), BlockPos.containing(aABB.getCenter()), BlockPos.containing(box.getCenter()), this.testInfo.getTick() ); } } @@ -622,11 +622,11 @@ public class GameTestHelper { } } - public void assertEntityData(BlockPos blockPos, EntityType entityType, Predicate predicate) { - BlockPos blockPos2 = this.absolutePos(blockPos); - List list = this.getLevel().getEntities(entityType, new AABB(blockPos2), Entity::isAlive); + public void assertEntityData(BlockPos pos, EntityType type, Predicate predicate) { + BlockPos blockPos = this.absolutePos(pos); + List list = this.getLevel().getEntities(type, new AABB(blockPos), Entity::isAlive); if (list.isEmpty()) { - throw new GameTestAssertPosException("Expected " + entityType.toShortString(), blockPos2, blockPos, this.testInfo.getTick()); + throw new GameTestAssertPosException("Expected " + type.toShortString(), blockPos, pos, this.testInfo.getTick()); } else { for (E entity : list) { if (!predicate.test(entity)) { @@ -874,15 +874,15 @@ public class GameTestHelper { return blockPos2.subtract(blockPos); } - public AABB absoluteAABB(AABB aABB) { - Vec3 vec3 = this.absoluteVec(aABB.getMinPosition()); - Vec3 vec32 = this.absoluteVec(aABB.getMaxPosition()); + public AABB absoluteAABB(AABB aabb) { + Vec3 vec3 = this.absoluteVec(aabb.getMinPosition()); + Vec3 vec32 = this.absoluteVec(aabb.getMaxPosition()); return new AABB(vec3, vec32); } - public AABB relativeAABB(AABB aABB) { - Vec3 vec3 = this.relativeVec(aABB.getMinPosition()); - Vec3 vec32 = this.relativeVec(aABB.getMaxPosition()); + public AABB relativeAABB(AABB aabb) { + Vec3 vec3 = this.relativeVec(aabb.getMinPosition()); + Vec3 vec32 = this.relativeVec(aabb.getMaxPosition()); return new AABB(vec3, vec32); } diff --git a/net/minecraft/gametest/framework/StructureUtils.java b/net/minecraft/gametest/framework/StructureUtils.java index c5707cac..2ea45cc8 100644 --- a/net/minecraft/gametest/framework/StructureUtils.java +++ b/net/minecraft/gametest/framework/StructureUtils.java @@ -102,27 +102,27 @@ public class StructureUtils { structureBlockEntity.setShowBoundingBox(true); } - public static BlockPos getStartCorner(GameTestInfo gameTestInfo, BlockPos blockPos, Rotation rotation, ServerLevel serverLevel) { - Vec3i vec3i = ((StructureTemplate)serverLevel.getStructureManager() + public static BlockPos getStartCorner(GameTestInfo gameTestInfo, BlockPos pos, Rotation rotation, ServerLevel level) { + Vec3i vec3i = ((StructureTemplate)level.getStructureManager() .get(ResourceLocation.parse(gameTestInfo.getStructureName())) .orElseThrow(() -> new IllegalStateException("Missing test structure: " + gameTestInfo.getStructureName()))) .getSize(); - BlockPos blockPos2; + BlockPos blockPos; if (rotation == Rotation.NONE) { - blockPos2 = blockPos; + blockPos = pos; } else if (rotation == Rotation.CLOCKWISE_90) { - blockPos2 = blockPos.offset(vec3i.getZ() - 1, 0, 0); + blockPos = pos.offset(vec3i.getZ() - 1, 0, 0); } else if (rotation == Rotation.CLOCKWISE_180) { - blockPos2 = blockPos.offset(vec3i.getX() - 1, 0, vec3i.getZ() - 1); + blockPos = pos.offset(vec3i.getX() - 1, 0, vec3i.getZ() - 1); } else { if (rotation != Rotation.COUNTERCLOCKWISE_90) { throw new IllegalArgumentException("Invalid rotation: " + rotation); } - blockPos2 = blockPos.offset(0, 0, vec3i.getX() - 1); + blockPos = pos.offset(0, 0, vec3i.getX() - 1); } - return blockPos2; + return blockPos; } public static StructureBlockEntity prepareTestStructure(GameTestInfo gameTestInfo, BlockPos pos, Rotation rotation, ServerLevel level) { diff --git a/net/minecraft/locale/DeprecatedTranslationsInfo.java b/net/minecraft/locale/DeprecatedTranslationsInfo.java index a6fb454a..47496c40 100644 --- a/net/minecraft/locale/DeprecatedTranslationsInfo.java +++ b/net/minecraft/locale/DeprecatedTranslationsInfo.java @@ -29,9 +29,9 @@ public record DeprecatedTranslationsInfo(List removed, Map new IllegalStateException("Failed to parse deprecated language data: " + string)); } - public static DeprecatedTranslationsInfo loadFromResource(String string) { + public static DeprecatedTranslationsInfo loadFromResource(String name) { try { - InputStream inputStream = Language.class.getResourceAsStream(string); + InputStream inputStream = Language.class.getResourceAsStream(name); DeprecatedTranslationsInfo var2; label49: { @@ -65,7 +65,7 @@ public record DeprecatedTranslationsInfo(List removed, Map removed, Map map) { + public void applyToMap(Map translations) { for (String string : this.removed) { - map.remove(string); + translations.remove(string); } this.renamed.forEach((stringx, string2) -> { - String string3 = (String)map.remove(stringx); + String string3 = (String)translations.remove(stringx); if (string3 == null) { LOGGER.warn("Missing translation key for rename: {}", stringx); - map.remove(string2); + translations.remove(string2); } else { - map.put(string2, string3); + translations.put(string2, string3); } }); } diff --git a/net/minecraft/network/FriendlyByteBuf.java b/net/minecraft/network/FriendlyByteBuf.java index 9492596c..1f60dcef 100644 --- a/net/minecraft/network/FriendlyByteBuf.java +++ b/net/minecraft/network/FriendlyByteBuf.java @@ -442,12 +442,12 @@ public class FriendlyByteBuf extends ByteBuf { return this; } - public static ChunkPos readChunkPos(ByteBuf byteBuf) { - return new ChunkPos(byteBuf.readLong()); + public static ChunkPos readChunkPos(ByteBuf buffer) { + return new ChunkPos(buffer.readLong()); } - public static void writeChunkPos(ByteBuf byteBuf, ChunkPos chunkPos) { - byteBuf.writeLong(chunkPos.toLong()); + public static void writeChunkPos(ByteBuf buffer, ChunkPos chunkPos) { + buffer.writeLong(chunkPos.toLong()); } /** @@ -517,18 +517,18 @@ public class FriendlyByteBuf extends ByteBuf { buffer.writeFloat(quaternion.w); } - public static Vec3 readVec3(ByteBuf byteBuf) { - return new Vec3(byteBuf.readDouble(), byteBuf.readDouble(), byteBuf.readDouble()); + public static Vec3 readVec3(ByteBuf buffer) { + return new Vec3(buffer.readDouble(), buffer.readDouble(), buffer.readDouble()); } public Vec3 readVec3() { return readVec3(this); } - public static void writeVec3(ByteBuf byteBuf, Vec3 vec3) { - byteBuf.writeDouble(vec3.x()); - byteBuf.writeDouble(vec3.y()); - byteBuf.writeDouble(vec3.z()); + public static void writeVec3(ByteBuf buffer, Vec3 vec3) { + buffer.writeDouble(vec3.x()); + buffer.writeDouble(vec3.y()); + buffer.writeDouble(vec3.z()); } public void writeVec3(Vec3 vec3) { @@ -859,20 +859,20 @@ public class FriendlyByteBuf extends ByteBuf { } } - public static int readContainerId(ByteBuf byteBuf) { - return VarInt.read(byteBuf); + public static int readContainerId(ByteBuf buffer) { + return VarInt.read(buffer); } public int readContainerId() { return readContainerId(this.source); } - public static void writeContainerId(ByteBuf byteBuf, int i) { - VarInt.write(byteBuf, i); + public static void writeContainerId(ByteBuf buffer, int containerId) { + VarInt.write(buffer, containerId); } - public void writeContainerId(int i) { - writeContainerId(this.source, i); + public void writeContainerId(int containerId) { + writeContainerId(this.source, containerId); } @Override diff --git a/net/minecraft/network/chat/ChatTypeDecoration.java b/net/minecraft/network/chat/ChatTypeDecoration.java index 27543cc2..0cd80ef7 100644 --- a/net/minecraft/network/chat/ChatTypeDecoration.java +++ b/net/minecraft/network/chat/ChatTypeDecoration.java @@ -7,6 +7,7 @@ import java.util.List; import java.util.function.IntFunction; import net.minecraft.ChatFormatting; import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.chat.ChatType.Bound; import net.minecraft.network.chat.ChatTypeDecoration.Parameter.Selector; import net.minecraft.network.chat.Style.Serializer; import net.minecraft.network.codec.ByteBufCodecs; @@ -54,12 +55,12 @@ public record ChatTypeDecoration(String translationKey, List optional) { - return MutableComponent.create(new SelectorContents(selectorPattern, optional)); + static MutableComponent selector(SelectorPattern selectorPattern, Optional seperator) { + return MutableComponent.create(new SelectorContents(selectorPattern, seperator)); } static Component translationArg(Date date) { diff --git a/net/minecraft/network/codec/StreamCodec.java b/net/minecraft/network/codec/StreamCodec.java index 70f9ccbc..6b548571 100644 --- a/net/minecraft/network/codec/StreamCodec.java +++ b/net/minecraft/network/codec/StreamCodec.java @@ -278,91 +278,91 @@ public interface StreamCodec extends StreamDecoder, StreamEncoder StreamCodec composite( - StreamCodec streamCodec, - Function function, - StreamCodec streamCodec2, - Function function2, - StreamCodec streamCodec3, - Function function3, - StreamCodec streamCodec4, - Function function4, - StreamCodec streamCodec5, - Function function5, - StreamCodec streamCodec6, - Function function6, - StreamCodec streamCodec7, - Function function7, - Function7 function72 + StreamCodec codec1, + Function getter1, + StreamCodec codec2, + Function getter2, + StreamCodec codec3, + Function getter3, + StreamCodec codec4, + Function getter4, + StreamCodec codec5, + Function getter5, + StreamCodec codec6, + Function getter6, + StreamCodec codec7, + Function getter7, + Function7 factory ) { return new StreamCodec() { @Override public C decode(B object) { - T1 object2 = streamCodec.decode(object); - T2 object3 = streamCodec2.decode(object); - T3 object4 = streamCodec3.decode(object); - T4 object5 = streamCodec4.decode(object); - T5 object6 = streamCodec5.decode(object); - T6 object7 = streamCodec6.decode(object); - T7 object8 = streamCodec7.decode(object); - return function72.apply(object2, object3, object4, object5, object6, object7, object8); + T1 object2 = codec1.decode(object); + T2 object3 = codec2.decode(object); + T3 object4 = codec3.decode(object); + T4 object5 = codec4.decode(object); + T5 object6 = codec5.decode(object); + T6 object7 = codec6.decode(object); + T7 object8 = codec7.decode(object); + return factory.apply(object2, object3, object4, object5, object6, object7, object8); } @Override public void encode(B object, C object2) { - streamCodec.encode(object, (T1)function.apply(object2)); - streamCodec2.encode(object, (T2)function2.apply(object2)); - streamCodec3.encode(object, (T3)function3.apply(object2)); - streamCodec4.encode(object, (T4)function4.apply(object2)); - streamCodec5.encode(object, (T5)function5.apply(object2)); - streamCodec6.encode(object, (T6)function6.apply(object2)); - streamCodec7.encode(object, (T7)function7.apply(object2)); + codec1.encode(object, (T1)getter1.apply(object2)); + codec2.encode(object, (T2)getter2.apply(object2)); + codec3.encode(object, (T3)getter3.apply(object2)); + codec4.encode(object, (T4)getter4.apply(object2)); + codec5.encode(object, (T5)getter5.apply(object2)); + codec6.encode(object, (T6)getter6.apply(object2)); + codec7.encode(object, (T7)getter7.apply(object2)); } }; } static StreamCodec composite( - StreamCodec streamCodec, - Function function, - StreamCodec streamCodec2, - Function function2, - StreamCodec streamCodec3, - Function function3, - StreamCodec streamCodec4, - Function function4, - StreamCodec streamCodec5, - Function function5, - StreamCodec streamCodec6, - Function function6, - StreamCodec streamCodec7, - Function function7, - StreamCodec streamCodec8, - Function function8, - Function8 function82 + StreamCodec codec1, + Function getter1, + StreamCodec codec2, + Function getter2, + StreamCodec codec3, + Function getter3, + StreamCodec codec4, + Function getter4, + StreamCodec codec5, + Function getter5, + StreamCodec codec6, + Function getter6, + StreamCodec codec7, + Function getter7, + StreamCodec codec8, + Function getter8, + Function8 factory ) { return new StreamCodec() { @Override public C decode(B object) { - T1 object2 = streamCodec.decode(object); - T2 object3 = streamCodec2.decode(object); - T3 object4 = streamCodec3.decode(object); - T4 object5 = streamCodec4.decode(object); - T5 object6 = streamCodec5.decode(object); - T6 object7 = streamCodec6.decode(object); - T7 object8 = streamCodec7.decode(object); - T8 object9 = streamCodec8.decode(object); - return function82.apply(object2, object3, object4, object5, object6, object7, object8, object9); + T1 object2 = codec1.decode(object); + T2 object3 = codec2.decode(object); + T3 object4 = codec3.decode(object); + T4 object5 = codec4.decode(object); + T5 object6 = codec5.decode(object); + T6 object7 = codec6.decode(object); + T7 object8 = codec7.decode(object); + T8 object9 = codec8.decode(object); + return factory.apply(object2, object3, object4, object5, object6, object7, object8, object9); } @Override public void encode(B object, C object2) { - streamCodec.encode(object, (T1)function.apply(object2)); - streamCodec2.encode(object, (T2)function2.apply(object2)); - streamCodec3.encode(object, (T3)function3.apply(object2)); - streamCodec4.encode(object, (T4)function4.apply(object2)); - streamCodec5.encode(object, (T5)function5.apply(object2)); - streamCodec6.encode(object, (T6)function6.apply(object2)); - streamCodec7.encode(object, (T7)function7.apply(object2)); - streamCodec8.encode(object, (T8)function8.apply(object2)); + codec1.encode(object, (T1)getter1.apply(object2)); + codec2.encode(object, (T2)getter2.apply(object2)); + codec3.encode(object, (T3)getter3.apply(object2)); + codec4.encode(object, (T4)getter4.apply(object2)); + codec5.encode(object, (T5)getter5.apply(object2)); + codec6.encode(object, (T6)getter6.apply(object2)); + codec7.encode(object, (T7)getter7.apply(object2)); + codec8.encode(object, (T8)getter8.apply(object2)); } }; } diff --git a/net/minecraft/network/protocol/game/ClientGamePacketListener.java b/net/minecraft/network/protocol/game/ClientGamePacketListener.java index 0e1036fc..20dec445 100644 --- a/net/minecraft/network/protocol/game/ClientGamePacketListener.java +++ b/net/minecraft/network/protocol/game/ClientGamePacketListener.java @@ -40,11 +40,11 @@ public interface ClientGamePacketListener extends ClientCommonPacketListener, Cl */ void handleAwardStats(ClientboundAwardStatsPacket packet); - void handleRecipeBookAdd(ClientboundRecipeBookAddPacket clientboundRecipeBookAddPacket); + void handleRecipeBookAdd(ClientboundRecipeBookAddPacket packet); - void handleRecipeBookRemove(ClientboundRecipeBookRemovePacket clientboundRecipeBookRemovePacket); + void handleRecipeBookRemove(ClientboundRecipeBookRemovePacket packet); - void handleRecipeBookSettings(ClientboundRecipeBookSettingsPacket clientboundRecipeBookSettingsPacket); + void handleRecipeBookSettings(ClientboundRecipeBookSettingsPacket packet); /** * Updates all registered IWorldAccess instances with destroyBlockInWorldPartially @@ -145,11 +145,11 @@ public interface ClientGamePacketListener extends ClientCommonPacketListener, Cl */ void handleMoveEntity(ClientboundMoveEntityPacket packet); - void handleMinecartAlongTrack(ClientboundMoveMinecartPacket clientboundMoveMinecartPacket); + void handleMinecartAlongTrack(ClientboundMoveMinecartPacket packet); void handleMovePlayer(ClientboundPlayerPositionPacket packet); - void handleRotatePlayer(ClientboundPlayerRotationPacket clientboundPlayerRotationPacket); + void handleRotatePlayer(ClientboundPlayerRotationPacket packet); /** * Spawns a specified number of particles at the specified location with a randomized displacement according to specified bounds @@ -173,7 +173,7 @@ public interface ClientGamePacketListener extends ClientCommonPacketListener, Cl */ void handleRotateMob(ClientboundRotateHeadPacket packet); - void handleSetHeldSlot(ClientboundSetHeldSlotPacket clientboundSetHeldSlotPacket); + void handleSetHeldSlot(ClientboundSetHeldSlotPacket packet); /** * Removes or sets the ScoreObjective to be displayed at a particular scoreboard position (list, sidebar, below name) @@ -218,7 +218,7 @@ public interface ClientGamePacketListener extends ClientCommonPacketListener, Cl void handleTakeItemEntity(ClientboundTakeItemEntityPacket packet); - void handleEntityPositionSync(ClientboundEntityPositionSyncPacket clientboundEntityPositionSyncPacket); + void handleEntityPositionSync(ClientboundEntityPositionSyncPacket packet); /** * Updates an entity's position and rotation as specified by the packet @@ -331,7 +331,7 @@ public interface ClientGamePacketListener extends ClientCommonPacketListener, Cl void handleProjectilePowerPacket(ClientboundProjectilePowerPacket packet); - void handleSetCursorItem(ClientboundSetCursorItemPacket clientboundSetCursorItemPacket); + void handleSetCursorItem(ClientboundSetCursorItemPacket packet); - void handleSetPlayerInventory(ClientboundSetPlayerInventoryPacket clientboundSetPlayerInventoryPacket); + void handleSetPlayerInventory(ClientboundSetPlayerInventoryPacket packet); } diff --git a/net/minecraft/network/protocol/game/ClientboundEntityPositionSyncPacket.java b/net/minecraft/network/protocol/game/ClientboundEntityPositionSyncPacket.java index 25db72f5..506b6883 100644 --- a/net/minecraft/network/protocol/game/ClientboundEntityPositionSyncPacket.java +++ b/net/minecraft/network/protocol/game/ClientboundEntityPositionSyncPacket.java @@ -30,7 +30,10 @@ public record ClientboundEntityPositionSyncPacket(int id, PositionMoveRotation v return GamePacketTypes.CLIENTBOUND_ENTITY_POSITION_SYNC; } - public void handle(ClientGamePacketListener clientGamePacketListener) { - clientGamePacketListener.handleEntityPositionSync(this); + /** + * Passes this Packet on to the PacketListener for processing. + */ + public void handle(ClientGamePacketListener handler) { + handler.handleEntityPositionSync(this); } } diff --git a/net/minecraft/network/protocol/game/ClientboundMoveMinecartPacket.java b/net/minecraft/network/protocol/game/ClientboundMoveMinecartPacket.java index 8c00a8c2..9d220e19 100644 --- a/net/minecraft/network/protocol/game/ClientboundMoveMinecartPacket.java +++ b/net/minecraft/network/protocol/game/ClientboundMoveMinecartPacket.java @@ -25,8 +25,11 @@ public record ClientboundMoveMinecartPacket(int entityId, List set) { - return new ClientboundPlayerPositionPacket(i, positionMoveRotation, set); + public static ClientboundPlayerPositionPacket of(int id, PositionMoveRotation positionMoveRotation, Set relativeArguments) { + return new ClientboundPlayerPositionPacket(id, positionMoveRotation, relativeArguments); } @Override diff --git a/net/minecraft/network/protocol/game/ClientboundRecipeBookAddPacket.java b/net/minecraft/network/protocol/game/ClientboundRecipeBookAddPacket.java index 88e85609..1be8557c 100644 --- a/net/minecraft/network/protocol/game/ClientboundRecipeBookAddPacket.java +++ b/net/minecraft/network/protocol/game/ClientboundRecipeBookAddPacket.java @@ -22,8 +22,11 @@ public record ClientboundRecipeBookAddPacket(List set, boolean bl) { - return new ClientboundTeleportEntityPacket(i, positionMoveRotation, set, bl); + public static ClientboundTeleportEntityPacket teleport(int id, PositionMoveRotation change, Set relatives, boolean onGround) { + return new ClientboundTeleportEntityPacket(id, change, relatives, onGround); } @Override diff --git a/net/minecraft/network/protocol/game/DebugPackets.java b/net/minecraft/network/protocol/game/DebugPackets.java index 4bbcee59..4aa4ec47 100644 --- a/net/minecraft/network/protocol/game/DebugPackets.java +++ b/net/minecraft/network/protocol/game/DebugPackets.java @@ -82,9 +82,9 @@ public class DebugPackets { public static void sendNeighborsUpdatePacket(Level level, BlockPos pos) { } - public static void sendWireUpdates(Level level, RedstoneWireOrientationsDebugPayload redstoneWireOrientationsDebugPayload) { + public static void sendWireUpdates(Level level, RedstoneWireOrientationsDebugPayload payload) { if (level instanceof ServerLevel serverLevel) { - sendPacketToAllPlayers(serverLevel, redstoneWireOrientationsDebugPayload); + sendPacketToAllPlayers(serverLevel, payload); } } diff --git a/net/minecraft/network/protocol/game/ServerGamePacketListener.java b/net/minecraft/network/protocol/game/ServerGamePacketListener.java index e7889e21..7e6cf84a 100644 --- a/net/minecraft/network/protocol/game/ServerGamePacketListener.java +++ b/net/minecraft/network/protocol/game/ServerGamePacketListener.java @@ -107,7 +107,7 @@ public interface ServerGamePacketListener extends ServerCommonPacketListener, Se void handleRecipeBookSeenRecipePacket(ServerboundRecipeBookSeenRecipePacket packet); - void handleBundleItemSelectedPacket(ServerboundSelectBundleItemPacket serverboundSelectBundleItemPacket); + void handleBundleItemSelectedPacket(ServerboundSelectBundleItemPacket packet); void handleRecipeBookChangeSettingsPacket(ServerboundRecipeBookChangeSettingsPacket packet); @@ -156,5 +156,5 @@ public interface ServerGamePacketListener extends ServerCommonPacketListener, Se void handleDebugSampleSubscription(ServerboundDebugSampleSubscriptionPacket packet); - void handleClientTickEnd(ServerboundClientTickEndPacket serverboundClientTickEndPacket); + void handleClientTickEnd(ServerboundClientTickEndPacket packet); } diff --git a/net/minecraft/network/protocol/game/ServerboundMovePlayerPacket.java b/net/minecraft/network/protocol/game/ServerboundMovePlayerPacket.java index 0dc0179e..f5469a1f 100644 --- a/net/minecraft/network/protocol/game/ServerboundMovePlayerPacket.java +++ b/net/minecraft/network/protocol/game/ServerboundMovePlayerPacket.java @@ -18,37 +18,39 @@ public abstract class ServerboundMovePlayerPacket implements Packet { T copy(T value); - static EntityDataSerializer forValueType(StreamCodec streamCodec) { - return () -> streamCodec; + static EntityDataSerializer forValueType(StreamCodec codec) { + return () -> codec; } public interface ForValueType extends EntityDataSerializer { diff --git a/net/minecraft/recipebook/PlaceRecipeHelper.java b/net/minecraft/recipebook/PlaceRecipeHelper.java index decbb150..3cb66a94 100644 --- a/net/minecraft/recipebook/PlaceRecipeHelper.java +++ b/net/minecraft/recipebook/PlaceRecipeHelper.java @@ -6,48 +6,48 @@ import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.item.crafting.ShapedRecipe; public interface PlaceRecipeHelper { - static void placeRecipe(int i, int j, Recipe recipe, Iterable iterable, PlaceRecipeHelper.Output output) { + static void placeRecipe(int width, int height, Recipe recipe, Iterable ingredients, PlaceRecipeHelper.Output output) { if (recipe instanceof ShapedRecipe shapedRecipe) { - placeRecipe(i, j, shapedRecipe.getWidth(), shapedRecipe.getHeight(), iterable, output); + placeRecipe(width, height, shapedRecipe.getWidth(), shapedRecipe.getHeight(), ingredients, output); } else { - placeRecipe(i, j, i, j, iterable, output); + placeRecipe(width, height, width, height, ingredients, output); } } - static void placeRecipe(int i, int j, int k, int l, Iterable iterable, PlaceRecipeHelper.Output output) { - Iterator iterator = iterable.iterator(); - int m = 0; + static void placeRecipe(int gridWidth, int gridHeight, int width, int height, Iterable ingredients, PlaceRecipeHelper.Output output) { + Iterator iterator = ingredients.iterator(); + int i = 0; - for (int n = 0; n < j; n++) { - boolean bl = l < j / 2.0F; - int o = Mth.floor(j / 2.0F - l / 2.0F); - if (bl && o > n) { - m += i; - n++; + for (int j = 0; j < gridHeight; j++) { + boolean bl = height < gridHeight / 2.0F; + int k = Mth.floor(gridHeight / 2.0F - height / 2.0F); + if (bl && k > j) { + i += gridWidth; + j++; } - for (int p = 0; p < i; p++) { + for (int l = 0; l < gridWidth; l++) { if (!iterator.hasNext()) { return; } - bl = k < i / 2.0F; - o = Mth.floor(i / 2.0F - k / 2.0F); - int q = k; - boolean bl2 = p < k; + bl = width < gridWidth / 2.0F; + k = Mth.floor(gridWidth / 2.0F - width / 2.0F); + int m = width; + boolean bl2 = l < width; if (bl) { - q = o + k; - bl2 = o <= p && p < o + k; + m = k + width; + bl2 = k <= l && l < k + width; } if (bl2) { - output.addItemToSlot((T)iterator.next(), m, p, n); - } else if (q == p) { - m += i - p; + output.addItemToSlot((T)iterator.next(), i, l, j); + } else if (m == l) { + i += gridWidth - l; break; } - m++; + i++; } } } diff --git a/net/minecraft/recipebook/ServerPlaceRecipe.java b/net/minecraft/recipebook/ServerPlaceRecipe.java index 9553a196..2e1ffa6e 100644 --- a/net/minecraft/recipebook/ServerPlaceRecipe.java +++ b/net/minecraft/recipebook/ServerPlaceRecipe.java @@ -27,42 +27,48 @@ public class ServerPlaceRecipe> { private final List slotsToClear; public static > RecipeBookMenu.PostPlaceAction placeRecipe( - ServerPlaceRecipe.CraftingMenuAccess craftingMenuAccess, - int i, - int j, - List list, - List list2, + ServerPlaceRecipe.CraftingMenuAccess menu, + int gridWidth, + int gridHeight, + List inputGridSlots, + List slotsToClear, Inventory inventory, - RecipeHolder recipeHolder, - boolean bl, - boolean bl2 + RecipeHolder recipe, + boolean useMaxItems, + boolean isCreative ) { - ServerPlaceRecipe serverPlaceRecipe = new ServerPlaceRecipe<>(craftingMenuAccess, inventory, bl, i, j, list, list2); - if (!bl2 && !serverPlaceRecipe.testClearGrid()) { + ServerPlaceRecipe serverPlaceRecipe = new ServerPlaceRecipe<>(menu, inventory, useMaxItems, gridWidth, gridHeight, inputGridSlots, slotsToClear); + if (!isCreative && !serverPlaceRecipe.testClearGrid()) { return RecipeBookMenu.PostPlaceAction.NOTHING; } else { StackedItemContents stackedItemContents = new StackedItemContents(); inventory.fillStackedContents(stackedItemContents); - craftingMenuAccess.fillCraftSlotsStackedContents(stackedItemContents); - return serverPlaceRecipe.tryPlaceRecipe(recipeHolder, stackedItemContents); + menu.fillCraftSlotsStackedContents(stackedItemContents); + return serverPlaceRecipe.tryPlaceRecipe(recipe, stackedItemContents); } } private ServerPlaceRecipe( - ServerPlaceRecipe.CraftingMenuAccess craftingMenuAccess, Inventory inventory, boolean bl, int i, int j, List list, List list2 + ServerPlaceRecipe.CraftingMenuAccess menu, + Inventory inventory, + boolean useMaxItems, + int gridWidth, + int gridHeight, + List inputGridSlots, + List slotsToClear ) { - this.menu = craftingMenuAccess; + this.menu = menu; this.inventory = inventory; - this.useMaxItems = bl; - this.gridWidth = i; - this.gridHeight = j; - this.inputGridSlots = list; - this.slotsToClear = list2; + this.useMaxItems = useMaxItems; + this.gridWidth = gridWidth; + this.gridHeight = gridHeight; + this.inputGridSlots = inputGridSlots; + this.slotsToClear = slotsToClear; } - private RecipeBookMenu.PostPlaceAction tryPlaceRecipe(RecipeHolder recipeHolder, StackedItemContents stackedItemContents) { - if (stackedItemContents.canCraft(recipeHolder.value(), null)) { - this.placeRecipe(recipeHolder, stackedItemContents); + private RecipeBookMenu.PostPlaceAction tryPlaceRecipe(RecipeHolder recipe, StackedItemContents stackedItemContents) { + if (stackedItemContents.canCraft(recipe.value(), null)) { + this.placeRecipe(recipe, stackedItemContents); this.inventory.setChanged(); return RecipeBookMenu.PostPlaceAction.NOTHING; } else { @@ -82,9 +88,9 @@ public class ServerPlaceRecipe> { this.menu.clearCraftingContent(); } - private void placeRecipe(RecipeHolder recipeHolder, StackedItemContents stackedItemContents) { - boolean bl = this.menu.recipeMatches(recipeHolder); - int i = stackedItemContents.getBiggestCraftableStack(recipeHolder.value(), null); + private void placeRecipe(RecipeHolder recipe, StackedItemContents stackedItemContents) { + boolean bl = this.menu.recipeMatches(recipe); + int i = stackedItemContents.getBiggestCraftableStack(recipe.value(), null); if (bl) { for (Slot slot : this.inputGridSlots) { ItemStack itemStack = slot.getItem(); @@ -96,82 +102,80 @@ public class ServerPlaceRecipe> { int j = this.calculateAmountToCraft(i, bl); List> list = new ArrayList(); - if (stackedItemContents.canCraft(recipeHolder.value(), j, list::add)) { + if (stackedItemContents.canCraft(recipe.value(), j, list::add)) { OptionalInt optionalInt = list.stream().mapToInt(holder -> ((Item)holder.value()).getDefaultMaxStackSize()).min(); if (optionalInt.isPresent()) { j = Math.min(j, optionalInt.getAsInt()); } list.clear(); - if (stackedItemContents.canCraft(recipeHolder.value(), j, list::add)) { + if (stackedItemContents.canCraft(recipe.value(), j, list::add)) { this.clearGrid(); int k = j; - PlaceRecipeHelper.placeRecipe( - this.gridWidth, this.gridHeight, recipeHolder.value(), recipeHolder.value().placementInfo().slotInfo(), (optional, jx, kx, l) -> { - if (!optional.isEmpty()) { - Slot slotx = (Slot)this.inputGridSlots.get(jx); - int m = ((PlacementInfo.SlotInfo)optional.get()).placerOutputPosition(); - int n = k; + PlaceRecipeHelper.placeRecipe(this.gridWidth, this.gridHeight, recipe.value(), recipe.value().placementInfo().slotInfo(), (optional, jx, kx, l) -> { + if (!optional.isEmpty()) { + Slot slotx = (Slot)this.inputGridSlots.get(jx); + int m = ((PlacementInfo.SlotInfo)optional.get()).placerOutputPosition(); + int n = k; - while (n > 0) { - Holder holder = (Holder)list.get(m); - n = this.moveItemToGrid(slotx, holder, n); - if (n == -1) { - return; - } + while (n > 0) { + Holder holder = (Holder)list.get(m); + n = this.moveItemToGrid(slotx, holder, n); + if (n == -1) { + return; } } } - ); + }); } } } - private int calculateAmountToCraft(int i, boolean bl) { + private int calculateAmountToCraft(int max, boolean recipeMatches) { if (this.useMaxItems) { - return i; - } else if (bl) { - int j = Integer.MAX_VALUE; + return max; + } else if (recipeMatches) { + int i = Integer.MAX_VALUE; for (Slot slot : this.inputGridSlots) { ItemStack itemStack = slot.getItem(); - if (!itemStack.isEmpty() && j > itemStack.getCount()) { - j = itemStack.getCount(); + if (!itemStack.isEmpty() && i > itemStack.getCount()) { + i = itemStack.getCount(); } } - if (j != Integer.MAX_VALUE) { - j++; + if (i != Integer.MAX_VALUE) { + i++; } - return j; + return i; } else { return 1; } } - private int moveItemToGrid(Slot slot, Holder holder, int i) { - int j = this.inventory.findSlotMatchingCraftingIngredient(holder); - if (j == -1) { + private int moveItemToGrid(Slot slot, Holder item, int count) { + int i = this.inventory.findSlotMatchingCraftingIngredient(item); + if (i == -1) { return -1; } else { - ItemStack itemStack = this.inventory.getItem(j); - int k; - if (i < itemStack.getCount()) { - this.inventory.removeItem(j, i); - k = i; + ItemStack itemStack = this.inventory.getItem(i); + int j; + if (count < itemStack.getCount()) { + this.inventory.removeItem(i, count); + j = count; } else { - this.inventory.removeItemNoUpdate(j); - k = itemStack.getCount(); + this.inventory.removeItemNoUpdate(i); + j = itemStack.getCount(); } if (slot.getItem().isEmpty()) { - slot.set(itemStack.copyWithCount(k)); + slot.set(itemStack.copyWithCount(j)); } else { - slot.getItem().grow(k); + slot.getItem().grow(j); } - return i - k; + return count - j; } } @@ -230,6 +234,6 @@ public class ServerPlaceRecipe> { void clearCraftingContent(); - boolean recipeMatches(RecipeHolder recipeHolder); + boolean recipeMatches(RecipeHolder recipe); } } diff --git a/net/minecraft/resources/RegistryDataLoader.java b/net/minecraft/resources/RegistryDataLoader.java index 72e5502f..6b9c096b 100644 --- a/net/minecraft/resources/RegistryDataLoader.java +++ b/net/minecraft/resources/RegistryDataLoader.java @@ -133,30 +133,32 @@ public class RegistryDataLoader { ); public static RegistryAccess.Frozen load( - ResourceManager resourceManager, List> list, List> list2 + ResourceManager resourceManager, List> registryLookups, List> registryData ) { - return load((loader, registryInfoLookup) -> loader.loadFromResources(resourceManager, registryInfoLookup), list, list2); + return load((loader, registryInfoLookup) -> loader.loadFromResources(resourceManager, registryInfoLookup), registryLookups, registryData); } public static RegistryAccess.Frozen load( - Map>, RegistryDataLoader.NetworkedRegistryData> map, + Map>, RegistryDataLoader.NetworkedRegistryData> elements, ResourceProvider resourceProvider, - List> list, - List> list2 + List> registryLookups, + List> registryData ) { - return load((loader, registryInfoLookup) -> loader.loadFromNetwork(map, resourceProvider, registryInfoLookup), list, list2); + return load((loader, registryInfoLookup) -> loader.loadFromNetwork(elements, resourceProvider, registryInfoLookup), registryLookups, registryData); } private static RegistryAccess.Frozen load( - RegistryDataLoader.LoadingFunction loadingFunction, List> list, List> list2 + RegistryDataLoader.LoadingFunction loadingFunction, + List> registryLookups, + List> registryData ) { Map, Exception> map = new HashMap(); - List> list3 = (List>)list2.stream() - .map(registryData -> registryData.create(Lifecycle.stable(), map)) + List> list = (List>)registryData.stream() + .map(registryDatax -> registryDatax.create(Lifecycle.stable(), map)) .collect(Collectors.toUnmodifiableList()); - RegistryInfoLookup registryInfoLookup = createContext(list, list3); - list3.forEach(loader -> loadingFunction.apply(loader, registryInfoLookup)); - list3.forEach(loader -> { + RegistryInfoLookup registryInfoLookup = createContext(registryLookups, list); + list.forEach(loader -> loadingFunction.apply(loader, registryInfoLookup)); + list.forEach(loader -> { Registry registry = loader.registry(); try { @@ -172,14 +174,14 @@ public class RegistryDataLoader { if (!map.isEmpty()) { throw logErrors(map); } else { - return new RegistryAccess.ImmutableRegistryAccess(list3.stream().map(RegistryDataLoader.Loader::registry).toList()).freeze(); + return new RegistryAccess.ImmutableRegistryAccess(list.stream().map(RegistryDataLoader.Loader::registry).toList()).freeze(); } } - private static RegistryInfoLookup createContext(List> list, List> list2) { + private static RegistryInfoLookup createContext(List> registryLookups, List> loaders) { final Map>, RegistryInfo> map = new HashMap(); - list.forEach(registryLookup -> map.put(registryLookup.key(), createInfoForContextRegistry(registryLookup))); - list2.forEach(loader -> map.put(loader.registry.key(), createInfoForNewRegistry(loader.registry))); + registryLookups.forEach(registryLookup -> map.put(registryLookup.key(), createInfoForContextRegistry(registryLookup))); + loaders.forEach(loader -> map.put(loader.registry.key(), createInfoForNewRegistry(loader.registry))); return new RegistryInfoLookup() { @Override public Optional> lookup(ResourceKey> registryKey) { @@ -196,22 +198,22 @@ public class RegistryDataLoader { return new RegistryInfo<>(registryLookup, registryLookup, registryLookup.registryLifecycle()); } - private static ReportedException logErrors(Map, Exception> map) { - printFullDetailsToLog(map); - return createReportWithBriefInfo(map); + private static ReportedException logErrors(Map, Exception> errors) { + printFullDetailsToLog(errors); + return createReportWithBriefInfo(errors); } - private static void printFullDetailsToLog(Map, Exception> map) { + private static void printFullDetailsToLog(Map, Exception> errors) { StringWriter stringWriter = new StringWriter(); PrintWriter printWriter = new PrintWriter(stringWriter); - Map> map2 = (Map>)map.entrySet() + Map> map = (Map>)errors.entrySet() .stream() .collect( Collectors.groupingBy( entry -> ((ResourceKey)entry.getKey()).registry(), Collectors.toMap(entry -> ((ResourceKey)entry.getKey()).location(), Entry::getValue) ) ); - map2.entrySet().stream().sorted(Entry.comparingByKey()).forEach(entry -> { + map.entrySet().stream().sorted(Entry.comparingByKey()).forEach(entry -> { printWriter.printf("> Errors in registry %s:%n", entry.getKey()); ((Map)entry.getValue()).entrySet().stream().sorted(Entry.comparingByKey()).forEach(entryx -> { printWriter.printf(">> Errors in element %s:%n", entryx.getKey()); @@ -222,14 +224,14 @@ public class RegistryDataLoader { LOGGER.error("Registry loading errors:\n{}", stringWriter); } - private static ReportedException createReportWithBriefInfo(Map, Exception> map) { + private static ReportedException createReportWithBriefInfo(Map, Exception> errors) { CrashReport crashReport = CrashReport.forThrowable(new IllegalStateException("Failed to load registries due to errors"), "Registry Loading"); CrashReportCategory crashReportCategory = crashReport.addCategory("Loading info"); crashReportCategory.setDetail( "Errors", (CrashReportDetail)(() -> { StringBuilder stringBuilder = new StringBuilder(); - map.entrySet() + errors.entrySet() .stream() .sorted(Entry.comparingByKey(ERROR_KEY_COMPARATOR)) .forEach( diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java index 24be9243..4e278236 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java @@ -64,6 +64,7 @@ import net.minecraft.Util; import net.minecraft.commands.CommandSource; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; +import net.minecraft.commands.Commands.CommandSelection; import net.minecraft.core.BlockPos; import net.minecraft.core.HolderGetter; import net.minecraft.core.LayeredRegistryAccess; @@ -73,8 +74,8 @@ import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.features.MiscOverworldFeatures; import net.minecraft.gametest.framework.GameTestTicker; import net.minecraft.network.chat.ChatDecorator; -import net.minecraft.network.chat.ChatType; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.ChatType.Bound; import net.minecraft.network.protocol.PacketType; import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket; import net.minecraft.network.protocol.game.ClientboundSetTimePacket; @@ -1577,7 +1578,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop reload( - LayeredRegistryAccess layeredRegistryAccess, List> list, ResourceManager resourceManager, Executor executor + LayeredRegistryAccess registryAccess, + List> postponedTags, + ResourceManager resourceManager, + Executor backgroundExecutor ) { - List> list2 = TagLoader.buildUpdatedLookups(layeredRegistryAccess.getAccessForLoading(RegistryLayer.RELOADABLE), list); - HolderLookup.Provider provider = HolderLookup.Provider.create(list2.stream()); + List> list = TagLoader.buildUpdatedLookups(registryAccess.getAccessForLoading(RegistryLayer.RELOADABLE), postponedTags); + HolderLookup.Provider provider = HolderLookup.Provider.create(list.stream()); RegistryOps registryOps = provider.createSerializationContext(JsonOps.INSTANCE); - List>> list3 = LootDataType.values() - .map(lootDataType -> scheduleRegistryLoad(lootDataType, registryOps, resourceManager, executor)) + List>> list2 = LootDataType.values() + .map(lootDataType -> scheduleRegistryLoad(lootDataType, registryOps, resourceManager, backgroundExecutor)) .toList(); - CompletableFuture>> completableFuture = Util.sequence(list3); - return completableFuture.thenApplyAsync(listx -> createAndValidateFullContext(layeredRegistryAccess, provider, listx), executor); + CompletableFuture>> completableFuture = Util.sequence(list2); + return completableFuture.thenApplyAsync(listx -> createAndValidateFullContext(registryAccess, provider, listx), backgroundExecutor); } private static CompletableFuture> scheduleRegistryLoad( - LootDataType lootDataType, RegistryOps registryOps, ResourceManager resourceManager, Executor executor + LootDataType lootDataType, RegistryOps ops, ResourceManager resourceManager, Executor backgroundExecutor ) { return CompletableFuture.supplyAsync( () -> { WritableRegistry writableRegistry = new MappedRegistry<>(lootDataType.registryKey(), Lifecycle.experimental()); Map map = new HashMap(); String string = Registries.elementsDirPath(lootDataType.registryKey()); - SimpleJsonResourceReloadListener.scanDirectory(resourceManager, string, registryOps, lootDataType.codec(), map); + SimpleJsonResourceReloadListener.scanDirectory(resourceManager, string, ops, lootDataType.codec(), map); map.forEach( (resourceLocation, object) -> writableRegistry.register( ResourceKey.create(lootDataType.registryKey(), resourceLocation), (T)object, DEFAULT_REGISTRATION_INFO @@ -69,27 +72,27 @@ public class ReloadableServerRegistries { TagLoader.loadTagsForRegistry(resourceManager, writableRegistry); return writableRegistry; }, - executor + backgroundExecutor ); } private static ReloadableServerRegistries.LoadResult createAndValidateFullContext( - LayeredRegistryAccess layeredRegistryAccess, HolderLookup.Provider provider, List> list + LayeredRegistryAccess registryAccess, HolderLookup.Provider provider, List> registries ) { - LayeredRegistryAccess layeredRegistryAccess2 = createUpdatedRegistries(layeredRegistryAccess, list); - HolderLookup.Provider provider2 = concatenateLookups(provider, layeredRegistryAccess2.getLayer(RegistryLayer.RELOADABLE)); + LayeredRegistryAccess layeredRegistryAccess = createUpdatedRegistries(registryAccess, registries); + HolderLookup.Provider provider2 = concatenateLookups(provider, layeredRegistryAccess.getLayer(RegistryLayer.RELOADABLE)); validateLootRegistries(provider2); - return new ReloadableServerRegistries.LoadResult(layeredRegistryAccess2, provider2); + return new ReloadableServerRegistries.LoadResult(layeredRegistryAccess, provider2); } - private static HolderLookup.Provider concatenateLookups(HolderLookup.Provider provider, HolderLookup.Provider provider2) { - return HolderLookup.Provider.create(Stream.concat(provider.listRegistries(), provider2.listRegistries())); + private static HolderLookup.Provider concatenateLookups(HolderLookup.Provider lookup1, HolderLookup.Provider lookup2) { + return HolderLookup.Provider.create(Stream.concat(lookup1.listRegistries(), lookup2.listRegistries())); } - private static void validateLootRegistries(HolderLookup.Provider provider) { + private static void validateLootRegistries(HolderLookup.Provider registries) { Collector collector = new Collector(); - ValidationContext validationContext = new ValidationContext(collector, LootContextParamSets.ALL_PARAMS, provider); - LootDataType.values().forEach(lootDataType -> validateRegistry(validationContext, lootDataType, provider)); + ValidationContext validationContext = new ValidationContext(collector, LootContextParamSets.ALL_PARAMS, registries); + LootDataType.values().forEach(lootDataType -> validateRegistry(validationContext, lootDataType, registries)); collector.get().forEach((string, string2) -> LOGGER.warn("Found loot table element validation problem in {}: {}", string, string2)); } @@ -99,16 +102,16 @@ public class ReloadableServerRegistries { return registryAccess.replaceFrom(RegistryLayer.RELOADABLE, new RegistryAccess.ImmutableRegistryAccess(registries).freeze()); } - private static void validateRegistry(ValidationContext validationContext, LootDataType lootDataType, HolderLookup.Provider provider) { - HolderLookup holderLookup = provider.lookupOrThrow(lootDataType.registryKey()); - holderLookup.listElements().forEach(reference -> lootDataType.runValidation(validationContext, reference.key(), (T)reference.value())); + private static void validateRegistry(ValidationContext context, LootDataType lootDataType, HolderLookup.Provider registries) { + HolderLookup holderLookup = registries.lookupOrThrow(lootDataType.registryKey()); + holderLookup.listElements().forEach(reference -> lootDataType.runValidation(context, reference.key(), (T)reference.value())); } public static class Holder { private final HolderLookup.Provider registries; - public Holder(HolderLookup.Provider provider) { - this.registries = provider; + public Holder(HolderLookup.Provider registries) { + this.registries = registries; } public HolderGetter.Provider lookup() { diff --git a/net/minecraft/server/ReloadableServerResources.java b/net/minecraft/server/ReloadableServerResources.java index ca552015..4bc2e934 100644 --- a/net/minecraft/server/ReloadableServerResources.java +++ b/net/minecraft/server/ReloadableServerResources.java @@ -6,6 +6,7 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; import net.minecraft.commands.CommandBuildContext; import net.minecraft.commands.Commands; +import net.minecraft.commands.Commands.CommandSelection; import net.minecraft.core.HolderLookup; import net.minecraft.core.LayeredRegistryAccess; import net.minecraft.core.Registry; @@ -28,19 +29,19 @@ public class ReloadableServerResources { private final List> postponedTags; private ReloadableServerResources( - LayeredRegistryAccess layeredRegistryAccess, - HolderLookup.Provider provider, - FeatureFlagSet featureFlagSet, - Commands.CommandSelection commandSelection, - List> list, - int i + LayeredRegistryAccess registryAccess, + HolderLookup.Provider registries, + FeatureFlagSet enabledFeatures, + CommandSelection commandSelection, + List> postponedTags, + int functionCompilationLevel ) { - this.fullRegistryHolder = new ReloadableServerRegistries.Holder(layeredRegistryAccess.compositeAccess()); - this.postponedTags = list; - this.recipes = new RecipeManager(provider); - this.commands = new Commands(commandSelection, CommandBuildContext.simple(provider, featureFlagSet)); - this.advancements = new ServerAdvancementManager(provider); - this.functionLibrary = new ServerFunctionLibrary(i, this.commands.getDispatcher()); + this.fullRegistryHolder = new ReloadableServerRegistries.Holder(registryAccess.compositeAccess()); + this.postponedTags = postponedTags; + this.recipes = new RecipeManager(registries); + this.commands = new Commands(commandSelection, CommandBuildContext.simple(registries, enabledFeatures)); + this.advancements = new ServerAdvancementManager(registries); + this.functionLibrary = new ServerFunctionLibrary(functionCompilationLevel, this.commands.getDispatcher()); } public ServerFunctionLibrary getFunctionLibrary() { @@ -69,22 +70,22 @@ public class ReloadableServerResources { public static CompletableFuture loadResources( ResourceManager resourceManager, - LayeredRegistryAccess layeredRegistryAccess, - List> list, - FeatureFlagSet featureFlagSet, - Commands.CommandSelection commandSelection, - int i, - Executor executor, - Executor executor2 + LayeredRegistryAccess registryAccess, + List> postponedTags, + FeatureFlagSet enabledFeatures, + CommandSelection commandSelection, + int functionCompilationLevel, + Executor backgroundExecutor, + Executor gameExecutor ) { - return ReloadableServerRegistries.reload(layeredRegistryAccess, list, resourceManager, executor) + return ReloadableServerRegistries.reload(registryAccess, postponedTags, resourceManager, backgroundExecutor) .thenCompose( loadResult -> { ReloadableServerResources reloadableServerResources = new ReloadableServerResources( - loadResult.layers(), loadResult.lookupWithUpdatedTags(), featureFlagSet, commandSelection, list, i + loadResult.layers(), loadResult.lookupWithUpdatedTags(), enabledFeatures, commandSelection, postponedTags, functionCompilationLevel ); return SimpleReloadInstance.create( - resourceManager, reloadableServerResources.listeners(), executor, executor2, DATA_RELOAD_INITIAL_TASK, LOGGER.isDebugEnabled() + resourceManager, reloadableServerResources.listeners(), backgroundExecutor, gameExecutor, DATA_RELOAD_INITIAL_TASK, LOGGER.isDebugEnabled() ) .done() .thenApply(object -> reloadableServerResources); diff --git a/net/minecraft/server/ServerFunctionLibrary.java b/net/minecraft/server/ServerFunctionLibrary.java index 5b4d6f09..d0047590 100644 --- a/net/minecraft/server/ServerFunctionLibrary.java +++ b/net/minecraft/server/ServerFunctionLibrary.java @@ -54,8 +54,8 @@ public class ServerFunctionLibrary implements PreparableReloadListener { return this.functions; } - public List> getTag(ResourceLocation resourceLocation) { - return (List>)this.tags.getOrDefault(resourceLocation, List.of()); + public List> getTag(ResourceLocation location) { + return (List>)this.tags.getOrDefault(location, List.of()); } public Iterable getAvailableTags() { @@ -69,13 +69,13 @@ public class ServerFunctionLibrary implements PreparableReloadListener { @Override public CompletableFuture reload( - PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor executor, Executor executor2 + PreparableReloadListener.PreparationBarrier barrier, ResourceManager manager, Executor backgroundExecutor, Executor gameExecutor ) { CompletableFuture>> completableFuture = CompletableFuture.supplyAsync( - () -> this.tagsLoader.load(resourceManager), executor + () -> this.tagsLoader.load(manager), backgroundExecutor ); CompletableFuture>>> completableFuture2 = CompletableFuture.supplyAsync( - () -> LISTER.listMatchingResources(resourceManager), executor + () -> LISTER.listMatchingResources(manager), backgroundExecutor ) .thenCompose( map -> { @@ -90,7 +90,7 @@ public class ServerFunctionLibrary implements PreparableReloadListener { map2.put(resourceLocation2, CompletableFuture.supplyAsync(() -> { List list = readLines((Resource)entry.getValue()); return CommandFunction.fromLines(resourceLocation2, this.dispatcher, commandSourceStack, list); - }, executor)); + }, backgroundExecutor)); } CompletableFuture[] completableFutures = (CompletableFuture[])map2.values().toArray(new CompletableFuture[0]); @@ -98,7 +98,7 @@ public class ServerFunctionLibrary implements PreparableReloadListener { } ); return completableFuture.thenCombine(completableFuture2, Pair::of) - .thenCompose(preparationBarrier::wait) + .thenCompose(barrier::wait) .thenAcceptAsync( pair -> { Map>> map = (Map>>)pair.getSecond(); @@ -115,7 +115,7 @@ public class ServerFunctionLibrary implements PreparableReloadListener { this.functions = builder.build(); this.tags = this.tagsLoader.build((Map>)pair.getFirst()); }, - executor2 + gameExecutor ); } diff --git a/net/minecraft/server/ServerFunctionManager.java b/net/minecraft/server/ServerFunctionManager.java index 7c369a48..75fdd9fd 100644 --- a/net/minecraft/server/ServerFunctionManager.java +++ b/net/minecraft/server/ServerFunctionManager.java @@ -91,12 +91,12 @@ public class ServerFunctionManager { return this.server.createCommandSourceStack().withPermission(2).withSuppressedOutput(); } - public Optional> get(ResourceLocation functionIdentifier) { - return this.library.getFunction(functionIdentifier); + public Optional> get(ResourceLocation function) { + return this.library.getFunction(function); } - public List> getTag(ResourceLocation resourceLocation) { - return this.library.getTag(resourceLocation); + public List> getTag(ResourceLocation tag) { + return this.library.getTag(tag); } public Iterable getFunctionNames() { diff --git a/net/minecraft/server/SuppressedExceptionCollector.java b/net/minecraft/server/SuppressedExceptionCollector.java index 4b615cf7..b955a431 100644 --- a/net/minecraft/server/SuppressedExceptionCollector.java +++ b/net/minecraft/server/SuppressedExceptionCollector.java @@ -15,16 +15,16 @@ public class SuppressedExceptionCollector { return System.currentTimeMillis(); } - public synchronized void addEntry(String string, Throwable throwable) { + public synchronized void addEntry(String id, Throwable throwable) { long l = currentTimeMs(); - String string2 = throwable.getMessage(); - this.latestEntries.add(new SuppressedExceptionCollector.LongEntry(l, string, throwable.getClass(), string2)); + String string = throwable.getMessage(); + this.latestEntries.add(new SuppressedExceptionCollector.LongEntry(l, id, throwable.getClass(), string)); while (this.latestEntries.size() > 8) { this.latestEntries.remove(); } - SuppressedExceptionCollector.ShortEntry shortEntry = new SuppressedExceptionCollector.ShortEntry(string, throwable.getClass()); + SuppressedExceptionCollector.ShortEntry shortEntry = new SuppressedExceptionCollector.ShortEntry(id, throwable.getClass()); int i = this.entryCounts.getInt(shortEntry); this.entryCounts.putAndMoveToFirst(shortEntry, i + 1); } diff --git a/net/minecraft/server/commands/GameRuleCommand.java b/net/minecraft/server/commands/GameRuleCommand.java index 6e711632..d511728d 100644 --- a/net/minecraft/server/commands/GameRuleCommand.java +++ b/net/minecraft/server/commands/GameRuleCommand.java @@ -10,7 +10,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.world.level.GameRules; public class GameRuleCommand { - public static void register(CommandDispatcher commandDispatcher, CommandBuildContext commandBuildContext) { + public static void register(CommandDispatcher dispatcher, CommandBuildContext commandBuildContext) { final LiteralArgumentBuilder literalArgumentBuilder = Commands.literal("gamerule") .requires(commandSourceStack -> commandSourceStack.hasPermission(2)); new GameRules(commandBuildContext.enabledFeatures()) @@ -26,7 +26,7 @@ public class GameRuleCommand { } } ); - commandDispatcher.register(literalArgumentBuilder); + dispatcher.register(literalArgumentBuilder); } static > int setRule(CommandContext source, GameRules.Key gameRule) { diff --git a/net/minecraft/server/commands/LookAt.java b/net/minecraft/server/commands/LookAt.java index 66054c7b..00aa2bff 100644 --- a/net/minecraft/server/commands/LookAt.java +++ b/net/minecraft/server/commands/LookAt.java @@ -8,7 +8,7 @@ import net.minecraft.world.phys.Vec3; @FunctionalInterface public interface LookAt { - void perform(CommandSourceStack commandSourceStack, Entity entity); + void perform(CommandSourceStack source, Entity entity); public record LookAtEntity(Entity entity, Anchor anchor) implements LookAt { @Override diff --git a/net/minecraft/server/commands/RotateCommand.java b/net/minecraft/server/commands/RotateCommand.java index a0a71e63..5c026e46 100644 --- a/net/minecraft/server/commands/RotateCommand.java +++ b/net/minecraft/server/commands/RotateCommand.java @@ -14,8 +14,8 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.phys.Vec2; public class RotateCommand { - public static void register(CommandDispatcher commandDispatcher) { - commandDispatcher.register( + public static void register(CommandDispatcher dispatcher) { + dispatcher.register( Commands.literal("rotate") .requires(commandSourceStack -> commandSourceStack.hasPermission(2)) .then( @@ -70,16 +70,16 @@ public class RotateCommand { ); } - private static int rotate(CommandSourceStack commandSourceStack, Entity entity, Coordinates coordinates) { - Vec2 vec2 = coordinates.getRotation(commandSourceStack); + private static int rotate(CommandSourceStack source, Entity entity, Coordinates coordinates) { + Vec2 vec2 = coordinates.getRotation(source); entity.forceSetRotation(vec2.y, vec2.x); - commandSourceStack.sendSuccess(() -> Component.translatable("commands.rotate.success", entity.getDisplayName()), true); + source.sendSuccess(() -> Component.translatable("commands.rotate.success", entity.getDisplayName()), true); return 1; } - private static int rotate(CommandSourceStack commandSourceStack, Entity entity, LookAt lookAt) { - lookAt.perform(commandSourceStack, entity); - commandSourceStack.sendSuccess(() -> Component.translatable("commands.rotate.success", entity.getDisplayName()), true); + private static int rotate(CommandSourceStack source, Entity entity, LookAt lookAt) { + lookAt.perform(source, entity); + source.sendSuccess(() -> Component.translatable("commands.rotate.success", entity.getDisplayName()), true); return 1; } } diff --git a/net/minecraft/server/commands/TeleportCommand.java b/net/minecraft/server/commands/TeleportCommand.java index fd3075e2..c43ee466 100644 --- a/net/minecraft/server/commands/TeleportCommand.java +++ b/net/minecraft/server/commands/TeleportCommand.java @@ -177,30 +177,30 @@ public class TeleportCommand { } private static int teleportToPos( - CommandSourceStack commandSourceStack, - Collection collection, - ServerLevel serverLevel, - Coordinates coordinates, - @Nullable Coordinates coordinates2, + CommandSourceStack source, + Collection targets, + ServerLevel level, + Coordinates position, + @Nullable Coordinates rotation, @Nullable LookAt lookAt ) throws CommandSyntaxException { - Vec3 vec3 = coordinates.getPosition(commandSourceStack); - Vec2 vec2 = coordinates2 == null ? null : coordinates2.getRotation(commandSourceStack); + Vec3 vec3 = position.getPosition(source); + Vec2 vec2 = rotation == null ? null : rotation.getRotation(source); - for (Entity entity : collection) { - Set set = getRelatives(coordinates, coordinates2, entity.level().dimension() == serverLevel.dimension()); + for (Entity entity : targets) { + Set set = getRelatives(position, rotation, entity.level().dimension() == level.dimension()); if (vec2 == null) { - performTeleport(commandSourceStack, entity, serverLevel, vec3.x, vec3.y, vec3.z, set, entity.getYRot(), entity.getXRot(), lookAt); + performTeleport(source, entity, level, vec3.x, vec3.y, vec3.z, set, entity.getYRot(), entity.getXRot(), lookAt); } else { - performTeleport(commandSourceStack, entity, serverLevel, vec3.x, vec3.y, vec3.z, set, vec2.y, vec2.x, lookAt); + performTeleport(source, entity, level, vec3.x, vec3.y, vec3.z, set, vec2.y, vec2.x, lookAt); } } - if (collection.size() == 1) { - commandSourceStack.sendSuccess( + if (targets.size() == 1) { + source.sendSuccess( () -> Component.translatable( "commands.teleport.success.location.single", - ((Entity)collection.iterator().next()).getDisplayName(), + ((Entity)targets.iterator().next()).getDisplayName(), formatDouble(vec3.x), formatDouble(vec3.y), formatDouble(vec3.z) @@ -208,45 +208,45 @@ public class TeleportCommand { true ); } else { - commandSourceStack.sendSuccess( + source.sendSuccess( () -> Component.translatable( - "commands.teleport.success.location.multiple", collection.size(), formatDouble(vec3.x), formatDouble(vec3.y), formatDouble(vec3.z) + "commands.teleport.success.location.multiple", targets.size(), formatDouble(vec3.x), formatDouble(vec3.y), formatDouble(vec3.z) ), true ); } - return collection.size(); + return targets.size(); } - private static Set getRelatives(Coordinates coordinates, @Nullable Coordinates coordinates2, boolean bl) { + private static Set getRelatives(Coordinates position, @Nullable Coordinates rotation, boolean absolute) { Set set = EnumSet.noneOf(Relative.class); - if (coordinates.isXRelative()) { + if (position.isXRelative()) { set.add(Relative.DELTA_X); - if (bl) { + if (absolute) { set.add(Relative.X); } } - if (coordinates.isYRelative()) { + if (position.isYRelative()) { set.add(Relative.DELTA_Y); - if (bl) { + if (absolute) { set.add(Relative.Y); } } - if (coordinates.isZRelative()) { + if (position.isZRelative()) { set.add(Relative.DELTA_Z); - if (bl) { + if (absolute) { set.add(Relative.Z); } } - if (coordinates2 == null || coordinates2.isXRelative()) { + if (rotation == null || rotation.isXRelative()) { set.add(Relative.X_ROT); } - if (coordinates2 == null || coordinates2.isYRelative()) { + if (rotation == null || rotation.isYRelative()) { set.add(Relative.Y_ROT); } @@ -258,39 +258,39 @@ public class TeleportCommand { } private static void performTeleport( - CommandSourceStack commandSourceStack, - Entity entity, - ServerLevel serverLevel, - double d, - double e, - double f, - Set set, - float g, - float h, + CommandSourceStack source, + Entity target, + ServerLevel level, + double x, + double y, + double z, + Set relatives, + float yRot, + float xRot, @Nullable LookAt lookAt ) throws CommandSyntaxException { - BlockPos blockPos = BlockPos.containing(d, e, f); + BlockPos blockPos = BlockPos.containing(x, y, z); if (!Level.isInSpawnableBounds(blockPos)) { throw INVALID_POSITION.create(); } else { - double i = set.contains(Relative.X) ? d - entity.getX() : d; - double j = set.contains(Relative.Y) ? e - entity.getY() : e; - double k = set.contains(Relative.Z) ? f - entity.getZ() : f; - float l = set.contains(Relative.Y_ROT) ? g - entity.getYRot() : g; - float m = set.contains(Relative.X_ROT) ? h - entity.getXRot() : h; - float n = Mth.wrapDegrees(l); - float o = Mth.wrapDegrees(m); - if (entity.teleportTo(serverLevel, i, j, k, set, n, o, true)) { + double d = relatives.contains(Relative.X) ? x - target.getX() : x; + double e = relatives.contains(Relative.Y) ? y - target.getY() : y; + double f = relatives.contains(Relative.Z) ? z - target.getZ() : z; + float g = relatives.contains(Relative.Y_ROT) ? yRot - target.getYRot() : yRot; + float h = relatives.contains(Relative.X_ROT) ? xRot - target.getXRot() : xRot; + float i = Mth.wrapDegrees(g); + float j = Mth.wrapDegrees(h); + if (target.teleportTo(level, d, e, f, relatives, i, j, true)) { if (lookAt != null) { - lookAt.perform(commandSourceStack, entity); + lookAt.perform(source, target); } - if (!(entity instanceof LivingEntity livingEntity && livingEntity.isFallFlying())) { - entity.setDeltaMovement(entity.getDeltaMovement().multiply(1.0, 0.0, 1.0)); - entity.setOnGround(true); + if (!(target instanceof LivingEntity livingEntity && livingEntity.isFallFlying())) { + target.setDeltaMovement(target.getDeltaMovement().multiply(1.0, 0.0, 1.0)); + target.setOnGround(true); } - if (entity instanceof PathfinderMob pathfinderMob) { + if (target instanceof PathfinderMob pathfinderMob) { pathfinderMob.getNavigation().stop(); } } diff --git a/net/minecraft/server/dedicated/DedicatedServerProperties.java b/net/minecraft/server/dedicated/DedicatedServerProperties.java index 7f16b036..87e28df6 100644 --- a/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java @@ -20,6 +20,7 @@ import java.util.regex.Pattern; import net.minecraft.core.Holder; import net.minecraft.core.HolderLookup; import net.minecraft.core.RegistryAccess; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.Registries; import net.minecraft.network.chat.Component; import net.minecraft.resources.RegistryOps; @@ -196,8 +197,8 @@ public class DedicatedServerProperties extends Settings holderLookup = provider.lookupOrThrow(Registries.WORLD_PRESET); - Holder.Reference reference = (Holder.Reference)holderLookup.get(WorldPresets.NORMAL) + public WorldDimensions create(HolderLookup.Provider registries) { + HolderLookup holderLookup = registries.lookupOrThrow(Registries.WORLD_PRESET); + Reference reference = (Reference)holderLookup.get(WorldPresets.NORMAL) .or(() -> holderLookup.listElements().findAny()) .orElseThrow(() -> new IllegalStateException("Invalid datapack contents: can't find default preset")); Holder holder = (Holder)Optional.ofNullable(ResourceLocation.tryParse(this.levelType)) @@ -220,12 +221,12 @@ public class DedicatedServerProperties extends Settings registryOps = provider.createSerializationContext(JsonOps.INSTANCE); + RegistryOps registryOps = registries.createSerializationContext(JsonOps.INSTANCE); Optional optional = FlatLevelGeneratorSettings.CODEC .parse(new Dynamic<>(registryOps, this.generatorSettings())) .resultOrPartial(DedicatedServerProperties.LOGGER::error); if (optional.isPresent()) { - return worldDimensions.replaceOverworldGenerator(provider, new FlatLevelSource((FlatLevelGeneratorSettings)optional.get())); + return worldDimensions.replaceOverworldGenerator(registries, new FlatLevelSource((FlatLevelGeneratorSettings)optional.get())); } } diff --git a/net/minecraft/server/dedicated/ServerWatchdog.java b/net/minecraft/server/dedicated/ServerWatchdog.java index cfa94598..9843b846 100644 --- a/net/minecraft/server/dedicated/ServerWatchdog.java +++ b/net/minecraft/server/dedicated/ServerWatchdog.java @@ -75,14 +75,14 @@ public class ServerWatchdog implements Runnable { } } - public static CrashReport createWatchdogCrashReport(String string, long l) { + public static CrashReport createWatchdogCrashReport(String title, long threadId) { ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean(); ThreadInfo[] threadInfos = threadMXBean.dumpAllThreads(true, true); StringBuilder stringBuilder = new StringBuilder(); Error error = new Error("Watchdog"); for (ThreadInfo threadInfo : threadInfos) { - if (threadInfo.getThreadId() == l) { + if (threadInfo.getThreadId() == threadId) { error.setStackTrace(threadInfo.getStackTrace()); } @@ -90,7 +90,7 @@ public class ServerWatchdog implements Runnable { stringBuilder.append("\n"); } - CrashReport crashReport = new CrashReport(string, error); + CrashReport crashReport = new CrashReport(title, error); CrashReportCategory crashReportCategory = crashReport.addCategory("Thread Dump"); crashReportCategory.setDetail("Threads", stringBuilder); return crashReport; diff --git a/net/minecraft/server/level/ChunkHolder.java b/net/minecraft/server/level/ChunkHolder.java index acb02cbc..888bca84 100644 --- a/net/minecraft/server/level/ChunkHolder.java +++ b/net/minecraft/server/level/ChunkHolder.java @@ -122,32 +122,32 @@ public class ChunkHolder extends GenerationChunkHolder { } @Override - protected void addSaveDependency(CompletableFuture completableFuture) { + protected void addSaveDependency(CompletableFuture saveDependency) { if (this.saveSync.isDone()) { - this.saveSync = completableFuture; + this.saveSync = saveDependency; } else { - this.saveSync = this.saveSync.thenCombine(completableFuture, (object, object2) -> null); + this.saveSync = this.saveSync.thenCombine(saveDependency, (object, object2) -> null); } } - public boolean blockChanged(BlockPos blockPos) { + public boolean blockChanged(BlockPos pos) { LevelChunk levelChunk = this.getTickingChunk(); if (levelChunk == null) { return false; } else { boolean bl = this.hasChangedSections; - int i = this.levelHeightAccessor.getSectionIndex(blockPos.getY()); + int i = this.levelHeightAccessor.getSectionIndex(pos.getY()); if (this.changedBlocksPerSection[i] == null) { this.hasChangedSections = true; this.changedBlocksPerSection[i] = new ShortOpenHashSet(); } - this.changedBlocksPerSection[i].add(SectionPos.sectionRelativePos(blockPos)); + this.changedBlocksPerSection[i].add(SectionPos.sectionRelativePos(pos)); return !bl; } } - public boolean sectionLightChanged(LightLayer lightLayer, int i) { + public boolean sectionLightChanged(LightLayer lightLayer, int y) { ChunkAccess chunkAccess = this.getChunkIfPresent(ChunkStatus.INITIALIZE_LIGHT); if (chunkAccess == null) { return false; @@ -157,13 +157,13 @@ public class ChunkHolder extends GenerationChunkHolder { if (levelChunk == null) { return false; } else { - int j = this.lightEngine.getMinLightSection(); - int k = this.lightEngine.getMaxLightSection(); - if (i >= j && i <= k) { + int i = this.lightEngine.getMinLightSection(); + int j = this.lightEngine.getMaxLightSection(); + if (y >= i && y <= j) { BitSet bitSet = lightLayer == LightLayer.SKY ? this.skyChangedLightSectionFilter : this.blockChangedLightSectionFilter; - int l = i - j; - if (!bitSet.get(l)) { - bitSet.set(l); + int k = y - i; + if (!bitSet.get(k)) { + bitSet.set(k); return true; } else { return false; diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java index ab143a8b..31885eec 100644 --- a/net/minecraft/server/level/ChunkMap.java +++ b/net/minecraft/server/level/ChunkMap.java @@ -426,9 +426,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } } - private void onLevelChange(ChunkPos chunkPos, IntSupplier intSupplier, int i, IntConsumer intConsumer) { - this.worldgenTaskDispatcher.onLevelChange(chunkPos, intSupplier, i, intConsumer); - this.lightTaskDispatcher.onLevelChange(chunkPos, intSupplier, i, intConsumer); + private void onLevelChange(ChunkPos chunkPos, IntSupplier queueLevelGetter, int ticketLevel, IntConsumer queueLevelSetter) { + this.worldgenTaskDispatcher.onLevelChange(chunkPos, queueLevelGetter, ticketLevel, queueLevelSetter); + this.lightTaskDispatcher.onLevelChange(chunkPos, queueLevelGetter, ticketLevel, queueLevelSetter); } @Override @@ -524,12 +524,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.saveChunksEagerly(hasMoreTime); } - private void saveChunksEagerly(BooleanSupplier booleanSupplier) { + private void saveChunksEagerly(BooleanSupplier hasMoreTime) { long l = Util.getMillis(); int i = 0; LongIterator longIterator = this.chunksToEagerlySave.iterator(); - while (i < 20 && this.activeChunkWrites.get() < 128 && booleanSupplier.getAsBoolean() && longIterator.hasNext()) { + while (i < 20 && this.activeChunkWrites.get() < 128 && hasMoreTime.getAsBoolean() && longIterator.hasNext()) { long m = longIterator.nextLong(); ChunkHolder chunkHolder = this.visibleChunkMap.get(m); ChunkAccess chunkAccess = chunkHolder != null ? chunkHolder.getLatestChunk() : null; @@ -727,20 +727,20 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return completableFuture2; } - private void onChunkReadyToSend(ChunkHolder chunkHolder, LevelChunk levelChunk) { - ChunkPos chunkPos = levelChunk.getPos(); + private void onChunkReadyToSend(ChunkHolder chunkHolder, LevelChunk chunk) { + ChunkPos chunkPos = chunk.getPos(); for (ServerPlayer serverPlayer : this.playerMap.getAllPlayers()) { if (serverPlayer.getChunkTrackingView().contains(chunkPos)) { - markChunkPendingToSend(serverPlayer, levelChunk); + markChunkPendingToSend(serverPlayer, chunk); } } this.level.getChunkSource().onChunkReadyToSend(chunkHolder); } - public CompletableFuture> prepareAccessibleChunk(ChunkHolder holder) { - return this.getChunkRangeFuture(holder, 1, ChunkLevel::getStatusAroundFullChunk) + public CompletableFuture> prepareAccessibleChunk(ChunkHolder chunk) { + return this.getChunkRangeFuture(chunk, 1, ChunkLevel::getStatusAroundFullChunk) .thenApply(chunkResult -> chunkResult.map(list -> (LevelChunk)list.get(list.size() / 2))); } @@ -748,23 +748,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return this.tickingGenerated.get(); } - private boolean saveChunkIfNeeded(ChunkHolder chunkHolder, long l) { - if (chunkHolder.wasAccessibleSinceLastSave() && chunkHolder.isReadyForSaving()) { - ChunkAccess chunkAccess = chunkHolder.getLatestChunk(); + private boolean saveChunkIfNeeded(ChunkHolder chunk, long gametime) { + if (chunk.wasAccessibleSinceLastSave() && chunk.isReadyForSaving()) { + ChunkAccess chunkAccess = chunk.getLatestChunk(); if (!(chunkAccess instanceof ImposterProtoChunk) && !(chunkAccess instanceof LevelChunk)) { return false; } else if (!chunkAccess.isUnsaved()) { return false; } else { - long m = chunkAccess.getPos().toLong(); - long n = this.nextChunkSaveTime.getOrDefault(m, -1L); - if (l < n) { + long l = chunkAccess.getPos().toLong(); + long m = this.nextChunkSaveTime.getOrDefault(l, -1L); + if (gametime < m) { return false; } else { boolean bl = this.save(chunkAccess); - chunkHolder.refreshAccessibility(); + chunk.refreshAccessibility(); if (bl) { - this.nextChunkSaveTime.put(m, l + 10000L); + this.nextChunkSaveTime.put(l, gametime + 10000L); } return bl; @@ -961,14 +961,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return this.upgradeChunkTag(this.level.dimension(), this.overworldDataStorage, tag, this.generator().getTypeNameForDataFixer()); } - void forEachSpawnCandidateChunk(Consumer consumer) { + void forEachSpawnCandidateChunk(Consumer action) { LongIterator longIterator = this.distanceManager.getSpawnCandidateChunks(); while (longIterator.hasNext()) { long l = longIterator.nextLong(); ChunkHolder chunkHolder = this.visibleChunkMap.get(l); if (chunkHolder != null && this.anyPlayerCloseEnoughForSpawningInternal(chunkHolder.getPos())) { - consumer.accept(chunkHolder); + action.accept(chunkHolder); } } } diff --git a/net/minecraft/server/level/ChunkTaskDispatcher.java b/net/minecraft/server/level/ChunkTaskDispatcher.java index d85a6140..f752a01d 100644 --- a/net/minecraft/server/level/ChunkTaskDispatcher.java +++ b/net/minecraft/server/level/ChunkTaskDispatcher.java @@ -21,10 +21,10 @@ public class ChunkTaskDispatcher implements ChunkHolder.LevelChangeListener, Aut private final PriorityConsecutiveExecutor dispatcher; protected boolean sleeping; - public ChunkTaskDispatcher(TaskScheduler taskScheduler, Executor executor) { - this.queue = new ChunkTaskPriorityQueue(taskScheduler.name() + "_queue"); - this.executor = taskScheduler; - this.dispatcher = new PriorityConsecutiveExecutor(4, executor, "dispatcher"); + public ChunkTaskDispatcher(TaskScheduler executor, Executor dispatcher) { + this.queue = new ChunkTaskPriorityQueue(executor.name() + "_queue"); + this.executor = executor; + this.dispatcher = new PriorityConsecutiveExecutor(4, dispatcher, "dispatcher"); this.sleeping = true; } @@ -41,23 +41,23 @@ public class ChunkTaskDispatcher implements ChunkHolder.LevelChangeListener, Aut })); } - public void release(long l, Runnable runnable, boolean bl) { + public void release(long chunkPos, Runnable afterRelease, boolean fullClear) { this.dispatcher.schedule(new StrictQueue.RunnableWithPriority(1, () -> { - this.queue.release(l, bl); - this.onRelease(l); + this.queue.release(chunkPos, fullClear); + this.onRelease(chunkPos); if (this.sleeping) { this.sleeping = false; this.pollTask(); } - runnable.run(); + afterRelease.run(); })); } - public void submit(Runnable runnable, long l, IntSupplier intSupplier) { + public void submit(Runnable task, long chunkPos, IntSupplier queueLevelSupplier) { this.dispatcher.schedule(new StrictQueue.RunnableWithPriority(2, () -> { - int i = intSupplier.getAsInt(); - this.queue.submit(runnable, l, i); + int i = queueLevelSupplier.getAsInt(); + this.queue.submit(task, chunkPos, i); if (this.sleeping) { this.sleeping = false; this.pollTask(); @@ -76,14 +76,14 @@ public class ChunkTaskDispatcher implements ChunkHolder.LevelChangeListener, Aut })); } - protected void scheduleForExecution(ChunkTaskPriorityQueue.TasksForChunk tasksForChunk) { - CompletableFuture.allOf((CompletableFuture[])tasksForChunk.tasks().stream().map(runnable -> this.executor.scheduleWithResult(completableFuture -> { + protected void scheduleForExecution(ChunkTaskPriorityQueue.TasksForChunk tasks) { + CompletableFuture.allOf((CompletableFuture[])tasks.tasks().stream().map(runnable -> this.executor.scheduleWithResult(completableFuture -> { runnable.run(); completableFuture.complete(Unit.INSTANCE); })).toArray(CompletableFuture[]::new)).thenAccept(void_ -> this.pollTask()); } - protected void onRelease(long l) { + protected void onRelease(long chunkPos) { } @Nullable diff --git a/net/minecraft/server/level/ChunkTaskPriorityQueue.java b/net/minecraft/server/level/ChunkTaskPriorityQueue.java index e2a9ccca..15596482 100644 --- a/net/minecraft/server/level/ChunkTaskPriorityQueue.java +++ b/net/minecraft/server/level/ChunkTaskPriorityQueue.java @@ -16,8 +16,8 @@ public class ChunkTaskPriorityQueue { private volatile int topPriorityQueueIndex = PRIORITY_LEVEL_COUNT; private final String name; - public ChunkTaskPriorityQueue(String string) { - this.name = string; + public ChunkTaskPriorityQueue(String name) { + this.name = name; } protected void resortChunkTasks(int queueLevel, ChunkPos chunkPos, int ticketLevel) { @@ -40,11 +40,11 @@ public class ChunkTaskPriorityQueue { } } - protected void submit(Runnable runnable, long l, int i) { - ((Long2ObjectLinkedOpenHashMap)this.queuesPerPriority.get(i)) - .computeIfAbsent(l, (Long2ObjectFunction)(lx -> Lists.newArrayList())) - .add(runnable); - this.topPriorityQueueIndex = Math.min(this.topPriorityQueueIndex, i); + protected void submit(Runnable task, long chunkPos, int queueLevel) { + ((Long2ObjectLinkedOpenHashMap)this.queuesPerPriority.get(queueLevel)) + .computeIfAbsent(chunkPos, (Long2ObjectFunction)(l -> Lists.newArrayList())) + .add(task); + this.topPriorityQueueIndex = Math.min(this.topPriorityQueueIndex, queueLevel); } protected void release(long chunkPos, boolean fullClear) { diff --git a/net/minecraft/server/level/GenerationChunkHolder.java b/net/minecraft/server/level/GenerationChunkHolder.java index 15dec890..befe7330 100644 --- a/net/minecraft/server/level/GenerationChunkHolder.java +++ b/net/minecraft/server/level/GenerationChunkHolder.java @@ -232,7 +232,7 @@ public abstract class GenerationChunkHolder { return chunkStatus == null || status.isAfter(chunkStatus); } - protected abstract void addSaveDependency(CompletableFuture completableFuture); + protected abstract void addSaveDependency(CompletableFuture saveDependency); public void increaseGenerationRefCount() { if (this.generationRefCount.getAndIncrement() == 0) { diff --git a/net/minecraft/server/level/ParticleStatus.java b/net/minecraft/server/level/ParticleStatus.java index c89bad3e..87f83774 100644 --- a/net/minecraft/server/level/ParticleStatus.java +++ b/net/minecraft/server/level/ParticleStatus.java @@ -14,9 +14,9 @@ public enum ParticleStatus implements OptionEnum { private final int id; private final String key; - private ParticleStatus(final int j, final String string2) { - this.id = j; - this.key = string2; + private ParticleStatus(final int id, final String key) { + this.id = id; + this.key = key; } @Override @@ -29,7 +29,7 @@ public enum ParticleStatus implements OptionEnum { return this.id; } - public static ParticleStatus byId(int i) { - return (ParticleStatus)BY_ID.apply(i); + public static ParticleStatus byId(int id) { + return (ParticleStatus)BY_ID.apply(id); } } diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java index ead6a3c3..239cfc1b 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java @@ -362,8 +362,8 @@ public class ServerChunkCache extends ChunkSource { } } - private void broadcastChangedChunks(ProfilerFiller profilerFiller) { - profilerFiller.push("broadcast"); + private void broadcastChangedChunks(ProfilerFiller profiler) { + profiler.push("broadcast"); for (ChunkHolder chunkHolder : this.chunkHoldersToBroadcast) { LevelChunk levelChunk = chunkHolder.getTickingChunk(); @@ -373,41 +373,41 @@ public class ServerChunkCache extends ChunkSource { } this.chunkHoldersToBroadcast.clear(); - profilerFiller.pop(); + profiler.pop(); } - private void collectTickingChunks(List list) { + private void collectTickingChunks(List output) { this.chunkMap.forEachSpawnCandidateChunk(chunkHolder -> { LevelChunk levelChunk = chunkHolder.getTickingChunk(); if (levelChunk != null && this.level.isNaturalSpawningAllowed(chunkHolder.getPos())) { - list.add(levelChunk); + output.add(levelChunk); } }); } - private void tickChunks(ProfilerFiller profilerFiller, long l, List list) { - profilerFiller.popPush("naturalSpawnCount"); + private void tickChunks(ProfilerFiller profiler, long timeInhabited, List chunks) { + profiler.popPush("naturalSpawnCount"); int i = this.distanceManager.getNaturalSpawnChunkCount(); NaturalSpawner.SpawnState spawnState = NaturalSpawner.createState( i, this.level.getAllEntities(), this::getFullChunk, new LocalMobCapCalculator(this.chunkMap) ); this.lastSpawnState = spawnState; - profilerFiller.popPush("spawnAndTick"); + profiler.popPush("spawnAndTick"); boolean bl = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING); int j = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING); - List list2; + List list; if (bl && (this.spawnEnemies || this.spawnFriendlies)) { boolean bl2 = this.level.getLevelData().getGameTime() % 400L == 0L; - list2 = NaturalSpawner.getFilteredSpawningCategories(spawnState, this.spawnFriendlies, this.spawnEnemies, bl2); + list = NaturalSpawner.getFilteredSpawningCategories(spawnState, this.spawnFriendlies, this.spawnEnemies, bl2); } else { - list2 = List.of(); + list = List.of(); } - for (LevelChunk levelChunk : list) { + for (LevelChunk levelChunk : chunks) { ChunkPos chunkPos = levelChunk.getPos(); - levelChunk.incrementInhabitedTime(l); - if (!list2.isEmpty() && this.level.getWorldBorder().isWithinBounds(chunkPos)) { - NaturalSpawner.spawnForChunk(this.level, levelChunk, spawnState, list2); + levelChunk.incrementInhabitedTime(timeInhabited); + if (!list.isEmpty() && this.level.getWorldBorder().isWithinBounds(chunkPos)) { + NaturalSpawner.spawnForChunk(this.level, levelChunk, spawnState, list); } if (this.level.shouldTickBlocksAt(chunkPos.toLong())) { @@ -415,7 +415,7 @@ public class ServerChunkCache extends ChunkSource { } } - profilerFiller.popPush("customSpawners"); + profiler.popPush("customSpawners"); if (bl) { this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies); } @@ -518,8 +518,8 @@ public class ServerChunkCache extends ChunkSource { } @Override - public void setSpawnSettings(boolean bl) { - this.spawnEnemies = bl; + public void setSpawnSettings(boolean spawnSettings) { + this.spawnEnemies = spawnSettings; this.spawnFriendlies = this.spawnFriendlies; } diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java index 0a9e6fbb..d8c76f42 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java @@ -15,7 +15,6 @@ import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.game.ClientGamePacketListener; import net.minecraft.network.protocol.game.ClientboundBundlePacket; import net.minecraft.network.protocol.game.ClientboundEntityPositionSyncPacket; -import net.minecraft.network.protocol.game.ClientboundMoveEntityPacket; import net.minecraft.network.protocol.game.ClientboundMoveMinecartPacket; import net.minecraft.network.protocol.game.ClientboundProjectilePowerPacket; import net.minecraft.network.protocol.game.ClientboundRemoveEntitiesPacket; @@ -27,6 +26,9 @@ import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket; import net.minecraft.network.protocol.game.ClientboundSetPassengersPacket; import net.minecraft.network.protocol.game.ClientboundUpdateAttributesPacket; import net.minecraft.network.protocol.game.VecDeltaCodec; +import net.minecraft.network.protocol.game.ClientboundMoveEntityPacket.Pos; +import net.minecraft.network.protocol.game.ClientboundMoveEntityPacket.PosRot; +import net.minecraft.network.protocol.game.ClientboundMoveEntityPacket.Rot; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.network.syncher.SynchedEntityData.DataValue; import net.minecraft.util.Mth; @@ -124,7 +126,7 @@ public class ServerEntity { boolean bl = Math.abs(b - this.lastSentYRot) >= 1 || Math.abs(c - this.lastSentXRot) >= 1; if (this.entity.isPassenger()) { if (bl) { - this.broadcast.accept(new ClientboundMoveEntityPacket.Rot(this.entity.getId(), b, c, this.entity.onGround())); + this.broadcast.accept(new Rot(this.entity.getId(), b, c, this.entity.onGround())); this.lastSentYRot = b; this.lastSentXRot = c; } @@ -154,14 +156,14 @@ public class ServerEntity { bl5 = true; } else if ((!bl3 || !bl) && !(this.entity instanceof AbstractArrow)) { if (bl3) { - packet2 = new ClientboundMoveEntityPacket.Pos(this.entity.getId(), (short)l, (short)m, (short)n, this.entity.onGround()); + packet2 = new Pos(this.entity.getId(), (short)l, (short)m, (short)n, this.entity.onGround()); bl4 = true; } else if (bl) { - packet2 = new ClientboundMoveEntityPacket.Rot(this.entity.getId(), b, c, this.entity.onGround()); + packet2 = new Rot(this.entity.getId(), b, c, this.entity.onGround()); bl5 = true; } } else { - packet2 = new ClientboundMoveEntityPacket.PosRot(this.entity.getId(), (short)l, (short)m, (short)n, b, c, this.entity.onGround()); + packet2 = new PosRot(this.entity.getId(), (short)l, (short)m, (short)n, b, c, this.entity.onGround()); bl4 = true; bl5 = true; } @@ -220,15 +222,15 @@ public class ServerEntity { } } - private void handleMinecartPosRot(NewMinecartBehavior newMinecartBehavior, byte b, byte c, boolean bl) { + private void handleMinecartPosRot(NewMinecartBehavior behavior, byte yRot, byte xRot, boolean dirty) { this.sendDirtyEntityData(); - if (newMinecartBehavior.lerpSteps.isEmpty()) { + if (behavior.lerpSteps.isEmpty()) { Vec3 vec3 = this.entity.getDeltaMovement(); double d = vec3.distanceToSqr(this.lastSentMovement); Vec3 vec32 = this.entity.trackingPosition(); - boolean bl2 = this.positionCodec.delta(vec32).lengthSqr() >= 7.6293945E-6F; - boolean bl3 = bl2 || this.tickCount % 60 == 0; - if (bl3 || bl || d > 1.0E-7) { + boolean bl = this.positionCodec.delta(vec32).lengthSqr() >= 7.6293945E-6F; + boolean bl2 = bl || this.tickCount % 60 == 0; + if (bl2 || dirty || d > 1.0E-7) { this.broadcast .accept( new ClientboundMoveMinecartPacket( @@ -238,12 +240,12 @@ public class ServerEntity { ); } } else { - this.broadcast.accept(new ClientboundMoveMinecartPacket(this.entity.getId(), List.copyOf(newMinecartBehavior.lerpSteps))); - newMinecartBehavior.lerpSteps.clear(); + this.broadcast.accept(new ClientboundMoveMinecartPacket(this.entity.getId(), List.copyOf(behavior.lerpSteps))); + behavior.lerpSteps.clear(); } - this.lastSentYRot = b; - this.lastSentXRot = c; + this.lastSentYRot = yRot; + this.lastSentXRot = xRot; this.positionCodec.setBase(this.entity.position()); } diff --git a/net/minecraft/server/level/ServerEntityGetter.java b/net/minecraft/server/level/ServerEntityGetter.java index 526e9191..9a58bd4f 100644 --- a/net/minecraft/server/level/ServerEntityGetter.java +++ b/net/minecraft/server/level/ServerEntityGetter.java @@ -13,52 +13,52 @@ public interface ServerEntityGetter extends EntityGetter { ServerLevel getLevel(); @Nullable - default Player getNearestPlayer(TargetingConditions targetingConditions, LivingEntity livingEntity) { - return this.getNearestEntity(this.players(), targetingConditions, livingEntity, livingEntity.getX(), livingEntity.getY(), livingEntity.getZ()); + default Player getNearestPlayer(TargetingConditions targetingConditions, LivingEntity source) { + return this.getNearestEntity(this.players(), targetingConditions, source, source.getX(), source.getY(), source.getZ()); } @Nullable - default Player getNearestPlayer(TargetingConditions targetingConditions, LivingEntity livingEntity, double d, double e, double f) { - return this.getNearestEntity(this.players(), targetingConditions, livingEntity, d, e, f); + default Player getNearestPlayer(TargetingConditions targetingConditions, LivingEntity source, double x, double y, double z) { + return this.getNearestEntity(this.players(), targetingConditions, source, x, y, z); } @Nullable - default Player getNearestPlayer(TargetingConditions targetingConditions, double d, double e, double f) { - return this.getNearestEntity(this.players(), targetingConditions, null, d, e, f); + default Player getNearestPlayer(TargetingConditions targetingConditions, double x, double y, double z) { + return this.getNearestEntity(this.players(), targetingConditions, null, x, y, z); } @Nullable default T getNearestEntity( - Class class_, TargetingConditions targetingConditions, @Nullable LivingEntity livingEntity, double d, double e, double f, AABB aABB + Class entityClass, TargetingConditions targetingConditions, @Nullable LivingEntity source, double x, double y, double z, AABB area ) { - return this.getNearestEntity(this.getEntitiesOfClass(class_, aABB, livingEntityx -> true), targetingConditions, livingEntity, d, e, f); + return this.getNearestEntity(this.getEntitiesOfClass(entityClass, area, livingEntity -> true), targetingConditions, source, x, y, z); } @Nullable default T getNearestEntity( - List list, TargetingConditions targetingConditions, @Nullable LivingEntity livingEntity, double d, double e, double f + List entities, TargetingConditions targetingConditions, @Nullable LivingEntity source, double x, double y, double z ) { - double g = -1.0; - T livingEntity2 = null; + double d = -1.0; + T livingEntity = null; - for (T livingEntity3 : list) { - if (targetingConditions.test(this.getLevel(), livingEntity, livingEntity3)) { - double h = livingEntity3.distanceToSqr(d, e, f); - if (g == -1.0 || h < g) { - g = h; - livingEntity2 = livingEntity3; + for (T livingEntity2 : entities) { + if (targetingConditions.test(this.getLevel(), source, livingEntity2)) { + double e = livingEntity2.distanceToSqr(x, y, z); + if (d == -1.0 || e < d) { + d = e; + livingEntity = livingEntity2; } } } - return livingEntity2; + return livingEntity; } - default List getNearbyPlayers(TargetingConditions targetingConditions, LivingEntity livingEntity, AABB aABB) { + default List getNearbyPlayers(TargetingConditions targetingConditions, LivingEntity source, AABB area) { List list = new ArrayList(); for (Player player : this.players()) { - if (aABB.contains(player.getX(), player.getY(), player.getZ()) && targetingConditions.test(this.getLevel(), livingEntity, player)) { + if (area.contains(player.getX(), player.getY(), player.getZ()) && targetingConditions.test(this.getLevel(), source, player)) { list.add(player); } } @@ -66,13 +66,13 @@ public interface ServerEntityGetter extends EntityGetter { return list; } - default List getNearbyEntities(Class class_, TargetingConditions targetingConditions, LivingEntity livingEntity, AABB aABB) { - List list = this.getEntitiesOfClass(class_, aABB, livingEntityx -> true); + default List getNearbyEntities(Class entityClass, TargetingConditions targetingConditions, LivingEntity source, AABB area) { + List list = this.getEntitiesOfClass(entityClass, area, livingEntityx -> true); List list2 = new ArrayList(); - for (T livingEntity2 : list) { - if (targetingConditions.test(this.getLevel(), livingEntity, livingEntity2)) { - list2.add(livingEntity2); + for (T livingEntity : list) { + if (targetingConditions.test(this.getLevel(), source, livingEntity)) { + list2.add(livingEntity); } } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java index b4486e9f..893b3f4c 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java @@ -43,6 +43,7 @@ import net.minecraft.core.Direction; import net.minecraft.core.Holder; import net.minecraft.core.HolderSet; import net.minecraft.core.SectionPos; +import net.minecraft.core.HolderSet.Named; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; @@ -807,13 +808,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } } - private void saveLevelData(boolean bl) { + private void saveLevelData(boolean join) { if (this.dragonFight != null) { this.server.getWorldData().setEndDragonFightData(this.dragonFight.saveData()); } DimensionDataStorage dimensionDataStorage = this.getChunkSource().getDataStorage(); - if (bl) { + if (join) { dimensionDataStorage.saveAndJoin(); } else { dimensionDataStorage.scheduleSave(); @@ -1061,23 +1062,23 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } @Override - public void updateNeighborsAt(BlockPos blockPos, Block block, @Nullable Orientation orientation) { - this.neighborUpdater.updateNeighborsAtExceptFromFacing(blockPos, block, null, orientation); + public void updateNeighborsAt(BlockPos pos, Block block, @Nullable Orientation orientation) { + this.neighborUpdater.updateNeighborsAtExceptFromFacing(pos, block, null, orientation); } @Override - public void updateNeighborsAtExceptFromFacing(BlockPos blockPos, Block block, Direction direction, @Nullable Orientation orientation) { - this.neighborUpdater.updateNeighborsAtExceptFromFacing(blockPos, block, direction, orientation); + public void updateNeighborsAtExceptFromFacing(BlockPos pos, Block block, Direction facing, @Nullable Orientation orientation) { + this.neighborUpdater.updateNeighborsAtExceptFromFacing(pos, block, facing, orientation); } @Override - public void neighborChanged(BlockPos blockPos, Block block, @Nullable Orientation orientation) { - this.neighborUpdater.neighborChanged(blockPos, block, orientation); + public void neighborChanged(BlockPos pos, Block block, @Nullable Orientation orientation) { + this.neighborUpdater.neighborChanged(pos, block, orientation); } @Override - public void neighborChanged(BlockState blockState, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - this.neighborUpdater.neighborChanged(blockState, blockPos, block, orientation, bl); + public void neighborChanged(BlockState state, BlockPos pos, Block block, @Nullable Orientation orientation, boolean movedByPiston) { + this.neighborUpdater.neighborChanged(state, pos, block, orientation, movedByPiston); } @Override @@ -1099,18 +1100,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @Override public void explode( - @Nullable Entity entity, + @Nullable Entity source, @Nullable DamageSource damageSource, - @Nullable ExplosionDamageCalculator explosionDamageCalculator, - double d, - double e, - double f, - float g, - boolean bl, + @Nullable ExplosionDamageCalculator damageCalculator, + double x, + double y, + double z, + float radius, + boolean fire, Level.ExplosionInteraction explosionInteraction, - ParticleOptions particleOptions, - ParticleOptions particleOptions2, - Holder holder + ParticleOptions smallExplosionParticles, + ParticleOptions largeExplosionParticles, + Holder explosionSound ) { Explosion.BlockInteraction blockInteraction = switch (explosionInteraction) { case NONE -> Explosion.BlockInteraction.KEEP; @@ -1121,21 +1122,21 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe case TNT -> this.getDestroyType(GameRules.RULE_TNT_EXPLOSION_DROP_DECAY); case TRIGGER -> Explosion.BlockInteraction.TRIGGER_BLOCK; }; - Vec3 vec3 = new Vec3(d, e, f); - ServerExplosion serverExplosion = new ServerExplosion(this, entity, damageSource, explosionDamageCalculator, vec3, g, bl, blockInteraction); + Vec3 vec3 = new Vec3(x, y, z); + ServerExplosion serverExplosion = new ServerExplosion(this, source, damageSource, damageCalculator, vec3, radius, fire, blockInteraction); serverExplosion.explode(); - ParticleOptions particleOptions3 = serverExplosion.isSmall() ? particleOptions : particleOptions2; + ParticleOptions particleOptions = serverExplosion.isSmall() ? smallExplosionParticles : largeExplosionParticles; for (ServerPlayer serverPlayer : this.players) { if (serverPlayer.distanceToSqr(vec3) < 4096.0) { Optional optional = Optional.ofNullable((Vec3)serverExplosion.getHitPlayers().get(serverPlayer)); - serverPlayer.connection.send(new ClientboundExplodePacket(vec3, optional, particleOptions3, holder)); + serverPlayer.connection.send(new ClientboundExplodePacket(vec3, optional, particleOptions, explosionSound)); } } } - private Explosion.BlockInteraction getDestroyType(GameRules.Key key) { - return this.getGameRules().getBoolean(key) ? Explosion.BlockInteraction.DESTROY_WITH_DECAY : Explosion.BlockInteraction.DESTROY; + private Explosion.BlockInteraction getDestroyType(GameRules.Key decayGameRule) { + return this.getGameRules().getBoolean(decayGameRule) ? Explosion.BlockInteraction.DESTROY_WITH_DECAY : Explosion.BlockInteraction.DESTROY; } @Override @@ -1271,7 +1272,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe if (!this.server.getWorldData().worldGenOptions().generateStructures()) { return null; } else { - Optional> optional = this.registryAccess().lookupOrThrow(Registries.STRUCTURE).get(structureTag); + Optional> optional = this.registryAccess().lookupOrThrow(Registries.STRUCTURE).get(structureTag); if (optional.isEmpty()) { return null; } else { diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java index 48d98dce..c04318ba 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java @@ -38,12 +38,12 @@ import net.minecraft.nbt.ListTag; import net.minecraft.nbt.NbtOps; import net.minecraft.nbt.Tag; import net.minecraft.network.PacketSendListener; -import net.minecraft.network.chat.ChatType; import net.minecraft.network.chat.CommonComponents; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.HoverEvent; import net.minecraft.network.chat.OutgoingChatMessage; import net.minecraft.network.chat.RemoteChatSession; +import net.minecraft.network.chat.ChatType.Bound; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.game.ClientboundAnimatePacket; import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; @@ -406,8 +406,8 @@ public class ServerPlayer extends Player { return blockPos; } - private boolean noCollisionNoLiquid(ServerLevel serverLevel, AABB aABB) { - return serverLevel.noCollision(this, aABB, true); + private boolean noCollisionNoLiquid(ServerLevel level, AABB collisionBox) { + return level.noCollision(this, collisionBox, true); } private int getCoprime(int spawnArea) { @@ -415,104 +415,104 @@ public class ServerPlayer extends Player { } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("warden_spawn_tracker", 10)) { + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("warden_spawn_tracker", 10)) { WardenSpawnTracker.CODEC - .parse(new Dynamic<>(NbtOps.INSTANCE, compound.get("warden_spawn_tracker"))) + .parse(new Dynamic<>(NbtOps.INSTANCE, tag.get("warden_spawn_tracker"))) .resultOrPartial(LOGGER::error) .ifPresent(wardenSpawnTracker -> this.wardenSpawnTracker = wardenSpawnTracker); } - if (compound.contains("enteredNetherPosition", 10)) { - CompoundTag compoundTag = compound.getCompound("enteredNetherPosition"); + if (tag.contains("enteredNetherPosition", 10)) { + CompoundTag compoundTag = tag.getCompound("enteredNetherPosition"); this.enteredNetherPosition = new Vec3(compoundTag.getDouble("x"), compoundTag.getDouble("y"), compoundTag.getDouble("z")); } - this.seenCredits = compound.getBoolean("seenCredits"); - if (compound.contains("recipeBook", 10)) { - this.recipeBook.fromNbt(compound.getCompound("recipeBook"), resourceKey -> this.server.getRecipeManager().byKey(resourceKey).isPresent()); + this.seenCredits = tag.getBoolean("seenCredits"); + if (tag.contains("recipeBook", 10)) { + this.recipeBook.fromNbt(tag.getCompound("recipeBook"), resourceKey -> this.server.getRecipeManager().byKey(resourceKey).isPresent()); } if (this.isSleeping()) { this.stopSleeping(); } - if (compound.contains("SpawnX", 99) && compound.contains("SpawnY", 99) && compound.contains("SpawnZ", 99)) { - this.respawnPosition = new BlockPos(compound.getInt("SpawnX"), compound.getInt("SpawnY"), compound.getInt("SpawnZ")); - this.respawnForced = compound.getBoolean("SpawnForced"); - this.respawnAngle = compound.getFloat("SpawnAngle"); - if (compound.contains("SpawnDimension")) { + if (tag.contains("SpawnX", 99) && tag.contains("SpawnY", 99) && tag.contains("SpawnZ", 99)) { + this.respawnPosition = new BlockPos(tag.getInt("SpawnX"), tag.getInt("SpawnY"), tag.getInt("SpawnZ")); + this.respawnForced = tag.getBoolean("SpawnForced"); + this.respawnAngle = tag.getFloat("SpawnAngle"); + if (tag.contains("SpawnDimension")) { this.respawnDimension = (ResourceKey)Level.RESOURCE_KEY_CODEC - .parse(NbtOps.INSTANCE, compound.get("SpawnDimension")) + .parse(NbtOps.INSTANCE, tag.get("SpawnDimension")) .resultOrPartial(LOGGER::error) .orElse(Level.OVERWORLD); } } - this.spawnExtraParticlesOnFall = compound.getBoolean("spawn_extra_particles_on_fall"); - Tag tag = compound.get("raid_omen_position"); - if (tag != null) { - BlockPos.CODEC.parse(NbtOps.INSTANCE, tag).resultOrPartial(LOGGER::error).ifPresent(blockPos -> this.raidOmenPosition = blockPos); + this.spawnExtraParticlesOnFall = tag.getBoolean("spawn_extra_particles_on_fall"); + Tag tag2 = tag.get("raid_omen_position"); + if (tag2 != null) { + BlockPos.CODEC.parse(NbtOps.INSTANCE, tag2).resultOrPartial(LOGGER::error).ifPresent(blockPos -> this.raidOmenPosition = blockPos); } } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); WardenSpawnTracker.CODEC .encodeStart(NbtOps.INSTANCE, this.wardenSpawnTracker) .resultOrPartial(LOGGER::error) - .ifPresent(tag -> compound.put("warden_spawn_tracker", tag)); - this.storeGameTypes(compound); - compound.putBoolean("seenCredits", this.seenCredits); + .ifPresent(tagx -> tag.put("warden_spawn_tracker", tagx)); + this.storeGameTypes(tag); + tag.putBoolean("seenCredits", this.seenCredits); if (this.enteredNetherPosition != null) { CompoundTag compoundTag = new CompoundTag(); compoundTag.putDouble("x", this.enteredNetherPosition.x); compoundTag.putDouble("y", this.enteredNetherPosition.y); compoundTag.putDouble("z", this.enteredNetherPosition.z); - compound.put("enteredNetherPosition", compoundTag); + tag.put("enteredNetherPosition", compoundTag); } - this.saveParentVehicle(compound); - compound.put("recipeBook", this.recipeBook.toNbt()); - compound.putString("Dimension", this.level().dimension().location().toString()); + this.saveParentVehicle(tag); + tag.put("recipeBook", this.recipeBook.toNbt()); + tag.putString("Dimension", this.level().dimension().location().toString()); if (this.respawnPosition != null) { - compound.putInt("SpawnX", this.respawnPosition.getX()); - compound.putInt("SpawnY", this.respawnPosition.getY()); - compound.putInt("SpawnZ", this.respawnPosition.getZ()); - compound.putBoolean("SpawnForced", this.respawnForced); - compound.putFloat("SpawnAngle", this.respawnAngle); + tag.putInt("SpawnX", this.respawnPosition.getX()); + tag.putInt("SpawnY", this.respawnPosition.getY()); + tag.putInt("SpawnZ", this.respawnPosition.getZ()); + tag.putBoolean("SpawnForced", this.respawnForced); + tag.putFloat("SpawnAngle", this.respawnAngle); ResourceLocation.CODEC .encodeStart(NbtOps.INSTANCE, this.respawnDimension.location()) .resultOrPartial(LOGGER::error) - .ifPresent(tag -> compound.put("SpawnDimension", tag)); + .ifPresent(tagx -> tag.put("SpawnDimension", tagx)); } - compound.putBoolean("spawn_extra_particles_on_fall", this.spawnExtraParticlesOnFall); + tag.putBoolean("spawn_extra_particles_on_fall", this.spawnExtraParticlesOnFall); if (this.raidOmenPosition != null) { - BlockPos.CODEC.encodeStart(NbtOps.INSTANCE, this.raidOmenPosition).resultOrPartial(LOGGER::error).ifPresent(tag -> compound.put("raid_omen_position", tag)); + BlockPos.CODEC.encodeStart(NbtOps.INSTANCE, this.raidOmenPosition).resultOrPartial(LOGGER::error).ifPresent(tagx -> tag.put("raid_omen_position", tagx)); } - this.saveEnderPearls(compound); + this.saveEnderPearls(tag); } - private void saveParentVehicle(CompoundTag compoundTag) { + private void saveParentVehicle(CompoundTag tag) { Entity entity = this.getRootVehicle(); Entity entity2 = this.getVehicle(); if (entity2 != null && entity != this && entity.hasExactlyOnePlayerPassenger()) { + CompoundTag compoundTag = new CompoundTag(); CompoundTag compoundTag2 = new CompoundTag(); - CompoundTag compoundTag3 = new CompoundTag(); - entity.save(compoundTag3); - compoundTag2.putUUID("Attach", entity2.getUUID()); - compoundTag2.put("Entity", compoundTag3); - compoundTag.put("RootVehicle", compoundTag2); + entity.save(compoundTag2); + compoundTag.putUUID("Attach", entity2.getUUID()); + compoundTag.put("Entity", compoundTag2); + tag.put("RootVehicle", compoundTag); } } - public void loadAndSpawnParentVehicle(Optional optional) { - if (optional.isPresent() && ((CompoundTag)optional.get()).contains("RootVehicle", 10) && this.level() instanceof ServerLevel serverLevel) { - CompoundTag compoundTag = ((CompoundTag)optional.get()).getCompound("RootVehicle"); + public void loadAndSpawnParentVehicle(Optional tag) { + if (tag.isPresent() && ((CompoundTag)tag.get()).contains("RootVehicle", 10) && this.level() instanceof ServerLevel serverLevel) { + CompoundTag compoundTag = ((CompoundTag)tag.get()).getCompound("RootVehicle"); Entity entity = EntityType.loadEntityRecursive( compoundTag.getCompound("Entity"), serverLevel, EntitySpawnReason.LOAD, entityx -> !serverLevel.addWithUUID(entityx) ? null : entityx ); @@ -549,7 +549,7 @@ public class ServerPlayer extends Player { } } - private void saveEnderPearls(CompoundTag compoundTag) { + private void saveEnderPearls(CompoundTag tag) { if (!this.enderPearls.isEmpty()) { ListTag listTag = new ListTag(); @@ -557,36 +557,34 @@ public class ServerPlayer extends Player { if (thrownEnderpearl.isRemoved()) { LOGGER.warn("Trying to save removed ender pearl, skipping"); } else { - CompoundTag compoundTag2 = new CompoundTag(); - thrownEnderpearl.save(compoundTag2); + CompoundTag compoundTag = new CompoundTag(); + thrownEnderpearl.save(compoundTag); ResourceLocation.CODEC .encodeStart(NbtOps.INSTANCE, thrownEnderpearl.level().dimension().location()) .resultOrPartial(LOGGER::error) - .ifPresent(tag -> compoundTag2.put("ender_pearl_dimension", tag)); - listTag.add(compoundTag2); + .ifPresent(tagx -> compoundTag.put("ender_pearl_dimension", tagx)); + listTag.add(compoundTag); } } - compoundTag.put("ender_pearls", listTag); + tag.put("ender_pearls", listTag); } } - public void loadAndSpawnEnderpearls(Optional optional) { - if (optional.isPresent() - && ((CompoundTag)optional.get()).contains("ender_pearls", 9) - && ((CompoundTag)optional.get()).get("ender_pearls") instanceof ListTag listTag) { + public void loadAndSpawnEnderpearls(Optional tag) { + if (tag.isPresent() && ((CompoundTag)tag.get()).contains("ender_pearls", 9) && ((CompoundTag)tag.get()).get("ender_pearls") instanceof ListTag listTag) { listTag.forEach( - tag -> { - if (tag instanceof CompoundTag compoundTag && compoundTag.contains("ender_pearl_dimension")) { - Optional> optionalx = Level.RESOURCE_KEY_CODEC + tagx -> { + if (tagx instanceof CompoundTag compoundTag && compoundTag.contains("ender_pearl_dimension")) { + Optional> optional = Level.RESOURCE_KEY_CODEC .parse(NbtOps.INSTANCE, compoundTag.get("ender_pearl_dimension")) .resultOrPartial(LOGGER::error); - if (optionalx.isEmpty()) { + if (optional.isEmpty()) { LOGGER.warn("No dimension defined for ender pearl, skipping"); return; } - ServerLevel serverLevel = this.level().getServer().getLevel((ResourceKey)optionalx.get()); + ServerLevel serverLevel = this.level().getServer().getLevel((ResourceKey)optional.get()); if (serverLevel != null) { Entity entity = EntityType.loadEntityRecursive( compoundTag, serverLevel, EntitySpawnReason.LOAD, entityx -> !serverLevel.addWithUUID(entityx) ? null : entityx @@ -594,10 +592,10 @@ public class ServerPlayer extends Player { if (entity != null) { placeEnderPearlTicket(serverLevel, entity.chunkPosition()); } else { - LOGGER.warn("Failed to spawn player ender pearl in level ({}), skipping", optionalx.get()); + LOGGER.warn("Failed to spawn player ender pearl in level ({}), skipping", optional.get()); } } else { - LOGGER.warn("Trying to load ender pearl without level ({}) being loaded, skipping", optionalx.get()); + LOGGER.warn("Trying to load ender pearl without level ({}) being loaded, skipping", optional.get()); } } } @@ -787,8 +785,8 @@ public class ServerPlayer extends Player { } } - private void synchronizeSpecialItemUpdates(ItemStack itemStack) { - MapId mapId = itemStack.get(DataComponents.MAP_ID); + private void synchronizeSpecialItemUpdates(ItemStack stack) { + MapId mapId = stack.get(DataComponents.MAP_ID); MapItemSavedData mapItemSavedData = MapItem.getSavedData(mapId, this.level()); if (mapItemSavedData != null) { Packet packet = mapItemSavedData.getUpdatePacket(mapId, this); @@ -954,8 +952,8 @@ public class ServerPlayer extends Player { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - if (this.isInvulnerableTo(serverLevel, damageSource)) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + if (this.isInvulnerableTo(level, damageSource)) { return false; } else { boolean bl = this.server.isDedicatedServer() && this.isPvpAllowed() && damageSource.is(DamageTypeTags.IS_FALL); @@ -968,7 +966,7 @@ public class ServerPlayer extends Player { } else { return entity instanceof AbstractArrow abstractArrow && abstractArrow.getOwner() instanceof Player player2 && !this.canHarmPlayer(player2) ? false - : super.hurtServer(serverLevel, damageSource, f); + : super.hurtServer(level, damageSource, amount); } } } @@ -986,13 +984,13 @@ public class ServerPlayer extends Player { return this.server.isPvpAllowed(); } - public TeleportTransition findRespawnPositionAndUseSpawnBlock(boolean bl, TeleportTransition.PostTeleportTransition postTeleportTransition) { + public TeleportTransition findRespawnPositionAndUseSpawnBlock(boolean useCharge, TeleportTransition.PostTeleportTransition postTeleportTransition) { BlockPos blockPos = this.getRespawnPosition(); float f = this.getRespawnAngle(); - boolean bl2 = this.isRespawnForced(); + boolean bl = this.isRespawnForced(); ServerLevel serverLevel = this.server.getLevel(this.getRespawnDimension()); if (serverLevel != null && blockPos != null) { - Optional optional = findRespawnAndUseSpawnBlock(serverLevel, blockPos, f, bl2, bl); + Optional optional = findRespawnAndUseSpawnBlock(serverLevel, blockPos, f, bl, useCharge); if (optional.isPresent()) { ServerPlayer.RespawnPosAngle respawnPosAngle = (ServerPlayer.RespawnPosAngle)optional.get(); return new TeleportTransition(serverLevel, respawnPosAngle.position(), Vec3.ZERO, respawnPosAngle.yaw(), 0.0F, postTeleportTransition); @@ -1005,13 +1003,13 @@ public class ServerPlayer extends Player { } private static Optional findRespawnAndUseSpawnBlock( - ServerLevel level, BlockPos pos, float angle, boolean forced, boolean keepInventory + ServerLevel level, BlockPos pos, float angle, boolean forced, boolean useCharge ) { BlockState blockState = level.getBlockState(pos); Block block = blockState.getBlock(); if (block instanceof RespawnAnchorBlock && (forced || (Integer)blockState.getValue(RespawnAnchorBlock.CHARGE) > 0) && RespawnAnchorBlock.canSetSpawn(level)) { Optional optional = RespawnAnchorBlock.findStandUpPosition(EntityType.PLAYER, level, pos); - if (!forced && keepInventory && optional.isPresent()) { + if (!forced && useCharge && optional.isPresent()) { level.setBlock(pos, blockState.setValue(RespawnAnchorBlock.CHARGE, (Integer)blockState.getValue(RespawnAnchorBlock.CHARGE) - 1), 3); } @@ -1098,8 +1096,8 @@ public class ServerPlayer extends Player { } @Override - public void forceSetRotation(float f, float g) { - this.connection.send(new ClientboundPlayerRotationPacket(f, g)); + public void forceSetRotation(float yRot, float xRot) { + this.connection.send(new ClientboundPlayerRotationPacket(yRot, xRot)); } private void triggerDimensionChangeTriggers(ServerLevel level) { @@ -1214,8 +1212,8 @@ public class ServerPlayer extends Player { } @Override - public boolean isInvulnerableTo(ServerLevel serverLevel, DamageSource damageSource) { - return super.isInvulnerableTo(serverLevel, damageSource) || this.isChangingDimension() && !damageSource.is(DamageTypes.ENDER_PEARL); + public boolean isInvulnerableTo(ServerLevel level, DamageSource damageSource) { + return super.isInvulnerableTo(level, damageSource) || this.isChangingDimension() && !damageSource.is(DamageTypes.ENDER_PEARL); } @Override @@ -1591,10 +1589,10 @@ public class ServerPlayer extends Player { } @Override - protected void onEffectsRemoved(Collection collection) { - super.onEffectsRemoved(collection); + protected void onEffectsRemoved(Collection effects) { + super.onEffectsRemoved(effects); - for (MobEffectInstance mobEffectInstance : collection) { + for (MobEffectInstance mobEffectInstance : effects) { this.connection.send(new ClientboundRemoveMobEffectPacket(this.getId(), mobEffectInstance.getEffect())); if (mobEffectInstance.is(MobEffects.LEVITATION)) { this.levitationStartPos = null; @@ -1615,23 +1613,23 @@ public class ServerPlayer extends Player { } @Override - public boolean teleportTo(ServerLevel serverLevel, double d, double e, double f, Set set, float g, float h, boolean bl) { - ChunkPos chunkPos = new ChunkPos(BlockPos.containing(d, e, f)); - serverLevel.getChunkSource().addRegionTicket(TicketType.POST_TELEPORT, chunkPos, 1, this.getId()); + public boolean teleportTo(ServerLevel level, double x, double y, double z, Set relativeMovements, float yaw, float pitch, boolean setCamera) { + ChunkPos chunkPos = new ChunkPos(BlockPos.containing(x, y, z)); + level.getChunkSource().addRegionTicket(TicketType.POST_TELEPORT, chunkPos, 1, this.getId()); if (this.isSleeping()) { this.stopSleepInBed(true, true); } - if (bl) { + if (setCamera) { this.setCamera(this); } - boolean bl2 = super.teleportTo(serverLevel, d, e, f, set, g, h, bl); - if (bl2) { - this.setYHeadRot(set.contains(Relative.Y_ROT) ? this.getYHeadRot() + g : g); + boolean bl = super.teleportTo(level, x, y, z, relativeMovements, yaw, pitch, setCamera); + if (bl) { + this.setYHeadRot(relativeMovements.contains(Relative.Y_ROT) ? this.getYHeadRot() + yaw : yaw); } - return bl2; + return bl; } @Override @@ -1713,16 +1711,16 @@ public class ServerPlayer extends Player { ); } - public void sendSystemMessage(Component component) { - this.sendSystemMessage(component, false); + public void sendSystemMessage(Component mesage) { + this.sendSystemMessage(mesage, false); } - public void sendSystemMessage(Component component, boolean bypassHiddenChat) { - if (this.acceptsSystemMessages(bypassHiddenChat)) { - this.connection.send(new ClientboundSystemChatPacket(component, bypassHiddenChat), PacketSendListener.exceptionallySend(() -> { + public void sendSystemMessage(Component message, boolean overlay) { + if (this.acceptsSystemMessages(overlay)) { + this.connection.send(new ClientboundSystemChatPacket(message, overlay), PacketSendListener.exceptionallySend(() -> { if (this.acceptsSystemMessages(false)) { int i = 256; - String string = component.getString(256); + String string = message.getString(256); Component component2 = Component.literal(string).withStyle(ChatFormatting.YELLOW); return new ClientboundSystemChatPacket(Component.translatable("multiplayer.message_not_delivered", component2).withStyle(ChatFormatting.RED), false); } else { @@ -1732,7 +1730,7 @@ public class ServerPlayer extends Player { } } - public void sendChatMessage(OutgoingChatMessage message, boolean filtered, ChatType.Bound boundType) { + public void sendChatMessage(OutgoingChatMessage message, boolean filtered, Bound boundType) { if (this.acceptsChatMessages()) { message.sendToPlayer(this, filtered, boundType); } @@ -1783,8 +1781,8 @@ public class ServerPlayer extends Player { return this.chatVisibility; } - private boolean acceptsSystemMessages(boolean bypassHiddenChat) { - return this.chatVisibility == ChatVisiblity.HIDDEN ? bypassHiddenChat : true; + private boolean acceptsSystemMessages(boolean overlay) { + return this.chatVisibility == ChatVisiblity.HIDDEN ? overlay : true; } private boolean acceptsChatMessages() { @@ -1984,18 +1982,18 @@ public class ServerPlayer extends Player { } @Nullable - private ItemEntity createItemStackToDrop(ItemStack itemStack, boolean bl, boolean bl2) { - if (itemStack.isEmpty()) { + private ItemEntity createItemStackToDrop(ItemStack droppedItem, boolean dropAround, boolean includeThrowerName) { + if (droppedItem.isEmpty()) { return null; } else { double d = this.getEyeY() - 0.3F; - ItemEntity itemEntity = new ItemEntity(this.level(), this.getX(), d, this.getZ(), itemStack); + ItemEntity itemEntity = new ItemEntity(this.level(), this.getX(), d, this.getZ(), droppedItem); itemEntity.setPickUpDelay(40); - if (bl2) { + if (includeThrowerName) { itemEntity.setThrower(this); } - if (bl) { + if (dropAround) { float f = this.random.nextFloat() * 0.5F; float g = this.random.nextFloat() * (float) (Math.PI * 2); itemEntity.setDeltaMovement(-Mth.sin(g) * f, 0.2F, Mth.cos(g) * f); @@ -2061,8 +2059,8 @@ public class ServerPlayer extends Player { } @Override - public boolean mayInteract(ServerLevel serverLevel, BlockPos blockPos) { - return super.mayInteract(serverLevel, blockPos) && serverLevel.mayInteract(this, blockPos); + public boolean mayInteract(ServerLevel level, BlockPos pos) { + return super.mayInteract(level, pos) && level.mayInteract(this, pos); } @Override @@ -2082,9 +2080,9 @@ public class ServerPlayer extends Player { } @Override - public void handleExtraItemsCreatedOnUse(ItemStack itemStack) { - if (!this.getInventory().add(itemStack)) { - this.drop(itemStack, false); + public void handleExtraItemsCreatedOnUse(ItemStack stack) { + if (!this.getInventory().add(stack)) { + this.drop(stack, false); } } @@ -2204,8 +2202,8 @@ public class ServerPlayer extends Player { return this.lastClientInput; } - public void setLastClientInput(Input input) { - this.lastClientInput = input; + public void setLastClientInput(Input lastClientInput) { + this.lastClientInput = lastClientInput; } public Vec3 getLastClientMoveIntent() { @@ -2214,22 +2212,22 @@ public class ServerPlayer extends Player { return getInputVector(new Vec3(f, 0.0, g), 1.0F, this.getYRot()); } - public void registerEnderPearl(ThrownEnderpearl thrownEnderpearl) { - this.enderPearls.add(thrownEnderpearl); + public void registerEnderPearl(ThrownEnderpearl enderPearl) { + this.enderPearls.add(enderPearl); } - public void deregisterEnderPearl(ThrownEnderpearl thrownEnderpearl) { - this.enderPearls.remove(thrownEnderpearl); + public void deregisterEnderPearl(ThrownEnderpearl enderPearl) { + this.enderPearls.remove(enderPearl); } public Set getEnderPearls() { return this.enderPearls; } - public long registerAndUpdateEnderPearlTicket(ThrownEnderpearl thrownEnderpearl) { - if (thrownEnderpearl.level() instanceof ServerLevel serverLevel) { - ChunkPos chunkPos = thrownEnderpearl.chunkPosition(); - this.registerEnderPearl(thrownEnderpearl); + public long registerAndUpdateEnderPearlTicket(ThrownEnderpearl enderPearl) { + if (enderPearl.level() instanceof ServerLevel serverLevel) { + ChunkPos chunkPos = enderPearl.chunkPosition(); + this.registerEnderPearl(enderPearl); serverLevel.resetEmptyTime(); return placeEnderPearlTicket(serverLevel, chunkPos) - 1L; } else { @@ -2237,8 +2235,8 @@ public class ServerPlayer extends Player { } } - public static long placeEnderPearlTicket(ServerLevel serverLevel, ChunkPos chunkPos) { - serverLevel.getChunkSource().addRegionTicket(TicketType.ENDER_PEARL, chunkPos, 2, chunkPos); + public static long placeEnderPearlTicket(ServerLevel level, ChunkPos pos) { + level.getChunkSource().addRegionTicket(TicketType.ENDER_PEARL, pos, 2, pos); return TicketType.ENDER_PEARL.timeout(); } diff --git a/net/minecraft/server/level/ThreadedLevelLightEngine.java b/net/minecraft/server/level/ThreadedLevelLightEngine.java index 9cdd3ecd..2b7570b9 100644 --- a/net/minecraft/server/level/ThreadedLevelLightEngine.java +++ b/net/minecraft/server/level/ThreadedLevelLightEngine.java @@ -33,11 +33,11 @@ public class ThreadedLevelLightEngine extends LevelLightEngine implements AutoCl private final AtomicBoolean scheduled = new AtomicBoolean(); public ThreadedLevelLightEngine( - LightChunkGetter lightChunkGetter, ChunkMap chunkMap, boolean bl, ConsecutiveExecutor consecutiveExecutor, ChunkTaskDispatcher chunkTaskDispatcher + LightChunkGetter lightChunkGetter, ChunkMap chunkMap, boolean skyLight, ConsecutiveExecutor consecutiveExecutor, ChunkTaskDispatcher taskDispatcher ) { - super(lightChunkGetter, true, bl); + super(lightChunkGetter, true, skyLight); this.chunkMap = chunkMap; - this.taskDispatcher = chunkTaskDispatcher; + this.taskDispatcher = taskDispatcher; this.consecutiveExecutor = consecutiveExecutor; } diff --git a/net/minecraft/server/level/ThrottlingChunkTaskDispatcher.java b/net/minecraft/server/level/ThrottlingChunkTaskDispatcher.java index a645c49b..31f47ae2 100644 --- a/net/minecraft/server/level/ThrottlingChunkTaskDispatcher.java +++ b/net/minecraft/server/level/ThrottlingChunkTaskDispatcher.java @@ -14,15 +14,15 @@ public class ThrottlingChunkTaskDispatcher extends ChunkTaskDispatcher { private final int maxChunksInExecution; private final String executorSchedulerName; - public ThrottlingChunkTaskDispatcher(TaskScheduler taskScheduler, Executor executor, int i) { - super(taskScheduler, executor); - this.maxChunksInExecution = i; - this.executorSchedulerName = taskScheduler.name(); + public ThrottlingChunkTaskDispatcher(TaskScheduler executor, Executor dispatcher, int maxChunksInExecution) { + super(executor, dispatcher); + this.maxChunksInExecution = maxChunksInExecution; + this.executorSchedulerName = executor.name(); } @Override - protected void onRelease(long l) { - this.chunkPositionsInExecution.remove(l); + protected void onRelease(long chunkPos) { + this.chunkPositionsInExecution.remove(chunkPos); } @Nullable @@ -32,9 +32,9 @@ public class ThrottlingChunkTaskDispatcher extends ChunkTaskDispatcher { } @Override - protected void scheduleForExecution(ChunkTaskPriorityQueue.TasksForChunk tasksForChunk) { - this.chunkPositionsInExecution.add(tasksForChunk.chunkPos()); - super.scheduleForExecution(tasksForChunk); + protected void scheduleForExecution(ChunkTaskPriorityQueue.TasksForChunk tasks) { + this.chunkPositionsInExecution.add(tasks.chunkPos()); + super.scheduleForExecution(tasks); } @VisibleForTesting diff --git a/net/minecraft/server/network/LegacyTextFilter.java b/net/minecraft/server/network/LegacyTextFilter.java index 4c24cfc5..d4c95a8b 100644 --- a/net/minecraft/server/network/LegacyTextFilter.java +++ b/net/minecraft/server/network/LegacyTextFilter.java @@ -25,48 +25,48 @@ public class LegacyTextFilter extends ServerTextFilter { private final String authKey; private LegacyTextFilter( - URL uRL, - ServerTextFilter.MessageEncoder messageEncoder, - URL uRL2, - LegacyTextFilter.JoinOrLeaveEncoder joinOrLeaveEncoder, - URL uRL3, - LegacyTextFilter.JoinOrLeaveEncoder joinOrLeaveEncoder2, - String string, - ServerTextFilter.IgnoreStrategy ignoreStrategy, - ExecutorService executorService + URL chatEndpoint, + ServerTextFilter.MessageEncoder chatEncoder, + URL joinEndpoint, + LegacyTextFilter.JoinOrLeaveEncoder joinEncoder, + URL leaveEndpoint, + LegacyTextFilter.JoinOrLeaveEncoder leaveEncoder, + String authKey, + ServerTextFilter.IgnoreStrategy chatIgnoreStrategy, + ExecutorService workerPool ) { - super(uRL, messageEncoder, ignoreStrategy, executorService); - this.joinEndpoint = uRL2; - this.joinEncoder = joinOrLeaveEncoder; - this.leaveEndpoint = uRL3; - this.leaveEncoder = joinOrLeaveEncoder2; - this.authKey = string; + super(chatEndpoint, chatEncoder, chatIgnoreStrategy, workerPool); + this.joinEndpoint = joinEndpoint; + this.joinEncoder = joinEncoder; + this.leaveEndpoint = leaveEndpoint; + this.leaveEncoder = leaveEncoder; + this.authKey = authKey; } @Nullable - public static ServerTextFilter createTextFilterFromConfig(String string) { + public static ServerTextFilter createTextFilterFromConfig(String config) { try { - JsonObject jsonObject = GsonHelper.parse(string); + JsonObject jsonObject = GsonHelper.parse(config); URI uRI = new URI(GsonHelper.getAsString(jsonObject, "apiServer")); - String string2 = GsonHelper.getAsString(jsonObject, "apiKey"); - if (string2.isEmpty()) { + String string = GsonHelper.getAsString(jsonObject, "apiKey"); + if (string.isEmpty()) { throw new IllegalArgumentException("Missing API key"); } else { int i = GsonHelper.getAsInt(jsonObject, "ruleId", 1); - String string3 = GsonHelper.getAsString(jsonObject, "serverId", ""); - String string4 = GsonHelper.getAsString(jsonObject, "roomId", "Java:Chat"); + String string2 = GsonHelper.getAsString(jsonObject, "serverId", ""); + String string3 = GsonHelper.getAsString(jsonObject, "roomId", "Java:Chat"); int j = GsonHelper.getAsInt(jsonObject, "hashesToDrop", -1); int k = GsonHelper.getAsInt(jsonObject, "maxConcurrentRequests", 7); JsonObject jsonObject2 = GsonHelper.getAsJsonObject(jsonObject, "endpoints", null); - String string5 = getEndpointFromConfig(jsonObject2, "chat", "v1/chat"); - boolean bl = string5.equals("v1/chat"); - URL uRL = uRI.resolve("/" + string5).toURL(); + String string4 = getEndpointFromConfig(jsonObject2, "chat", "v1/chat"); + boolean bl = string4.equals("v1/chat"); + URL uRL = uRI.resolve("/" + string4).toURL(); URL uRL2 = getEndpoint(uRI, jsonObject2, "join", "v1/join"); URL uRL3 = getEndpoint(uRI, jsonObject2, "leave", "v1/leave"); LegacyTextFilter.JoinOrLeaveEncoder joinOrLeaveEncoder = gameProfile -> { JsonObject jsonObjectx = new JsonObject(); - jsonObjectx.addProperty("server", string3); - jsonObjectx.addProperty("room", string4); + jsonObjectx.addProperty("server", string2); + jsonObjectx.addProperty("room", string3); jsonObjectx.addProperty("user_id", gameProfile.getId().toString()); jsonObjectx.addProperty("user_display_name", gameProfile.getName()); return jsonObjectx; @@ -76,8 +76,8 @@ public class LegacyTextFilter extends ServerTextFilter { messageEncoder = (gameProfile, string3x) -> { JsonObject jsonObjectx = new JsonObject(); jsonObjectx.addProperty("rule", i); - jsonObjectx.addProperty("server", string3); - jsonObjectx.addProperty("room", string4); + jsonObjectx.addProperty("server", string2); + jsonObjectx.addProperty("room", string3); jsonObjectx.addProperty("player", gameProfile.getId().toString()); jsonObjectx.addProperty("player_display_name", gameProfile.getName()); jsonObjectx.addProperty("text", string3x); @@ -85,12 +85,12 @@ public class LegacyTextFilter extends ServerTextFilter { return jsonObjectx; }; } else { - String string6 = String.valueOf(i); + String string5 = String.valueOf(i); messageEncoder = (gameProfile, string4x) -> { JsonObject jsonObjectx = new JsonObject(); - jsonObjectx.addProperty("rule_id", string6); - jsonObjectx.addProperty("category", string3); - jsonObjectx.addProperty("subcategory", string4); + jsonObjectx.addProperty("rule_id", string5); + jsonObjectx.addProperty("category", string2); + jsonObjectx.addProperty("subcategory", string3); jsonObjectx.addProperty("user_id", gameProfile.getId().toString()); jsonObjectx.addProperty("user_display_name", gameProfile.getName()); jsonObjectx.addProperty("text", string4x); @@ -101,18 +101,18 @@ public class LegacyTextFilter extends ServerTextFilter { ServerTextFilter.IgnoreStrategy ignoreStrategy = ServerTextFilter.IgnoreStrategy.select(j); ExecutorService executorService = createWorkerPool(k); - String string7 = Base64.getEncoder().encodeToString(string2.getBytes(StandardCharsets.US_ASCII)); - return new LegacyTextFilter(uRL, messageEncoder, uRL2, joinOrLeaveEncoder, uRL3, joinOrLeaveEncoder, string7, ignoreStrategy, executorService); + String string6 = Base64.getEncoder().encodeToString(string.getBytes(StandardCharsets.US_ASCII)); + return new LegacyTextFilter(uRL, messageEncoder, uRL2, joinOrLeaveEncoder, uRL3, joinOrLeaveEncoder, string6, ignoreStrategy, executorService); } } catch (Exception var20) { - LOGGER.warn("Failed to parse chat filter config {}", string, var20); + LOGGER.warn("Failed to parse chat filter config {}", config, var20); return null; } } @Override - public TextFilter createContext(GameProfile gameProfile) { - return new ServerTextFilter.PlayerContext(gameProfile) { + public TextFilter createContext(GameProfile profile) { + return new ServerTextFilter.PlayerContext(profile) { @Override public void join() { LegacyTextFilter.this.processJoinOrLeave(this.profile, LegacyTextFilter.this.joinEndpoint, LegacyTextFilter.this.joinEncoder, this.streamExecutor); @@ -125,20 +125,20 @@ public class LegacyTextFilter extends ServerTextFilter { }; } - void processJoinOrLeave(GameProfile gameProfile, URL uRL, LegacyTextFilter.JoinOrLeaveEncoder joinOrLeaveEncoder, Executor executor) { - executor.execute(() -> { - JsonObject jsonObject = joinOrLeaveEncoder.encode(gameProfile); + void processJoinOrLeave(GameProfile profile, URL endpoint, LegacyTextFilter.JoinOrLeaveEncoder encoder, Executor streamExecutor) { + streamExecutor.execute(() -> { + JsonObject jsonObject = encoder.encode(profile); try { - this.processRequest(jsonObject, uRL); + this.processRequest(jsonObject, endpoint); } catch (Exception var6) { - LOGGER.warn("Failed to send join/leave packet to {} for player {}", uRL, gameProfile, var6); + LOGGER.warn("Failed to send join/leave packet to {} for player {}", endpoint, profile, var6); } }); } - private void processRequest(JsonObject jsonObject, URL uRL) throws IOException { - HttpURLConnection httpURLConnection = this.makeRequest(jsonObject, uRL); + private void processRequest(JsonObject request, URL endpoint) throws IOException { + HttpURLConnection httpURLConnection = this.makeRequest(request, endpoint); InputStream inputStream = httpURLConnection.getInputStream(); try { @@ -161,23 +161,23 @@ public class LegacyTextFilter extends ServerTextFilter { } @Override - protected void setAuthorizationProperty(HttpURLConnection httpURLConnection) { - httpURLConnection.setRequestProperty("Authorization", "Basic " + this.authKey); + protected void setAuthorizationProperty(HttpURLConnection connection) { + connection.setRequestProperty("Authorization", "Basic " + this.authKey); } @Override - protected FilteredText filterText(String string, ServerTextFilter.IgnoreStrategy ignoreStrategy, JsonObject jsonObject) { - boolean bl = GsonHelper.getAsBoolean(jsonObject, "response", false); + protected FilteredText filterText(String text, ServerTextFilter.IgnoreStrategy ignoreStrategy, JsonObject response) { + boolean bl = GsonHelper.getAsBoolean(response, "response", false); if (bl) { - return FilteredText.passThrough(string); + return FilteredText.passThrough(text); } else { - String string2 = GsonHelper.getAsString(jsonObject, "hashed", null); - if (string2 == null) { - return FilteredText.fullyFiltered(string); + String string = GsonHelper.getAsString(response, "hashed", null); + if (string == null) { + return FilteredText.fullyFiltered(text); } else { - JsonArray jsonArray = GsonHelper.getAsJsonArray(jsonObject, "hashes"); - FilterMask filterMask = this.parseMask(string, jsonArray, ignoreStrategy); - return new FilteredText(string, filterMask); + JsonArray jsonArray = GsonHelper.getAsJsonArray(response, "hashes"); + FilterMask filterMask = this.parseMask(text, jsonArray, ignoreStrategy); + return new FilteredText(text, filterMask); } } } diff --git a/net/minecraft/server/network/PlayerSafetyServiceTextFilter.java b/net/minecraft/server/network/PlayerSafetyServiceTextFilter.java index 01332885..c54f2ed4 100644 --- a/net/minecraft/server/network/PlayerSafetyServiceTextFilter.java +++ b/net/minecraft/server/network/PlayerSafetyServiceTextFilter.java @@ -29,34 +29,34 @@ public class PlayerSafetyServiceTextFilter extends ServerTextFilter { private final int connectionReadTimeoutMs; private PlayerSafetyServiceTextFilter( - URL uRL, - ServerTextFilter.MessageEncoder messageEncoder, - ServerTextFilter.IgnoreStrategy ignoreStrategy, - ExecutorService executorService, - ConfidentialClientApplication confidentialClientApplication, - ClientCredentialParameters clientCredentialParameters, - Set set, - int i + URL chatEndpoint, + ServerTextFilter.MessageEncoder chatEncoder, + ServerTextFilter.IgnoreStrategy chatIgnoreStrategy, + ExecutorService workerPool, + ConfidentialClientApplication client, + ClientCredentialParameters clientParameters, + Set fullyFilteredEvents, + int connectionReadTimeoutMs ) { - super(uRL, messageEncoder, ignoreStrategy, executorService); - this.client = confidentialClientApplication; - this.clientParameters = clientCredentialParameters; - this.fullyFilteredEvents = set; - this.connectionReadTimeoutMs = i; + super(chatEndpoint, chatEncoder, chatIgnoreStrategy, workerPool); + this.client = client; + this.clientParameters = clientParameters; + this.fullyFilteredEvents = fullyFilteredEvents; + this.connectionReadTimeoutMs = connectionReadTimeoutMs; } @Nullable - public static ServerTextFilter createTextFilterFromConfig(String string) { - JsonObject jsonObject = GsonHelper.parse(string); + public static ServerTextFilter createTextFilterFromConfig(String config) { + JsonObject jsonObject = GsonHelper.parse(config); URI uRI = URI.create(GsonHelper.getAsString(jsonObject, "apiServer")); - String string2 = GsonHelper.getAsString(jsonObject, "apiPath"); - String string3 = GsonHelper.getAsString(jsonObject, "scope"); - String string4 = GsonHelper.getAsString(jsonObject, "serverId", ""); - String string5 = GsonHelper.getAsString(jsonObject, "applicationId"); - String string6 = GsonHelper.getAsString(jsonObject, "tenantId"); - String string7 = GsonHelper.getAsString(jsonObject, "roomId", "Java:Chat"); - String string8 = GsonHelper.getAsString(jsonObject, "certificatePath"); - String string9 = GsonHelper.getAsString(jsonObject, "certificatePassword", ""); + String string = GsonHelper.getAsString(jsonObject, "apiPath"); + String string2 = GsonHelper.getAsString(jsonObject, "scope"); + String string3 = GsonHelper.getAsString(jsonObject, "serverId", ""); + String string4 = GsonHelper.getAsString(jsonObject, "applicationId"); + String string5 = GsonHelper.getAsString(jsonObject, "tenantId"); + String string6 = GsonHelper.getAsString(jsonObject, "roomId", "Java:Chat"); + String string7 = GsonHelper.getAsString(jsonObject, "certificatePath"); + String string8 = GsonHelper.getAsString(jsonObject, "certificatePassword", ""); int i = GsonHelper.getAsInt(jsonObject, "hashesToDrop", -1); int j = GsonHelper.getAsInt(jsonObject, "maxConcurrentRequests", 7); JsonArray jsonArray = GsonHelper.getAsJsonArray(jsonObject, "fullyFilteredEvents"); @@ -66,7 +66,7 @@ public class PlayerSafetyServiceTextFilter extends ServerTextFilter { URL uRL; try { - uRL = uRI.resolve(string2).toURL(); + uRL = uRI.resolve(string).toURL(); } catch (MalformedURLException var26) { throw new RuntimeException(var26); } @@ -75,8 +75,8 @@ public class PlayerSafetyServiceTextFilter extends ServerTextFilter { JsonObject jsonObjectx = new JsonObject(); jsonObjectx.addProperty("userId", gameProfile.getId().toString()); jsonObjectx.addProperty("userDisplayName", gameProfile.getName()); - jsonObjectx.addProperty("server", string4); - jsonObjectx.addProperty("room", string7); + jsonObjectx.addProperty("server", string3); + jsonObjectx.addProperty("room", string6); jsonObjectx.addProperty("area", "JavaChatRealms"); jsonObjectx.addProperty("data", string3x); jsonObjectx.addProperty("language", "*"); @@ -87,10 +87,10 @@ public class PlayerSafetyServiceTextFilter extends ServerTextFilter { IClientCertificate iClientCertificate; try { - InputStream inputStream = Files.newInputStream(Path.of(string8)); + InputStream inputStream = Files.newInputStream(Path.of(string7)); try { - iClientCertificate = ClientCredentialFactory.createFromCertificate(inputStream, string9); + iClientCertificate = ClientCredentialFactory.createFromCertificate(inputStream, string8); } catch (Throwable var27) { if (inputStream != null) { try { @@ -113,17 +113,17 @@ public class PlayerSafetyServiceTextFilter extends ServerTextFilter { ConfidentialClientApplication confidentialClientApplication; try { - confidentialClientApplication = ConfidentialClientApplication.builder(string5, iClientCertificate) + confidentialClientApplication = ConfidentialClientApplication.builder(string4, iClientCertificate) .sendX5c(true) .executorService(executorService) - .authority(String.format(Locale.ROOT, "https://login.microsoftonline.com/%s/", string6)) + .authority(String.format(Locale.ROOT, "https://login.microsoftonline.com/%s/", string5)) .build(); } catch (Exception var25) { LOGGER.warn("Failed to create confidential client application"); return null; } - ClientCredentialParameters clientCredentialParameters = ClientCredentialParameters.builder(Set.of(string3)).build(); + ClientCredentialParameters clientCredentialParameters = ClientCredentialParameters.builder(Set.of(string2)).build(); return new PlayerSafetyServiceTextFilter( uRL, messageEncoder, ignoreStrategy, executorService, confidentialClientApplication, clientCredentialParameters, set, k ); @@ -134,31 +134,31 @@ public class PlayerSafetyServiceTextFilter extends ServerTextFilter { } @Override - protected void setAuthorizationProperty(HttpURLConnection httpURLConnection) { + protected void setAuthorizationProperty(HttpURLConnection connection) { IAuthenticationResult iAuthenticationResult = this.aquireIAuthenticationResult(); - httpURLConnection.setRequestProperty("Authorization", "Bearer " + iAuthenticationResult.accessToken()); + connection.setRequestProperty("Authorization", "Bearer " + iAuthenticationResult.accessToken()); } @Override - protected FilteredText filterText(String string, ServerTextFilter.IgnoreStrategy ignoreStrategy, JsonObject jsonObject) { - JsonObject jsonObject2 = GsonHelper.getAsJsonObject(jsonObject, "result", null); - if (jsonObject2 == null) { - return FilteredText.fullyFiltered(string); + protected FilteredText filterText(String text, ServerTextFilter.IgnoreStrategy ignoreStrategy, JsonObject response) { + JsonObject jsonObject = GsonHelper.getAsJsonObject(response, "result", null); + if (jsonObject == null) { + return FilteredText.fullyFiltered(text); } else { - boolean bl = GsonHelper.getAsBoolean(jsonObject2, "filtered", true); + boolean bl = GsonHelper.getAsBoolean(jsonObject, "filtered", true); if (!bl) { - return FilteredText.passThrough(string); + return FilteredText.passThrough(text); } else { - for (JsonElement jsonElement : GsonHelper.getAsJsonArray(jsonObject2, "events", new JsonArray())) { - JsonObject jsonObject3 = jsonElement.getAsJsonObject(); - String string2 = GsonHelper.getAsString(jsonObject3, "id", ""); - if (this.fullyFilteredEvents.contains(string2)) { - return FilteredText.fullyFiltered(string); + for (JsonElement jsonElement : GsonHelper.getAsJsonArray(jsonObject, "events", new JsonArray())) { + JsonObject jsonObject2 = jsonElement.getAsJsonObject(); + String string = GsonHelper.getAsString(jsonObject2, "id", ""); + if (this.fullyFilteredEvents.contains(string)) { + return FilteredText.fullyFiltered(text); } } - JsonArray jsonArray2 = GsonHelper.getAsJsonArray(jsonObject2, "redactedTextIndex", new JsonArray()); - return new FilteredText(string, this.parseMask(string, jsonArray2, ignoreStrategy)); + JsonArray jsonArray2 = GsonHelper.getAsJsonArray(jsonObject, "redactedTextIndex", new JsonArray()); + return new FilteredText(text, this.parseMask(text, jsonArray2, ignoreStrategy)); } } } diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java index 519e0a7f..203a068c 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -52,6 +52,7 @@ import net.minecraft.network.chat.PlayerChatMessage; import net.minecraft.network.chat.RemoteChatSession; import net.minecraft.network.chat.SignableCommand; import net.minecraft.network.chat.SignedMessageBody; +import net.minecraft.network.chat.ChatType.Bound; import net.minecraft.network.chat.LastSeenMessages.Update; import net.minecraft.network.chat.RemoteChatSession.Data; import net.minecraft.network.chat.SignableCommand.Argument; @@ -156,6 +157,7 @@ import net.minecraft.world.entity.player.ChatVisiblity; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.ProfilePublicKey; +import net.minecraft.world.entity.player.ProfilePublicKey.ValidationException; import net.minecraft.world.entity.projectile.AbstractArrow; import net.minecraft.world.entity.vehicle.AbstractBoat; import net.minecraft.world.inventory.AnvilMenu; @@ -505,8 +507,8 @@ public class ServerGamePacketListenerImpl } @Override - public void handleBundleItemSelectedPacket(ServerboundSelectBundleItemPacket serverboundSelectBundleItemPacket) { - this.player.containerMenu.setSelectedBundleItemIndex(serverboundSelectBundleItemPacket.slotId(), serverboundSelectBundleItemPacket.selectedItemIndex()); + public void handleBundleItemSelectedPacket(ServerboundSelectBundleItemPacket packet) { + this.player.containerMenu.setSelectedBundleItemIndex(packet.slotId(), packet.selectedItemIndex()); } @Override @@ -959,7 +961,7 @@ public class ServerGamePacketListenerImpl } } - private boolean shouldCheckPlayerMovement(boolean bl) { + private boolean shouldCheckPlayerMovement(boolean isElytraMovement) { if (this.isSingleplayerOwner()) { return false; } else if (this.player.isChangingDimension()) { @@ -968,7 +970,7 @@ public class ServerGamePacketListenerImpl GameRules gameRules = this.player.serverLevel().getGameRules(); return gameRules.getBoolean(GameRules.RULE_DISABLE_PLAYER_MOVEMENT_CHECK) ? false - : !bl || !gameRules.getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK); + : !isElytraMovement || !gameRules.getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK); } } @@ -1006,15 +1008,15 @@ public class ServerGamePacketListenerImpl this.teleport(new PositionMoveRotation(new Vec3(x, y, z), Vec3.ZERO, yaw, pitch), Collections.emptySet()); } - public void teleport(PositionMoveRotation positionMoveRotation, Set set) { + public void teleport(PositionMoveRotation posMoveRotation, Set relatives) { this.awaitingTeleportTime = this.tickCount; if (++this.awaitingTeleport == Integer.MAX_VALUE) { this.awaitingTeleport = 0; } - this.player.teleportSetPosition(positionMoveRotation, set); + this.player.teleportSetPosition(posMoveRotation, relatives); this.awaitingPositionFromClient = this.player.position(); - this.player.connection.send(ClientboundPlayerPositionPacket.of(this.awaitingTeleport, positionMoveRotation, set)); + this.player.connection.send(ClientboundPlayerPositionPacket.of(this.awaitingTeleport, posMoveRotation, relatives)); } @Override @@ -1462,7 +1464,7 @@ public class ServerGamePacketListenerImpl } } - public void sendPlayerChatMessage(PlayerChatMessage chatMessage, ChatType.Bound boundType) { + public void sendPlayerChatMessage(PlayerChatMessage chatMessage, Bound boundType) { this.send( new ClientboundPlayerChatPacket( chatMessage.link().sender(), @@ -1477,7 +1479,7 @@ public class ServerGamePacketListenerImpl this.addPendingMessage(chatMessage); } - public void sendDisguisedChatMessage(Component message, ChatType.Bound boundType) { + public void sendDisguisedChatMessage(Component message, Bound boundType) { this.send(new ClientboundDisguisedChatPacket(message, boundType)); } @@ -1765,8 +1767,8 @@ public class ServerGamePacketListenerImpl public void handleChatSessionUpdate(ServerboundChatSessionUpdatePacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); Data data = packet.chatSession(); - ProfilePublicKey.Data data2 = this.chatSession != null ? this.chatSession.profilePublicKey().data() : null; - ProfilePublicKey.Data data3 = data.profilePublicKey(); + net.minecraft.world.entity.player.ProfilePublicKey.Data data2 = this.chatSession != null ? this.chatSession.profilePublicKey().data() : null; + net.minecraft.world.entity.player.ProfilePublicKey.Data data3 = data.profilePublicKey(); if (!Objects.equals(data2, data3)) { if (data2 != null && data3.expiresAt().isBefore(data2.expiresAt())) { this.disconnect(ProfilePublicKey.EXPIRED_PROFILE_PUBLIC_KEY); @@ -1779,7 +1781,7 @@ public class ServerGamePacketListenerImpl } this.resetPlayerChatState(data.validate(this.player.getGameProfile(), signatureValidator)); - } catch (ProfilePublicKey.ValidationException var6) { + } catch (ValidationException var6) { LOGGER.error("Failed to validate profile key: {}", var6.getMessage()); this.disconnect(var6.getComponent()); } @@ -1821,7 +1823,11 @@ public class ServerGamePacketListenerImpl this.player.setChatSession(chatSession); this.server .getPlayerList() - .broadcastAll(new ClientboundPlayerInfoUpdatePacket(EnumSet.of(ClientboundPlayerInfoUpdatePacket.Action.INITIALIZE_CHAT), List.of(this.player))); + .broadcastAll( + new ClientboundPlayerInfoUpdatePacket( + EnumSet.of(net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket.Action.INITIALIZE_CHAT), List.of(this.player) + ) + ); } ); } @@ -1831,8 +1837,8 @@ public class ServerGamePacketListenerImpl } @Override - public void handleClientTickEnd(ServerboundClientTickEndPacket serverboundClientTickEndPacket) { - PacketUtils.ensureRunningOnSameThread(serverboundClientTickEndPacket, this, this.player.serverLevel()); + public void handleClientTickEnd(ServerboundClientTickEndPacket packet) { + PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); if (!this.receivedMovementThisTick) { this.player.setKnownMovement(Vec3.ZERO); } @@ -1840,12 +1846,12 @@ public class ServerGamePacketListenerImpl this.receivedMovementThisTick = false; } - private void handlePlayerKnownMovement(Vec3 vec3) { - if (vec3.lengthSqr() > 1.0E-5F) { + private void handlePlayerKnownMovement(Vec3 movement) { + if (movement.lengthSqr() > 1.0E-5F) { this.player.resetLastActionTime(); } - this.player.setKnownMovement(vec3); + this.player.setKnownMovement(movement); this.receivedMovementThisTick = true; } diff --git a/net/minecraft/server/network/ServerTextFilter.java b/net/minecraft/server/network/ServerTextFilter.java index 3dcc91bf..ed2310df 100644 --- a/net/minecraft/server/network/ServerTextFilter.java +++ b/net/minecraft/server/network/ServerTextFilter.java @@ -47,35 +47,35 @@ public abstract class ServerTextFilter implements AutoCloseable { final ServerTextFilter.IgnoreStrategy chatIgnoreStrategy; final ExecutorService workerPool; - protected static ExecutorService createWorkerPool(int i) { - return Executors.newFixedThreadPool(i, THREAD_FACTORY); + protected static ExecutorService createWorkerPool(int size) { + return Executors.newFixedThreadPool(size, THREAD_FACTORY); } protected ServerTextFilter( - URL uRL, ServerTextFilter.MessageEncoder messageEncoder, ServerTextFilter.IgnoreStrategy ignoreStrategy, ExecutorService executorService + URL chatEndpoint, ServerTextFilter.MessageEncoder chatEncoder, ServerTextFilter.IgnoreStrategy chatIgnoreStrategy, ExecutorService workerPool ) { - this.chatIgnoreStrategy = ignoreStrategy; - this.workerPool = executorService; - this.chatEndpoint = uRL; - this.chatEncoder = messageEncoder; + this.chatIgnoreStrategy = chatIgnoreStrategy; + this.workerPool = workerPool; + this.chatEndpoint = chatEndpoint; + this.chatEncoder = chatEncoder; } - protected static URL getEndpoint(URI uRI, @Nullable JsonObject jsonObject, String string, String string2) throws MalformedURLException { - String string3 = getEndpointFromConfig(jsonObject, string, string2); - return uRI.resolve("/" + string3).toURL(); + protected static URL getEndpoint(URI apiServer, @Nullable JsonObject json, String key, String fallback) throws MalformedURLException { + String string = getEndpointFromConfig(json, key, fallback); + return apiServer.resolve("/" + string).toURL(); } - protected static String getEndpointFromConfig(@Nullable JsonObject jsonObject, String string, String string2) { - return jsonObject != null ? GsonHelper.getAsString(jsonObject, string, string2) : string2; + protected static String getEndpointFromConfig(@Nullable JsonObject json, String key, String fallback) { + return json != null ? GsonHelper.getAsString(json, key, fallback) : fallback; } @Nullable - public static ServerTextFilter createFromConfig(DedicatedServerProperties dedicatedServerProperties) { - String string = dedicatedServerProperties.textFilteringConfig; + public static ServerTextFilter createFromConfig(DedicatedServerProperties config) { + String string = config.textFilteringConfig; if (StringUtil.isBlank(string)) { return null; } else { - return switch (dedicatedServerProperties.textFilteringVersion) { + return switch (config.textFilteringVersion) { case 0 -> LegacyTextFilter.createTextFilterFromConfig(string); case 1 -> PlayerSafetyServiceTextFilter.createTextFilterFromConfig(string); default -> { @@ -87,33 +87,33 @@ public abstract class ServerTextFilter implements AutoCloseable { } protected CompletableFuture requestMessageProcessing( - GameProfile gameProfile, String string, ServerTextFilter.IgnoreStrategy ignoreStrategy, Executor executor + GameProfile profile, String filter, ServerTextFilter.IgnoreStrategy chatIgnoreStrategy, Executor streamExecutor ) { - return string.isEmpty() ? CompletableFuture.completedFuture(FilteredText.EMPTY) : CompletableFuture.supplyAsync(() -> { - JsonObject jsonObject = this.chatEncoder.encode(gameProfile, string); + return filter.isEmpty() ? CompletableFuture.completedFuture(FilteredText.EMPTY) : CompletableFuture.supplyAsync(() -> { + JsonObject jsonObject = this.chatEncoder.encode(profile, filter); try { JsonObject jsonObject2 = this.processRequestResponse(jsonObject, this.chatEndpoint); - return this.filterText(string, ignoreStrategy, jsonObject2); + return this.filterText(filter, chatIgnoreStrategy, jsonObject2); } catch (Exception var6) { - LOGGER.warn("Failed to validate message '{}'", string, var6); - return FilteredText.fullyFiltered(string); + LOGGER.warn("Failed to validate message '{}'", filter, var6); + return FilteredText.fullyFiltered(filter); } - }, executor); + }, streamExecutor); } - protected abstract FilteredText filterText(String string, ServerTextFilter.IgnoreStrategy ignoreStrategy, JsonObject jsonObject); + protected abstract FilteredText filterText(String text, ServerTextFilter.IgnoreStrategy ignoreStrategy, JsonObject response); - protected FilterMask parseMask(String string, JsonArray jsonArray, ServerTextFilter.IgnoreStrategy ignoreStrategy) { - if (jsonArray.isEmpty()) { + protected FilterMask parseMask(String text, JsonArray hashes, ServerTextFilter.IgnoreStrategy ignoreStrategy) { + if (hashes.isEmpty()) { return FilterMask.PASS_THROUGH; - } else if (ignoreStrategy.shouldIgnore(string, jsonArray.size())) { + } else if (ignoreStrategy.shouldIgnore(text, hashes.size())) { return FilterMask.FULLY_FILTERED; } else { - FilterMask filterMask = new FilterMask(string.length()); + FilterMask filterMask = new FilterMask(text.length()); - for (int i = 0; i < jsonArray.size(); i++) { - filterMask.setFiltered(jsonArray.get(i).getAsInt()); + for (int i = 0; i < hashes.size(); i++) { + filterMask.setFiltered(hashes.get(i).getAsInt()); } return filterMask; @@ -124,15 +124,15 @@ public abstract class ServerTextFilter implements AutoCloseable { this.workerPool.shutdownNow(); } - protected void drainStream(InputStream inputStream) throws IOException { + protected void drainStream(InputStream stream) throws IOException { byte[] bs = new byte[1024]; - while (inputStream.read(bs) != -1) { + while (stream.read(bs) != -1) { } } - private JsonObject processRequestResponse(JsonObject jsonObject, URL uRL) throws IOException { - HttpURLConnection httpURLConnection = this.makeRequest(jsonObject, uRL); + private JsonObject processRequestResponse(JsonObject request, URL endpoint) throws IOException { + HttpURLConnection httpURLConnection = this.makeRequest(request, endpoint); InputStream inputStream = httpURLConnection.getInputStream(); JsonObject var13; @@ -174,8 +174,8 @@ public abstract class ServerTextFilter implements AutoCloseable { return var13; } - protected HttpURLConnection makeRequest(JsonObject jsonObject, URL uRL) throws IOException { - HttpURLConnection httpURLConnection = this.getURLConnection(uRL); + protected HttpURLConnection makeRequest(JsonObject request, URL endpoint) throws IOException { + HttpURLConnection httpURLConnection = this.getURLConnection(endpoint); this.setAuthorizationProperty(httpURLConnection); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(httpURLConnection.getOutputStream(), StandardCharsets.UTF_8); @@ -183,7 +183,7 @@ public abstract class ServerTextFilter implements AutoCloseable { JsonWriter jsonWriter = new JsonWriter(outputStreamWriter); try { - Streams.write(jsonObject, jsonWriter); + Streams.write(request, jsonWriter); } catch (Throwable var10) { try { jsonWriter.close(); @@ -214,14 +214,14 @@ public abstract class ServerTextFilter implements AutoCloseable { } } - protected abstract void setAuthorizationProperty(HttpURLConnection httpURLConnection); + protected abstract void setAuthorizationProperty(HttpURLConnection connection); protected int connectionReadTimeout() { return 2000; } - protected HttpURLConnection getURLConnection(URL uRL) throws IOException { - HttpURLConnection httpURLConnection = (HttpURLConnection)uRL.openConnection(); + protected HttpURLConnection getURLConnection(URL url) throws IOException { + HttpURLConnection httpURLConnection = (HttpURLConnection)url.openConnection(); httpURLConnection.setConnectTimeout(15000); httpURLConnection.setReadTimeout(this.connectionReadTimeout()); httpURLConnection.setUseCaches(false); @@ -234,8 +234,8 @@ public abstract class ServerTextFilter implements AutoCloseable { return httpURLConnection; } - public TextFilter createContext(GameProfile gameProfile) { - return new ServerTextFilter.PlayerContext(gameProfile); + public TextFilter createContext(GameProfile profile) { + return new ServerTextFilter.PlayerContext(profile); } @FunctionalInterface @@ -243,15 +243,15 @@ public abstract class ServerTextFilter implements AutoCloseable { ServerTextFilter.IgnoreStrategy NEVER_IGNORE = (string, i) -> false; ServerTextFilter.IgnoreStrategy IGNORE_FULLY_FILTERED = (string, i) -> string.length() == i; - static ServerTextFilter.IgnoreStrategy ignoreOverThreshold(int i) { - return (string, j) -> j >= i; + static ServerTextFilter.IgnoreStrategy ignoreOverThreshold(int theshold) { + return (string, j) -> j >= theshold; } - static ServerTextFilter.IgnoreStrategy select(int i) { - return switch (i) { + static ServerTextFilter.IgnoreStrategy select(int threshold) { + return switch (threshold) { case -1 -> NEVER_IGNORE; case 0 -> IGNORE_FULLY_FILTERED; - default -> ignoreOverThreshold(i); + default -> ignoreOverThreshold(threshold); }; } @@ -267,9 +267,9 @@ public abstract class ServerTextFilter implements AutoCloseable { protected final GameProfile profile; protected final Executor streamExecutor; - protected PlayerContext(final GameProfile gameProfile) { - this.profile = gameProfile; - ConsecutiveExecutor consecutiveExecutor = new ConsecutiveExecutor(ServerTextFilter.this.workerPool, "chat stream for " + gameProfile.getName()); + protected PlayerContext(final GameProfile profile) { + this.profile = profile; + ConsecutiveExecutor consecutiveExecutor = new ConsecutiveExecutor(ServerTextFilter.this.workerPool, "chat stream for " + profile.getName()); this.streamExecutor = consecutiveExecutor::schedule; } @@ -288,8 +288,8 @@ public abstract class ServerTextFilter implements AutoCloseable { } protected static class RequestFailedException extends RuntimeException { - protected RequestFailedException(String string) { - super(string); + protected RequestFailedException(String message) { + super(message); } } } diff --git a/net/minecraft/server/packs/resources/PreparableReloadListener.java b/net/minecraft/server/packs/resources/PreparableReloadListener.java index 5445d9eb..2e3e38d7 100644 --- a/net/minecraft/server/packs/resources/PreparableReloadListener.java +++ b/net/minecraft/server/packs/resources/PreparableReloadListener.java @@ -5,7 +5,7 @@ import java.util.concurrent.Executor; public interface PreparableReloadListener { CompletableFuture reload( - PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor executor, Executor executor2 + PreparableReloadListener.PreparationBarrier barrier, ResourceManager manager, Executor backgroundExecutor, Executor gameExecutor ); default String getName() { diff --git a/net/minecraft/server/packs/resources/ProfiledReloadInstance.java b/net/minecraft/server/packs/resources/ProfiledReloadInstance.java index 726799f9..912da761 100644 --- a/net/minecraft/server/packs/resources/ProfiledReloadInstance.java +++ b/net/minecraft/server/packs/resources/ProfiledReloadInstance.java @@ -49,13 +49,13 @@ public class ProfiledReloadInstance extends SimpleReloadInstance executor.execute(() -> { ProfilerFiller profilerFiller = Profiler.get(); - profilerFiller.push(string); + profilerFiller.push(name); long l = Util.getNanos(); runnable.run(); - atomicLong.addAndGet(Util.getNanos() - l); + timeTaken.addAndGet(Util.getNanos() - l); profilerFiller.pop(); }); } diff --git a/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java b/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java index 66ba9d63..38f39caf 100644 --- a/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java +++ b/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java @@ -9,14 +9,14 @@ import net.minecraft.util.profiling.ProfilerFiller; public interface ResourceManagerReloadListener extends PreparableReloadListener { @Override default CompletableFuture reload( - PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor executor, Executor executor2 + PreparableReloadListener.PreparationBarrier barrier, ResourceManager manager, Executor backgroundExecutor, Executor gameExecutor ) { - return preparationBarrier.wait(Unit.INSTANCE).thenRunAsync(() -> { + return barrier.wait(Unit.INSTANCE).thenRunAsync(() -> { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("listener"); - this.onResourceManagerReload(resourceManager); + this.onResourceManagerReload(manager); profilerFiller.pop(); - }, executor2); + }, gameExecutor); } void onResourceManagerReload(ResourceManager resourceManager); diff --git a/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java b/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java index 84f28963..29b8523a 100644 --- a/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java +++ b/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java @@ -24,18 +24,18 @@ public abstract class SimpleJsonResourceReloadListener extends SimplePreparab private final Codec codec; private final String directory; - protected SimpleJsonResourceReloadListener(HolderLookup.Provider provider, Codec codec, String string) { - this(provider.createSerializationContext(JsonOps.INSTANCE), codec, string); + protected SimpleJsonResourceReloadListener(HolderLookup.Provider registries, Codec codec, String directory) { + this(registries.createSerializationContext(JsonOps.INSTANCE), codec, directory); } - protected SimpleJsonResourceReloadListener(Codec codec, String string) { - this(JsonOps.INSTANCE, codec, string); + protected SimpleJsonResourceReloadListener(Codec codec, String directory) { + this(JsonOps.INSTANCE, codec, directory); } - private SimpleJsonResourceReloadListener(DynamicOps dynamicOps, Codec codec, String string) { - this.ops = dynamicOps; + private SimpleJsonResourceReloadListener(DynamicOps ops, Codec codec, String directory) { + this.ops = ops; this.codec = codec; - this.directory = string; + this.directory = directory; } /** @@ -48,9 +48,9 @@ public abstract class SimpleJsonResourceReloadListener extends SimplePreparab } public static void scanDirectory( - ResourceManager resourceManager, String string, DynamicOps dynamicOps, Codec codec, Map map + ResourceManager resourceManager, String directory, DynamicOps ops, Codec codec, Map results ) { - FileToIdConverter fileToIdConverter = FileToIdConverter.json(string); + FileToIdConverter fileToIdConverter = FileToIdConverter.json(directory); for (Entry entry : fileToIdConverter.listMatchingResources(resourceManager).entrySet()) { ResourceLocation resourceLocation = (ResourceLocation)entry.getKey(); @@ -60,8 +60,8 @@ public abstract class SimpleJsonResourceReloadListener extends SimplePreparab Reader reader = ((Resource)entry.getValue()).openAsReader(); try { - codec.parse(dynamicOps, JsonParser.parseReader(reader)).ifSuccess(object -> { - if (map.putIfAbsent(resourceLocation2, object) != null) { + codec.parse(ops, JsonParser.parseReader(reader)).ifSuccess(object -> { + if (results.putIfAbsent(resourceLocation2, object) != null) { throw new IllegalStateException("Duplicate data file ignored with ID " + resourceLocation2); } }).ifError(error -> LOGGER.error("Couldn't parse data file '{}' from '{}': {}", resourceLocation2, resourceLocation, error)); diff --git a/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java b/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java index 2422b1a0..d7eedb3c 100644 --- a/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java +++ b/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java @@ -8,11 +8,11 @@ import net.minecraft.util.profiling.ProfilerFiller; public abstract class SimplePreparableReloadListener implements PreparableReloadListener { @Override public final CompletableFuture reload( - PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, Executor executor, Executor executor2 + PreparableReloadListener.PreparationBarrier barrier, ResourceManager manager, Executor backgroundExecutor, Executor gameExecutor ) { - return CompletableFuture.supplyAsync(() -> this.prepare(resourceManager, Profiler.get()), executor) - .thenCompose(preparationBarrier::wait) - .thenAcceptAsync(object -> this.apply((T)object, resourceManager, Profiler.get()), executor2); + return CompletableFuture.supplyAsync(() -> this.prepare(manager, Profiler.get()), backgroundExecutor) + .thenCompose(barrier::wait) + .thenAcceptAsync(object -> this.apply((T)object, manager, Profiler.get()), gameExecutor); } /** diff --git a/net/minecraft/stats/RecipeBookSettings.java b/net/minecraft/stats/RecipeBookSettings.java index a0e387ba..cf43813a 100644 --- a/net/minecraft/stats/RecipeBookSettings.java +++ b/net/minecraft/stats/RecipeBookSettings.java @@ -32,17 +32,17 @@ public final class RecipeBookSettings { this(new EnumMap(RecipeBookType.class)); } - private RecipeBookSettings.TypeSettings getSettings(RecipeBookType recipeBookType) { - return (RecipeBookSettings.TypeSettings)this.states.getOrDefault(recipeBookType, RecipeBookSettings.TypeSettings.DEFAULT); + private RecipeBookSettings.TypeSettings getSettings(RecipeBookType type) { + return (RecipeBookSettings.TypeSettings)this.states.getOrDefault(type, RecipeBookSettings.TypeSettings.DEFAULT); } - private void updateSettings(RecipeBookType recipeBookType, UnaryOperator unaryOperator) { - this.states.compute(recipeBookType, (recipeBookTypex, typeSettings) -> { + private void updateSettings(RecipeBookType type, UnaryOperator updater) { + this.states.compute(type, (recipeBookType, typeSettings) -> { if (typeSettings == null) { typeSettings = RecipeBookSettings.TypeSettings.DEFAULT; } - typeSettings = (RecipeBookSettings.TypeSettings)unaryOperator.apply(typeSettings); + typeSettings = (RecipeBookSettings.TypeSettings)updater.apply(typeSettings); if (typeSettings.equals(RecipeBookSettings.TypeSettings.DEFAULT)) { typeSettings = null; } @@ -137,12 +137,12 @@ public final class RecipeBookSettings { return "[open=" + this.open + ", filtering=" + this.filtering + "]"; } - public RecipeBookSettings.TypeSettings setOpen(boolean bl) { - return new RecipeBookSettings.TypeSettings(bl, this.filtering); + public RecipeBookSettings.TypeSettings setOpen(boolean open) { + return new RecipeBookSettings.TypeSettings(open, this.filtering); } - public RecipeBookSettings.TypeSettings setFiltering(boolean bl) { - return new RecipeBookSettings.TypeSettings(this.open, bl); + public RecipeBookSettings.TypeSettings setFiltering(boolean filtering) { + return new RecipeBookSettings.TypeSettings(this.open, filtering); } } } diff --git a/net/minecraft/stats/ServerRecipeBook.java b/net/minecraft/stats/ServerRecipeBook.java index 75d531f3..6c8e52a5 100644 --- a/net/minecraft/stats/ServerRecipeBook.java +++ b/net/minecraft/stats/ServerRecipeBook.java @@ -41,25 +41,25 @@ public class ServerRecipeBook extends RecipeBook { this.displayResolver = displayResolver; } - public void add(ResourceKey> resourceKey) { - this.known.add(resourceKey); + public void add(ResourceKey> recipe) { + this.known.add(recipe); } - public boolean contains(ResourceKey> resourceKey) { - return this.known.contains(resourceKey); + public boolean contains(ResourceKey> recipe) { + return this.known.contains(recipe); } - public void remove(ResourceKey> resourceKey) { - this.known.remove(resourceKey); - this.highlight.remove(resourceKey); + public void remove(ResourceKey> recipe) { + this.known.remove(recipe); + this.highlight.remove(recipe); } - public void removeHighlight(ResourceKey> resourceKey) { - this.highlight.remove(resourceKey); + public void removeHighlight(ResourceKey> recipe) { + this.highlight.remove(recipe); } - private void addHighlight(ResourceKey> resourceKey) { - this.highlight.add(resourceKey); + private void addHighlight(ResourceKey> recipe) { + this.highlight.add(recipe); } public int addRecipes(Collection> recipes, ServerPlayer player) { @@ -123,24 +123,24 @@ public class ServerRecipeBook extends RecipeBook { return compoundTag; } - public void fromNbt(CompoundTag compoundTag, Predicate>> predicate) { - this.setBookSettings(RecipeBookSettings.read(compoundTag)); - ListTag listTag = compoundTag.getList("recipes", 8); - this.loadRecipes(listTag, this::add, predicate); - ListTag listTag2 = compoundTag.getList("toBeDisplayed", 8); - this.loadRecipes(listTag2, this::addHighlight, predicate); + public void fromNbt(CompoundTag tag, Predicate>> isRecognized) { + this.setBookSettings(RecipeBookSettings.read(tag)); + ListTag listTag = tag.getList("recipes", 8); + this.loadRecipes(listTag, this::add, isRecognized); + ListTag listTag2 = tag.getList("toBeDisplayed", 8); + this.loadRecipes(listTag2, this::addHighlight, isRecognized); } - private void loadRecipes(ListTag listTag, Consumer>> consumer, Predicate>> predicate) { - for (int i = 0; i < listTag.size(); i++) { - String string = listTag.getString(i); + private void loadRecipes(ListTag tag, Consumer>> output, Predicate>> isRecognized) { + for (int i = 0; i < tag.size(); i++) { + String string = tag.getString(i); try { ResourceKey> resourceKey = ResourceKey.create(Registries.RECIPE, ResourceLocation.parse(string)); - if (!predicate.test(resourceKey)) { + if (!isRecognized.test(resourceKey)) { LOGGER.error("Tried to load unrecognized recipe: {} removed now.", resourceKey); } else { - consumer.accept(resourceKey); + output.accept(resourceKey); } } catch (ResourceLocationException var7) { LOGGER.error("Tried to load improperly formatted recipe: {} removed now.", string); @@ -162,12 +162,12 @@ public class ServerRecipeBook extends RecipeBook { player.connection.send(new ClientboundRecipeBookAddPacket(list, true)); } - public void copyOverData(ServerRecipeBook serverRecipeBook) { + public void copyOverData(ServerRecipeBook other) { this.known.clear(); this.highlight.clear(); - this.bookSettings.replaceFrom(serverRecipeBook.bookSettings); - this.known.addAll(serverRecipeBook.known); - this.highlight.addAll(serverRecipeBook.highlight); + this.bookSettings.replaceFrom(other.bookSettings); + this.known.addAll(other.known); + this.highlight.addAll(other.highlight); } @FunctionalInterface diff --git a/net/minecraft/tags/TagEntry.java b/net/minecraft/tags/TagEntry.java index a5796ebf..5d2a4be1 100644 --- a/net/minecraft/tags/TagEntry.java +++ b/net/minecraft/tags/TagEntry.java @@ -111,9 +111,9 @@ public class TagEntry { public interface Lookup { @Nullable - T element(ResourceLocation resourceLocation, boolean bl); + T element(ResourceLocation id, boolean required); @Nullable - Collection tag(ResourceLocation tagLocation); + Collection tag(ResourceLocation id); } } diff --git a/net/minecraft/tags/TagKey.java b/net/minecraft/tags/TagKey.java index af849e32..46b447b7 100644 --- a/net/minecraft/tags/TagKey.java +++ b/net/minecraft/tags/TagKey.java @@ -34,8 +34,8 @@ public record TagKey(ResourceKey> registry, ResourceLoc ); } - public static StreamCodec> streamCodec(ResourceKey> resourceKey) { - return ResourceLocation.STREAM_CODEC.map(resourceLocation -> create(resourceKey, resourceLocation), TagKey::location); + public static StreamCodec> streamCodec(ResourceKey> registry) { + return ResourceLocation.STREAM_CODEC.map(resourceLocation -> create(registry, resourceLocation), TagKey::location); } public static TagKey create(ResourceKey> registry, ResourceLocation location) { diff --git a/net/minecraft/tags/TagLoader.java b/net/minecraft/tags/TagLoader.java index d5a2357c..8f823367 100644 --- a/net/minecraft/tags/TagLoader.java +++ b/net/minecraft/tags/TagLoader.java @@ -40,9 +40,9 @@ public class TagLoader { final TagLoader.ElementLookup elementLookup; private final String directory; - public TagLoader(TagLoader.ElementLookup elementLookup, String string) { + public TagLoader(TagLoader.ElementLookup elementLookup, String directory) { this.elementLookup = elementLookup; - this.directory = string; + this.directory = directory; } public Map> load(ResourceManager resourceManager) { @@ -91,17 +91,17 @@ public class TagLoader { return map; } - private Either, List> tryBuildTag(TagEntry.Lookup lookup, List list) { + private Either, List> tryBuildTag(TagEntry.Lookup lookup, List entries) { SequencedSet sequencedSet = new LinkedHashSet(); - List list2 = new ArrayList(); + List list = new ArrayList(); - for (TagLoader.EntryWithSource entryWithSource : list) { + for (TagLoader.EntryWithSource entryWithSource : entries) { if (!entryWithSource.entry().build(lookup, sequencedSet::add)) { - list2.add(entryWithSource); + list.add(entryWithSource); } } - return list2.isEmpty() ? Either.right(List.copyOf(sequencedSet)) : Either.left(list2); + return list.isEmpty() ? Either.right(List.copyOf(sequencedSet)) : Either.left(list); } public Map> build(Map> builders) { @@ -109,14 +109,14 @@ public class TagLoader { TagEntry.Lookup lookup = new TagEntry.Lookup() { @Nullable @Override - public T element(ResourceLocation resourceLocation, boolean bl) { - return (T)TagLoader.this.elementLookup.get(resourceLocation, bl).orElse(null); + public T element(ResourceLocation id, boolean required) { + return (T)TagLoader.this.elementLookup.get(id, required).orElse(null); } @Nullable @Override - public Collection tag(ResourceLocation tagLocation) { - return (Collection)map.get(tagLocation); + public Collection tag(ResourceLocation id) { + return (Collection)map.get(id); } }; DependencySorter dependencySorter = new DependencySorter<>(); @@ -135,8 +135,8 @@ public class TagLoader { return map; } - public static void loadTagsFromNetwork(TagNetworkSerialization.NetworkPayload networkPayload, WritableRegistry writableRegistry) { - networkPayload.resolve(writableRegistry).tags.forEach(writableRegistry::bindTag); + public static void loadTagsFromNetwork(TagNetworkSerialization.NetworkPayload payload, WritableRegistry registry) { + payload.resolve(registry).tags.forEach(registry::bindTag); } public static List> loadTagsForExistingRegistries(ResourceManager resourceManager, RegistryAccess registryAccess) { @@ -146,17 +146,16 @@ public class TagLoader { .collect(Collectors.toUnmodifiableList()); } - public static void loadTagsForRegistry(ResourceManager resourceManager, WritableRegistry writableRegistry) { - ResourceKey> resourceKey = writableRegistry.key(); - TagLoader> tagLoader = new TagLoader<>(TagLoader.ElementLookup.fromWritableRegistry(writableRegistry), Registries.tagsDirPath(resourceKey)); - tagLoader.build(tagLoader.load(resourceManager)) - .forEach((resourceLocation, list) -> writableRegistry.bindTag(TagKey.create(resourceKey, resourceLocation), list)); + public static void loadTagsForRegistry(ResourceManager resourceManager, WritableRegistry registry) { + ResourceKey> resourceKey = registry.key(); + TagLoader> tagLoader = new TagLoader<>(TagLoader.ElementLookup.fromWritableRegistry(registry), Registries.tagsDirPath(resourceKey)); + tagLoader.build(tagLoader.load(resourceManager)).forEach((resourceLocation, list) -> registry.bindTag(TagKey.create(resourceKey, resourceLocation), list)); } - private static Map, List>> wrapTags(ResourceKey> resourceKey, Map>> map) { - return (Map, List>>)map.entrySet() + private static Map, List>> wrapTags(ResourceKey> registryKey, Map>> tags) { + return (Map, List>>)tags.entrySet() .stream() - .collect(Collectors.toUnmodifiableMap(entry -> TagKey.create(resourceKey, (ResourceLocation)entry.getKey()), Entry::getValue)); + .collect(Collectors.toUnmodifiableMap(entry -> TagKey.create(registryKey, (ResourceLocation)entry.getKey()), Entry::getValue)); } private static Optional> loadPendingTags(ResourceManager resourceManager, Registry registry) { @@ -168,19 +167,19 @@ public class TagLoader { return loadResult.tags().isEmpty() ? Optional.empty() : Optional.of(registry.prepareTagReload(loadResult)); } - public static List> buildUpdatedLookups(RegistryAccess.Frozen frozen, List> list) { - List> list2 = new ArrayList(); - frozen.registries().forEach(registryEntry -> { - Registry.PendingTags pendingTags = findTagsForRegistry(list, registryEntry.key()); - list2.add(pendingTags != null ? pendingTags.lookup() : registryEntry.value()); + public static List> buildUpdatedLookups(RegistryAccess.Frozen registry, List> tags) { + List> list = new ArrayList(); + registry.registries().forEach(registryEntry -> { + Registry.PendingTags pendingTags = findTagsForRegistry(tags, registryEntry.key()); + list.add(pendingTags != null ? pendingTags.lookup() : registryEntry.value()); }); - return list2; + return list; } @Nullable - private static Registry.PendingTags findTagsForRegistry(List> list, ResourceKey> resourceKey) { - for (Registry.PendingTags pendingTags : list) { - if (pendingTags.key() == resourceKey) { + private static Registry.PendingTags findTagsForRegistry(List> tags, ResourceKey> registryKey) { + for (Registry.PendingTags pendingTags : tags) { + if (pendingTags.key() == registryKey) { return pendingTags; } } @@ -195,9 +194,9 @@ public class TagLoader { return (resourceLocation, bl) -> registry.get(resourceLocation); } - static TagLoader.ElementLookup> fromWritableRegistry(WritableRegistry writableRegistry) { - HolderGetter holderGetter = writableRegistry.createRegistrationLookup(); - return (resourceLocation, bl) -> ((HolderGetter)(bl ? holderGetter : writableRegistry)).get(ResourceKey.create(writableRegistry.key(), resourceLocation)); + static TagLoader.ElementLookup> fromWritableRegistry(WritableRegistry registry) { + HolderGetter holderGetter = registry.createRegistrationLookup(); + return (resourceLocation, bl) -> ((HolderGetter)(bl ? holderGetter : registry)).get(ResourceKey.create(registry.key(), resourceLocation)); } } diff --git a/net/minecraft/tags/TagNetworkSerialization.java b/net/minecraft/tags/TagNetworkSerialization.java index 4d9d3cfe..41bf412e 100644 --- a/net/minecraft/tags/TagNetworkSerialization.java +++ b/net/minecraft/tags/TagNetworkSerialization.java @@ -12,6 +12,7 @@ import net.minecraft.core.Holder; import net.minecraft.core.LayeredRegistryAccess; import net.minecraft.core.Registry; import net.minecraft.core.RegistrySynchronization; +import net.minecraft.core.Holder.Kind; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; @@ -33,7 +34,7 @@ public class TagNetworkSerialization { IntList intList = new IntArrayList(named.size()); for (Holder holder : named) { - if (holder.kind() != Holder.Kind.REFERENCE) { + if (holder.kind() != Kind.REFERENCE) { throw new IllegalStateException("Can't serialize unregistered value " + holder); } @@ -45,10 +46,10 @@ public class TagNetworkSerialization { return new TagNetworkSerialization.NetworkPayload(map); } - static TagLoader.LoadResult deserializeTagsFromNetwork(Registry registry, TagNetworkSerialization.NetworkPayload networkPayload) { + static TagLoader.LoadResult deserializeTagsFromNetwork(Registry registry, TagNetworkSerialization.NetworkPayload payload) { ResourceKey> resourceKey = registry.key(); Map, List>> map = new HashMap(); - networkPayload.tags.forEach((resourceLocation, intList) -> { + payload.tags.forEach((resourceLocation, intList) -> { TagKey tagKey = TagKey.create(resourceKey, resourceLocation); List> list = (List>)intList.intStream().mapToObj(registry::get).flatMap(Optional::stream).collect(Collectors.toUnmodifiableList()); map.put(tagKey, list); diff --git a/net/minecraft/util/ARGB.java b/net/minecraft/util/ARGB.java index 112251fb..4c518837 100644 --- a/net/minecraft/util/ARGB.java +++ b/net/minecraft/util/ARGB.java @@ -4,113 +4,123 @@ import net.minecraft.world.phys.Vec3; import org.joml.Vector3f; public class ARGB { - public static int alpha(int i) { - return i >>> 24; + public static int alpha(int color) { + return color >>> 24; } - public static int red(int i) { - return i >> 16 & 0xFF; + public static int red(int color) { + return color >> 16 & 0xFF; } - public static int green(int i) { - return i >> 8 & 0xFF; + public static int green(int color) { + return color >> 8 & 0xFF; } - public static int blue(int i) { - return i & 0xFF; + public static int blue(int color) { + return color & 0xFF; } - public static int color(int i, int j, int k, int l) { - return i << 24 | j << 16 | k << 8 | l; + public static int color(int alpha, int red, int green, int blue) { + return alpha << 24 | red << 16 | green << 8 | blue; } - public static int color(int i, int j, int k) { - return color(255, i, j, k); + public static int color(int red, int green, int blue) { + return color(255, red, green, blue); } - public static int color(Vec3 vec3) { - return color(as8BitChannel((float)vec3.x()), as8BitChannel((float)vec3.y()), as8BitChannel((float)vec3.z())); + public static int color(Vec3 color) { + return color(as8BitChannel((float)color.x()), as8BitChannel((float)color.y()), as8BitChannel((float)color.z())); } - public static int multiply(int i, int j) { - if (i == -1) { - return j; + public static int multiply(int color1, int color2) { + if (color1 == -1) { + return color2; } else { - return j == -1 ? i : color(alpha(i) * alpha(j) / 255, red(i) * red(j) / 255, green(i) * green(j) / 255, blue(i) * blue(j) / 255); + return color2 == -1 + ? color1 + : color(alpha(color1) * alpha(color2) / 255, red(color1) * red(color2) / 255, green(color1) * green(color2) / 255, blue(color1) * blue(color2) / 255); } } - public static int scaleRGB(int i, float f) { - return scaleRGB(i, f, f, f); + public static int scaleRGB(int color, float scale) { + return scaleRGB(color, scale, scale, scale); } - public static int scaleRGB(int i, float f, float g, float h) { - return color(alpha(i), Math.clamp((int)(red(i) * f), 0, 255), Math.clamp((int)(green(i) * g), 0, 255), Math.clamp((int)(blue(i) * h), 0, 255)); - } - - public static int scaleRGB(int i, int j) { + public static int scaleRGB(int color, float redScale, float greenScale, float blueScale) { return color( - alpha(i), Math.clamp((long)red(i) * j / 255L, 0, 255), Math.clamp((long)green(i) * j / 255L, 0, 255), Math.clamp((long)blue(i) * j / 255L, 0, 255) + alpha(color), + Math.clamp((int)(red(color) * redScale), 0, 255), + Math.clamp((int)(green(color) * greenScale), 0, 255), + Math.clamp((int)(blue(color) * blueScale), 0, 255) ); } - public static int greyscale(int i) { - int j = (int)(red(i) * 0.3F + green(i) * 0.59F + blue(i) * 0.11F); - return color(j, j, j); + public static int scaleRGB(int color, int scale) { + return color( + alpha(color), + Math.clamp((long)red(color) * scale / 255L, 0, 255), + Math.clamp((long)green(color) * scale / 255L, 0, 255), + Math.clamp((long)blue(color) * scale / 255L, 0, 255) + ); } - public static int lerp(float f, int i, int j) { - int k = Mth.lerpInt(f, alpha(i), alpha(j)); - int l = Mth.lerpInt(f, red(i), red(j)); - int m = Mth.lerpInt(f, green(i), green(j)); - int n = Mth.lerpInt(f, blue(i), blue(j)); - return color(k, l, m, n); + public static int greyscale(int color) { + int i = (int)(red(color) * 0.3F + green(color) * 0.59F + blue(color) * 0.11F); + return color(i, i, i); } - public static int opaque(int i) { - return i | 0xFF000000; + public static int lerp(float delta, int color1, int color2) { + int i = Mth.lerpInt(delta, alpha(color1), alpha(color2)); + int j = Mth.lerpInt(delta, red(color1), red(color2)); + int k = Mth.lerpInt(delta, green(color1), green(color2)); + int l = Mth.lerpInt(delta, blue(color1), blue(color2)); + return color(i, j, k, l); } - public static int transparent(int i) { - return i & 16777215; + public static int opaque(int color) { + return color | 0xFF000000; } - public static int color(int i, int j) { - return i << 24 | j & 16777215; + public static int transparent(int color) { + return color & 16777215; } - public static int white(float f) { - return as8BitChannel(f) << 24 | 16777215; + public static int color(int alpha, int color) { + return alpha << 24 | color & 16777215; } - public static int colorFromFloat(float f, float g, float h, float i) { - return color(as8BitChannel(f), as8BitChannel(g), as8BitChannel(h), as8BitChannel(i)); + public static int white(float alpha) { + return as8BitChannel(alpha) << 24 | 16777215; } - public static Vector3f vector3fFromRGB24(int i) { - float f = red(i) / 255.0F; - float g = green(i) / 255.0F; - float h = blue(i) / 255.0F; + public static int colorFromFloat(float alpha, float red, float green, float blue) { + return color(as8BitChannel(alpha), as8BitChannel(red), as8BitChannel(green), as8BitChannel(blue)); + } + + public static Vector3f vector3fFromRGB24(int color) { + float f = red(color) / 255.0F; + float g = green(color) / 255.0F; + float h = blue(color) / 255.0F; return new Vector3f(f, g, h); } - public static int average(int i, int j) { - return color((alpha(i) + alpha(j)) / 2, (red(i) + red(j)) / 2, (green(i) + green(j)) / 2, (blue(i) + blue(j)) / 2); + public static int average(int color1, int color2) { + return color((alpha(color1) + alpha(color2)) / 2, (red(color1) + red(color2)) / 2, (green(color1) + green(color2)) / 2, (blue(color1) + blue(color2)) / 2); } - public static int as8BitChannel(float f) { - return Mth.floor(f * 255.0F); + public static int as8BitChannel(float value) { + return Mth.floor(value * 255.0F); } - public static float from8BitChannel(int i) { - return i / 255.0F; + public static float from8BitChannel(int value) { + return value / 255.0F; } - public static int toABGR(int i) { - return i & -16711936 | (i & 0xFF0000) >> 16 | (i & 0xFF) << 16; + public static int toABGR(int color) { + return color & -16711936 | (color & 0xFF0000) >> 16 | (color & 0xFF) << 16; } - public static int fromABGR(int i) { - return toABGR(i); + public static int fromABGR(int color) { + return toABGR(color); } } diff --git a/net/minecraft/util/BinaryAnimator.java b/net/minecraft/util/BinaryAnimator.java index 27a05521..cf477c60 100644 --- a/net/minecraft/util/BinaryAnimator.java +++ b/net/minecraft/util/BinaryAnimator.java @@ -6,18 +6,18 @@ public class BinaryAnimator { private int ticks; private int ticksOld; - public BinaryAnimator(int i, BinaryAnimator.EasingFunction easingFunction) { - this.animationLength = i; + public BinaryAnimator(int animationLength, BinaryAnimator.EasingFunction easingFunction) { + this.animationLength = animationLength; this.easingFunction = easingFunction; } - public BinaryAnimator(int i) { - this(i, f -> f); + public BinaryAnimator(int animationLength) { + this(animationLength, f -> f); } - public void tick(boolean bl) { + public void tick(boolean condition) { this.ticksOld = this.ticks; - if (bl) { + if (condition) { if (this.ticks < this.animationLength) { this.ticks++; } @@ -26,9 +26,9 @@ public class BinaryAnimator { } } - public float getFactor(float f) { - float g = Mth.lerp(f, (float)this.ticksOld, (float)this.ticks) / this.animationLength; - return this.easingFunction.apply(g); + public float getFactor(float partialTick) { + float f = Mth.lerp(partialTick, (float)this.ticksOld, (float)this.ticks) / this.animationLength; + return this.easingFunction.apply(f); } public interface EasingFunction { diff --git a/net/minecraft/util/ExtraCodecs.java b/net/minecraft/util/ExtraCodecs.java index 3a5193c4..9b198136 100644 --- a/net/minecraft/util/ExtraCodecs.java +++ b/net/minecraft/util/ExtraCodecs.java @@ -311,22 +311,26 @@ public class ExtraCodecs { }; } - public static Codec overrideLifecycle(Codec codec, Function function, Function function2) { - return codec.mapResult(new ResultFunction() { - @Override - public DataResult> apply(DynamicOps dynamicOps, T object, DataResult> dataResult) { - return (DataResult>)dataResult.result().map(pair -> dataResult.setLifecycle((Lifecycle)function.apply(pair.getFirst()))).orElse(dataResult); - } + public static Codec overrideLifecycle(Codec codec, Function applyLifecycle, Function coApplyLifecycle) { + return codec.mapResult( + new ResultFunction() { + @Override + public DataResult> apply(DynamicOps dynamicOps, T object, DataResult> dataResult) { + return (DataResult>)dataResult.result() + .map(pair -> dataResult.setLifecycle((Lifecycle)applyLifecycle.apply(pair.getFirst()))) + .orElse(dataResult); + } - @Override - public DataResult coApply(DynamicOps dynamicOps, E object, DataResult dataResult) { - return dataResult.setLifecycle((Lifecycle)function2.apply(object)); - } + @Override + public DataResult coApply(DynamicOps dynamicOps, E object, DataResult dataResult) { + return dataResult.setLifecycle((Lifecycle)coApplyLifecycle.apply(object)); + } - public String toString() { - return "WithLifecycle[" + function + " " + function2 + "]"; + public String toString() { + return "WithLifecycle[" + applyLifecycle + " " + coApplyLifecycle + "]"; + } } - }); + ); } public static Codec overrideLifecycle(Codec codec, Function lifecycleGetter) { @@ -350,10 +354,12 @@ public class ExtraCodecs { return intRangeWithMessage(min, max, integer -> "Value must be within range [" + min + ";" + max + "]: " + integer); } - private static Codec floatRangeMinInclusiveWithMessage(float f, float g, Function function) { + private static Codec floatRangeMinInclusiveWithMessage(float min, float max, Function errorMessage) { return Codec.FLOAT .validate( - float_ -> float_.compareTo(f) >= 0 && float_.compareTo(g) <= 0 ? DataResult.success(float_) : DataResult.error(() -> (String)function.apply(float_)) + float_ -> float_.compareTo(min) >= 0 && float_.compareTo(max) <= 0 + ? DataResult.success(float_) + : DataResult.error(() -> (String)errorMessage.apply(float_)) ); } @@ -376,8 +382,8 @@ public class ExtraCodecs { ); } - public static > Codec nonEmptyMap(Codec codec) { - return codec.validate(map -> map.isEmpty() ? DataResult.error(() -> "Map must have contents") : DataResult.success(map)); + public static > Codec nonEmptyMap(Codec mapCodec) { + return mapCodec.validate(map -> map.isEmpty() ? DataResult.error(() -> "Map must have contents") : DataResult.success(map)); } public static MapCodec retrieveContext(Function, DataResult> retriever) { @@ -463,19 +469,19 @@ public class ExtraCodecs { @Deprecated public static MapCodec dispatchOptionalValue( - String string, String string2, Codec codec, Function keyGetter, Function> codecGetter + String key1, String key2, Codec codec, Function keyGetter, Function> codecGetter ) { return new MapCodec() { @Override public Stream keys(DynamicOps dynamicOps) { - return Stream.of(dynamicOps.createString(string), dynamicOps.createString(string2)); + return Stream.of(dynamicOps.createString(key1), dynamicOps.createString(key2)); } @Override public DataResult decode(DynamicOps dynamicOps, MapLike mapLike) { - T object = mapLike.get(string); - return object == null ? DataResult.error(() -> "Missing \"" + string + "\" in: " + mapLike) : codec.decode(dynamicOps, object).flatMap(pair -> { - T objectx = (T)Objects.requireNonNullElseGet(mapLike.get(string2), dynamicOps::emptyMap); + T object = mapLike.get(key1); + return object == null ? DataResult.error(() -> "Missing \"" + key1 + "\" in: " + mapLike) : codec.decode(dynamicOps, object).flatMap(pair -> { + T objectx = (T)Objects.requireNonNullElseGet(mapLike.get(key2), dynamicOps::emptyMap); return ((Codec)codecGetter.apply(pair.getFirst())).decode(dynamicOps, objectx).map(Pair::getFirst); }); } @@ -483,10 +489,10 @@ public class ExtraCodecs { @Override public RecordBuilder encode(V object, DynamicOps dynamicOps, RecordBuilder recordBuilder) { K object2 = (K)keyGetter.apply(object); - recordBuilder.add(string, codec.encodeStart(dynamicOps, object2)); + recordBuilder.add(key1, codec.encodeStart(dynamicOps, object2)); DataResult dataResult = this.encode((Codec)codecGetter.apply(object2), object, dynamicOps); if (dataResult.result().isEmpty() || !Objects.equals(dataResult.result().get(), dynamicOps.emptyMap())) { - recordBuilder.add(string2, dataResult); + recordBuilder.add(key2, dataResult); } return recordBuilder; diff --git a/net/minecraft/util/Mth.java b/net/minecraft/util/Mth.java index 903c68a9..27846aeb 100644 --- a/net/minecraft/util/Mth.java +++ b/net/minecraft/util/Mth.java @@ -233,12 +233,12 @@ public class Mth { return number % multiple == 0; } - public static byte packDegrees(float f) { - return (byte)floor(f * 256.0F / 360.0F); + public static byte packDegrees(float degrees) { + return (byte)floor(degrees * 256.0F / 360.0F); } - public static float unpackDegrees(byte b) { - return b * 360 / 256.0F; + public static float unpackDegrees(byte degrees) { + return degrees * 360 / 256.0F; } /** @@ -257,8 +257,8 @@ public class Mth { return i; } - public static float wrapDegrees(long l) { - float f = (float)(l % 360L); + public static float wrapDegrees(long angle) { + float f = (float)(angle % 360L); if (f >= 180.0F) { f -= 360.0F; } @@ -645,8 +645,8 @@ public class Mth { return start + delta * (end - start); } - public static Vec3 lerp(double d, Vec3 vec3, Vec3 vec32) { - return new Vec3(lerp(d, vec3.x, vec32.x), lerp(d, vec3.y, vec32.y), lerp(d, vec3.z, vec32.z)); + public static Vec3 lerp(double delta, Vec3 start, Vec3 end) { + return new Vec3(lerp(delta, start.x, end.x), lerp(delta, start.y, end.y), lerp(delta, start.z, end.z)); } /** @@ -709,18 +709,18 @@ public class Mth { return start + delta * wrapDegrees(end - start); } - public static float rotLerpRad(float f, float g, float h) { - float i = h - g; + public static float rotLerpRad(float delta, float start, float end) { + float f = end - start; - while (i < (float) -Math.PI) { - i += (float) (Math.PI * 2); + while (f < (float) -Math.PI) { + f += (float) (Math.PI * 2); } - while (i >= (float) Math.PI) { - i -= (float) (Math.PI * 2); + while (f >= (float) Math.PI) { + f -= (float) (Math.PI * 2); } - return g + f * i; + return start + delta * f; } public static float triangleWave(float input, float period) { @@ -802,8 +802,8 @@ public class Mth { return Math.sqrt(lengthSquared(xDistance, yDistance)); } - public static float length(float f, float g) { - return (float)Math.sqrt(lengthSquared(f, g)); + public static float length(float xDistance, float yDistance) { + return (float)Math.sqrt(lengthSquared(xDistance, yDistance)); } public static double lengthSquared(double xDistance, double yDistance, double zDistance) { @@ -863,8 +863,8 @@ public class Mth { return fraction.getNumerator() * factor / fraction.getDenominator(); } - public static float easeInOutSine(float f) { - return -(cos((float) Math.PI * f) - 1.0F) / 2.0F; + public static float easeInOutSine(float value) { + return -(cos((float) Math.PI * value) - 1.0F) / 2.0F; } static { diff --git a/net/minecraft/util/RandomSource.java b/net/minecraft/util/RandomSource.java index b5219919..f21a8eab 100644 --- a/net/minecraft/util/RandomSource.java +++ b/net/minecraft/util/RandomSource.java @@ -63,8 +63,8 @@ public interface RandomSource { return center + maxDeviation * (this.nextDouble() - this.nextDouble()); } - default float triangle(float f, float g) { - return f + g * (this.nextFloat() - this.nextFloat()); + default float triangle(float center, float maxDeviation) { + return center + maxDeviation * (this.nextFloat() - this.nextFloat()); } default void consumeCount(int count) { diff --git a/net/minecraft/util/SmoothDouble.java b/net/minecraft/util/SmoothDouble.java index bd779e33..629d39e7 100644 --- a/net/minecraft/util/SmoothDouble.java +++ b/net/minecraft/util/SmoothDouble.java @@ -5,18 +5,18 @@ public class SmoothDouble { private double remainingValue; private double lastAmount; - public double getNewDeltaValue(double d, double e) { - this.targetValue += d; - double f = this.targetValue - this.remainingValue; - double g = Mth.lerp(0.5, this.lastAmount, f); - double h = Math.signum(f); - if (h * f > h * this.lastAmount) { - f = g; + public double getNewDeltaValue(double input, double multiplier) { + this.targetValue += input; + double d = this.targetValue - this.remainingValue; + double e = Mth.lerp(0.5, this.lastAmount, d); + double f = Math.signum(d); + if (f * d > f * this.lastAmount) { + d = e; } - this.lastAmount = g; - this.remainingValue += f * e; - return f * e; + this.lastAmount = e; + this.remainingValue += d * multiplier; + return d * multiplier; } public void reset() { diff --git a/net/minecraft/util/SpawnUtil.java b/net/minecraft/util/SpawnUtil.java index b3c6f4c8..b7859dc2 100644 --- a/net/minecraft/util/SpawnUtil.java +++ b/net/minecraft/util/SpawnUtil.java @@ -17,19 +17,19 @@ import net.minecraft.world.level.block.state.BlockState; public class SpawnUtil { public static Optional trySpawnMob( - EntityType entityType, EntitySpawnReason entitySpawnReason, ServerLevel serverLevel, BlockPos blockPos, int i, int j, int k, SpawnUtil.Strategy strategy + EntityType entityType, EntitySpawnReason spawnReason, ServerLevel level, BlockPos pos, int attempts, int range, int yOffset, SpawnUtil.Strategy strategy ) { - BlockPos.MutableBlockPos mutableBlockPos = blockPos.mutable(); + BlockPos.MutableBlockPos mutableBlockPos = pos.mutable(); - for (int l = 0; l < i; l++) { - int m = Mth.randomBetweenInclusive(serverLevel.random, -j, j); - int n = Mth.randomBetweenInclusive(serverLevel.random, -j, j); - mutableBlockPos.setWithOffset(blockPos, m, k, n); - if (serverLevel.getWorldBorder().isWithinBounds(mutableBlockPos) && moveToPossibleSpawnPosition(serverLevel, k, mutableBlockPos, strategy)) { - T mob = (T)entityType.create(serverLevel, null, mutableBlockPos, entitySpawnReason, false, false); + for (int i = 0; i < attempts; i++) { + int j = Mth.randomBetweenInclusive(level.random, -range, range); + int k = Mth.randomBetweenInclusive(level.random, -range, range); + mutableBlockPos.setWithOffset(pos, j, yOffset, k); + if (level.getWorldBorder().isWithinBounds(mutableBlockPos) && moveToPossibleSpawnPosition(level, yOffset, mutableBlockPos, strategy)) { + T mob = (T)entityType.create(level, null, mutableBlockPos, spawnReason, false, false); if (mob != null) { - if (mob.checkSpawnRules(serverLevel, entitySpawnReason) && mob.checkSpawnObstruction(serverLevel)) { - serverLevel.addFreshEntityWithPassengers(mob); + if (mob.checkSpawnRules(level, spawnReason) && mob.checkSpawnObstruction(level)) { + level.addFreshEntityWithPassengers(mob); return Optional.of(mob); } diff --git a/net/minecraft/util/StringRepresentable.java b/net/minecraft/util/StringRepresentable.java index 7a222fa3..6ed2240c 100644 --- a/net/minecraft/util/StringRepresentable.java +++ b/net/minecraft/util/StringRepresentable.java @@ -87,8 +87,8 @@ public interface StringRepresentable { return (E)Objects.requireNonNullElse(this.byName(name), defaultValue); } - public E byName(@Nullable String string, Supplier supplier) { - return (E)Objects.requireNonNullElseGet(this.byName(string), supplier); + public E byName(@Nullable String name, Supplier defaultValue) { + return (E)Objects.requireNonNullElseGet(this.byName(name), defaultValue); } } diff --git a/net/minecraft/util/TickThrottler.java b/net/minecraft/util/TickThrottler.java index cde73baf..11444797 100644 --- a/net/minecraft/util/TickThrottler.java +++ b/net/minecraft/util/TickThrottler.java @@ -5,9 +5,9 @@ public class TickThrottler { private final int threshold; private int count; - public TickThrottler(int i, int j) { - this.incrementStep = i; - this.threshold = j; + public TickThrottler(int incrementStep, int threshold) { + this.incrementStep = incrementStep; + this.threshold = threshold; } public void increment() { diff --git a/net/minecraft/util/TriState.java b/net/minecraft/util/TriState.java index c7dd92a0..f000f049 100644 --- a/net/minecraft/util/TriState.java +++ b/net/minecraft/util/TriState.java @@ -5,11 +5,11 @@ public enum TriState { FALSE, DEFAULT; - public boolean toBoolean(boolean bl) { + public boolean toBoolean(boolean defaultValue) { return switch (this) { case TRUE -> true; case FALSE -> false; - default -> bl; + default -> defaultValue; }; } } diff --git a/net/minecraft/util/context/ContextKey.java b/net/minecraft/util/context/ContextKey.java index 63246e96..d668fb23 100644 --- a/net/minecraft/util/context/ContextKey.java +++ b/net/minecraft/util/context/ContextKey.java @@ -5,12 +5,12 @@ import net.minecraft.resources.ResourceLocation; public class ContextKey { private final ResourceLocation name; - public ContextKey(ResourceLocation resourceLocation) { - this.name = resourceLocation; + public ContextKey(ResourceLocation name) { + this.name = name; } - public static ContextKey vanilla(String string) { - return new ContextKey<>(ResourceLocation.withDefaultNamespace(string)); + public static ContextKey vanilla(String name) { + return new ContextKey<>(ResourceLocation.withDefaultNamespace(name)); } public ResourceLocation name() { diff --git a/net/minecraft/util/context/ContextKeySet.java b/net/minecraft/util/context/ContextKeySet.java index 1d250cc1..c2caeaf2 100644 --- a/net/minecraft/util/context/ContextKeySet.java +++ b/net/minecraft/util/context/ContextKeySet.java @@ -8,9 +8,9 @@ public class ContextKeySet { private final Set> required; private final Set> allowed; - ContextKeySet(Set> set, Set> set2) { - this.required = Set.copyOf(set); - this.allowed = Set.copyOf(Sets.union(set, set2)); + ContextKeySet(Set> required, Set> allowed) { + this.required = Set.copyOf(required); + this.allowed = Set.copyOf(Sets.union(required, allowed)); } public Set> required() { @@ -31,20 +31,20 @@ public class ContextKeySet { private final Set> required = Sets.newIdentityHashSet(); private final Set> optional = Sets.newIdentityHashSet(); - public ContextKeySet.Builder required(ContextKey contextKey) { - if (this.optional.contains(contextKey)) { - throw new IllegalArgumentException("Parameter " + contextKey.name() + " is already optional"); + public ContextKeySet.Builder required(ContextKey key) { + if (this.optional.contains(key)) { + throw new IllegalArgumentException("Parameter " + key.name() + " is already optional"); } else { - this.required.add(contextKey); + this.required.add(key); return this; } } - public ContextKeySet.Builder optional(ContextKey contextKey) { - if (this.required.contains(contextKey)) { - throw new IllegalArgumentException("Parameter " + contextKey.name() + " is already required"); + public ContextKeySet.Builder optional(ContextKey key) { + if (this.required.contains(key)) { + throw new IllegalArgumentException("Parameter " + key.name() + " is already required"); } else { - this.optional.add(contextKey); + this.optional.add(key); return this; } } diff --git a/net/minecraft/util/context/ContextMap.java b/net/minecraft/util/context/ContextMap.java index f9d63555..fd32a489 100644 --- a/net/minecraft/util/context/ContextMap.java +++ b/net/minecraft/util/context/ContextMap.java @@ -11,64 +11,64 @@ import org.jetbrains.annotations.Nullable; public class ContextMap { private final Map, Object> params; - ContextMap(Map, Object> map) { - this.params = map; + ContextMap(Map, Object> params) { + this.params = params; } - public boolean has(ContextKey contextKey) { - return this.params.containsKey(contextKey); + public boolean has(ContextKey key) { + return this.params.containsKey(key); } - public T getOrThrow(ContextKey contextKey) { - T object = (T)this.params.get(contextKey); + public T getOrThrow(ContextKey key) { + T object = (T)this.params.get(key); if (object == null) { - throw new NoSuchElementException(contextKey.name().toString()); + throw new NoSuchElementException(key.name().toString()); } else { return object; } } @Nullable - public T getOptional(ContextKey contextKey) { - return (T)this.params.get(contextKey); + public T getOptional(ContextKey key) { + return (T)this.params.get(key); } @Nullable @Contract("_,!null->!null; _,_->_") - public T getOrDefault(ContextKey contextKey, @Nullable T object) { - return (T)this.params.getOrDefault(contextKey, object); + public T getOrDefault(ContextKey key, @Nullable T defaultValue) { + return (T)this.params.getOrDefault(key, defaultValue); } public static class Builder { private final Map, Object> params = new IdentityHashMap(); - public ContextMap.Builder withParameter(ContextKey contextKey, T object) { - this.params.put(contextKey, object); + public ContextMap.Builder withParameter(ContextKey key, T value) { + this.params.put(key, value); return this; } - public ContextMap.Builder withOptionalParameter(ContextKey contextKey, @Nullable T object) { - if (object == null) { - this.params.remove(contextKey); + public ContextMap.Builder withOptionalParameter(ContextKey key, @Nullable T value) { + if (value == null) { + this.params.remove(key); } else { - this.params.put(contextKey, object); + this.params.put(key, value); } return this; } - public T getParameter(ContextKey contextKey) { - T object = (T)this.params.get(contextKey); + public T getParameter(ContextKey key) { + T object = (T)this.params.get(key); if (object == null) { - throw new NoSuchElementException(contextKey.name().toString()); + throw new NoSuchElementException(key.name().toString()); } else { return object; } } @Nullable - public T getOptionalParameter(ContextKey contextKey) { - return (T)this.params.get(contextKey); + public T getOptionalParameter(ContextKey key) { + return (T)this.params.get(key); } public ContextMap create(ContextKeySet contextKeySet) { diff --git a/net/minecraft/util/datafix/DataFixers.java b/net/minecraft/util/datafix/DataFixers.java index 09bbd4ac..685dc2a3 100644 --- a/net/minecraft/util/datafix/DataFixers.java +++ b/net/minecraft/util/datafix/DataFixers.java @@ -106,6 +106,7 @@ import net.minecraft.util.datafix.fixes.EntityPufferfishRenameFix; import net.minecraft.util.datafix.fixes.EntityRavagerRenameFix; import net.minecraft.util.datafix.fixes.EntityRedundantChanceTagsFix; import net.minecraft.util.datafix.fixes.EntityRidingToPassengersFix; +import net.minecraft.util.datafix.fixes.EntitySalmonSizeFix; import net.minecraft.util.datafix.fixes.EntityShulkerColorFix; import net.minecraft.util.datafix.fixes.EntityShulkerRotationFix; import net.minecraft.util.datafix.fixes.EntitySkeletonSplitFix; @@ -1346,6 +1347,8 @@ public class DataFixers { Schema schema236 = builder.addSchema(4071, V4071::new); builder.addFixer(new AddNewChoices(schema236, "Added Creaking", References.ENTITY)); builder.addFixer(new AddNewChoices(schema236, "Added Creaking Heart", References.BLOCK_ENTITY)); + Schema schema237 = builder.addSchema(4081, SAME_NAMESPACED); + builder.addFixer(new EntitySalmonSizeFix(schema237)); } private static UnaryOperator createRenamerNoNamespace(Map renameMap) { diff --git a/net/minecraft/util/datafix/ExtraDataFixUtils.java b/net/minecraft/util/datafix/ExtraDataFixUtils.java index 5bd83730..94b8e1d8 100644 --- a/net/minecraft/util/datafix/ExtraDataFixUtils.java +++ b/net/minecraft/util/datafix/ExtraDataFixUtils.java @@ -35,15 +35,15 @@ public class ExtraDataFixUtils { return new Typed<>(type, data.getOps(), (R)data.getValue()); } - public static Type patchSubType(Type type, Type type2, Type type3) { - return type.all(typePatcher(type2, type3), true, false).view().newType(); + public static Type patchSubType(Type type, Type oldSubType, Type newSubType) { + return type.all(typePatcher(oldSubType, newSubType), true, false).view().newType(); } - private static TypeRewriteRule typePatcher(Type type, Type type2) { - RewriteResult rewriteResult = RewriteResult.create(View.create("Patcher", type, type2, dynamicOps -> object -> { + private static TypeRewriteRule typePatcher(Type oldType, Type newType) { + RewriteResult rewriteResult = RewriteResult.create(View.create("Patcher", oldType, newType, dynamicOps -> object -> { throw new UnsupportedOperationException(); }), new BitSet()); - return TypeRewriteRule.everywhere(TypeRewriteRule.ifSame(type, rewriteResult), PointFreeRule.nop(), true, true); + return TypeRewriteRule.everywhere(TypeRewriteRule.ifSame(oldType, rewriteResult), PointFreeRule.nop(), true, true); } @SafeVarargs @@ -57,14 +57,14 @@ public class ExtraDataFixUtils { }; } - public static Dynamic blockState(String string, Map map) { + public static Dynamic blockState(String blockId, Map properties) { Dynamic dynamic = new Dynamic<>(NbtOps.INSTANCE, new CompoundTag()); - Dynamic dynamic2 = dynamic.set("Name", dynamic.createString(string)); - if (!map.isEmpty()) { + Dynamic dynamic2 = dynamic.set("Name", dynamic.createString(blockId)); + if (!properties.isEmpty()) { dynamic2 = dynamic2.set( "Properties", dynamic.createMap( - (Map, ? extends Dynamic>)map.entrySet() + (Map, ? extends Dynamic>)properties.entrySet() .stream() .collect(Collectors.toMap(entry -> dynamic.createString((String)entry.getKey()), entry -> dynamic.createString((String)entry.getValue()))) ) @@ -74,11 +74,11 @@ public class ExtraDataFixUtils { return dynamic2; } - public static Dynamic blockState(String string) { - return blockState(string, Map.of()); + public static Dynamic blockState(String blockId) { + return blockState(blockId, Map.of()); } - public static Dynamic fixStringField(Dynamic dynamic, String string, UnaryOperator unaryOperator) { - return dynamic.update(string, dynamic2 -> DataFixUtils.orElse(dynamic2.asString().map(unaryOperator).map(dynamic::createString).result(), dynamic2)); + public static Dynamic fixStringField(Dynamic data, String fieldName, UnaryOperator fixer) { + return data.update(fieldName, dynamic2 -> DataFixUtils.orElse(dynamic2.asString().map(fixer).map(data::createString).result(), dynamic2)); } } diff --git a/net/minecraft/util/datafix/fixes/AttributeIdPrefixFix.java b/net/minecraft/util/datafix/fixes/AttributeIdPrefixFix.java index 841ca82b..72a5aaf6 100644 --- a/net/minecraft/util/datafix/fixes/AttributeIdPrefixFix.java +++ b/net/minecraft/util/datafix/fixes/AttributeIdPrefixFix.java @@ -7,20 +7,20 @@ import net.minecraft.util.datafix.schemas.NamespacedSchema; public class AttributeIdPrefixFix extends AttributesRenameFix { private static final List PREFIXES = List.of("generic.", "horse.", "player.", "zombie."); - public AttributeIdPrefixFix(Schema schema) { - super(schema, "AttributeIdPrefixFix", AttributeIdPrefixFix::replaceId); + public AttributeIdPrefixFix(Schema outputSchema) { + super(outputSchema, "AttributeIdPrefixFix", AttributeIdPrefixFix::replaceId); } - private static String replaceId(String string) { - String string2 = NamespacedSchema.ensureNamespaced(string); + private static String replaceId(String id) { + String string = NamespacedSchema.ensureNamespaced(id); - for (String string3 : PREFIXES) { - String string4 = NamespacedSchema.ensureNamespaced(string3); - if (string2.startsWith(string4)) { - return "minecraft:" + string2.substring(string4.length()); + for (String string2 : PREFIXES) { + String string3 = NamespacedSchema.ensureNamespaced(string2); + if (string.startsWith(string3)) { + return "minecraft:" + string.substring(string3.length()); } } - return string; + return id; } } diff --git a/net/minecraft/util/datafix/fixes/AttributesRenameFix.java b/net/minecraft/util/datafix/fixes/AttributesRenameFix.java index b0cd7e46..27e52ed9 100644 --- a/net/minecraft/util/datafix/fixes/AttributesRenameFix.java +++ b/net/minecraft/util/datafix/fixes/AttributesRenameFix.java @@ -14,10 +14,10 @@ public class AttributesRenameFix extends DataFix { private final String name; private final UnaryOperator renames; - public AttributesRenameFix(Schema schema, String string, UnaryOperator unaryOperator) { - super(schema, false); - this.name = string; - this.renames = unaryOperator; + public AttributesRenameFix(Schema outputSchema, String name, UnaryOperator renames) { + super(outputSchema, false); + this.name = name; + this.renames = renames; } @Override @@ -29,8 +29,8 @@ public class AttributesRenameFix extends DataFix { ); } - private Typed fixDataComponents(Typed typed) { - return typed.update( + private Typed fixDataComponents(Typed dataComponents) { + return dataComponents.update( DSL.remainderFinder(), dynamic -> dynamic.update( "minecraft:attribute_modifiers", @@ -42,8 +42,8 @@ public class AttributesRenameFix extends DataFix { ); } - private Typed fixEntity(Typed typed) { - return typed.update( + private Typed fixEntity(Typed data) { + return data.update( DSL.remainderFinder(), dynamic -> dynamic.update( "attributes", @@ -52,11 +52,11 @@ public class AttributesRenameFix extends DataFix { ); } - private Dynamic fixIdField(Dynamic dynamic) { - return ExtraDataFixUtils.fixStringField(dynamic, "id", this.renames); + private Dynamic fixIdField(Dynamic data) { + return ExtraDataFixUtils.fixStringField(data, "id", this.renames); } - private Dynamic fixTypeField(Dynamic dynamic) { - return ExtraDataFixUtils.fixStringField(dynamic, "type", this.renames); + private Dynamic fixTypeField(Dynamic data) { + return ExtraDataFixUtils.fixStringField(data, "type", this.renames); } } diff --git a/net/minecraft/util/datafix/fixes/AttributesRenameLegacy.java b/net/minecraft/util/datafix/fixes/AttributesRenameLegacy.java index 5cc6abbe..bf9fd1e0 100644 --- a/net/minecraft/util/datafix/fixes/AttributesRenameLegacy.java +++ b/net/minecraft/util/datafix/fixes/AttributesRenameLegacy.java @@ -15,10 +15,10 @@ public class AttributesRenameLegacy extends DataFix { private final String name; private final UnaryOperator renames; - public AttributesRenameLegacy(Schema schema, String string, UnaryOperator unaryOperator) { - super(schema, false); - this.name = string; - this.renames = unaryOperator; + public AttributesRenameLegacy(Schema outputSchema, String name, UnaryOperator renames) { + super(outputSchema, false); + this.name = name; + this.renames = renames; } @Override @@ -32,12 +32,12 @@ public class AttributesRenameLegacy extends DataFix { ); } - private Dynamic fixName(Dynamic dynamic) { - return DataFixUtils.orElse(dynamic.asString().result().map(this.renames).map(dynamic::createString), dynamic); + private Dynamic fixName(Dynamic name) { + return DataFixUtils.orElse(name.asString().result().map(this.renames).map(name::createString), name); } - private Typed fixItemStackTag(Typed typed) { - return typed.update( + private Typed fixItemStackTag(Typed itemStackTag) { + return itemStackTag.update( DSL.remainderFinder(), dynamic -> dynamic.update( "AttributeModifiers", @@ -49,8 +49,8 @@ public class AttributesRenameLegacy extends DataFix { ); } - private Typed fixEntity(Typed typed) { - return typed.update( + private Typed fixEntity(Typed entityTag) { + return entityTag.update( DSL.remainderFinder(), dynamic -> dynamic.update( "Attributes", diff --git a/net/minecraft/util/datafix/fixes/BitStorageAlignFix.java b/net/minecraft/util/datafix/fixes/BitStorageAlignFix.java index 2741a258..a9af7f16 100644 --- a/net/minecraft/util/datafix/fixes/BitStorageAlignFix.java +++ b/net/minecraft/util/datafix/fixes/BitStorageAlignFix.java @@ -54,13 +54,15 @@ public class BitStorageAlignFix extends DataFix { ); } - private static Typed updateSections(OpticFinder sections, OpticFinder opticFinder, OpticFinder>>> palette, Typed data) { + private static Typed updateSections( + OpticFinder sectionsFinder, OpticFinder sectionElementFinder, OpticFinder>>> paletteFinder, Typed data + ) { return data.updateTyped( - sections, + sectionsFinder, typed -> typed.updateTyped( - opticFinder, + sectionElementFinder, typedx -> { - int i = (Integer)typedx.getOptional(palette).map(list -> Math.max(4, DataFixUtils.ceillog2(list.size()))).orElse(0); + int i = (Integer)typedx.getOptional(paletteFinder).map(list -> Math.max(4, DataFixUtils.ceillog2(list.size()))).orElse(0); return i != 0 && !Mth.isPowerOfTwo(i) ? typedx.update(DSL.remainderFinder(), dynamic -> dynamic.update("BlockStates", dynamic2 -> updateBitStorage(dynamic, dynamic2, 4096, i))) : typedx; diff --git a/net/minecraft/util/datafix/fixes/BoatSplitFix.java b/net/minecraft/util/datafix/fixes/BoatSplitFix.java index 5db22510..83eb8f0e 100644 --- a/net/minecraft/util/datafix/fixes/BoatSplitFix.java +++ b/net/minecraft/util/datafix/fixes/BoatSplitFix.java @@ -12,24 +12,24 @@ import net.minecraft.util.datafix.ExtraDataFixUtils; import net.minecraft.util.datafix.schemas.NamespacedSchema; public class BoatSplitFix extends DataFix { - public BoatSplitFix(Schema schema) { - super(schema, true); + public BoatSplitFix(Schema outputSchema) { + super(outputSchema, true); } - private static boolean isNormalBoat(String string) { - return string.equals("minecraft:boat"); + private static boolean isNormalBoat(String id) { + return id.equals("minecraft:boat"); } - private static boolean isChestBoat(String string) { - return string.equals("minecraft:chest_boat"); + private static boolean isChestBoat(String id) { + return id.equals("minecraft:chest_boat"); } - private static boolean isAnyBoat(String string) { - return isNormalBoat(string) || isChestBoat(string); + private static boolean isAnyBoat(String id) { + return isNormalBoat(id) || isChestBoat(id); } - private static String mapVariantToNormalBoat(String string) { - return switch (string) { + private static String mapVariantToNormalBoat(String variant) { + return switch (variant) { case "spruce" -> "minecraft:spruce_boat"; case "birch" -> "minecraft:birch_boat"; case "jungle" -> "minecraft:jungle_boat"; @@ -42,8 +42,8 @@ public class BoatSplitFix extends DataFix { }; } - private static String mapVariantToChestBoat(String string) { - return switch (string) { + private static String mapVariantToChestBoat(String variant) { + return switch (variant) { case "spruce" -> "minecraft:spruce_chest_boat"; case "birch" -> "minecraft:birch_chest_boat"; case "jungle" -> "minecraft:jungle_chest_boat"; diff --git a/net/minecraft/util/datafix/fixes/CarvingStepRemoveFix.java b/net/minecraft/util/datafix/fixes/CarvingStepRemoveFix.java index 9ef715ef..dd076a2b 100644 --- a/net/minecraft/util/datafix/fixes/CarvingStepRemoveFix.java +++ b/net/minecraft/util/datafix/fixes/CarvingStepRemoveFix.java @@ -9,8 +9,8 @@ import com.mojang.serialization.Dynamic; import java.util.Optional; public class CarvingStepRemoveFix extends DataFix { - public CarvingStepRemoveFix(Schema schema) { - super(schema, false); + public CarvingStepRemoveFix(Schema outputSchema) { + super(outputSchema, false); } @Override @@ -18,8 +18,8 @@ public class CarvingStepRemoveFix extends DataFix { return this.fixTypeEverywhereTyped("CarvingStepRemoveFix", this.getInputSchema().getType(References.CHUNK), CarvingStepRemoveFix::fixChunk); } - private static Typed fixChunk(Typed typed) { - return typed.update(DSL.remainderFinder(), dynamic -> { + private static Typed fixChunk(Typed chunkTag) { + return chunkTag.update(DSL.remainderFinder(), dynamic -> { Dynamic dynamic2 = dynamic; Optional> optional = dynamic.get("CarvingMasks").result(); if (optional.isPresent()) { diff --git a/net/minecraft/util/datafix/fixes/ChunkPalettedStorageFix.java b/net/minecraft/util/datafix/fixes/ChunkPalettedStorageFix.java index b5663f2b..ca94d18a 100644 --- a/net/minecraft/util/datafix/fixes/ChunkPalettedStorageFix.java +++ b/net/minecraft/util/datafix/fixes/ChunkPalettedStorageFix.java @@ -122,17 +122,17 @@ public class ChunkPalettedStorageFix extends DataFix { } } - public int get(int i, int j, int k) { - int l = this.getPosition(j << 8 | k << 4 | i); - return this.isFirst(j << 8 | k << 4 | i) ? this.data[l] & 15 : this.data[l] >> 4 & 15; + public int get(int x, int y, int z) { + int i = this.getPosition(y << 8 | z << 4 | x); + return this.isFirst(y << 8 | z << 4 | x) ? this.data[i] & 15 : this.data[i] >> 4 & 15; } - private boolean isFirst(int i) { - return (i & 1) == 0; + private boolean isFirst(int packedPos) { + return (packedPos & 1) == 0; } - private int getPosition(int i) { - return i >> 1; + private int getPosition(int packedPos) { + return packedPos >> 1; } } @@ -258,301 +258,309 @@ public class ChunkPalettedStorageFix extends DataFix { private MappingConstants() { } - private static void mapSkull(Map> map, int i, String string, String string2) { - map.put(i + "north", ExtraDataFixUtils.blockState("minecraft:" + string + "_wall_" + string2, Map.of("facing", "north"))); - map.put(i + "east", ExtraDataFixUtils.blockState("minecraft:" + string + "_wall_" + string2, Map.of("facing", "east"))); - map.put(i + "south", ExtraDataFixUtils.blockState("minecraft:" + string + "_wall_" + string2, Map.of("facing", "south"))); - map.put(i + "west", ExtraDataFixUtils.blockState("minecraft:" + string + "_wall_" + string2, Map.of("facing", "west"))); + private static void mapSkull(Map> map, int id, String skullType, String suffix) { + map.put(id + "north", ExtraDataFixUtils.blockState("minecraft:" + skullType + "_wall_" + suffix, Map.of("facing", "north"))); + map.put(id + "east", ExtraDataFixUtils.blockState("minecraft:" + skullType + "_wall_" + suffix, Map.of("facing", "east"))); + map.put(id + "south", ExtraDataFixUtils.blockState("minecraft:" + skullType + "_wall_" + suffix, Map.of("facing", "south"))); + map.put(id + "west", ExtraDataFixUtils.blockState("minecraft:" + skullType + "_wall_" + suffix, Map.of("facing", "west"))); - for (int j = 0; j < 16; j++) { - map.put("" + i + j, ExtraDataFixUtils.blockState("minecraft:" + string + "_" + string2, Map.of("rotation", String.valueOf(j)))); + for (int i = 0; i < 16; i++) { + map.put("" + id + i, ExtraDataFixUtils.blockState("minecraft:" + skullType + "_" + suffix, Map.of("rotation", String.valueOf(i)))); } } - private static void mapDoor(Map> map, String string) { - String string2 = "minecraft:" + string; + private static void mapDoor(Map> map, String doorId) { + String string = "minecraft:" + doorId; map.put( - "minecraft:" + string + "eastlowerleftfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "lower", "hinge", "left", "open", "false", "powered", "false")) + "minecraft:" + doorId + "eastlowerleftfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "lower", "hinge", "left", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "eastlowerleftfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "lower", "hinge", "left", "open", "false", "powered", "true")) + "minecraft:" + doorId + "eastlowerleftfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "lower", "hinge", "left", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "eastlowerlefttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "lower", "hinge", "left", "open", "true", "powered", "false")) + "minecraft:" + doorId + "eastlowerlefttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "lower", "hinge", "left", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "eastlowerlefttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "lower", "hinge", "left", "open", "true", "powered", "true")) + "minecraft:" + doorId + "eastlowerlefttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "lower", "hinge", "left", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "eastlowerrightfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "lower", "hinge", "right", "open", "false", "powered", "false")) + "minecraft:" + doorId + "eastlowerrightfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "lower", "hinge", "right", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "eastlowerrightfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "lower", "hinge", "right", "open", "false", "powered", "true")) + "minecraft:" + doorId + "eastlowerrightfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "lower", "hinge", "right", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "eastlowerrighttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "lower", "hinge", "right", "open", "true", "powered", "false")) + "minecraft:" + doorId + "eastlowerrighttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "lower", "hinge", "right", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "eastlowerrighttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "lower", "hinge", "right", "open", "true", "powered", "true")) + "minecraft:" + doorId + "eastlowerrighttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "lower", "hinge", "right", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "eastupperleftfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "upper", "hinge", "left", "open", "false", "powered", "false")) + "minecraft:" + doorId + "eastupperleftfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "upper", "hinge", "left", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "eastupperleftfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "upper", "hinge", "left", "open", "false", "powered", "true")) + "minecraft:" + doorId + "eastupperleftfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "upper", "hinge", "left", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "eastupperlefttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "upper", "hinge", "left", "open", "true", "powered", "false")) + "minecraft:" + doorId + "eastupperlefttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "upper", "hinge", "left", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "eastupperlefttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "upper", "hinge", "left", "open", "true", "powered", "true")) + "minecraft:" + doorId + "eastupperlefttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "upper", "hinge", "left", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "eastupperrightfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "upper", "hinge", "right", "open", "false", "powered", "false")) + "minecraft:" + doorId + "eastupperrightfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "upper", "hinge", "right", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "eastupperrightfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "upper", "hinge", "right", "open", "false", "powered", "true")) + "minecraft:" + doorId + "eastupperrightfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "upper", "hinge", "right", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "eastupperrighttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "upper", "hinge", "right", "open", "true", "powered", "false")) + "minecraft:" + doorId + "eastupperrighttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "upper", "hinge", "right", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "eastupperrighttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "east", "half", "upper", "hinge", "right", "open", "true", "powered", "true")) + "minecraft:" + doorId + "eastupperrighttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "east", "half", "upper", "hinge", "right", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "northlowerleftfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "lower", "hinge", "left", "open", "false", "powered", "false")) + "minecraft:" + doorId + "northlowerleftfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "lower", "hinge", "left", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "northlowerleftfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "lower", "hinge", "left", "open", "false", "powered", "true")) + "minecraft:" + doorId + "northlowerleftfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "lower", "hinge", "left", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "northlowerlefttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "lower", "hinge", "left", "open", "true", "powered", "false")) + "minecraft:" + doorId + "northlowerlefttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "lower", "hinge", "left", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "northlowerlefttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "lower", "hinge", "left", "open", "true", "powered", "true")) + "minecraft:" + doorId + "northlowerlefttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "lower", "hinge", "left", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "northlowerrightfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "lower", "hinge", "right", "open", "false", "powered", "false")) + "minecraft:" + doorId + "northlowerrightfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "lower", "hinge", "right", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "northlowerrightfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "lower", "hinge", "right", "open", "false", "powered", "true")) + "minecraft:" + doorId + "northlowerrightfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "lower", "hinge", "right", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "northlowerrighttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "lower", "hinge", "right", "open", "true", "powered", "false")) + "minecraft:" + doorId + "northlowerrighttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "lower", "hinge", "right", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "northlowerrighttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "lower", "hinge", "right", "open", "true", "powered", "true")) + "minecraft:" + doorId + "northlowerrighttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "lower", "hinge", "right", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "northupperleftfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "upper", "hinge", "left", "open", "false", "powered", "false")) + "minecraft:" + doorId + "northupperleftfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "upper", "hinge", "left", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "northupperleftfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "upper", "hinge", "left", "open", "false", "powered", "true")) + "minecraft:" + doorId + "northupperleftfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "upper", "hinge", "left", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "northupperlefttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "upper", "hinge", "left", "open", "true", "powered", "false")) + "minecraft:" + doorId + "northupperlefttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "upper", "hinge", "left", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "northupperlefttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "upper", "hinge", "left", "open", "true", "powered", "true")) + "minecraft:" + doorId + "northupperlefttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "upper", "hinge", "left", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "northupperrightfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "upper", "hinge", "right", "open", "false", "powered", "false")) + "minecraft:" + doorId + "northupperrightfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "upper", "hinge", "right", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "northupperrightfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "upper", "hinge", "right", "open", "false", "powered", "true")) + "minecraft:" + doorId + "northupperrightfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "upper", "hinge", "right", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "northupperrighttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "upper", "hinge", "right", "open", "true", "powered", "false")) + "minecraft:" + doorId + "northupperrighttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "upper", "hinge", "right", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "northupperrighttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "north", "half", "upper", "hinge", "right", "open", "true", "powered", "true")) + "minecraft:" + doorId + "northupperrighttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "north", "half", "upper", "hinge", "right", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "southlowerleftfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "lower", "hinge", "left", "open", "false", "powered", "false")) + "minecraft:" + doorId + "southlowerleftfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "lower", "hinge", "left", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "southlowerleftfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "lower", "hinge", "left", "open", "false", "powered", "true")) + "minecraft:" + doorId + "southlowerleftfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "lower", "hinge", "left", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "southlowerlefttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "lower", "hinge", "left", "open", "true", "powered", "false")) + "minecraft:" + doorId + "southlowerlefttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "lower", "hinge", "left", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "southlowerlefttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "lower", "hinge", "left", "open", "true", "powered", "true")) + "minecraft:" + doorId + "southlowerlefttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "lower", "hinge", "left", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "southlowerrightfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "lower", "hinge", "right", "open", "false", "powered", "false")) + "minecraft:" + doorId + "southlowerrightfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "lower", "hinge", "right", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "southlowerrightfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "lower", "hinge", "right", "open", "false", "powered", "true")) + "minecraft:" + doorId + "southlowerrightfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "lower", "hinge", "right", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "southlowerrighttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "lower", "hinge", "right", "open", "true", "powered", "false")) + "minecraft:" + doorId + "southlowerrighttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "lower", "hinge", "right", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "southlowerrighttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "lower", "hinge", "right", "open", "true", "powered", "true")) + "minecraft:" + doorId + "southlowerrighttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "lower", "hinge", "right", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "southupperleftfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "upper", "hinge", "left", "open", "false", "powered", "false")) + "minecraft:" + doorId + "southupperleftfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "upper", "hinge", "left", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "southupperleftfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "upper", "hinge", "left", "open", "false", "powered", "true")) + "minecraft:" + doorId + "southupperleftfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "upper", "hinge", "left", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "southupperlefttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "upper", "hinge", "left", "open", "true", "powered", "false")) + "minecraft:" + doorId + "southupperlefttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "upper", "hinge", "left", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "southupperlefttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "upper", "hinge", "left", "open", "true", "powered", "true")) + "minecraft:" + doorId + "southupperlefttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "upper", "hinge", "left", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "southupperrightfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "upper", "hinge", "right", "open", "false", "powered", "false")) + "minecraft:" + doorId + "southupperrightfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "upper", "hinge", "right", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "southupperrightfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "upper", "hinge", "right", "open", "false", "powered", "true")) + "minecraft:" + doorId + "southupperrightfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "upper", "hinge", "right", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "southupperrighttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "upper", "hinge", "right", "open", "true", "powered", "false")) + "minecraft:" + doorId + "southupperrighttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "upper", "hinge", "right", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "southupperrighttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "south", "half", "upper", "hinge", "right", "open", "true", "powered", "true")) + "minecraft:" + doorId + "southupperrighttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "south", "half", "upper", "hinge", "right", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "westlowerleftfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "lower", "hinge", "left", "open", "false", "powered", "false")) + "minecraft:" + doorId + "westlowerleftfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "lower", "hinge", "left", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "westlowerleftfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "lower", "hinge", "left", "open", "false", "powered", "true")) + "minecraft:" + doorId + "westlowerleftfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "lower", "hinge", "left", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "westlowerlefttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "lower", "hinge", "left", "open", "true", "powered", "false")) + "minecraft:" + doorId + "westlowerlefttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "lower", "hinge", "left", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "westlowerlefttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "lower", "hinge", "left", "open", "true", "powered", "true")) + "minecraft:" + doorId + "westlowerlefttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "lower", "hinge", "left", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "westlowerrightfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "lower", "hinge", "right", "open", "false", "powered", "false")) + "minecraft:" + doorId + "westlowerrightfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "lower", "hinge", "right", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "westlowerrightfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "lower", "hinge", "right", "open", "false", "powered", "true")) + "minecraft:" + doorId + "westlowerrightfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "lower", "hinge", "right", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "westlowerrighttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "lower", "hinge", "right", "open", "true", "powered", "false")) + "minecraft:" + doorId + "westlowerrighttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "lower", "hinge", "right", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "westlowerrighttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "lower", "hinge", "right", "open", "true", "powered", "true")) + "minecraft:" + doorId + "westlowerrighttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "lower", "hinge", "right", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "westupperleftfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "upper", "hinge", "left", "open", "false", "powered", "false")) + "minecraft:" + doorId + "westupperleftfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "upper", "hinge", "left", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "westupperleftfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "upper", "hinge", "left", "open", "false", "powered", "true")) + "minecraft:" + doorId + "westupperleftfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "upper", "hinge", "left", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "westupperlefttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "upper", "hinge", "left", "open", "true", "powered", "false")) + "minecraft:" + doorId + "westupperlefttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "upper", "hinge", "left", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "westupperlefttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "upper", "hinge", "left", "open", "true", "powered", "true")) + "minecraft:" + doorId + "westupperlefttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "upper", "hinge", "left", "open", "true", "powered", "true")) ); map.put( - "minecraft:" + string + "westupperrightfalsefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "upper", "hinge", "right", "open", "false", "powered", "false")) + "minecraft:" + doorId + "westupperrightfalsefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "upper", "hinge", "right", "open", "false", "powered", "false")) ); map.put( - "minecraft:" + string + "westupperrightfalsetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "upper", "hinge", "right", "open", "false", "powered", "true")) + "minecraft:" + doorId + "westupperrightfalsetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "upper", "hinge", "right", "open", "false", "powered", "true")) ); map.put( - "minecraft:" + string + "westupperrighttruefalse", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "upper", "hinge", "right", "open", "true", "powered", "false")) + "minecraft:" + doorId + "westupperrighttruefalse", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "upper", "hinge", "right", "open", "true", "powered", "false")) ); map.put( - "minecraft:" + string + "westupperrighttruetrue", - ExtraDataFixUtils.blockState(string2, Map.of("facing", "west", "half", "upper", "hinge", "right", "open", "true", "powered", "true")) + "minecraft:" + doorId + "westupperrighttruetrue", + ExtraDataFixUtils.blockState(string, Map.of("facing", "west", "half", "upper", "hinge", "right", "open", "true", "powered", "true")) ); } - private static void addBeds(Map> map, int i, String string) { - map.put("southfalsefoot" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_bed", Map.of("facing", "south", "occupied", "false", "part", "foot"))); - map.put("westfalsefoot" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_bed", Map.of("facing", "west", "occupied", "false", "part", "foot"))); - map.put("northfalsefoot" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_bed", Map.of("facing", "north", "occupied", "false", "part", "foot"))); - map.put("eastfalsefoot" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_bed", Map.of("facing", "east", "occupied", "false", "part", "foot"))); - map.put("southfalsehead" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_bed", Map.of("facing", "south", "occupied", "false", "part", "head"))); - map.put("westfalsehead" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_bed", Map.of("facing", "west", "occupied", "false", "part", "head"))); - map.put("northfalsehead" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_bed", Map.of("facing", "north", "occupied", "false", "part", "head"))); - map.put("eastfalsehead" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_bed", Map.of("facing", "east", "occupied", "false", "part", "head"))); - map.put("southtruehead" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_bed", Map.of("facing", "south", "occupied", "true", "part", "head"))); - map.put("westtruehead" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_bed", Map.of("facing", "west", "occupied", "true", "part", "head"))); - map.put("northtruehead" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_bed", Map.of("facing", "north", "occupied", "true", "part", "head"))); - map.put("easttruehead" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_bed", Map.of("facing", "east", "occupied", "true", "part", "head"))); + private static void addBeds(Map> map, int id, String bedColor) { + map.put( + "southfalsefoot" + id, ExtraDataFixUtils.blockState("minecraft:" + bedColor + "_bed", Map.of("facing", "south", "occupied", "false", "part", "foot")) + ); + map.put("westfalsefoot" + id, ExtraDataFixUtils.blockState("minecraft:" + bedColor + "_bed", Map.of("facing", "west", "occupied", "false", "part", "foot"))); + map.put( + "northfalsefoot" + id, ExtraDataFixUtils.blockState("minecraft:" + bedColor + "_bed", Map.of("facing", "north", "occupied", "false", "part", "foot")) + ); + map.put("eastfalsefoot" + id, ExtraDataFixUtils.blockState("minecraft:" + bedColor + "_bed", Map.of("facing", "east", "occupied", "false", "part", "foot"))); + map.put( + "southfalsehead" + id, ExtraDataFixUtils.blockState("minecraft:" + bedColor + "_bed", Map.of("facing", "south", "occupied", "false", "part", "head")) + ); + map.put("westfalsehead" + id, ExtraDataFixUtils.blockState("minecraft:" + bedColor + "_bed", Map.of("facing", "west", "occupied", "false", "part", "head"))); + map.put( + "northfalsehead" + id, ExtraDataFixUtils.blockState("minecraft:" + bedColor + "_bed", Map.of("facing", "north", "occupied", "false", "part", "head")) + ); + map.put("eastfalsehead" + id, ExtraDataFixUtils.blockState("minecraft:" + bedColor + "_bed", Map.of("facing", "east", "occupied", "false", "part", "head"))); + map.put("southtruehead" + id, ExtraDataFixUtils.blockState("minecraft:" + bedColor + "_bed", Map.of("facing", "south", "occupied", "true", "part", "head"))); + map.put("westtruehead" + id, ExtraDataFixUtils.blockState("minecraft:" + bedColor + "_bed", Map.of("facing", "west", "occupied", "true", "part", "head"))); + map.put("northtruehead" + id, ExtraDataFixUtils.blockState("minecraft:" + bedColor + "_bed", Map.of("facing", "north", "occupied", "true", "part", "head"))); + map.put("easttruehead" + id, ExtraDataFixUtils.blockState("minecraft:" + bedColor + "_bed", Map.of("facing", "east", "occupied", "true", "part", "head"))); } - private static void addBanners(Map> map, int i, String string) { - for (int j = 0; j < 16; j++) { - map.put(j + "_" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_banner", Map.of("rotation", String.valueOf(j)))); + private static void addBanners(Map> map, int id, String bannerColor) { + for (int i = 0; i < 16; i++) { + map.put(i + "_" + id, ExtraDataFixUtils.blockState("minecraft:" + bannerColor + "_banner", Map.of("rotation", String.valueOf(i)))); } - map.put("north_" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_wall_banner", Map.of("facing", "north"))); - map.put("south_" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_wall_banner", Map.of("facing", "south"))); - map.put("west_" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_wall_banner", Map.of("facing", "west"))); - map.put("east_" + i, ExtraDataFixUtils.blockState("minecraft:" + string + "_wall_banner", Map.of("facing", "east"))); + map.put("north_" + id, ExtraDataFixUtils.blockState("minecraft:" + bannerColor + "_wall_banner", Map.of("facing", "north"))); + map.put("south_" + id, ExtraDataFixUtils.blockState("minecraft:" + bannerColor + "_wall_banner", Map.of("facing", "south"))); + map.put("west_" + id, ExtraDataFixUtils.blockState("minecraft:" + bannerColor + "_wall_banner", Map.of("facing", "west"))); + map.put("east_" + id, ExtraDataFixUtils.blockState("minecraft:" + bannerColor + "_wall_banner", Map.of("facing", "east"))); } static { @@ -637,26 +645,26 @@ public class ChunkPalettedStorageFix extends DataFix { this.hasData = section.get("Blocks").result().isPresent(); } - public Dynamic getBlock(int id) { - if (id >= 0 && id <= 4095) { - Dynamic dynamic = this.palette.byId(this.buffer[id]); + public Dynamic getBlock(int index) { + if (index >= 0 && index <= 4095) { + Dynamic dynamic = this.palette.byId(this.buffer[index]); return dynamic == null ? ChunkPalettedStorageFix.MappingConstants.AIR : dynamic; } else { return ChunkPalettedStorageFix.MappingConstants.AIR; } } - public void setBlock(int index, Dynamic data) { - if (this.seen.add(data)) { - this.listTag.add("%%FILTER_ME%%".equals(ChunkPalettedStorageFix.getName(data)) ? ChunkPalettedStorageFix.MappingConstants.AIR : data); + public void setBlock(int index, Dynamic block) { + if (this.seen.add(block)) { + this.listTag.add("%%FILTER_ME%%".equals(ChunkPalettedStorageFix.getName(block)) ? ChunkPalettedStorageFix.MappingConstants.AIR : block); } - this.buffer[index] = ChunkPalettedStorageFix.idFor(this.palette, data); + this.buffer[index] = ChunkPalettedStorageFix.idFor(this.palette, block); } - public int upgrade(int i) { + public int upgrade(int sides) { if (!this.hasData) { - return i; + return sides; } else { ByteBuffer byteBuffer = (ByteBuffer)this.section.get("Blocks").asByteBufferOpt().result().get(); ChunkPalettedStorageFix.DataLayer dataLayer = (ChunkPalettedStorageFix.DataLayer)this.section @@ -675,39 +683,39 @@ public class ChunkPalettedStorageFix extends DataFix { ChunkPalettedStorageFix.idFor(this.palette, ChunkPalettedStorageFix.MappingConstants.AIR); this.listTag.add(ChunkPalettedStorageFix.MappingConstants.AIR); - for (int j = 0; j < 4096; j++) { - int k = j & 15; - int l = j >> 8 & 15; - int m = j >> 4 & 15; - int n = dataLayer2.get(k, l, m) << 12 | (byteBuffer.get(j) & 255) << 4 | dataLayer.get(k, l, m); - if (ChunkPalettedStorageFix.MappingConstants.FIX.get(n >> 4)) { - this.addFix(n >> 4, j); + for (int i = 0; i < 4096; i++) { + int j = i & 15; + int k = i >> 8 & 15; + int l = i >> 4 & 15; + int m = dataLayer2.get(j, k, l) << 12 | (byteBuffer.get(i) & 255) << 4 | dataLayer.get(j, k, l); + if (ChunkPalettedStorageFix.MappingConstants.FIX.get(m >> 4)) { + this.addFix(m >> 4, i); } - if (ChunkPalettedStorageFix.MappingConstants.VIRTUAL.get(n >> 4)) { - int o = ChunkPalettedStorageFix.getSideMask(k == 0, k == 15, m == 0, m == 15); - if (o == 0) { - this.update.add(j); + if (ChunkPalettedStorageFix.MappingConstants.VIRTUAL.get(m >> 4)) { + int n = ChunkPalettedStorageFix.getSideMask(j == 0, j == 15, l == 0, l == 15); + if (n == 0) { + this.update.add(i); } else { - i |= o; + sides |= n; } } - this.setBlock(j, BlockStateData.getTag(n)); + this.setBlock(i, BlockStateData.getTag(m)); } - return i; + return sides; } } - private void addFix(int i, int j) { - IntList intList = this.toFix.get(i); + private void addFix(int index, int value) { + IntList intList = this.toFix.get(index); if (intList == null) { intList = new IntArrayList(); - this.toFix.put(i, intList); + this.toFix.put(index, intList); } - intList.add(j); + intList.add(value); } public Dynamic write() { @@ -975,43 +983,43 @@ public class ChunkPalettedStorageFix extends DataFix { // $VF: Unable to simplify switch-on-enum, as the enum class was not able to be found. // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) - public static int relative(int i, ChunkPalettedStorageFix.Direction direction) { + public static int relative(int data, ChunkPalettedStorageFix.Direction direction) { return switch (direction.getAxis().ordinal()) { case 0 -> { - int j = (i & 15) + direction.getAxisDirection().getStep(); - yield j >= 0 && j <= 15 ? i & -16 | j : -1; + int i = (data & 15) + direction.getAxisDirection().getStep(); + yield i >= 0 && i <= 15 ? data & -16 | i : -1; } case 1 -> { - int j = (i >> 8) + direction.getAxisDirection().getStep(); - yield j >= 0 && j <= 255 ? i & 0xFF | j << 8 : -1; + int i = (data >> 8) + direction.getAxisDirection().getStep(); + yield i >= 0 && i <= 255 ? data & 0xFF | i << 8 : -1; } case 2 -> { - int j = (i >> 4 & 15) + direction.getAxisDirection().getStep(); - yield j >= 0 && j <= 15 ? i & -241 | j << 4 : -1; + int i = (data >> 4 & 15) + direction.getAxisDirection().getStep(); + yield i >= 0 && i <= 15 ? data & -241 | i << 4 : -1; } default -> throw new MatchException(null, null); }; } - private void setBlock(int i, Dynamic dynamic) { - if (i >= 0 && i <= 65535) { - ChunkPalettedStorageFix.Section section = this.getSection(i); + private void setBlock(int index, Dynamic block) { + if (index >= 0 && index <= 65535) { + ChunkPalettedStorageFix.Section section = this.getSection(index); if (section != null) { - section.setBlock(i & 4095, dynamic); + section.setBlock(index & 4095, block); } } } @Nullable - private ChunkPalettedStorageFix.Section getSection(int i) { - int j = i >> 12; - return j < this.sections.length ? this.sections[j] : null; + private ChunkPalettedStorageFix.Section getSection(int index) { + int i = index >> 12; + return i < this.sections.length ? this.sections[i] : null; } - public Dynamic getBlock(int i) { - if (i >= 0 && i <= 65535) { - ChunkPalettedStorageFix.Section section = this.getSection(i); - return section == null ? ChunkPalettedStorageFix.MappingConstants.AIR : section.getBlock(i & 4095); + public Dynamic getBlock(int index) { + if (index >= 0 && index <= 65535) { + ChunkPalettedStorageFix.Section section = this.getSection(index); + return section == null ? ChunkPalettedStorageFix.MappingConstants.AIR : section.getBlock(index & 4095); } else { return ChunkPalettedStorageFix.MappingConstants.AIR; } diff --git a/net/minecraft/util/datafix/fixes/ContainerBlockEntityLockPredicateFix.java b/net/minecraft/util/datafix/fixes/ContainerBlockEntityLockPredicateFix.java index 9bb76b73..b22e2baf 100644 --- a/net/minecraft/util/datafix/fixes/ContainerBlockEntityLockPredicateFix.java +++ b/net/minecraft/util/datafix/fixes/ContainerBlockEntityLockPredicateFix.java @@ -7,8 +7,8 @@ import com.mojang.datafixers.Typed; import com.mojang.datafixers.schemas.Schema; public class ContainerBlockEntityLockPredicateFix extends DataFix { - public ContainerBlockEntityLockPredicateFix(Schema schema) { - super(schema, false); + public ContainerBlockEntityLockPredicateFix(Schema outputSchema) { + super(outputSchema, false); } @Override @@ -18,7 +18,7 @@ public class ContainerBlockEntityLockPredicateFix extends DataFix { ); } - private static Typed fixBlockEntity(Typed typed) { - return typed.update(DSL.remainderFinder(), dynamic -> dynamic.renameAndFixField("Lock", "lock", LockComponentPredicateFix::fixLock)); + private static Typed fixBlockEntity(Typed data) { + return data.update(DSL.remainderFinder(), dynamic -> dynamic.renameAndFixField("Lock", "lock", LockComponentPredicateFix::fixLock)); } } diff --git a/net/minecraft/util/datafix/fixes/EntitySalmonSizeFix.java b/net/minecraft/util/datafix/fixes/EntitySalmonSizeFix.java new file mode 100644 index 00000000..0d1f3c68 --- /dev/null +++ b/net/minecraft/util/datafix/fixes/EntitySalmonSizeFix.java @@ -0,0 +1,19 @@ +package net.minecraft.util.datafix.fixes; + +import com.mojang.datafixers.DSL; +import com.mojang.datafixers.Typed; +import com.mojang.datafixers.schemas.Schema; + +public class EntitySalmonSizeFix extends NamedEntityFix { + public EntitySalmonSizeFix(Schema outputSchema) { + super(outputSchema, false, "EntitySalmonSizeFix", References.ENTITY, "minecraft:salmon"); + } + + @Override + protected Typed fix(Typed typed) { + return typed.update(DSL.remainderFinder(), dynamic -> { + String string = dynamic.get("type").asString("medium"); + return string.equals("large") ? dynamic : dynamic.set("type", dynamic.createString("medium")); + }); + } +} diff --git a/net/minecraft/util/datafix/fixes/FireResistantToDamageResistantComponentFix.java b/net/minecraft/util/datafix/fixes/FireResistantToDamageResistantComponentFix.java index 6ebd68ef..f24a9890 100644 --- a/net/minecraft/util/datafix/fixes/FireResistantToDamageResistantComponentFix.java +++ b/net/minecraft/util/datafix/fixes/FireResistantToDamageResistantComponentFix.java @@ -4,8 +4,8 @@ import com.mojang.datafixers.schemas.Schema; import com.mojang.serialization.Dynamic; public class FireResistantToDamageResistantComponentFix extends ItemStackComponentRemainderFix { - public FireResistantToDamageResistantComponentFix(Schema schema) { - super(schema, "FireResistantToDamageResistantComponentFix", "minecraft:fire_resistant", "minecraft:damage_resistant"); + public FireResistantToDamageResistantComponentFix(Schema outputSchema) { + super(outputSchema, "FireResistantToDamageResistantComponentFix", "minecraft:fire_resistant", "minecraft:damage_resistant"); } @Override diff --git a/net/minecraft/util/datafix/fixes/FoodToConsumableFix.java b/net/minecraft/util/datafix/fixes/FoodToConsumableFix.java index 7a40a977..1c86785e 100644 --- a/net/minecraft/util/datafix/fixes/FoodToConsumableFix.java +++ b/net/minecraft/util/datafix/fixes/FoodToConsumableFix.java @@ -8,8 +8,8 @@ import java.util.Optional; import java.util.stream.Stream; public class FoodToConsumableFix extends DataFix { - public FoodToConsumableFix(Schema schema) { - super(schema, true); + public FoodToConsumableFix(Schema outputSchema) { + super(outputSchema, true); } @Override diff --git a/net/minecraft/util/datafix/fixes/LockComponentPredicateFix.java b/net/minecraft/util/datafix/fixes/LockComponentPredicateFix.java index 06ee71c9..2e41017f 100644 --- a/net/minecraft/util/datafix/fixes/LockComponentPredicateFix.java +++ b/net/minecraft/util/datafix/fixes/LockComponentPredicateFix.java @@ -9,8 +9,8 @@ import java.util.Optional; public class LockComponentPredicateFix extends ItemStackComponentRemainderFix { public static final Escaper ESCAPER = Escapers.builder().addEscape('"', "\\\"").addEscape('\\', "\\\\").build(); - public LockComponentPredicateFix(Schema schema) { - super(schema, "LockComponentPredicateFix", "minecraft:lock"); + public LockComponentPredicateFix(Schema outputSchema) { + super(outputSchema, "LockComponentPredicateFix", "minecraft:lock"); } @Override @@ -18,14 +18,14 @@ public class LockComponentPredicateFix extends ItemStackComponentRemainderFix { return fixLock(tag); } - public static Dynamic fixLock(Dynamic dynamic) { - Optional optional = dynamic.asString().result(); + public static Dynamic fixLock(Dynamic tag) { + Optional optional = tag.asString().result(); if (optional.isPresent()) { - Dynamic dynamic2 = dynamic.createString("\"" + ESCAPER.escape((String)optional.get()) + "\""); - Dynamic dynamic3 = dynamic.emptyMap().set("minecraft:custom_name", dynamic2); - return dynamic.emptyMap().set("components", dynamic3); + Dynamic dynamic = tag.createString("\"" + ESCAPER.escape((String)optional.get()) + "\""); + Dynamic dynamic2 = tag.emptyMap().set("minecraft:custom_name", dynamic); + return tag.emptyMap().set("components", dynamic2); } else { - return dynamic.emptyMap(); + return tag.emptyMap(); } } } diff --git a/net/minecraft/util/datafix/fixes/OminousBannerRarityFix.java b/net/minecraft/util/datafix/fixes/OminousBannerRarityFix.java index d8bc12b8..9643ecc4 100644 --- a/net/minecraft/util/datafix/fixes/OminousBannerRarityFix.java +++ b/net/minecraft/util/datafix/fixes/OminousBannerRarityFix.java @@ -13,8 +13,8 @@ import net.minecraft.util.datafix.ComponentDataFixUtils; import net.minecraft.util.datafix.schemas.NamespacedSchema; public class OminousBannerRarityFix extends DataFix { - public OminousBannerRarityFix(Schema schema) { - super(schema, false); + public OminousBannerRarityFix(Schema outputSchema) { + super(outputSchema, false); } @Override @@ -34,10 +34,10 @@ public class OminousBannerRarityFix extends DataFix { })); } - private Typed fix(Typed typed, OpticFinder opticFinder) { - return typed.updateTyped( - opticFinder, - typedx -> typedx.update( + private Typed fix(Typed data, OpticFinder componentField) { + return data.updateTyped( + componentField, + typed -> typed.update( DSL.remainderFinder(), dynamic -> { boolean bl = dynamic.get("minecraft:item_name") diff --git a/net/minecraft/util/datafix/fixes/StructuresBecomeConfiguredFix.java b/net/minecraft/util/datafix/fixes/StructuresBecomeConfiguredFix.java index 3d07dde3..65cfd17c 100644 --- a/net/minecraft/util/datafix/fixes/StructuresBecomeConfiguredFix.java +++ b/net/minecraft/util/datafix/fixes/StructuresBecomeConfiguredFix.java @@ -173,8 +173,8 @@ public class StructuresBecomeConfiguredFix extends DataFix { } @Nullable - private Dynamic findUpdatedStructureType(Dynamic dynamic, Dynamic data) { - String string = dynamic.asString("UNKNOWN").toLowerCase(Locale.ROOT); + private Dynamic findUpdatedStructureType(Dynamic structureName, Dynamic data) { + String string = structureName.asString("UNKNOWN").toLowerCase(Locale.ROOT); StructuresBecomeConfiguredFix.Conversion conversion = (StructuresBecomeConfiguredFix.Conversion)CONVERSION_MAP.get(string); if (conversion == null) { return null; diff --git a/net/minecraft/util/datafix/fixes/TrialSpawnerConfigInRegistryFix.java b/net/minecraft/util/datafix/fixes/TrialSpawnerConfigInRegistryFix.java index 88c32c79..55dca8ef 100644 --- a/net/minecraft/util/datafix/fixes/TrialSpawnerConfigInRegistryFix.java +++ b/net/minecraft/util/datafix/fixes/TrialSpawnerConfigInRegistryFix.java @@ -21,25 +21,25 @@ import org.slf4j.Logger; public class TrialSpawnerConfigInRegistryFix extends NamedEntityFix { private static final Logger LOGGER = LogUtils.getLogger(); - public TrialSpawnerConfigInRegistryFix(Schema schema) { - super(schema, false, "TrialSpawnerConfigInRegistryFix", References.BLOCK_ENTITY, "minecraft:trial_spawner"); + public TrialSpawnerConfigInRegistryFix(Schema outputSchema) { + super(outputSchema, false, "TrialSpawnerConfigInRegistryFix", References.BLOCK_ENTITY, "minecraft:trial_spawner"); } - public Dynamic fixTag(Dynamic dynamic) { - Optional> optional = dynamic.get("normal_config").result(); + public Dynamic fixTag(Dynamic tag) { + Optional> optional = tag.get("normal_config").result(); if (optional.isEmpty()) { - return dynamic; + return tag; } else { - Optional> optional2 = dynamic.get("ominous_config").result(); + Optional> optional2 = tag.get("ominous_config").result(); if (optional2.isEmpty()) { - return dynamic; + return tag; } else { ResourceLocation resourceLocation = (ResourceLocation)TrialSpawnerConfigInRegistryFix.VanillaTrialChambers.CONFIGS_TO_KEY .get(Pair.of((Dynamic)optional.get(), (Dynamic)optional2.get())); return resourceLocation == null - ? dynamic - : dynamic.set("normal_config", dynamic.createString(resourceLocation.withSuffix("/normal").toString())) - .set("ominous_config", dynamic.createString(resourceLocation.withSuffix("/ominous").toString())); + ? tag + : tag.set("normal_config", tag.createString(resourceLocation.withSuffix("/normal").toString())) + .set("ominous_config", tag.createString(resourceLocation.withSuffix("/ominous").toString())); } } } @@ -59,59 +59,59 @@ public class TrialSpawnerConfigInRegistryFix extends NamedEntityFix { private VanillaTrialChambers() { } - private static void register(ResourceLocation resourceLocation, String string, String string2) { + private static void register(ResourceLocation name, String normal, String ominous) { try { - CompoundTag compoundTag = parse(string); - CompoundTag compoundTag2 = parse(string2); + CompoundTag compoundTag = parse(normal); + CompoundTag compoundTag2 = parse(ominous); CompoundTag compoundTag3 = compoundTag.copy().merge(compoundTag2); CompoundTag compoundTag4 = removeDefaults(compoundTag3.copy()); Dynamic dynamic = asDynamic(compoundTag); - CONFIGS_TO_KEY.put(Pair.of(dynamic, asDynamic(compoundTag2)), resourceLocation); - CONFIGS_TO_KEY.put(Pair.of(dynamic, asDynamic(compoundTag3)), resourceLocation); - CONFIGS_TO_KEY.put(Pair.of(dynamic, asDynamic(compoundTag4)), resourceLocation); + CONFIGS_TO_KEY.put(Pair.of(dynamic, asDynamic(compoundTag2)), name); + CONFIGS_TO_KEY.put(Pair.of(dynamic, asDynamic(compoundTag3)), name); + CONFIGS_TO_KEY.put(Pair.of(dynamic, asDynamic(compoundTag4)), name); } catch (RuntimeException var8) { - throw new IllegalStateException("Failed to parse NBT for " + resourceLocation, var8); + throw new IllegalStateException("Failed to parse NBT for " + name, var8); } } - private static Dynamic asDynamic(CompoundTag compoundTag) { - return new Dynamic<>(NbtOps.INSTANCE, compoundTag); + private static Dynamic asDynamic(CompoundTag tag) { + return new Dynamic<>(NbtOps.INSTANCE, tag); } - private static CompoundTag parse(String string) { + private static CompoundTag parse(String config) { try { - return TagParser.parseTag(string); + return TagParser.parseTag(config); } catch (CommandSyntaxException var2) { - throw new IllegalArgumentException("Failed to parse Trial Spawner NBT config: " + string, var2); + throw new IllegalArgumentException("Failed to parse Trial Spawner NBT config: " + config, var2); } } - private static CompoundTag removeDefaults(CompoundTag compoundTag) { - if (compoundTag.getInt("spawn_range") == 4) { - compoundTag.remove("spawn_range"); + private static CompoundTag removeDefaults(CompoundTag tag) { + if (tag.getInt("spawn_range") == 4) { + tag.remove("spawn_range"); } - if (compoundTag.getFloat("total_mobs") == 6.0F) { - compoundTag.remove("total_mobs"); + if (tag.getFloat("total_mobs") == 6.0F) { + tag.remove("total_mobs"); } - if (compoundTag.getFloat("simultaneous_mobs") == 2.0F) { - compoundTag.remove("simultaneous_mobs"); + if (tag.getFloat("simultaneous_mobs") == 2.0F) { + tag.remove("simultaneous_mobs"); } - if (compoundTag.getFloat("total_mobs_added_per_player") == 2.0F) { - compoundTag.remove("total_mobs_added_per_player"); + if (tag.getFloat("total_mobs_added_per_player") == 2.0F) { + tag.remove("total_mobs_added_per_player"); } - if (compoundTag.getFloat("simultaneous_mobs_added_per_player") == 1.0F) { - compoundTag.remove("simultaneous_mobs_added_per_player"); + if (tag.getFloat("simultaneous_mobs_added_per_player") == 1.0F) { + tag.remove("simultaneous_mobs_added_per_player"); } - if (compoundTag.getInt("ticks_between_spawn") == 40) { - compoundTag.remove("ticks_between_spawn"); + if (tag.getInt("ticks_between_spawn") == 40) { + tag.remove("ticks_between_spawn"); } - return compoundTag; + return tag; } static { diff --git a/net/minecraft/util/datafix/fixes/VillagerSetCanPickUpLootFix.java b/net/minecraft/util/datafix/fixes/VillagerSetCanPickUpLootFix.java index 1b38175b..dd058a4c 100644 --- a/net/minecraft/util/datafix/fixes/VillagerSetCanPickUpLootFix.java +++ b/net/minecraft/util/datafix/fixes/VillagerSetCanPickUpLootFix.java @@ -8,8 +8,8 @@ import com.mojang.serialization.Dynamic; public class VillagerSetCanPickUpLootFix extends NamedEntityFix { private static final String CAN_PICK_UP_LOOT = "CanPickUpLoot"; - public VillagerSetCanPickUpLootFix(Schema schema) { - super(schema, true, "Villager CanPickUpLoot default value", References.ENTITY, "Villager"); + public VillagerSetCanPickUpLootFix(Schema outputSchema) { + super(outputSchema, true, "Villager CanPickUpLoot default value", References.ENTITY, "Villager"); } @Override @@ -17,7 +17,7 @@ public class VillagerSetCanPickUpLootFix extends NamedEntityFix { return typed.update(DSL.remainderFinder(), VillagerSetCanPickUpLootFix::fixValue); } - private static Dynamic fixValue(Dynamic dynamic) { - return dynamic.set("CanPickUpLoot", dynamic.createBoolean(true)); + private static Dynamic fixValue(Dynamic tag) { + return tag.set("CanPickUpLoot", tag.createBoolean(true)); } } diff --git a/net/minecraft/util/datafix/fixes/WorldGenSettingsFix.java b/net/minecraft/util/datafix/fixes/WorldGenSettingsFix.java index c20d2de4..b67e3370 100644 --- a/net/minecraft/util/datafix/fixes/WorldGenSettingsFix.java +++ b/net/minecraft/util/datafix/fixes/WorldGenSettingsFix.java @@ -195,7 +195,7 @@ public class WorldGenSettingsFix extends DataFix { return noise(seed, data, data.createString("minecraft:overworld"), vanillaBiomeSource(data, seed, false, false)); } - protected static T vanillaLevels(Dynamic data, long seed, Dynamic dynamic, boolean caves) { + protected static T vanillaLevels(Dynamic data, long seed, Dynamic generator, boolean caves) { DynamicOps dynamicOps = data.getOps(); return dynamicOps.createMap( ImmutableMap.of( @@ -205,7 +205,7 @@ public class WorldGenSettingsFix extends DataFix { dynamicOps.createString("type"), dynamicOps.createString("minecraft:overworld" + (caves ? "_caves" : "")), dynamicOps.createString("generator"), - dynamic.getValue() + generator.getValue() ) ), dynamicOps.createString("minecraft:the_nether"), @@ -377,12 +377,12 @@ public class WorldGenSettingsFix extends DataFix { return Math.max(minValue, getInt(string, defaultValue)); } - private static void setSpacing(Map map, String string, String spacing, int i) { + private static void setSpacing(Map map, String structure, String spacing, int minValue) { WorldGenSettingsFix.StructureFeatureConfiguration structureFeatureConfiguration = (WorldGenSettingsFix.StructureFeatureConfiguration)map.getOrDefault( - string, DEFAULTS.get(string) + structure, DEFAULTS.get(structure) ); - int j = getInt(spacing, structureFeatureConfiguration.spacing, i); - map.put(string, new WorldGenSettingsFix.StructureFeatureConfiguration(j, structureFeatureConfiguration.separation, structureFeatureConfiguration.salt)); + int i = getInt(spacing, structureFeatureConfiguration.spacing, minValue); + map.put(structure, new WorldGenSettingsFix.StructureFeatureConfiguration(i, structureFeatureConfiguration.separation, structureFeatureConfiguration.salt)); } static final class StructureFeatureConfiguration { diff --git a/net/minecraft/util/datafix/schemas/V4059.java b/net/minecraft/util/datafix/schemas/V4059.java index 8a8a612e..34af40d4 100644 --- a/net/minecraft/util/datafix/schemas/V4059.java +++ b/net/minecraft/util/datafix/schemas/V4059.java @@ -9,8 +9,8 @@ import java.util.function.Supplier; import net.minecraft.util.datafix.fixes.References; public class V4059 extends NamespacedSchema { - public V4059(int i, Schema schema) { - super(i, schema); + public V4059(int versionKey, Schema parent) { + super(versionKey, parent); } public static SequencedMap> components(Schema schema) { diff --git a/net/minecraft/util/datafix/schemas/V4067.java b/net/minecraft/util/datafix/schemas/V4067.java index 0ceca95c..bac0adef 100644 --- a/net/minecraft/util/datafix/schemas/V4067.java +++ b/net/minecraft/util/datafix/schemas/V4067.java @@ -8,8 +8,8 @@ import java.util.function.Supplier; import net.minecraft.util.datafix.fixes.References; public class V4067 extends NamespacedSchema { - public V4067(int i, Schema schema) { - super(i, schema); + public V4067(int versionKey, Schema parent) { + super(versionKey, parent); } @Override @@ -38,7 +38,7 @@ public class V4067 extends NamespacedSchema { return map; } - private void registerChestBoat(Map> map, String string) { - this.register(map, string, stringx -> DSL.optionalFields("Items", DSL.list(References.ITEM_STACK.in(this)))); + private void registerChestBoat(Map> map, String name) { + this.register(map, name, string -> DSL.optionalFields("Items", DSL.list(References.ITEM_STACK.in(this)))); } } diff --git a/net/minecraft/util/datafix/schemas/V4070.java b/net/minecraft/util/datafix/schemas/V4070.java index 34d28bf4..86b598d6 100644 --- a/net/minecraft/util/datafix/schemas/V4070.java +++ b/net/minecraft/util/datafix/schemas/V4070.java @@ -9,8 +9,8 @@ import java.util.function.Supplier; import net.minecraft.util.datafix.fixes.References; public class V4070 extends NamespacedSchema { - public V4070(int i, Schema schema) { - super(i, schema); + public V4070(int versionKey, Schema parent) { + super(versionKey, parent); } @Override diff --git a/net/minecraft/util/datafix/schemas/V4071.java b/net/minecraft/util/datafix/schemas/V4071.java index 5cc23bec..f037c55b 100644 --- a/net/minecraft/util/datafix/schemas/V4071.java +++ b/net/minecraft/util/datafix/schemas/V4071.java @@ -7,8 +7,8 @@ import java.util.Map; import java.util.function.Supplier; public class V4071 extends NamespacedSchema { - public V4071(int i, Schema schema) { - super(i, schema); + public V4071(int versionKey, Schema parent) { + super(versionKey, parent); } @Override diff --git a/net/minecraft/util/profiling/InactiveProfiler.java b/net/minecraft/util/profiling/InactiveProfiler.java index 70c074bc..c5bfdc7b 100644 --- a/net/minecraft/util/profiling/InactiveProfiler.java +++ b/net/minecraft/util/profiling/InactiveProfiler.java @@ -47,12 +47,12 @@ public class InactiveProfiler implements ProfileCollector { } @Override - public Zone zone(String string) { + public Zone zone(String name) { return Zone.INACTIVE; } @Override - public Zone zone(Supplier supplier) { + public Zone zone(Supplier name) { return Zone.INACTIVE; } diff --git a/net/minecraft/util/profiling/Profiler.java b/net/minecraft/util/profiling/Profiler.java index 5056d733..a591d6c1 100644 --- a/net/minecraft/util/profiling/Profiler.java +++ b/net/minecraft/util/profiling/Profiler.java @@ -12,19 +12,19 @@ public final class Profiler { private Profiler() { } - public static Profiler.Scope use(ProfilerFiller profilerFiller) { - startUsing(profilerFiller); + public static Profiler.Scope use(ProfilerFiller profiler) { + startUsing(profiler); return Profiler::stopUsing; } - private static void startUsing(ProfilerFiller profilerFiller) { + private static void startUsing(ProfilerFiller profiler) { if (ACTIVE.get() != null) { throw new IllegalStateException("Profiler is already active"); } else { - ProfilerFiller profilerFiller2 = decorateFiller(profilerFiller); - ACTIVE.set(profilerFiller2); + ProfilerFiller profilerFiller = decorateFiller(profiler); + ACTIVE.set(profilerFiller); ACTIVE_COUNT.incrementAndGet(); - profilerFiller2.startTick(); + profilerFiller.startTick(); } } @@ -39,8 +39,8 @@ public final class Profiler { } } - private static ProfilerFiller decorateFiller(ProfilerFiller profilerFiller) { - return ProfilerFiller.combine(getDefaultFiller(), profilerFiller); + private static ProfilerFiller decorateFiller(ProfilerFiller filler) { + return ProfilerFiller.combine(getDefaultFiller(), filler); } public static ProfilerFiller get() { diff --git a/net/minecraft/util/profiling/ProfilerFiller.java b/net/minecraft/util/profiling/ProfilerFiller.java index 78b525f3..b11c500b 100644 --- a/net/minecraft/util/profiling/ProfilerFiller.java +++ b/net/minecraft/util/profiling/ProfilerFiller.java @@ -26,22 +26,22 @@ public interface ProfilerFiller { void popPush(Supplier nameSupplier); - default void addZoneText(String string) { + default void addZoneText(String text) { } - default void addZoneValue(long l) { + default void addZoneValue(long value) { } - default void setZoneColor(int i) { + default void setZoneColor(int color) { } - default Zone zone(String string) { - this.push(string); + default Zone zone(String name) { + this.push(name); return new Zone(this); } - default Zone zone(Supplier supplier) { - this.push(supplier); + default Zone zone(Supplier name) { + this.push(name); return new Zone(this); } @@ -59,13 +59,11 @@ public interface ProfilerFiller { void incrementCounter(Supplier counterNameSupplier, int increment); - static ProfilerFiller combine(ProfilerFiller profilerFiller, ProfilerFiller profilerFiller2) { - if (profilerFiller == InactiveProfiler.INSTANCE) { - return profilerFiller2; + static ProfilerFiller combine(ProfilerFiller first, ProfilerFiller second) { + if (first == InactiveProfiler.INSTANCE) { + return second; } else { - return (ProfilerFiller)(profilerFiller2 == InactiveProfiler.INSTANCE - ? profilerFiller - : new ProfilerFiller.CombinedProfileFiller(profilerFiller, profilerFiller2)); + return (ProfilerFiller)(second == InactiveProfiler.INSTANCE ? first : new ProfilerFiller.CombinedProfileFiller(first, second)); } } @@ -73,9 +71,9 @@ public interface ProfilerFiller { private final ProfilerFiller first; private final ProfilerFiller second; - public CombinedProfileFiller(ProfilerFiller profilerFiller, ProfilerFiller profilerFiller2) { - this.first = profilerFiller; - this.second = profilerFiller2; + public CombinedProfileFiller(ProfilerFiller first, ProfilerFiller second) { + this.first = first; + this.second = second; } @Override @@ -139,21 +137,21 @@ public interface ProfilerFiller { } @Override - public void addZoneText(String string) { - this.first.addZoneText(string); - this.second.addZoneText(string); + public void addZoneText(String text) { + this.first.addZoneText(text); + this.second.addZoneText(text); } @Override - public void addZoneValue(long l) { - this.first.addZoneValue(l); - this.second.addZoneValue(l); + public void addZoneValue(long value) { + this.first.addZoneValue(value); + this.second.addZoneValue(value); } @Override - public void setZoneColor(int i) { - this.first.setZoneColor(i); - this.second.setZoneColor(i); + public void setZoneColor(int color) { + this.first.setZoneColor(color); + this.second.setZoneColor(color); } } } diff --git a/net/minecraft/util/profiling/TracyZoneFiller.java b/net/minecraft/util/profiling/TracyZoneFiller.java index 9f755129..25471f9b 100644 --- a/net/minecraft/util/profiling/TracyZoneFiller.java +++ b/net/minecraft/util/profiling/TracyZoneFiller.java @@ -105,36 +105,36 @@ public class TracyZoneFiller implements ProfilerFiller { } @Override - public void addZoneText(String string) { - this.activeZone().addText(string); + public void addZoneText(String text) { + this.activeZone().addText(text); } @Override - public void addZoneValue(long l) { - this.activeZone().addValue(l); + public void addZoneValue(long value) { + this.activeZone().addValue(value); } @Override - public void setZoneColor(int i) { - this.activeZone().setColor(i); + public void setZoneColor(int color) { + this.activeZone().setColor(color); } static final class PlotAndValue { private final Plot plot; private int value; - PlotAndValue(String string) { - this.plot = TracyClient.createPlot(string); + PlotAndValue(String name) { + this.plot = TracyClient.createPlot(name); this.value = 0; } - void set(int i) { - this.value = i; - this.plot.setValue(i); + void set(int value) { + this.value = value; + this.plot.setValue(value); } - void add(int i) { - this.set(this.value + i); + void add(int value) { + this.set(this.value + value); } } } diff --git a/net/minecraft/util/profiling/Zone.java b/net/minecraft/util/profiling/Zone.java index 4d9089e1..965092fe 100644 --- a/net/minecraft/util/profiling/Zone.java +++ b/net/minecraft/util/profiling/Zone.java @@ -8,37 +8,37 @@ public class Zone implements AutoCloseable { @Nullable private final ProfilerFiller profiler; - Zone(@Nullable ProfilerFiller profilerFiller) { - this.profiler = profilerFiller; + Zone(@Nullable ProfilerFiller profiler) { + this.profiler = profiler; } - public Zone addText(String string) { + public Zone addText(String text) { if (this.profiler != null) { - this.profiler.addZoneText(string); + this.profiler.addZoneText(text); } return this; } - public Zone addText(Supplier supplier) { + public Zone addText(Supplier text) { if (this.profiler != null) { - this.profiler.addZoneText((String)supplier.get()); + this.profiler.addZoneText((String)text.get()); } return this; } - public Zone addValue(long l) { + public Zone addValue(long value) { if (this.profiler != null) { - this.profiler.addZoneValue(l); + this.profiler.addZoneValue(value); } return this; } - public Zone setColor(int i) { + public Zone setColor(int color) { if (this.profiler != null) { - this.profiler.setZoneColor(i); + this.profiler.setZoneColor(color); } return this; diff --git a/net/minecraft/util/thread/AbstractConsecutiveExecutor.java b/net/minecraft/util/thread/AbstractConsecutiveExecutor.java index 9a6500ad..393d0742 100644 --- a/net/minecraft/util/thread/AbstractConsecutiveExecutor.java +++ b/net/minecraft/util/thread/AbstractConsecutiveExecutor.java @@ -20,10 +20,10 @@ public abstract class AbstractConsecutiveExecutor implements private final Executor executor; private final String name; - public AbstractConsecutiveExecutor(StrictQueue strictQueue, Executor executor, String string) { + public AbstractConsecutiveExecutor(StrictQueue queue, Executor executor, String name) { this.executor = executor; - this.queue = strictQueue; - this.name = string; + this.queue = queue; + this.name = name; MetricsRegistry.INSTANCE.add(this); } @@ -70,8 +70,8 @@ public abstract class AbstractConsecutiveExecutor implements } @Override - public void schedule(T runnable) { - this.queue.push(runnable); + public void schedule(T task) { + this.queue.push(task); this.registerForExecution(); } diff --git a/net/minecraft/util/thread/BlockableEventLoop.java b/net/minecraft/util/thread/BlockableEventLoop.java index cc91040b..22bf064d 100644 --- a/net/minecraft/util/thread/BlockableEventLoop.java +++ b/net/minecraft/util/thread/BlockableEventLoop.java @@ -84,8 +84,8 @@ public abstract class BlockableEventLoop implements Profiler } @Override - public void schedule(R runnable) { - this.pendingRunnables.add(runnable); + public void schedule(R task) { + this.pendingRunnables.add(task); LockSupport.unpark(this.getRunningThread()); } @@ -160,9 +160,9 @@ public abstract class BlockableEventLoop implements Profiler return ImmutableList.of(MetricSampler.create(this.name + "-pending-tasks", MetricCategory.EVENT_LOOPS, this::getPendingTasksCount)); } - public static boolean isNonRecoverable(Throwable throwable) { - return throwable instanceof ReportedException reportedException + public static boolean isNonRecoverable(Throwable error) { + return error instanceof ReportedException reportedException ? isNonRecoverable(reportedException.getCause()) - : throwable instanceof OutOfMemoryError || throwable instanceof StackOverflowError; + : error instanceof OutOfMemoryError || error instanceof StackOverflowError; } } diff --git a/net/minecraft/util/thread/ConsecutiveExecutor.java b/net/minecraft/util/thread/ConsecutiveExecutor.java index ebc49ee7..63746f5a 100644 --- a/net/minecraft/util/thread/ConsecutiveExecutor.java +++ b/net/minecraft/util/thread/ConsecutiveExecutor.java @@ -4,8 +4,8 @@ import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.Executor; public class ConsecutiveExecutor extends AbstractConsecutiveExecutor { - public ConsecutiveExecutor(Executor executor, String string) { - super(new StrictQueue.QueueStrictQueue(new ConcurrentLinkedQueue()), executor, string); + public ConsecutiveExecutor(Executor executor, String name) { + super(new StrictQueue.QueueStrictQueue(new ConcurrentLinkedQueue()), executor, name); } @Override diff --git a/net/minecraft/util/thread/PriorityConsecutiveExecutor.java b/net/minecraft/util/thread/PriorityConsecutiveExecutor.java index 7f881dbe..34d7280e 100644 --- a/net/minecraft/util/thread/PriorityConsecutiveExecutor.java +++ b/net/minecraft/util/thread/PriorityConsecutiveExecutor.java @@ -6,8 +6,8 @@ import java.util.function.Consumer; import net.minecraft.util.profiling.metrics.MetricsRegistry; public class PriorityConsecutiveExecutor extends AbstractConsecutiveExecutor { - public PriorityConsecutiveExecutor(int i, Executor executor, String string) { - super(new StrictQueue.FixedPriorityQueue(i), executor, string); + public PriorityConsecutiveExecutor(int size, Executor executor, String name) { + super(new StrictQueue.FixedPriorityQueue(size), executor, name); MetricsRegistry.INSTANCE.add(this); } @@ -15,9 +15,9 @@ public class PriorityConsecutiveExecutor extends AbstractConsecutiveExecutor CompletableFuture scheduleWithResult(int i, Consumer> consumer) { + public CompletableFuture scheduleWithResult(int priority, Consumer> resultConsumer) { CompletableFuture completableFuture = new CompletableFuture(); - this.schedule(new StrictQueue.RunnableWithPriority(i, () -> consumer.accept(completableFuture))); + this.schedule(new StrictQueue.RunnableWithPriority(priority, () -> resultConsumer.accept(completableFuture))); return completableFuture; } } diff --git a/net/minecraft/util/thread/StrictQueue.java b/net/minecraft/util/thread/StrictQueue.java index 8b940cfb..29053505 100644 --- a/net/minecraft/util/thread/StrictQueue.java +++ b/net/minecraft/util/thread/StrictQueue.java @@ -10,7 +10,7 @@ public interface StrictQueue { @Nullable Runnable pop(); - boolean push(T runnable); + boolean push(T task); boolean isEmpty(); @@ -42,10 +42,10 @@ public interface StrictQueue { return null; } - public boolean push(StrictQueue.RunnableWithPriority runnableWithPriority) { - int i = runnableWithPriority.priority; + public boolean push(StrictQueue.RunnableWithPriority task) { + int i = task.priority; if (i < this.queues.length && i >= 0) { - this.queues[i].add(runnableWithPriority); + this.queues[i].add(task); this.size.incrementAndGet(); return true; } else { @@ -78,8 +78,8 @@ public interface StrictQueue { } @Override - public boolean push(Runnable runnable) { - return this.queue.add(runnable); + public boolean push(Runnable task) { + return this.queue.add(task); } @Override diff --git a/net/minecraft/util/thread/TaskScheduler.java b/net/minecraft/util/thread/TaskScheduler.java index 86ae045d..39b555aa 100644 --- a/net/minecraft/util/thread/TaskScheduler.java +++ b/net/minecraft/util/thread/TaskScheduler.java @@ -7,29 +7,29 @@ import java.util.function.Consumer; public interface TaskScheduler extends AutoCloseable { String name(); - void schedule(R runnable); + void schedule(R task); default void close() { } R wrapRunnable(Runnable runnable); - default CompletableFuture scheduleWithResult(Consumer> consumer) { + default CompletableFuture scheduleWithResult(Consumer> resultConsumer) { CompletableFuture completableFuture = new CompletableFuture(); - this.schedule(this.wrapRunnable(() -> consumer.accept(completableFuture))); + this.schedule(this.wrapRunnable(() -> resultConsumer.accept(completableFuture))); return completableFuture; } - static TaskScheduler wrapExecutor(String string, Executor executor) { + static TaskScheduler wrapExecutor(String name, Executor executor) { return new TaskScheduler() { @Override public String name() { - return string; + return name; } @Override - public void schedule(Runnable runnable) { - executor.execute(runnable); + public void schedule(Runnable task) { + executor.execute(task); } @Override @@ -38,7 +38,7 @@ public interface TaskScheduler extends AutoCloseable { } public String toString() { - return string; + return name; } }; } diff --git a/net/minecraft/util/worldupdate/WorldUpgrader.java b/net/minecraft/util/worldupdate/WorldUpgrader.java index 9c6a957c..5ae4e159 100644 --- a/net/minecraft/util/worldupdate/WorldUpgrader.java +++ b/net/minecraft/util/worldupdate/WorldUpgrader.java @@ -167,12 +167,12 @@ public class WorldUpgrader implements AutoCloseable { protected CompletableFuture previousWriteFuture; protected final DataFixTypes dataFixType; - AbstractUpgrader(final DataFixTypes dataFixTypes, final String string, final String string2, final Component component, final Component component2) { - this.dataFixType = dataFixTypes; - this.type = string; - this.folderName = string2; - this.upgradingStatus = component; - this.finishedStatus = component2; + AbstractUpgrader(final DataFixTypes dataFixType, final String type, final String folderName, final Component upgradingStatus, final Component finishedStatus) { + this.dataFixType = dataFixType; + this.type = type; + this.folderName = folderName; + this.upgradingStatus = upgradingStatus; + this.finishedStatus = finishedStatus; } public void upgrade() { @@ -434,8 +434,8 @@ public class WorldUpgrader implements AutoCloseable { } abstract class SimpleRegionStorageUpgrader extends WorldUpgrader.AbstractUpgrader { - SimpleRegionStorageUpgrader(final DataFixTypes dataFixTypes, final String string, final Component component, final Component component2) { - super(dataFixTypes, string, string, component, component2); + SimpleRegionStorageUpgrader(final DataFixTypes dataFixType, final String type, final Component upgradingStatus, final Component finishedStatus) { + super(dataFixType, type, type, upgradingStatus, finishedStatus); } protected SimpleRegionStorage createStorage(RegionStorageInfo regionStorageInfo, Path path) { diff --git a/net/minecraft/world/InteractionResult.java b/net/minecraft/world/InteractionResult.java index c4cedf6f..746f4845 100644 --- a/net/minecraft/world/InteractionResult.java +++ b/net/minecraft/world/InteractionResult.java @@ -36,8 +36,8 @@ public sealed interface InteractionResult return true; } - public InteractionResult.Success heldItemTransformedTo(ItemStack itemStack) { - return new InteractionResult.Success(this.swingSource, new InteractionResult.ItemContext(true, itemStack)); + public InteractionResult.Success heldItemTransformedTo(ItemStack stack) { + return new InteractionResult.Success(this.swingSource, new InteractionResult.ItemContext(true, stack)); } public InteractionResult.Success withoutItem() { diff --git a/net/minecraft/world/LockCode.java b/net/minecraft/world/LockCode.java index 9f0cd882..1f0f2b99 100644 --- a/net/minecraft/world/LockCode.java +++ b/net/minecraft/world/LockCode.java @@ -19,16 +19,16 @@ public record LockCode(ItemPredicate predicate) { return this.predicate.test(stack); } - public void addToTag(CompoundTag compoundTag, HolderLookup.Provider provider) { + public void addToTag(CompoundTag tag, HolderLookup.Provider registries) { if (this != NO_LOCK) { - DataResult dataResult = CODEC.encode(this, provider.createSerializationContext(NbtOps.INSTANCE), new CompoundTag()); - dataResult.result().ifPresent(tag -> compoundTag.put("lock", tag)); + DataResult dataResult = CODEC.encode(this, registries.createSerializationContext(NbtOps.INSTANCE), new CompoundTag()); + dataResult.result().ifPresent(tagx -> tag.put("lock", tagx)); } } - public static LockCode fromTag(CompoundTag compoundTag, HolderLookup.Provider provider) { - if (compoundTag.contains("lock", 10)) { - DataResult> dataResult = CODEC.decode(provider.createSerializationContext(NbtOps.INSTANCE), compoundTag.get("lock")); + public static LockCode fromTag(CompoundTag tag, HolderLookup.Provider registries) { + if (tag.contains("lock", 10)) { + DataResult> dataResult = CODEC.decode(registries.createSerializationContext(NbtOps.INSTANCE), tag.get("lock")); if (dataResult.isSuccess()) { return dataResult.getOrThrow().getFirst(); } diff --git a/net/minecraft/world/effect/AbsorptionMobEffect.java b/net/minecraft/world/effect/AbsorptionMobEffect.java index 23d3f1a8..f97fe389 100644 --- a/net/minecraft/world/effect/AbsorptionMobEffect.java +++ b/net/minecraft/world/effect/AbsorptionMobEffect.java @@ -9,8 +9,8 @@ class AbsorptionMobEffect extends MobEffect { } @Override - public boolean applyEffectTick(ServerLevel serverLevel, LivingEntity livingEntity, int i) { - return livingEntity.getAbsorptionAmount() > 0.0F; + public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { + return entity.getAbsorptionAmount() > 0.0F; } @Override @@ -19,8 +19,8 @@ class AbsorptionMobEffect extends MobEffect { } @Override - public void onEffectStarted(LivingEntity livingEntity, int amplifier) { - super.onEffectStarted(livingEntity, amplifier); - livingEntity.setAbsorptionAmount(Math.max(livingEntity.getAbsorptionAmount(), 4 * (1 + amplifier))); + public void onEffectStarted(LivingEntity entity, int amplifier) { + super.onEffectStarted(entity, amplifier); + entity.setAbsorptionAmount(Math.max(entity.getAbsorptionAmount(), 4 * (1 + amplifier))); } } diff --git a/net/minecraft/world/effect/BadOmenMobEffect.java b/net/minecraft/world/effect/BadOmenMobEffect.java index 30634be5..77e2c50a 100644 --- a/net/minecraft/world/effect/BadOmenMobEffect.java +++ b/net/minecraft/world/effect/BadOmenMobEffect.java @@ -17,14 +17,14 @@ class BadOmenMobEffect extends MobEffect { } @Override - public boolean applyEffectTick(ServerLevel serverLevel, LivingEntity livingEntity, int i) { - if (livingEntity instanceof ServerPlayer serverPlayer + public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { + if (entity instanceof ServerPlayer serverPlayer && !serverPlayer.isSpectator() - && serverLevel.getDifficulty() != Difficulty.PEACEFUL - && serverLevel.isVillage(serverPlayer.blockPosition())) { - Raid raid = serverLevel.getRaidAt(serverPlayer.blockPosition()); + && level.getDifficulty() != Difficulty.PEACEFUL + && level.isVillage(serverPlayer.blockPosition())) { + Raid raid = level.getRaidAt(serverPlayer.blockPosition()); if (raid == null || raid.getRaidOmenLevel() < raid.getMaxRaidOmenLevel()) { - serverPlayer.addEffect(new MobEffectInstance(MobEffects.RAID_OMEN, 600, i)); + serverPlayer.addEffect(new MobEffectInstance(MobEffects.RAID_OMEN, 600, amplifier)); serverPlayer.setRaidOmenPosition(serverPlayer.blockPosition()); return false; } diff --git a/net/minecraft/world/effect/HealOrHarmMobEffect.java b/net/minecraft/world/effect/HealOrHarmMobEffect.java index dbe11450..9b638e71 100644 --- a/net/minecraft/world/effect/HealOrHarmMobEffect.java +++ b/net/minecraft/world/effect/HealOrHarmMobEffect.java @@ -14,27 +14,29 @@ class HealOrHarmMobEffect extends InstantenousMobEffect { } @Override - public boolean applyEffectTick(ServerLevel serverLevel, LivingEntity livingEntity, int i) { - if (this.isHarm == livingEntity.isInvertedHealAndHarm()) { - livingEntity.heal(Math.max(4 << i, 0)); + public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { + if (this.isHarm == entity.isInvertedHealAndHarm()) { + entity.heal(Math.max(4 << amplifier, 0)); } else { - livingEntity.hurtServer(serverLevel, livingEntity.damageSources().magic(), 6 << i); + entity.hurtServer(level, entity.damageSources().magic(), 6 << amplifier); } return true; } @Override - public void applyInstantenousEffect(ServerLevel serverLevel, @Nullable Entity entity, @Nullable Entity entity2, LivingEntity livingEntity, int i, double d) { - if (this.isHarm == livingEntity.isInvertedHealAndHarm()) { - int j = (int)(d * (4 << i) + 0.5); - livingEntity.heal(j); + public void applyInstantenousEffect( + ServerLevel level, @Nullable Entity source, @Nullable Entity indirectSource, LivingEntity entity, int amplifier, double health + ) { + if (this.isHarm == entity.isInvertedHealAndHarm()) { + int i = (int)(health * (4 << amplifier) + 0.5); + entity.heal(i); } else { - int j = (int)(d * (6 << i) + 0.5); - if (entity == null) { - livingEntity.hurtServer(serverLevel, livingEntity.damageSources().magic(), j); + int i = (int)(health * (6 << amplifier) + 0.5); + if (source == null) { + entity.hurtServer(level, entity.damageSources().magic(), i); } else { - livingEntity.hurtServer(serverLevel, livingEntity.damageSources().indirectMagic(entity, entity2), j); + entity.hurtServer(level, entity.damageSources().indirectMagic(source, indirectSource), i); } } } diff --git a/net/minecraft/world/effect/HungerMobEffect.java b/net/minecraft/world/effect/HungerMobEffect.java index 299ebd4a..38327f4b 100644 --- a/net/minecraft/world/effect/HungerMobEffect.java +++ b/net/minecraft/world/effect/HungerMobEffect.java @@ -10,9 +10,9 @@ class HungerMobEffect extends MobEffect { } @Override - public boolean applyEffectTick(ServerLevel serverLevel, LivingEntity livingEntity, int i) { - if (livingEntity instanceof Player player) { - player.causeFoodExhaustion(0.005F * (i + 1)); + public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { + if (entity instanceof Player player) { + player.causeFoodExhaustion(0.005F * (amplifier + 1)); } return true; diff --git a/net/minecraft/world/effect/InfestedMobEffect.java b/net/minecraft/world/effect/InfestedMobEffect.java index 0873feeb..379e5e22 100644 --- a/net/minecraft/world/effect/InfestedMobEffect.java +++ b/net/minecraft/world/effect/InfestedMobEffect.java @@ -25,26 +25,26 @@ class InfestedMobEffect extends MobEffect { } @Override - public void onMobHurt(ServerLevel serverLevel, LivingEntity livingEntity, int i, DamageSource damageSource, float f) { - if (livingEntity.getRandom().nextFloat() <= this.chanceToSpawn) { - int j = this.spawnedCount.applyAsInt(livingEntity.getRandom()); + public void onMobHurt(ServerLevel level, LivingEntity entity, int amplifier, DamageSource damageSource, float amount) { + if (entity.getRandom().nextFloat() <= this.chanceToSpawn) { + int i = this.spawnedCount.applyAsInt(entity.getRandom()); - for (int k = 0; k < j; k++) { - this.spawnSilverfish(serverLevel, livingEntity, livingEntity.getX(), livingEntity.getY() + livingEntity.getBbHeight() / 2.0, livingEntity.getZ()); + for (int j = 0; j < i; j++) { + this.spawnSilverfish(level, entity, entity.getX(), entity.getY() + entity.getBbHeight() / 2.0, entity.getZ()); } } } - private void spawnSilverfish(ServerLevel serverLevel, LivingEntity livingEntity, double d, double e, double f) { - Silverfish silverfish = EntityType.SILVERFISH.create(serverLevel, EntitySpawnReason.TRIGGERED); + private void spawnSilverfish(ServerLevel level, LivingEntity entity, double x, double y, double z) { + Silverfish silverfish = EntityType.SILVERFISH.create(level, EntitySpawnReason.TRIGGERED); if (silverfish != null) { - RandomSource randomSource = livingEntity.getRandom(); - float g = (float) (Math.PI / 2); - float h = Mth.randomBetween(randomSource, (float) (-Math.PI / 2), (float) (Math.PI / 2)); - Vector3f vector3f = livingEntity.getLookAngle().toVector3f().mul(0.3F).mul(1.0F, 1.5F, 1.0F).rotateY(h); - silverfish.moveTo(d, e, f, serverLevel.getRandom().nextFloat() * 360.0F, 0.0F); + RandomSource randomSource = entity.getRandom(); + float f = (float) (Math.PI / 2); + float g = Mth.randomBetween(randomSource, (float) (-Math.PI / 2), (float) (Math.PI / 2)); + Vector3f vector3f = entity.getLookAngle().toVector3f().mul(0.3F).mul(1.0F, 1.5F, 1.0F).rotateY(g); + silverfish.moveTo(x, y, z, level.getRandom().nextFloat() * 360.0F, 0.0F); silverfish.setDeltaMovement(new Vec3(vector3f)); - serverLevel.addFreshEntity(silverfish); + level.addFreshEntity(silverfish); silverfish.playSound(SoundEvents.SILVERFISH_HURT); } } diff --git a/net/minecraft/world/effect/MobEffect.java b/net/minecraft/world/effect/MobEffect.java index 39bb8ece..9b1b574c 100644 --- a/net/minecraft/world/effect/MobEffect.java +++ b/net/minecraft/world/effect/MobEffect.java @@ -72,33 +72,32 @@ public class MobEffect implements FeatureElement { return this.blendDurationTicks; } - public boolean applyEffectTick(ServerLevel serverLevel, LivingEntity livingEntity, int i) { + public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { return true; } - public void applyInstantenousEffect(ServerLevel serverLevel, @Nullable Entity entity, @Nullable Entity entity2, LivingEntity livingEntity, int i, double d) { - this.applyEffectTick(serverLevel, livingEntity, i); + public void applyInstantenousEffect( + ServerLevel level, @Nullable Entity source, @Nullable Entity indirectSource, LivingEntity entity, int amplifier, double health + ) { + this.applyEffectTick(level, entity, amplifier); } public boolean shouldApplyEffectTickThisTick(int duration, int amplifier) { return false; } - public void onEffectStarted(LivingEntity livingEntity, int amplifier) { + public void onEffectStarted(LivingEntity entity, int amplifier) { } - public void onEffectAdded(LivingEntity livingEntity, int amplifier) { + public void onEffectAdded(LivingEntity entity, int amplifier) { this.soundOnAdded - .ifPresent( - soundEvent -> livingEntity.level() - .playSound(null, livingEntity.getX(), livingEntity.getY(), livingEntity.getZ(), soundEvent, livingEntity.getSoundSource(), 1.0F, 1.0F) - ); + .ifPresent(soundEvent -> entity.level().playSound(null, entity.getX(), entity.getY(), entity.getZ(), soundEvent, entity.getSoundSource(), 1.0F, 1.0F)); } - public void onMobRemoved(ServerLevel serverLevel, LivingEntity livingEntity, int i, Entity.RemovalReason removalReason) { + public void onMobRemoved(ServerLevel level, LivingEntity entity, int amplifier, Entity.RemovalReason reason) { } - public void onMobHurt(ServerLevel serverLevel, LivingEntity livingEntity, int i, DamageSource damageSource, float f) { + public void onMobHurt(ServerLevel level, LivingEntity entity, int amplifier, DamageSource damageSource, float amount) { } /** diff --git a/net/minecraft/world/effect/MobEffectInstance.java b/net/minecraft/world/effect/MobEffectInstance.java index 790a2bfb..35c66b10 100644 --- a/net/minecraft/world/effect/MobEffectInstance.java +++ b/net/minecraft/world/effect/MobEffectInstance.java @@ -256,12 +256,12 @@ public class MobEffectInstance implements Comparable { this.effect.value().onEffectStarted(entity, this.amplifier); } - public void onMobRemoved(ServerLevel serverLevel, LivingEntity livingEntity, Entity.RemovalReason removalReason) { - this.effect.value().onMobRemoved(serverLevel, livingEntity, this.amplifier, removalReason); + public void onMobRemoved(ServerLevel level, LivingEntity entity, Entity.RemovalReason reason) { + this.effect.value().onMobRemoved(level, entity, this.amplifier, reason); } - public void onMobHurt(ServerLevel serverLevel, LivingEntity livingEntity, DamageSource damageSource, float f) { - this.effect.value().onMobHurt(serverLevel, livingEntity, this.amplifier, damageSource, f); + public void onMobHurt(ServerLevel level, LivingEntity entity, DamageSource damageSource, float amount) { + this.effect.value().onMobHurt(level, entity, this.amplifier, damageSource, amount); } public String getDescriptionId() { diff --git a/net/minecraft/world/effect/OozingMobEffect.java b/net/minecraft/world/effect/OozingMobEffect.java index 8d665516..f1a25ec8 100644 --- a/net/minecraft/world/effect/OozingMobEffect.java +++ b/net/minecraft/world/effect/OozingMobEffect.java @@ -32,14 +32,14 @@ class OozingMobEffect extends MobEffect { } @Override - public void onMobRemoved(ServerLevel serverLevel, LivingEntity livingEntity, int i, Entity.RemovalReason removalReason) { - if (removalReason == Entity.RemovalReason.KILLED) { - int j = this.spawnedCount.applyAsInt(livingEntity.getRandom()); - int k = serverLevel.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING); - int l = numberOfSlimesToSpawn(k, OozingMobEffect.NearbySlimes.closeTo(livingEntity), j); + public void onMobRemoved(ServerLevel level, LivingEntity entity, int amplifier, Entity.RemovalReason reason) { + if (reason == Entity.RemovalReason.KILLED) { + int i = this.spawnedCount.applyAsInt(entity.getRandom()); + int j = level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING); + int k = numberOfSlimesToSpawn(j, OozingMobEffect.NearbySlimes.closeTo(entity), i); - for (int m = 0; m < l; m++) { - this.spawnSlimeOffspring(livingEntity.level(), livingEntity.getX(), livingEntity.getY() + 0.5, livingEntity.getZ()); + for (int l = 0; l < k; l++) { + this.spawnSlimeOffspring(entity.level(), entity.getX(), entity.getY() + 0.5, entity.getZ()); } } } diff --git a/net/minecraft/world/effect/PoisonMobEffect.java b/net/minecraft/world/effect/PoisonMobEffect.java index e9e519e5..b01caeae 100644 --- a/net/minecraft/world/effect/PoisonMobEffect.java +++ b/net/minecraft/world/effect/PoisonMobEffect.java @@ -9,9 +9,9 @@ class PoisonMobEffect extends MobEffect { } @Override - public boolean applyEffectTick(ServerLevel serverLevel, LivingEntity livingEntity, int i) { - if (livingEntity.getHealth() > 1.0F) { - livingEntity.hurtServer(serverLevel, livingEntity.damageSources().magic(), 1.0F); + public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { + if (entity.getHealth() > 1.0F) { + entity.hurtServer(level, entity.damageSources().magic(), 1.0F); } return true; diff --git a/net/minecraft/world/effect/RaidOmenMobEffect.java b/net/minecraft/world/effect/RaidOmenMobEffect.java index feb3e0b4..768a04f0 100644 --- a/net/minecraft/world/effect/RaidOmenMobEffect.java +++ b/net/minecraft/world/effect/RaidOmenMobEffect.java @@ -17,11 +17,11 @@ class RaidOmenMobEffect extends MobEffect { } @Override - public boolean applyEffectTick(ServerLevel serverLevel, LivingEntity livingEntity, int i) { - if (livingEntity instanceof ServerPlayer serverPlayer && !livingEntity.isSpectator()) { + public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { + if (entity instanceof ServerPlayer serverPlayer && !entity.isSpectator()) { BlockPos blockPos = serverPlayer.getRaidOmenPosition(); if (blockPos != null) { - serverLevel.getRaids().createOrExtendRaid(serverPlayer, blockPos); + level.getRaids().createOrExtendRaid(serverPlayer, blockPos); serverPlayer.clearRaidOmenPosition(); return false; } diff --git a/net/minecraft/world/effect/RegenerationMobEffect.java b/net/minecraft/world/effect/RegenerationMobEffect.java index f4f742b0..dbd18776 100644 --- a/net/minecraft/world/effect/RegenerationMobEffect.java +++ b/net/minecraft/world/effect/RegenerationMobEffect.java @@ -9,9 +9,9 @@ class RegenerationMobEffect extends MobEffect { } @Override - public boolean applyEffectTick(ServerLevel serverLevel, LivingEntity livingEntity, int i) { - if (livingEntity.getHealth() < livingEntity.getMaxHealth()) { - livingEntity.heal(1.0F); + public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { + if (entity.getHealth() < entity.getMaxHealth()) { + entity.heal(1.0F); } return true; diff --git a/net/minecraft/world/effect/SaturationMobEffect.java b/net/minecraft/world/effect/SaturationMobEffect.java index 6b26fa9d..d94e632e 100644 --- a/net/minecraft/world/effect/SaturationMobEffect.java +++ b/net/minecraft/world/effect/SaturationMobEffect.java @@ -10,9 +10,9 @@ class SaturationMobEffect extends InstantenousMobEffect { } @Override - public boolean applyEffectTick(ServerLevel serverLevel, LivingEntity livingEntity, int i) { - if (livingEntity instanceof Player player) { - player.getFoodData().eat(i + 1, 1.0F); + public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { + if (entity instanceof Player player) { + player.getFoodData().eat(amplifier + 1, 1.0F); } return true; diff --git a/net/minecraft/world/effect/WeavingMobEffect.java b/net/minecraft/world/effect/WeavingMobEffect.java index 15d34e75..b1b2f020 100644 --- a/net/minecraft/world/effect/WeavingMobEffect.java +++ b/net/minecraft/world/effect/WeavingMobEffect.java @@ -23,31 +23,29 @@ class WeavingMobEffect extends MobEffect { } @Override - public void onMobRemoved(ServerLevel serverLevel, LivingEntity livingEntity, int i, Entity.RemovalReason removalReason) { - if (removalReason == Entity.RemovalReason.KILLED && (livingEntity instanceof Player || serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { - this.spawnCobwebsRandomlyAround(serverLevel, livingEntity.getRandom(), livingEntity.blockPosition()); + public void onMobRemoved(ServerLevel level, LivingEntity entity, int amplifier, Entity.RemovalReason reason) { + if (reason == Entity.RemovalReason.KILLED && (entity instanceof Player || level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { + this.spawnCobwebsRandomlyAround(level, entity.getRandom(), entity.blockPosition()); } } - private void spawnCobwebsRandomlyAround(ServerLevel serverLevel, RandomSource randomSource, BlockPos blockPos) { + private void spawnCobwebsRandomlyAround(ServerLevel level, RandomSource random, BlockPos pos) { Set set = Sets.newHashSet(); - int i = this.maxCobwebs.applyAsInt(randomSource); + int i = this.maxCobwebs.applyAsInt(random); - for (BlockPos blockPos2 : BlockPos.randomInCube(randomSource, 15, blockPos, 1)) { - BlockPos blockPos3 = blockPos2.below(); - if (!set.contains(blockPos2) - && serverLevel.getBlockState(blockPos2).canBeReplaced() - && serverLevel.getBlockState(blockPos3).isFaceSturdy(serverLevel, blockPos3, Direction.UP)) { - set.add(blockPos2.immutable()); + for (BlockPos blockPos : BlockPos.randomInCube(random, 15, pos, 1)) { + BlockPos blockPos2 = blockPos.below(); + if (!set.contains(blockPos) && level.getBlockState(blockPos).canBeReplaced() && level.getBlockState(blockPos2).isFaceSturdy(level, blockPos2, Direction.UP)) { + set.add(blockPos.immutable()); if (set.size() >= i) { break; } } } - for (BlockPos blockPos2x : set) { - serverLevel.setBlock(blockPos2x, Blocks.COBWEB.defaultBlockState(), 3); - serverLevel.levelEvent(3018, blockPos2x, 0); + for (BlockPos blockPosx : set) { + level.setBlock(blockPosx, Blocks.COBWEB.defaultBlockState(), 3); + level.levelEvent(3018, blockPosx, 0); } } } diff --git a/net/minecraft/world/effect/WindChargedMobEffect.java b/net/minecraft/world/effect/WindChargedMobEffect.java index f61e6907..62a53b29 100644 --- a/net/minecraft/world/effect/WindChargedMobEffect.java +++ b/net/minecraft/world/effect/WindChargedMobEffect.java @@ -14,14 +14,14 @@ class WindChargedMobEffect extends MobEffect { } @Override - public void onMobRemoved(ServerLevel serverLevel, LivingEntity livingEntity, int i, Entity.RemovalReason removalReason) { - if (removalReason == Entity.RemovalReason.KILLED) { - double d = livingEntity.getX(); - double e = livingEntity.getY() + livingEntity.getBbHeight() / 2.0F; - double f = livingEntity.getZ(); - float g = 3.0F + livingEntity.getRandom().nextFloat() * 2.0F; - serverLevel.explode( - livingEntity, + public void onMobRemoved(ServerLevel level, LivingEntity entity, int amplifier, Entity.RemovalReason reason) { + if (reason == Entity.RemovalReason.KILLED) { + double d = entity.getX(); + double e = entity.getY() + entity.getBbHeight() / 2.0F; + double f = entity.getZ(); + float g = 3.0F + entity.getRandom().nextFloat() * 2.0F; + level.explode( + entity, null, AbstractWindCharge.EXPLOSION_DAMAGE_CALCULATOR, d, diff --git a/net/minecraft/world/effect/WitherMobEffect.java b/net/minecraft/world/effect/WitherMobEffect.java index 8d857a15..72692f15 100644 --- a/net/minecraft/world/effect/WitherMobEffect.java +++ b/net/minecraft/world/effect/WitherMobEffect.java @@ -9,8 +9,8 @@ class WitherMobEffect extends MobEffect { } @Override - public boolean applyEffectTick(ServerLevel serverLevel, LivingEntity livingEntity, int i) { - livingEntity.hurtServer(serverLevel, livingEntity.damageSources().wither(), 1.0F); + public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { + entity.hurtServer(level, entity.damageSources().wither(), 1.0F); return true; } diff --git a/net/minecraft/world/entity/AgeableMob.java b/net/minecraft/world/entity/AgeableMob.java index 77d2e4fe..d846769c 100644 --- a/net/minecraft/world/entity/AgeableMob.java +++ b/net/minecraft/world/entity/AgeableMob.java @@ -28,7 +28,7 @@ public abstract class AgeableMob extends PathfinderMob { @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { if (spawnGroupData == null) { spawnGroupData = new AgeableMob.AgeableMobGroupData(true); @@ -37,12 +37,12 @@ public abstract class AgeableMob extends PathfinderMob { AgeableMob.AgeableMobGroupData ageableMobGroupData = (AgeableMob.AgeableMobGroupData)spawnGroupData; if (ageableMobGroupData.isShouldSpawnBaby() && ageableMobGroupData.getGroupSize() > 0 - && serverLevelAccessor.getRandom().nextFloat() <= ageableMobGroupData.getBabySpawnChance()) { + && level.getRandom().nextFloat() <= ageableMobGroupData.getBabySpawnChance()) { this.setAge(-24000); } ageableMobGroupData.increaseGroupSizeByOne(); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Nullable @@ -101,17 +101,17 @@ public abstract class AgeableMob extends PathfinderMob { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Age", this.getAge()); - compound.putInt("ForcedAge", this.forcedAge); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("Age", this.getAge()); + tag.putInt("ForcedAge", this.forcedAge); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setAge(compound.getInt("Age")); - this.forcedAge = compound.getInt("ForcedAge"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setAge(tag.getInt("Age")); + this.forcedAge = tag.getInt("ForcedAge"); } @Override diff --git a/net/minecraft/world/entity/AnimationState.java b/net/minecraft/world/entity/AnimationState.java index afaf9e2e..77291852 100644 --- a/net/minecraft/world/entity/AnimationState.java +++ b/net/minecraft/world/entity/AnimationState.java @@ -40,16 +40,16 @@ public class AnimationState { } } - public long getTimeInMillis(float f) { - float g = f - this.startTick; - return (long)(g * 50.0F); + public long getTimeInMillis(float gmaetime) { + float f = gmaetime - this.startTick; + return (long)(f * 50.0F); } public boolean isStarted() { return this.startTick != Integer.MIN_VALUE; } - public void copyFrom(AnimationState animationState) { - this.startTick = animationState.startTick; + public void copyFrom(AnimationState other) { + this.startTick = other.startTick; } } diff --git a/net/minecraft/world/entity/AreaEffectCloud.java b/net/minecraft/world/entity/AreaEffectCloud.java index 7fe1d19d..b5169a51 100644 --- a/net/minecraft/world/entity/AreaEffectCloud.java +++ b/net/minecraft/world/entity/AreaEffectCloud.java @@ -183,7 +183,7 @@ public class AreaEffectCloud extends Entity implements TraceableEntity { } } - private void serverTick(ServerLevel serverLevel) { + private void serverTick(ServerLevel level) { if (this.tickCount >= this.waitTime + this.duration) { this.discard(); } else { @@ -238,9 +238,7 @@ public class AreaEffectCloud extends Entity implements TraceableEntity { for (MobEffectInstance mobEffectInstance2 : list) { if (mobEffectInstance2.getEffect().value().isInstantenous()) { - mobEffectInstance2.getEffect() - .value() - .applyInstantenousEffect(serverLevel, this, this.getOwner(), livingEntity, mobEffectInstance2.getAmplifier(), 0.5); + mobEffectInstance2.getEffect().value().applyInstantenousEffect(level, this, this.getOwner(), livingEntity, mobEffectInstance2.getAmplifier(), 0.5); } else { livingEntity.addEffect(new MobEffectInstance(mobEffectInstance2), this); } @@ -323,54 +321,54 @@ public class AreaEffectCloud extends Entity implements TraceableEntity { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - this.tickCount = compound.getInt("Age"); - this.duration = compound.getInt("Duration"); - this.waitTime = compound.getInt("WaitTime"); - this.reapplicationDelay = compound.getInt("ReapplicationDelay"); - this.durationOnUse = compound.getInt("DurationOnUse"); - this.radiusOnUse = compound.getFloat("RadiusOnUse"); - this.radiusPerTick = compound.getFloat("RadiusPerTick"); - this.setRadius(compound.getFloat("Radius")); - if (compound.hasUUID("Owner")) { - this.ownerUUID = compound.getUUID("Owner"); + protected void readAdditionalSaveData(CompoundTag tag) { + this.tickCount = tag.getInt("Age"); + this.duration = tag.getInt("Duration"); + this.waitTime = tag.getInt("WaitTime"); + this.reapplicationDelay = tag.getInt("ReapplicationDelay"); + this.durationOnUse = tag.getInt("DurationOnUse"); + this.radiusOnUse = tag.getFloat("RadiusOnUse"); + this.radiusPerTick = tag.getFloat("RadiusPerTick"); + this.setRadius(tag.getFloat("Radius")); + if (tag.hasUUID("Owner")) { + this.ownerUUID = tag.getUUID("Owner"); } RegistryOps registryOps = this.registryAccess().createSerializationContext(NbtOps.INSTANCE); - if (compound.contains("Particle", 10)) { + if (tag.contains("Particle", 10)) { ParticleTypes.CODEC - .parse(registryOps, compound.get("Particle")) + .parse(registryOps, tag.get("Particle")) .resultOrPartial(string -> LOGGER.warn("Failed to parse area effect cloud particle options: '{}'", string)) .ifPresent(this::setParticle); } - if (compound.contains("potion_contents")) { + if (tag.contains("potion_contents")) { PotionContents.CODEC - .parse(registryOps, compound.get("potion_contents")) + .parse(registryOps, tag.get("potion_contents")) .resultOrPartial(string -> LOGGER.warn("Failed to parse area effect cloud potions: '{}'", string)) .ifPresent(this::setPotionContents); } } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - compound.putInt("Age", this.tickCount); - compound.putInt("Duration", this.duration); - compound.putInt("WaitTime", this.waitTime); - compound.putInt("ReapplicationDelay", this.reapplicationDelay); - compound.putInt("DurationOnUse", this.durationOnUse); - compound.putFloat("RadiusOnUse", this.radiusOnUse); - compound.putFloat("RadiusPerTick", this.radiusPerTick); - compound.putFloat("Radius", this.getRadius()); + protected void addAdditionalSaveData(CompoundTag tag) { + tag.putInt("Age", this.tickCount); + tag.putInt("Duration", this.duration); + tag.putInt("WaitTime", this.waitTime); + tag.putInt("ReapplicationDelay", this.reapplicationDelay); + tag.putInt("DurationOnUse", this.durationOnUse); + tag.putFloat("RadiusOnUse", this.radiusOnUse); + tag.putFloat("RadiusPerTick", this.radiusPerTick); + tag.putFloat("Radius", this.getRadius()); RegistryOps registryOps = this.registryAccess().createSerializationContext(NbtOps.INSTANCE); - compound.put("Particle", ParticleTypes.CODEC.encodeStart(registryOps, this.getParticle()).getOrThrow()); + tag.put("Particle", ParticleTypes.CODEC.encodeStart(registryOps, this.getParticle()).getOrThrow()); if (this.ownerUUID != null) { - compound.putUUID("Owner", this.ownerUUID); + tag.putUUID("Owner", this.ownerUUID); } if (!this.potionContents.equals(PotionContents.EMPTY)) { - Tag tag = PotionContents.CODEC.encodeStart(registryOps, this.potionContents).getOrThrow(); - compound.put("potion_contents", tag); + Tag tag2 = PotionContents.CODEC.encodeStart(registryOps, this.potionContents).getOrThrow(); + tag.put("potion_contents", tag2); } } @@ -394,7 +392,7 @@ public class AreaEffectCloud extends Entity implements TraceableEntity { } @Override - public final boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { return false; } } diff --git a/net/minecraft/world/entity/ConversionParams.java b/net/minecraft/world/entity/ConversionParams.java index ce3864a6..3e0075d9 100644 --- a/net/minecraft/world/entity/ConversionParams.java +++ b/net/minecraft/world/entity/ConversionParams.java @@ -4,8 +4,8 @@ import net.minecraft.world.scores.PlayerTeam; import org.jetbrains.annotations.Nullable; public record ConversionParams(ConversionType type, boolean keepEquipment, boolean preserveCanPickUpLoot, @Nullable PlayerTeam team) { - public static ConversionParams single(Mob mob, boolean bl, boolean bl2) { - return new ConversionParams(ConversionType.SINGLE, bl, bl2, mob.getTeam()); + public static ConversionParams single(Mob mob, boolean keepEquipment, boolean preserveCanPickUpLoot) { + return new ConversionParams(ConversionType.SINGLE, keepEquipment, preserveCanPickUpLoot, mob.getTeam()); } @FunctionalInterface diff --git a/net/minecraft/world/entity/ConversionType.java b/net/minecraft/world/entity/ConversionType.java index 308cecbe..b5b1e5bf 100644 --- a/net/minecraft/world/entity/ConversionType.java +++ b/net/minecraft/world/entity/ConversionType.java @@ -11,135 +11,135 @@ import net.minecraft.world.scores.Scoreboard; public enum ConversionType { SINGLE(true) { @Override - void convert(Mob mob, Mob mob2, ConversionParams conversionParams) { - Entity entity = mob.getFirstPassenger(); - mob2.copyPosition(mob); - mob2.setDeltaMovement(mob.getDeltaMovement()); + void convert(Mob oldMob, Mob newMob, ConversionParams conversionParams) { + Entity entity = oldMob.getFirstPassenger(); + newMob.copyPosition(oldMob); + newMob.setDeltaMovement(oldMob.getDeltaMovement()); if (entity != null) { entity.stopRiding(); entity.boardingCooldown = 0; - for (Entity entity2 : mob2.getPassengers()) { + for (Entity entity2 : newMob.getPassengers()) { entity2.stopRiding(); entity2.remove(Entity.RemovalReason.DISCARDED); } - entity.startRiding(mob2); + entity.startRiding(newMob); } - Entity entity3 = mob.getVehicle(); + Entity entity3 = oldMob.getVehicle(); if (entity3 != null) { - mob.stopRiding(); - mob2.startRiding(entity3); + oldMob.stopRiding(); + newMob.startRiding(entity3); } if (conversionParams.keepEquipment()) { for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES) { - ItemStack itemStack = mob.getItemBySlot(equipmentSlot); + ItemStack itemStack = oldMob.getItemBySlot(equipmentSlot); if (!itemStack.isEmpty()) { - mob2.setItemSlot(equipmentSlot, itemStack.copyAndClear()); - mob2.setDropChance(equipmentSlot, mob.getEquipmentDropChance(equipmentSlot)); + newMob.setItemSlot(equipmentSlot, itemStack.copyAndClear()); + newMob.setDropChance(equipmentSlot, oldMob.getEquipmentDropChance(equipmentSlot)); } } } - mob2.fallDistance = mob.fallDistance; - mob2.setSharedFlag(7, mob.isFallFlying()); - mob2.lastHurtByPlayerTime = mob.lastHurtByPlayerTime; - mob2.hurtTime = mob.hurtTime; - mob2.yBodyRot = mob.yBodyRot; - mob2.setOnGround(mob.onGround()); - mob.getSleepingPos().ifPresent(mob2::setSleepingPos); - Entity entity2 = mob.getLeashHolder(); + newMob.fallDistance = oldMob.fallDistance; + newMob.setSharedFlag(7, oldMob.isFallFlying()); + newMob.lastHurtByPlayerTime = oldMob.lastHurtByPlayerTime; + newMob.hurtTime = oldMob.hurtTime; + newMob.yBodyRot = oldMob.yBodyRot; + newMob.setOnGround(oldMob.onGround()); + oldMob.getSleepingPos().ifPresent(newMob::setSleepingPos); + Entity entity2 = oldMob.getLeashHolder(); if (entity2 != null) { - mob2.setLeashedTo(entity2, true); + newMob.setLeashedTo(entity2, true); } - this.convertCommon(mob, mob2, conversionParams); + this.convertCommon(oldMob, newMob, conversionParams); } }, SPLIT_ON_DEATH(false) { @Override - void convert(Mob mob, Mob mob2, ConversionParams conversionParams) { - Entity entity = mob.getFirstPassenger(); + void convert(Mob oldMob, Mob newMob, ConversionParams conversionParams) { + Entity entity = oldMob.getFirstPassenger(); if (entity != null) { entity.stopRiding(); } - Entity entity2 = mob.getLeashHolder(); + Entity entity2 = oldMob.getLeashHolder(); if (entity2 != null) { - mob.dropLeash(true, true); + oldMob.dropLeash(true, true); } - this.convertCommon(mob, mob2, conversionParams); + this.convertCommon(oldMob, newMob, conversionParams); } }; private final boolean discardAfterConversion; - ConversionType(final boolean bl) { - this.discardAfterConversion = bl; + ConversionType(final boolean discardAfterConversion) { + this.discardAfterConversion = discardAfterConversion; } public boolean shouldDiscardAfterConversion() { return this.discardAfterConversion; } - abstract void convert(Mob mob, Mob mob2, ConversionParams conversionParams); + abstract void convert(Mob oldMob, Mob newMob, ConversionParams conversionParams); - void convertCommon(Mob mob, Mob mob2, ConversionParams conversionParams) { - mob2.setAbsorptionAmount(mob.getAbsorptionAmount()); + void convertCommon(Mob oldMob, Mob newMob, ConversionParams conversionParams) { + newMob.setAbsorptionAmount(oldMob.getAbsorptionAmount()); - for (MobEffectInstance mobEffectInstance : mob.getActiveEffects()) { - mob2.addEffect(new MobEffectInstance(mobEffectInstance)); + for (MobEffectInstance mobEffectInstance : oldMob.getActiveEffects()) { + newMob.addEffect(new MobEffectInstance(mobEffectInstance)); } - if (mob.isBaby()) { - mob2.setBaby(true); + if (oldMob.isBaby()) { + newMob.setBaby(true); } - if (mob instanceof AgeableMob ageableMob && mob2 instanceof AgeableMob ageableMob2) { + if (oldMob instanceof AgeableMob ageableMob && newMob instanceof AgeableMob ageableMob2) { ageableMob2.setAge(ageableMob.getAge()); ageableMob2.forcedAge = ageableMob.forcedAge; ageableMob2.forcedAgeTimer = ageableMob.forcedAgeTimer; } - Brain brain = mob.getBrain(); - Brain brain2 = mob2.getBrain(); + Brain brain = oldMob.getBrain(); + Brain brain2 = newMob.getBrain(); if (brain.checkMemory(MemoryModuleType.ANGRY_AT, MemoryStatus.REGISTERED) && brain.hasMemoryValue(MemoryModuleType.ANGRY_AT)) { brain2.setMemory(MemoryModuleType.ANGRY_AT, brain.getMemory(MemoryModuleType.ANGRY_AT)); } if (conversionParams.preserveCanPickUpLoot()) { - mob2.setCanPickUpLoot(mob.canPickUpLoot()); + newMob.setCanPickUpLoot(oldMob.canPickUpLoot()); } - mob2.setLeftHanded(mob.isLeftHanded()); - mob2.setNoAi(mob.isNoAi()); - if (mob.isPersistenceRequired()) { - mob2.setPersistenceRequired(); + newMob.setLeftHanded(oldMob.isLeftHanded()); + newMob.setNoAi(oldMob.isNoAi()); + if (oldMob.isPersistenceRequired()) { + newMob.setPersistenceRequired(); } - if (mob.hasCustomName()) { - mob2.setCustomName(mob.getCustomName()); - mob2.setCustomNameVisible(mob.isCustomNameVisible()); + if (oldMob.hasCustomName()) { + newMob.setCustomName(oldMob.getCustomName()); + newMob.setCustomNameVisible(oldMob.isCustomNameVisible()); } - mob2.setSharedFlagOnFire(mob.isOnFire()); - mob2.setInvulnerable(mob.isInvulnerable()); - mob2.setNoGravity(mob.isNoGravity()); - mob2.setPortalCooldown(mob.getPortalCooldown()); - mob2.setSilent(mob.isSilent()); - mob.getTags().forEach(mob2::addTag); + newMob.setSharedFlagOnFire(oldMob.isOnFire()); + newMob.setInvulnerable(oldMob.isInvulnerable()); + newMob.setNoGravity(oldMob.isNoGravity()); + newMob.setPortalCooldown(oldMob.getPortalCooldown()); + newMob.setSilent(oldMob.isSilent()); + oldMob.getTags().forEach(newMob::addTag); if (conversionParams.team() != null) { - Scoreboard scoreboard = mob2.level().getScoreboard(); - scoreboard.addPlayerToTeam(mob2.getStringUUID(), conversionParams.team()); - if (mob.getTeam() != null && mob.getTeam() == conversionParams.team()) { - scoreboard.removePlayerFromTeam(mob.getStringUUID(), mob.getTeam()); + Scoreboard scoreboard = newMob.level().getScoreboard(); + scoreboard.addPlayerToTeam(newMob.getStringUUID(), conversionParams.team()); + if (oldMob.getTeam() != null && oldMob.getTeam() == conversionParams.team()) { + scoreboard.removePlayerFromTeam(oldMob.getStringUUID(), oldMob.getTeam()); } } - if (mob instanceof Zombie zombie && zombie.canBreakDoors() && mob2 instanceof Zombie zombie2) { + if (oldMob instanceof Zombie zombie && zombie.canBreakDoors() && newMob instanceof Zombie zombie2) { zombie2.setCanBreakDoors(true); } } diff --git a/net/minecraft/world/entity/Display.java b/net/minecraft/world/entity/Display.java index 37aedca4..baec3c05 100644 --- a/net/minecraft/world/entity/Display.java +++ b/net/minecraft/world/entity/Display.java @@ -133,7 +133,7 @@ public abstract class Display extends Entity { } @Override - public final boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { return false; } @@ -214,63 +214,63 @@ public abstract class Display extends Entity { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - if (compound.contains("transformation")) { + protected void readAdditionalSaveData(CompoundTag tag) { + if (tag.contains("transformation")) { Transformation.EXTENDED_CODEC - .decode(NbtOps.INSTANCE, compound.get("transformation")) + .decode(NbtOps.INSTANCE, tag.get("transformation")) .resultOrPartial(Util.prefix("Display entity", LOGGER::error)) .ifPresent(pair -> this.setTransformation((Transformation)pair.getFirst())); } - if (compound.contains("interpolation_duration", 99)) { - int i = compound.getInt("interpolation_duration"); + if (tag.contains("interpolation_duration", 99)) { + int i = tag.getInt("interpolation_duration"); this.setTransformationInterpolationDuration(i); } - if (compound.contains("start_interpolation", 99)) { - int i = compound.getInt("start_interpolation"); + if (tag.contains("start_interpolation", 99)) { + int i = tag.getInt("start_interpolation"); this.setTransformationInterpolationDelay(i); } - if (compound.contains("teleport_duration", 99)) { - int i = compound.getInt("teleport_duration"); + if (tag.contains("teleport_duration", 99)) { + int i = tag.getInt("teleport_duration"); this.setPosRotInterpolationDuration(Mth.clamp(i, 0, 59)); } - if (compound.contains("billboard", 8)) { + if (tag.contains("billboard", 8)) { Display.BillboardConstraints.CODEC - .decode(NbtOps.INSTANCE, compound.get("billboard")) + .decode(NbtOps.INSTANCE, tag.get("billboard")) .resultOrPartial(Util.prefix("Display entity", LOGGER::error)) .ifPresent(pair -> this.setBillboardConstraints((Display.BillboardConstraints)pair.getFirst())); } - if (compound.contains("view_range", 99)) { - this.setViewRange(compound.getFloat("view_range")); + if (tag.contains("view_range", 99)) { + this.setViewRange(tag.getFloat("view_range")); } - if (compound.contains("shadow_radius", 99)) { - this.setShadowRadius(compound.getFloat("shadow_radius")); + if (tag.contains("shadow_radius", 99)) { + this.setShadowRadius(tag.getFloat("shadow_radius")); } - if (compound.contains("shadow_strength", 99)) { - this.setShadowStrength(compound.getFloat("shadow_strength")); + if (tag.contains("shadow_strength", 99)) { + this.setShadowStrength(tag.getFloat("shadow_strength")); } - if (compound.contains("width", 99)) { - this.setWidth(compound.getFloat("width")); + if (tag.contains("width", 99)) { + this.setWidth(tag.getFloat("width")); } - if (compound.contains("height", 99)) { - this.setHeight(compound.getFloat("height")); + if (tag.contains("height", 99)) { + this.setHeight(tag.getFloat("height")); } - if (compound.contains("glow_color_override", 99)) { - this.setGlowColorOverride(compound.getInt("glow_color_override")); + if (tag.contains("glow_color_override", 99)) { + this.setGlowColorOverride(tag.getInt("glow_color_override")); } - if (compound.contains("brightness", 10)) { + if (tag.contains("brightness", 10)) { Brightness.CODEC - .decode(NbtOps.INSTANCE, compound.get("brightness")) + .decode(NbtOps.INSTANCE, tag.get("brightness")) .resultOrPartial(Util.prefix("Display entity", LOGGER::error)) .ifPresent(pair -> this.setBrightnessOverride((Brightness)pair.getFirst())); } else { @@ -286,20 +286,20 @@ public abstract class Display extends Entity { } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - Transformation.EXTENDED_CODEC.encodeStart(NbtOps.INSTANCE, createTransformation(this.entityData)).ifSuccess(tag -> compound.put("transformation", tag)); - Display.BillboardConstraints.CODEC.encodeStart(NbtOps.INSTANCE, this.getBillboardConstraints()).ifSuccess(tag -> compound.put("billboard", tag)); - compound.putInt("interpolation_duration", this.getTransformationInterpolationDuration()); - compound.putInt("teleport_duration", this.getPosRotInterpolationDuration()); - compound.putFloat("view_range", this.getViewRange()); - compound.putFloat("shadow_radius", this.getShadowRadius()); - compound.putFloat("shadow_strength", this.getShadowStrength()); - compound.putFloat("width", this.getWidth()); - compound.putFloat("height", this.getHeight()); - compound.putInt("glow_color_override", this.getGlowColorOverride()); + protected void addAdditionalSaveData(CompoundTag tag) { + Transformation.EXTENDED_CODEC.encodeStart(NbtOps.INSTANCE, createTransformation(this.entityData)).ifSuccess(tagx -> tag.put("transformation", tagx)); + Display.BillboardConstraints.CODEC.encodeStart(NbtOps.INSTANCE, this.getBillboardConstraints()).ifSuccess(tagx -> tag.put("billboard", tagx)); + tag.putInt("interpolation_duration", this.getTransformationInterpolationDuration()); + tag.putInt("teleport_duration", this.getPosRotInterpolationDuration()); + tag.putFloat("view_range", this.getViewRange()); + tag.putFloat("shadow_radius", this.getShadowRadius()); + tag.putFloat("shadow_strength", this.getShadowStrength()); + tag.putFloat("width", this.getWidth()); + tag.putFloat("height", this.getHeight()); + tag.putInt("glow_color_override", this.getGlowColorOverride()); Brightness brightness = this.getBrightnessOverride(); if (brightness != null) { - Brightness.CODEC.encodeStart(NbtOps.INSTANCE, brightness).ifSuccess(tag -> compound.put("brightness", tag)); + Brightness.CODEC.encodeStart(NbtOps.INSTANCE, brightness).ifSuccess(tagx -> tag.put("brightness", tagx)); } } @@ -339,9 +339,6 @@ public abstract class Display extends Entity { return this.posRotInterpolationTarget != null ? (float)this.posRotInterpolationTarget.targetYRot : this.getYRot(); } - /** - * Gets the bounding box of this Entity, adjusted to take auxiliary entities into account (e.g. the tile contained by a minecart, such as a command block). - */ public AABB getBoundingBoxForCulling() { return this.cullingBoundingBox; } @@ -588,15 +585,15 @@ public abstract class Display extends Entity { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setBlockState(NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), compound.getCompound("block_state"))); + protected void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setBlockState(NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), tag.getCompound("block_state"))); } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.put("block_state", NbtUtils.writeBlockState(this.getBlockState())); + protected void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.put("block_state", NbtUtils.writeBlockState(this.getBlockState())); } @Nullable @@ -691,30 +688,30 @@ public abstract class Display extends Entity { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("item")) { - this.setItemStack((ItemStack)ItemStack.parse(this.registryAccess(), compound.getCompound("item")).orElse(ItemStack.EMPTY)); + protected void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("item")) { + this.setItemStack((ItemStack)ItemStack.parse(this.registryAccess(), tag.getCompound("item")).orElse(ItemStack.EMPTY)); } else { this.setItemStack(ItemStack.EMPTY); } - if (compound.contains("item_display", 8)) { + if (tag.contains("item_display", 8)) { ItemDisplayContext.CODEC - .decode(NbtOps.INSTANCE, compound.get("item_display")) + .decode(NbtOps.INSTANCE, tag.get("item_display")) .resultOrPartial(Util.prefix("Display entity", Display.LOGGER::error)) .ifPresent(pair -> this.setItemTransform((ItemDisplayContext)pair.getFirst())); } } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + protected void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (!this.getItemStack().isEmpty()) { - compound.put("item", this.getItemStack().save(this.registryAccess())); + tag.put("item", this.getItemStack().save(this.registryAccess())); } - ItemDisplayContext.CODEC.encodeStart(NbtOps.INSTANCE, this.getItemTransform()).ifSuccess(tag -> compound.put("item_display", tag)); + ItemDisplayContext.CODEC.encodeStart(NbtOps.INSTANCE, this.getItemTransform()).ifSuccess(tagx -> tag.put("item_display", tagx)); } @Override @@ -884,25 +881,25 @@ public abstract class Display extends Entity { // $VF: Unable to simplify switch-on-enum, as the enum class was not able to be found. // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) @Override - protected void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("line_width", 99)) { - this.setLineWidth(compound.getInt("line_width")); + protected void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("line_width", 99)) { + this.setLineWidth(tag.getInt("line_width")); } - if (compound.contains("text_opacity", 99)) { - this.setTextOpacity(compound.getByte("text_opacity")); + if (tag.contains("text_opacity", 99)) { + this.setTextOpacity(tag.getByte("text_opacity")); } - if (compound.contains("background", 99)) { - this.setBackgroundColor(compound.getInt("background")); + if (tag.contains("background", 99)) { + this.setBackgroundColor(tag.getInt("background")); } - byte b = loadFlag((byte)0, compound, "shadow", (byte)1); - b = loadFlag(b, compound, "see_through", (byte)2); - b = loadFlag(b, compound, "default_background", (byte)4); + byte b = loadFlag((byte)0, tag, "shadow", (byte)1); + b = loadFlag(b, tag, "see_through", (byte)2); + b = loadFlag(b, tag, "default_background", (byte)4); Optional optional = Align.CODEC - .decode(NbtOps.INSTANCE, compound.get("alignment")) + .decode(NbtOps.INSTANCE, tag.get("alignment")) .resultOrPartial(Util.prefix("Display entity", Display.LOGGER::error)) .map(Pair::getFirst); if (optional.isPresent()) { @@ -915,8 +912,8 @@ public abstract class Display extends Entity { } this.setFlags(b); - if (compound.contains("text", 8)) { - String string = compound.getString("text"); + if (tag.contains("text", 8)) { + String string = tag.getString("text"); try { Component component = Component.Serializer.fromJson(string, this.registryAccess()); @@ -938,17 +935,17 @@ public abstract class Display extends Entity { } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putString("text", Component.Serializer.toJson(this.getText(), this.registryAccess())); - compound.putInt("line_width", this.getLineWidth()); - compound.putInt("background", this.getBackgroundColor()); - compound.putByte("text_opacity", this.getTextOpacity()); + protected void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putString("text", Component.Serializer.toJson(this.getText(), this.registryAccess())); + tag.putInt("line_width", this.getLineWidth()); + tag.putInt("background", this.getBackgroundColor()); + tag.putByte("text_opacity", this.getTextOpacity()); byte b = this.getFlags(); - storeFlag(b, compound, "shadow", (byte)1); - storeFlag(b, compound, "see_through", (byte)2); - storeFlag(b, compound, "default_background", (byte)4); - Align.CODEC.encodeStart(NbtOps.INSTANCE, getAlign(b)).ifSuccess(tag -> compound.put("alignment", tag)); + storeFlag(b, tag, "shadow", (byte)1); + storeFlag(b, tag, "see_through", (byte)2); + storeFlag(b, tag, "default_background", (byte)4); + Align.CODEC.encodeStart(NbtOps.INSTANCE, getAlign(b)).ifSuccess(tagx -> tag.put("alignment", tagx)); } @Override diff --git a/net/minecraft/world/entity/ElytraAnimationState.java b/net/minecraft/world/entity/ElytraAnimationState.java index 0114da00..593a96ae 100644 --- a/net/minecraft/world/entity/ElytraAnimationState.java +++ b/net/minecraft/world/entity/ElytraAnimationState.java @@ -14,8 +14,8 @@ public class ElytraAnimationState { private float rotZOld; private final LivingEntity entity; - public ElytraAnimationState(LivingEntity livingEntity) { - this.entity = livingEntity; + public ElytraAnimationState(LivingEntity entity) { + this.entity = entity; } public void tick() { @@ -51,15 +51,15 @@ public class ElytraAnimationState { this.rotZ = this.rotZ + (h - this.rotZ) * 0.3F; } - public float getRotX(float f) { - return Mth.lerp(f, this.rotXOld, this.rotX); + public float getRotX(float partialTick) { + return Mth.lerp(partialTick, this.rotXOld, this.rotX); } - public float getRotY(float f) { - return Mth.lerp(f, this.rotYOld, this.rotY); + public float getRotY(float partialTick) { + return Mth.lerp(partialTick, this.rotYOld, this.rotY); } - public float getRotZ(float f) { - return Mth.lerp(f, this.rotZOld, this.rotZ); + public float getRotZ(float partialTick) { + return Mth.lerp(partialTick, this.rotZOld, this.rotZ); } } diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java index 3ceb0aee..c466066d 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -338,7 +338,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.tags.remove(tag); } - public void kill(ServerLevel serverLevel) { + public void kill(ServerLevel level) { this.remove(Entity.RemovalReason.KILLED); this.gameEvent(GameEvent.ENTITY_DIE); } @@ -368,7 +368,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public void onClientRemoval() { } - public void onRemoval(Entity.RemovalReason removalReason) { + public void onRemoval(Entity.RemovalReason reason) { } public void setPose(Pose pose) { @@ -617,10 +617,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.checkSupportingBlock(onGround, null); } - public void setOnGroundWithMovement(boolean bl, boolean bl2, Vec3 vec3) { - this.onGround = bl; - this.horizontalCollision = bl2; - this.checkSupportingBlock(bl, vec3); + public void setOnGroundWithMovement(boolean onGround, boolean horizontalCollision, Vec3 movement) { + this.onGround = onGround; + this.horizontalCollision = horizontalCollision; + this.checkSupportingBlock(onGround, movement); } public boolean isSupportedBy(BlockPos pos) { @@ -653,14 +653,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.onGround; } - public void move(MoverType type, Vec3 pos) { + public void move(MoverType type, Vec3 movement) { if (this.noPhysics) { - this.setPos(this.getX() + pos.x, this.getY() + pos.y, this.getZ() + pos.z); + this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z); } else { this.wasOnFire = this.isOnFire(); if (type == MoverType.PISTON) { - pos = this.limitPistonMovement(pos); - if (pos.equals(Vec3.ZERO)) { + movement = this.limitPistonMovement(movement); + if (movement.equals(Vec3.ZERO)) { return; } } @@ -668,15 +668,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("move"); if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7) { - pos = pos.multiply(this.stuckSpeedMultiplier); + movement = movement.multiply(this.stuckSpeedMultiplier); this.stuckSpeedMultiplier = Vec3.ZERO; this.setDeltaMovement(Vec3.ZERO); } - pos = this.maybeBackOffFromEdge(pos, type); - Vec3 vec3 = this.collide(pos); + movement = this.maybeBackOffFromEdge(movement, type); + Vec3 vec3 = this.collide(movement); double d = vec3.lengthSqr(); - if (d > 1.0E-7 || pos.lengthSqr() - d < 1.0E-7) { + if (d > 1.0E-7 || movement.lengthSqr() - d < 1.0E-7) { if (this.fallDistance != 0.0F && d >= 1.0) { BlockHitResult blockHitResult = this.level() .clip(new ClipContext(this.position(), this.position().add(vec3), Block.FALLDAMAGE_RESETTING, net.minecraft.world.level.ClipContext.Fluid.WATER, this)); @@ -690,11 +690,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess profilerFiller.pop(); profilerFiller.push("rest"); - boolean bl = !Mth.equal(pos.x, vec3.x); - boolean bl2 = !Mth.equal(pos.z, vec3.z); + boolean bl = !Mth.equal(movement.x, vec3.x); + boolean bl2 = !Mth.equal(movement.z, vec3.z); this.horizontalCollision = bl || bl2; - this.verticalCollision = pos.y != vec3.y; - this.verticalCollisionBelow = this.verticalCollision && pos.y < 0.0; + this.verticalCollision = movement.y != vec3.y; + this.verticalCollisionBelow = this.verticalCollision && movement.y < 0.0; if (this.horizontalCollision) { this.minorHorizontalCollision = this.isHorizontalCollisionMinor(vec3); } else { @@ -718,7 +718,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess if (this.isControlledByLocalInstance()) { net.minecraft.world.level.block.Block block = blockState.getBlock(); - if (pos.y != vec3.y) { + if (movement.y != vec3.y) { block.updateEntityMovementAfterFallOn(this.level(), this); } } @@ -737,20 +737,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } - private void applyMovementEmissionAndPlaySound(Entity.MovementEmission movementEmission, Vec3 vec3, BlockPos blockPos, BlockState blockState) { + private void applyMovementEmissionAndPlaySound(Entity.MovementEmission movementEmission, Vec3 movement, BlockPos pos, BlockState state) { float f = 0.6F; - float g = (float)(vec3.length() * 0.6F); - float h = (float)(vec3.horizontalDistance() * 0.6F); - BlockPos blockPos2 = this.getOnPos(); - BlockState blockState2 = this.level().getBlockState(blockPos2); - boolean bl = this.isStateClimbable(blockState2); + float g = (float)(movement.length() * 0.6F); + float h = (float)(movement.horizontalDistance() * 0.6F); + BlockPos blockPos = this.getOnPos(); + BlockState blockState = this.level().getBlockState(blockPos); + boolean bl = this.isStateClimbable(blockState); this.moveDist += bl ? g : h; this.flyDist += g; - if (this.moveDist > this.nextStep && !blockState2.isAir()) { - boolean bl2 = blockPos2.equals(blockPos); - boolean bl3 = this.vibrationAndSoundEffectsFromBlock(blockPos, blockState, movementEmission.emitsSounds(), bl2, vec3); + if (this.moveDist > this.nextStep && !blockState.isAir()) { + boolean bl2 = blockPos.equals(pos); + boolean bl3 = this.vibrationAndSoundEffectsFromBlock(pos, state, movementEmission.emitsSounds(), bl2, movement); if (!bl2) { - bl3 |= this.vibrationAndSoundEffectsFromBlock(blockPos2, blockState2, false, movementEmission.emitsEvents(), vec3); + bl3 |= this.vibrationAndSoundEffectsFromBlock(blockPos, blockState, false, movementEmission.emitsEvents(), movement); } if (bl3) { @@ -765,7 +765,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.gameEvent(GameEvent.SWIM); } } - } else if (blockState2.isAir()) { + } else if (blockState.isAir()) { this.processFlappingMovement(); } } @@ -774,7 +774,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.applyEffectsFromBlocks(this.oldPosition(), this.position); } - public void applyEffectsFromBlocks(Vec3 vec3, Vec3 vec32) { + public void applyEffectsFromBlocks(Vec3 oldPosition, Vec3 position) { if (this.isAffectedByBlocks()) { if (this.onGround()) { BlockPos blockPos = this.getOnPosLegacy(); @@ -782,7 +782,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess blockState.getBlock().stepOn(this.level(), blockPos, blockState, this); } - this.movementThisTick.add(new Entity.Movement(vec3, vec32)); + this.movementThisTick.add(new Entity.Movement(oldPosition, position)); this.checkInsideBlocks(this.movementThisTick, this.blocksInside); boolean bl = Iterables.any(this.blocksInside, blockStatex -> blockStatex.is(BlockTags.FIRE) || blockStatex.is(Blocks.LAVA)); this.movementThisTick.clear(); @@ -1071,16 +1071,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return SoundEvents.GENERIC_SPLASH; } - public void recordMovementThroughBlocks(Vec3 vec3, Vec3 vec32) { - this.movementThisTick.add(new Entity.Movement(vec3, vec32)); + public void recordMovementThroughBlocks(Vec3 oldPosition, Vec3 position) { + this.movementThisTick.add(new Entity.Movement(oldPosition, position)); } - private void checkInsideBlocks(List list, Set set) { + private void checkInsideBlocks(List movements, Set blocksInside) { if (this.isAffectedByBlocks()) { AABB aABB = this.getBoundingBox().deflate(1.0E-5F); LongSet longSet = this.visitedBlocks; - for (Entity.Movement movement : list) { + for (Entity.Movement movement : movements) { Vec3 vec3 = movement.from(); Vec3 vec32 = movement.to(); @@ -1108,7 +1108,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess throw new ReportedException(crashReport); } - set.add(blockState); + blocksInside.add(blockState); } } } @@ -1117,10 +1117,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } - private boolean collidedWithShapeMovingFrom(Vec3 vec3, Vec3 vec32, BlockPos blockPos, VoxelShape voxelShape) { - AABB aABB = this.getBoundingBox().move(this.getBoundingBox().getCenter().scale(-1.0)).move(vec32); - Vec3 vec33 = vec3.subtract(aABB.getBottomCenter()); - return this.getBoundingBox().collidedAlongVector(vec33, voxelShape.move(new Vec3(blockPos)).toAabbs()); + private boolean collidedWithShapeMovingFrom(Vec3 oldPosition, Vec3 position, BlockPos pos, VoxelShape shape) { + AABB aABB = this.getBoundingBox().move(this.getBoundingBox().getCenter().scale(-1.0)).move(position); + Vec3 vec3 = oldPosition.subtract(aABB.getBottomCenter()); + return this.getBoundingBox().collidedAlongVector(vec3, shape.move(new Vec3(pos)).toAabbs()); } protected void onInsideBlock(BlockState state) { @@ -1537,9 +1537,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.setOldRot(); } - public final void setOldPosAndRot(Vec3 vec3, float f, float g) { - this.setOldPos(vec3); - this.setOldRot(f, g); + public final void setOldPosAndRot(Vec3 pos, float yRot, float xRot) { + this.setOldPos(pos); + this.setOldRot(yRot, xRot); } protected void setOldPos() { @@ -1550,15 +1550,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.setOldRot(this.getYRot(), this.getXRot()); } - private void setOldPos(Vec3 vec3) { - this.xo = this.xOld = vec3.x; - this.yo = this.yOld = vec3.y; - this.zo = this.zOld = vec3.z; + private void setOldPos(Vec3 pos) { + this.xo = this.xOld = pos.x; + this.yo = this.yOld = pos.y; + this.zo = this.zOld = pos.z; } - private void setOldRot(float f, float g) { - this.yRotO = f; - this.xRotO = g; + private void setOldRot(float yRot, float xRot) { + this.yRotO = yRot; + this.xRotO = xRot; } public final Vec3 oldPosition() { @@ -1659,18 +1659,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } @Deprecated - public final void hurt(DamageSource damageSource, float f) { + public final void hurt(DamageSource damageSource, float amount) { if (this.level instanceof ServerLevel serverLevel) { - this.hurtServer(serverLevel, damageSource, f); + this.hurtServer(serverLevel, damageSource, amount); } } @Deprecated - public final boolean hurtOrSimulate(DamageSource damageSource, float f) { - return this.level instanceof ServerLevel serverLevel ? this.hurtServer(serverLevel, damageSource, f) : this.hurtClient(damageSource); + public final boolean hurtOrSimulate(DamageSource damageSource, float amount) { + return this.level instanceof ServerLevel serverLevel ? this.hurtServer(serverLevel, damageSource, amount) : this.hurtClient(damageSource); } - public abstract boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f); + public abstract boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount); public boolean hurtClient(DamageSource damageSource) { return false; @@ -1701,12 +1701,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.getYRot(partialTick); } - public float getXRot(float f) { - return f == 1.0F ? this.getXRot() : Mth.lerp(f, this.xRotO, this.getXRot()); + /** + * Gets the rotation of this entity around the x-axis (the pitch) in degrees. + */ + public float getXRot(float partialTick) { + return partialTick == 1.0F ? this.getXRot() : Mth.lerp(partialTick, this.xRotO, this.getXRot()); } - public float getYRot(float f) { - return f == 1.0F ? this.getYRot() : Mth.rotLerp(f, this.yRotO, this.getYRot()); + /** + * Gets the rotation of this entity around the y-axis (the yaw) in degrees. + */ + public float getYRot(float partialTick) { + return partialTick == 1.0F ? this.getYRot() : Mth.rotLerp(partialTick, this.yRotO, this.getYRot()); } /** @@ -1722,8 +1728,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return new Vec3(i * j, -k, h * j); } - public final Vec3 getUpVector(float partialTicks) { - return this.calculateUpVector(this.getViewXRot(partialTicks), this.getViewYRot(partialTicks)); + public final Vec3 getUpVector(float partialTick) { + return this.calculateUpVector(this.getViewXRot(partialTick), this.getViewYRot(partialTick)); } protected final Vec3 calculateUpVector(float xRot, float yRot) { @@ -1734,10 +1740,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return new Vec3(this.getX(), this.getEyeY(), this.getZ()); } - public final Vec3 getEyePosition(float partialTicks) { - double d = Mth.lerp((double)partialTicks, this.xo, this.getX()); - double e = Mth.lerp((double)partialTicks, this.yo, this.getY()) + this.getEyeHeight(); - double f = Mth.lerp((double)partialTicks, this.zo, this.getZ()); + public final Vec3 getEyePosition(float partialTick) { + double d = Mth.lerp((double)partialTick, this.xo, this.getX()); + double e = Mth.lerp((double)partialTick, this.yo, this.getY()) + this.getEyeHeight(); + double f = Mth.lerp((double)partialTick, this.zo, this.getZ()); return new Vec3(d, e, f); } @@ -2028,9 +2034,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess /** * (abstract) Protected helper method to read subclass entity data from NBT. */ - protected abstract void readAdditionalSaveData(CompoundTag compound); + protected abstract void readAdditionalSaveData(CompoundTag tag); - protected abstract void addAdditionalSaveData(CompoundTag compound); + protected abstract void addAdditionalSaveData(CompoundTag tag); /** * creates a NBT list from the array of doubles passed to this function @@ -2059,28 +2065,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } @Nullable - public ItemEntity spawnAtLocation(ServerLevel serverLevel, ItemLike itemLike) { - return this.spawnAtLocation(serverLevel, itemLike, 0); + public ItemEntity spawnAtLocation(ServerLevel level, ItemLike item) { + return this.spawnAtLocation(level, item, 0); } @Nullable - public ItemEntity spawnAtLocation(ServerLevel serverLevel, ItemLike itemLike, int i) { - return this.spawnAtLocation(serverLevel, new ItemStack(itemLike), (float)i); + public ItemEntity spawnAtLocation(ServerLevel level, ItemLike item, int yOffset) { + return this.spawnAtLocation(level, new ItemStack(item), (float)yOffset); } @Nullable - public ItemEntity spawnAtLocation(ServerLevel serverLevel, ItemStack itemStack) { - return this.spawnAtLocation(serverLevel, itemStack, 0.0F); + public ItemEntity spawnAtLocation(ServerLevel level, ItemStack stack) { + return this.spawnAtLocation(level, stack, 0.0F); } @Nullable - public ItemEntity spawnAtLocation(ServerLevel serverLevel, ItemStack itemStack, float f) { - if (itemStack.isEmpty()) { + public ItemEntity spawnAtLocation(ServerLevel level, ItemStack stack, float yOffset) { + if (stack.isEmpty()) { return null; } else { - ItemEntity itemEntity = new ItemEntity(serverLevel, this.getX(), this.getY() + f, this.getZ(), itemStack); + ItemEntity itemEntity = new ItemEntity(level, this.getX(), this.getY() + yOffset, this.getZ(), stack); itemEntity.setDefaultPickUpDelay(); - serverLevel.addFreshEntity(itemEntity); + level.addFreshEntity(itemEntity); return itemEntity; } } @@ -2861,7 +2867,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } - private Entity teleportSameDimension(ServerLevel serverLevel, TeleportTransition teleportTransition) { + private Entity teleportSameDimension(ServerLevel level, TeleportTransition teleportTransition) { for (Entity entity : this.getPassengers()) { entity.teleport(this.calculatePassengerTransition(teleportTransition, entity)); } @@ -2878,7 +2884,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this; } - private Entity teleportCrossDimension(ServerLevel serverLevel, TeleportTransition teleportTransition) { + private Entity teleportCrossDimension(ServerLevel level, TeleportTransition teleportTransition) { List list = this.getPassengers(); List list2 = new ArrayList(list.size()); this.ejectPassengers(); @@ -2892,7 +2898,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("teleportCrossDimension"); - Entity entityx = this.getType().create(serverLevel, EntitySpawnReason.DIMENSION_TRAVEL); + Entity entityx = this.getType().create(level, EntitySpawnReason.DIMENSION_TRAVEL); if (entityx == null) { profilerFiller.pop(); return null; @@ -2900,13 +2906,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess entityx.restoreFrom(this); this.removeAfterChangingDimensions(); entityx.teleportSetPosition(PositionMoveRotation.of(teleportTransition), teleportTransition.relatives()); - serverLevel.addDuringTeleport(entityx); + level.addDuringTeleport(entityx); for (Entity entity3 : list2) { entity3.startRiding(entityx, true); } - serverLevel.resetEmptyTime(); + level.resetEmptyTime(); teleportTransition.postTeleportTransition().onTransition(entityx); profilerFiller.pop(); return entityx; @@ -2941,23 +2947,23 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } - public void teleportSetPosition(PositionMoveRotation positionMoveRotation, Set set) { - PositionMoveRotation positionMoveRotation2 = PositionMoveRotation.of(this); - PositionMoveRotation positionMoveRotation3 = PositionMoveRotation.calculateAbsolute(positionMoveRotation2, positionMoveRotation, set); - this.setPosRaw(positionMoveRotation3.position().x, positionMoveRotation3.position().y, positionMoveRotation3.position().z); - this.setYRot(positionMoveRotation3.yRot()); - this.setYHeadRot(positionMoveRotation3.yRot()); - this.setXRot(positionMoveRotation3.xRot()); + public void teleportSetPosition(PositionMoveRotation positionMovementRotation, Set relatives) { + PositionMoveRotation positionMoveRotation = PositionMoveRotation.of(this); + PositionMoveRotation positionMoveRotation2 = PositionMoveRotation.calculateAbsolute(positionMoveRotation, positionMovementRotation, relatives); + this.setPosRaw(positionMoveRotation2.position().x, positionMoveRotation2.position().y, positionMoveRotation2.position().z); + this.setYRot(positionMoveRotation2.yRot()); + this.setYHeadRot(positionMoveRotation2.yRot()); + this.setXRot(positionMoveRotation2.xRot()); this.reapplyPosition(); this.setOldPosAndRot(); - this.setDeltaMovement(positionMoveRotation3.deltaMovement()); + this.setDeltaMovement(positionMoveRotation2.deltaMovement()); this.movementThisTick.clear(); } - public void forceSetRotation(float f, float g) { - this.setYRot(f); - this.setYHeadRot(f); - this.setXRot(g); + public void forceSetRotation(float yRot, float xRot) { + this.setYRot(yRot); + this.setYHeadRot(yRot); + this.setXRot(xRot); this.setOldRot(); } @@ -2982,8 +2988,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return (allowPassengers || !this.isPassenger()) && this.isAlive(); } - public boolean canTeleport(Level level, Level level2) { - if (level.dimension() == Level.END && level2.dimension() == Level.OVERWORLD) { + public boolean canTeleport(Level fromLevel, Level toLevel) { + if (fromLevel.dimension() == Level.END && toLevel.dimension() == Level.OVERWORLD) { for (Entity entity : this.getPassengers()) { if (entity instanceof ServerPlayer serverPlayer && !serverPlayer.seenCredits) { return false; @@ -3102,9 +3108,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.entityData.get(DATA_CUSTOM_NAME_VISIBLE); } - public boolean teleportTo(ServerLevel serverLevel, double d, double e, double f, Set set, float g, float h, boolean bl) { - float i = Mth.clamp(h, -90.0F, 90.0F); - Entity entity = this.teleport(new TeleportTransition(serverLevel, new Vec3(d, e, f), Vec3.ZERO, g, i, set, TeleportTransition.DO_NOTHING)); + public boolean teleportTo(ServerLevel level, double x, double y, double z, Set relativeMovements, float yaw, float pitch, boolean setCamera) { + float f = Mth.clamp(pitch, -90.0F, 90.0F); + Entity entity = this.teleport(new TeleportTransition(level, new Vec3(x, y, z), Vec3.ZERO, yaw, f, relativeMovements, TeleportTransition.DO_NOTHING)); return entity != null; } @@ -3466,17 +3472,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return 1; } - public CommandSourceStack createCommandSourceStackForNameResolution(ServerLevel serverLevel) { + public CommandSourceStack createCommandSourceStackForNameResolution(ServerLevel level) { return new CommandSourceStack( - CommandSource.NULL, - this.position(), - this.getRotationVector(), - serverLevel, - 0, - this.getName().getString(), - this.getDisplayName(), - serverLevel.getServer(), - this + CommandSource.NULL, this.position(), this.getRotationVector(), level, 0, this.getName().getString(), this.getDisplayName(), level.getServer(), this ); } @@ -3753,9 +3751,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return (this.isInPowderSnow || this.wasInPowderSnow) && this.canFreeze(); } - /** - * Gets the rotation of this entity around the y-axis (the yaw) in degrees. - */ public float getYRot() { return this.yRot; } @@ -3775,9 +3770,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } - /** - * Gets the rotation of this entity around the x-axis (the pitch) in degrees. - */ public float getXRot() { return this.xRot; } @@ -3851,7 +3843,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return false; } - public boolean mayInteract(ServerLevel serverLevel, BlockPos blockPos) { + public boolean mayInteract(ServerLevel level, BlockPos pos) { return true; } diff --git a/net/minecraft/world/entity/EntitySpawnReason.java b/net/minecraft/world/entity/EntitySpawnReason.java index bd91ae73..f2d7f57d 100644 --- a/net/minecraft/world/entity/EntitySpawnReason.java +++ b/net/minecraft/world/entity/EntitySpawnReason.java @@ -21,11 +21,11 @@ public enum EntitySpawnReason { LOAD, DIMENSION_TRAVEL; - public static boolean isSpawner(EntitySpawnReason entitySpawnReason) { - return entitySpawnReason == SPAWNER || entitySpawnReason == TRIAL_SPAWNER; + public static boolean isSpawner(EntitySpawnReason reason) { + return reason == SPAWNER || reason == TRIAL_SPAWNER; } - public static boolean ignoresLightRequirements(EntitySpawnReason entitySpawnReason) { - return entitySpawnReason == TRIAL_SPAWNER; + public static boolean ignoresLightRequirements(EntitySpawnReason reason) { + return reason == TRIAL_SPAWNER; } } diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java index dab65127..abb34edf 100644 --- a/net/minecraft/world/entity/EntityType.java +++ b/net/minecraft/world/entity/EntityType.java @@ -13,9 +13,9 @@ import java.util.stream.StreamSupport; import net.minecraft.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.Holder; import net.minecraft.core.HolderSet; import net.minecraft.core.Registry; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.component.DataComponents; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; @@ -180,7 +180,7 @@ import org.slf4j.Logger; public class EntityType implements FeatureElement, EntityTypeTest { private static final Logger LOGGER = LogUtils.getLogger(); - private final Holder.Reference> builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this); + private final Reference> builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this); private static final float MAGIC_HORSE_WIDTH = 1.3964844F; private static final int DISPLAY_TRACKING_RANGE = 10; public static final EntityType ACACIA_BOAT = register( @@ -1010,12 +1010,12 @@ public class EntityType implements FeatureElement, EntityTypeT private final float spawnDimensionsScale; private final FeatureFlagSet requiredFeatures; - private static EntityType register(ResourceKey> resourceKey, EntityType.Builder builder) { - return Registry.register(BuiltInRegistries.ENTITY_TYPE, resourceKey, builder.build(resourceKey)); + private static EntityType register(ResourceKey> key, EntityType.Builder builder) { + return Registry.register(BuiltInRegistries.ENTITY_TYPE, key, builder.build(key)); } - private static ResourceKey> vanillaEntityId(String string) { - return ResourceKey.create(Registries.ENTITY_TYPE, ResourceLocation.withDefaultNamespace(string)); + private static ResourceKey> vanillaEntityId(String name) { + return ResourceKey.create(Registries.ENTITY_TYPE, ResourceLocation.withDefaultNamespace(name)); } private static EntityType register(String key, EntityType.Builder builder) { @@ -1034,63 +1034,63 @@ public class EntityType implements FeatureElement, EntityTypeT } public EntityType( - EntityType.EntityFactory entityFactory, - MobCategory mobCategory, - boolean bl, - boolean bl2, - boolean bl3, - boolean bl4, - ImmutableSet immutableSet, - EntityDimensions entityDimensions, - float f, - int i, - int j, - String string, - Optional> optional, - FeatureFlagSet featureFlagSet + EntityType.EntityFactory factory, + MobCategory category, + boolean serialize, + boolean summon, + boolean fireImmune, + boolean canSpawnFarFromPlayer, + ImmutableSet immuneTo, + EntityDimensions dimensions, + float spawnDimensionsScale, + int clientTrackingRange, + int updateInterval, + String descriptionId, + Optional> lootTable, + FeatureFlagSet requiredFeatures ) { - this.factory = entityFactory; - this.category = mobCategory; - this.canSpawnFarFromPlayer = bl4; - this.serialize = bl; - this.summon = bl2; - this.fireImmune = bl3; - this.immuneTo = immutableSet; - this.dimensions = entityDimensions; - this.spawnDimensionsScale = f; - this.clientTrackingRange = i; - this.updateInterval = j; - this.descriptionId = string; - this.lootTable = optional; - this.requiredFeatures = featureFlagSet; + this.factory = factory; + this.category = category; + this.canSpawnFarFromPlayer = canSpawnFarFromPlayer; + this.serialize = serialize; + this.summon = summon; + this.fireImmune = fireImmune; + this.immuneTo = immuneTo; + this.dimensions = dimensions; + this.spawnDimensionsScale = spawnDimensionsScale; + this.clientTrackingRange = clientTrackingRange; + this.updateInterval = updateInterval; + this.descriptionId = descriptionId; + this.lootTable = lootTable; + this.requiredFeatures = requiredFeatures; } @Nullable public T spawn( - ServerLevel serverLevel, - @Nullable ItemStack itemStack, + ServerLevel level, + @Nullable ItemStack spawnedFrom, @Nullable Player player, - BlockPos blockPos, - EntitySpawnReason entitySpawnReason, - boolean bl, - boolean bl2 + BlockPos pos, + EntitySpawnReason reason, + boolean shouldOffsetY, + boolean shouldOffsetYMore ) { Consumer consumer; - if (itemStack != null) { - consumer = createDefaultStackConfig(serverLevel, itemStack, player); + if (spawnedFrom != null) { + consumer = createDefaultStackConfig(level, spawnedFrom, player); } else { consumer = entity -> {}; } - return this.spawn(serverLevel, consumer, blockPos, entitySpawnReason, bl, bl2); + return this.spawn(level, consumer, pos, reason, shouldOffsetY, shouldOffsetYMore); } - public static Consumer createDefaultStackConfig(Level level, ItemStack itemStack, @Nullable Player player) { - return appendDefaultStackConfig(entity -> {}, level, itemStack, player); + public static Consumer createDefaultStackConfig(Level level, ItemStack spawnedFrom, @Nullable Player player) { + return appendDefaultStackConfig(entity -> {}, level, spawnedFrom, player); } - public static Consumer appendDefaultStackConfig(Consumer consumer, Level level, ItemStack itemStack, @Nullable Player player) { - return appendCustomEntityStackConfig(appendCustomNameConfig(consumer, itemStack), level, itemStack, player); + public static Consumer appendDefaultStackConfig(Consumer consumer, Level level, ItemStack spawnedFrom, @Nullable Player player) { + return appendCustomEntityStackConfig(appendCustomNameConfig(consumer, spawnedFrom), level, spawnedFrom, player); } public static Consumer appendCustomNameConfig(Consumer consumer, ItemStack stack) { @@ -1098,45 +1098,45 @@ public class EntityType implements FeatureElement, EntityTypeT return component != null ? consumer.andThen(entity -> entity.setCustomName(component)) : consumer; } - public static Consumer appendCustomEntityStackConfig(Consumer consumer, Level level, ItemStack itemStack, @Nullable Player player) { - CustomData customData = itemStack.getOrDefault(DataComponents.ENTITY_DATA, CustomData.EMPTY); + public static Consumer appendCustomEntityStackConfig(Consumer consumer, Level level, ItemStack spawnedFrom, @Nullable Player player) { + CustomData customData = spawnedFrom.getOrDefault(DataComponents.ENTITY_DATA, CustomData.EMPTY); return !customData.isEmpty() ? consumer.andThen(entity -> updateCustomEntityTag(level, player, entity, customData)) : consumer; } @Nullable - public T spawn(ServerLevel serverLevel, BlockPos blockPos, EntitySpawnReason entitySpawnReason) { - return this.spawn(serverLevel, null, blockPos, entitySpawnReason, false, false); + public T spawn(ServerLevel level, BlockPos pos, EntitySpawnReason reason) { + return this.spawn(level, null, pos, reason, false, false); } @Nullable - public T spawn(ServerLevel serverLevel, @Nullable Consumer consumer, BlockPos blockPos, EntitySpawnReason entitySpawnReason, boolean bl, boolean bl2) { - T entity = this.create(serverLevel, consumer, blockPos, entitySpawnReason, bl, bl2); + public T spawn(ServerLevel level, @Nullable Consumer consumer, BlockPos pos, EntitySpawnReason reason, boolean shouldOffsetY, boolean shouldOffsetYMore) { + T entity = this.create(level, consumer, pos, reason, shouldOffsetY, shouldOffsetYMore); if (entity != null) { - serverLevel.addFreshEntityWithPassengers(entity); + level.addFreshEntityWithPassengers(entity); } return entity; } @Nullable - public T create(ServerLevel serverLevel, @Nullable Consumer consumer, BlockPos blockPos, EntitySpawnReason entitySpawnReason, boolean bl, boolean bl2) { - T entity = this.create(serverLevel, entitySpawnReason); + public T create(ServerLevel level, @Nullable Consumer consumer, BlockPos pos, EntitySpawnReason reason, boolean shoulOffsetY, boolean shouldOffsetYMore) { + T entity = this.create(level, reason); if (entity == null) { return null; } else { double d; - if (bl) { - entity.setPos(blockPos.getX() + 0.5, blockPos.getY() + 1, blockPos.getZ() + 0.5); - d = getYOffset(serverLevel, blockPos, bl2, entity.getBoundingBox()); + if (shoulOffsetY) { + entity.setPos(pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5); + d = getYOffset(level, pos, shouldOffsetYMore, entity.getBoundingBox()); } else { d = 0.0; } - entity.moveTo(blockPos.getX() + 0.5, blockPos.getY() + d, blockPos.getZ() + 0.5, Mth.wrapDegrees(serverLevel.random.nextFloat() * 360.0F), 0.0F); + entity.moveTo(pos.getX() + 0.5, pos.getY() + d, pos.getZ() + 0.5, Mth.wrapDegrees(level.random.nextFloat() * 360.0F), 0.0F); if (entity instanceof Mob mob) { mob.yHeadRot = mob.getYRot(); mob.yBodyRot = mob.getYRot(); - mob.finalizeSpawn(serverLevel, serverLevel.getCurrentDifficultyAt(mob.blockPosition()), entitySpawnReason, null); + mob.finalizeSpawn(level, level.getCurrentDifficultyAt(mob.blockPosition()), reason, null); mob.playAmbientSound(); } @@ -1226,15 +1226,15 @@ public class EntityType implements FeatureElement, EntityTypeT } @Nullable - public T create(Level level, EntitySpawnReason entitySpawnReason) { + public T create(Level level, EntitySpawnReason spawnReason) { return !this.isEnabled(level.enabledFeatures()) ? null : this.factory.create(this, level); } - public static Optional create(CompoundTag compoundTag, Level level, EntitySpawnReason entitySpawnReason) { + public static Optional create(CompoundTag tag, Level level, EntitySpawnReason spawnReason) { return Util.ifElse( - by(compoundTag).map(entityType -> entityType.create(level, entitySpawnReason)), - entity -> entity.load(compoundTag), - () -> LOGGER.warn("Skipping Entity with id {}", compoundTag.getString("id")) + by(tag).map(entityType -> entityType.create(level, spawnReason)), + entity -> entity.load(tag), + () -> LOGGER.warn("Skipping Entity with id {}", tag.getString("id")) ); } @@ -1258,18 +1258,18 @@ public class EntityType implements FeatureElement, EntityTypeT return this.dimensions; } - public static Optional> by(CompoundTag compound) { - return BuiltInRegistries.ENTITY_TYPE.getOptional(ResourceLocation.parse(compound.getString("id"))); + public static Optional> by(CompoundTag tag) { + return BuiltInRegistries.ENTITY_TYPE.getOptional(ResourceLocation.parse(tag.getString("id"))); } @Nullable - public static Entity loadEntityRecursive(CompoundTag compoundTag, Level level, EntitySpawnReason entitySpawnReason, Function function) { - return (Entity)loadStaticEntity(compoundTag, level, entitySpawnReason).map(function).map(entity -> { - if (compoundTag.contains("Passengers", 9)) { - ListTag listTag = compoundTag.getList("Passengers", 10); + public static Entity loadEntityRecursive(CompoundTag entityTag, Level level, EntitySpawnReason spawnReason, Function adapter) { + return (Entity)loadStaticEntity(entityTag, level, spawnReason).map(adapter).map(entity -> { + if (entityTag.contains("Passengers", 9)) { + ListTag listTag = entityTag.getList("Passengers", 10); for (int i = 0; i < listTag.size(); i++) { - Entity entity2 = loadEntityRecursive(listTag.getCompound(i), level, entitySpawnReason, function); + Entity entity2 = loadEntityRecursive(listTag.getCompound(i), level, spawnReason, adapter); if (entity2 != null) { entity2.startRiding(entity, true); } @@ -1280,11 +1280,11 @@ public class EntityType implements FeatureElement, EntityTypeT }).orElse(null); } - public static Stream loadEntitiesRecursive(List list, Level level, EntitySpawnReason entitySpawnReason) { - final Spliterator spliterator = list.spliterator(); + public static Stream loadEntitiesRecursive(List entityTags, Level level, EntitySpawnReason spawnReason) { + final Spliterator spliterator = entityTags.spliterator(); return StreamSupport.stream(new Spliterator() { public boolean tryAdvance(Consumer consumer) { - return spliterator.tryAdvance(tag -> EntityType.loadEntityRecursive((CompoundTag)tag, level, entitySpawnReason, entity -> { + return spliterator.tryAdvance(tag -> EntityType.loadEntityRecursive((CompoundTag)tag, level, spawnReason, entity -> { consumer.accept(entity); return entity; })); @@ -1295,7 +1295,7 @@ public class EntityType implements FeatureElement, EntityTypeT } public long estimateSize() { - return list.size(); + return entityTags.size(); } public int characteristics() { @@ -1304,9 +1304,9 @@ public class EntityType implements FeatureElement, EntityTypeT }, false); } - private static Optional loadStaticEntity(CompoundTag compoundTag, Level level, EntitySpawnReason entitySpawnReason) { + private static Optional loadStaticEntity(CompoundTag entityTag, Level level, EntitySpawnReason spawnReason) { try { - return create(compoundTag, level, entitySpawnReason); + return create(entityTag, level, spawnReason); } catch (RuntimeException var4) { LOGGER.warn("Exception loading entity: ", (Throwable)var4); return Optional.empty(); @@ -1356,24 +1356,24 @@ public class EntityType implements FeatureElement, EntityTypeT } @Deprecated - public Holder.Reference> builtInRegistryHolder() { + public Reference> builtInRegistryHolder() { return this.builtInRegistryHolder; } - private static EntityType.EntityFactory boatFactory(Supplier supplier) { - return (entityType, level) -> new Boat(entityType, level, supplier); + private static EntityType.EntityFactory boatFactory(Supplier boatItemGetter) { + return (entityType, level) -> new Boat(entityType, level, boatItemGetter); } - private static EntityType.EntityFactory chestBoatFactory(Supplier supplier) { - return (entityType, level) -> new ChestBoat(entityType, level, supplier); + private static EntityType.EntityFactory chestBoatFactory(Supplier boatItemGetter) { + return (entityType, level) -> new ChestBoat(entityType, level, boatItemGetter); } - private static EntityType.EntityFactory raftFactory(Supplier supplier) { - return (entityType, level) -> new Raft(entityType, level, supplier); + private static EntityType.EntityFactory raftFactory(Supplier raftItemGetter) { + return (entityType, level) -> new Raft(entityType, level, raftItemGetter); } - private static EntityType.EntityFactory chestRaftFactory(Supplier supplier) { - return (entityType, level) -> new ChestRaft(entityType, level, supplier); + private static EntityType.EntityFactory chestRaftFactory(Supplier raftItemGetter) { + return (entityType, level) -> new ChestRaft(entityType, level, raftItemGetter); } public static class Builder { @@ -1507,9 +1507,9 @@ public class EntityType implements FeatureElement, EntityTypeT return this; } - public EntityType build(ResourceKey> resourceKey) { + public EntityType build(ResourceKey> entityType) { if (this.serialize) { - Util.fetchChoiceType(References.ENTITY_TREE, resourceKey.location().toString()); + Util.fetchChoiceType(References.ENTITY_TREE, entityType.location().toString()); } return new EntityType<>( @@ -1524,8 +1524,8 @@ public class EntityType implements FeatureElement, EntityTypeT this.spawnDimensionsScale, this.clientTrackingRange, this.updateInterval, - this.descriptionId.get(resourceKey), - this.lootTable.get(resourceKey), + this.descriptionId.get(entityType), + this.lootTable.get(entityType), this.requiredFeatures ); } diff --git a/net/minecraft/world/entity/EquipmentSlot.java b/net/minecraft/world/entity/EquipmentSlot.java index 94e74049..e93d193e 100644 --- a/net/minecraft/world/entity/EquipmentSlot.java +++ b/net/minecraft/world/entity/EquipmentSlot.java @@ -30,11 +30,11 @@ public enum EquipmentSlot implements StringRepresentable { private final int id; private final String name; - private EquipmentSlot(final EquipmentSlot.Type type, final int index, final int countLimit, final int filterFlag, final String name) { + private EquipmentSlot(final EquipmentSlot.Type type, final int index, final int countLimit, final int id, final String name) { this.type = type; this.index = index; this.countLimit = countLimit; - this.id = filterFlag; + this.id = id; this.name = name; } @@ -62,8 +62,8 @@ public enum EquipmentSlot implements StringRepresentable { return this.id; } - public int getFilterBit(int i) { - return this.id + i; + public int getFilterBit(int offset) { + return this.id + offset; } public String getName() { diff --git a/net/minecraft/world/entity/EquipmentTable.java b/net/minecraft/world/entity/EquipmentTable.java index 271a1cfd..e8a398dc 100644 --- a/net/minecraft/world/entity/EquipmentTable.java +++ b/net/minecraft/world/entity/EquipmentTable.java @@ -26,8 +26,8 @@ public record EquipmentTable(ResourceKey lootTable, Map resourceKey, float f) { - this(resourceKey, createForAllSlots(f)); + public EquipmentTable(ResourceKey lootTable, float dropChance) { + this(lootTable, createForAllSlots(dropChance)); } private static Map createForAllSlots(float dropChance) { diff --git a/net/minecraft/world/entity/ExperienceOrb.java b/net/minecraft/world/entity/ExperienceOrb.java index 1ee2229d..0f3c7e90 100644 --- a/net/minecraft/world/entity/ExperienceOrb.java +++ b/net/minecraft/world/entity/ExperienceOrb.java @@ -192,12 +192,12 @@ public class ExperienceOrb extends Entity { } @Override - public final boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (this.isInvulnerableToBase(damageSource)) { return false; } else { this.markHurt(); - this.health = (int)(this.health - f); + this.health = (int)(this.health - amount); if (this.health <= 0) { this.discard(); } @@ -207,19 +207,19 @@ public class ExperienceOrb extends Entity { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - compound.putShort("Health", (short)this.health); - compound.putShort("Age", (short)this.age); - compound.putShort("Value", (short)this.value); - compound.putInt("Count", this.count); + public void addAdditionalSaveData(CompoundTag tag) { + tag.putShort("Health", (short)this.health); + tag.putShort("Age", (short)this.age); + tag.putShort("Value", (short)this.value); + tag.putInt("Count", this.count); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - this.health = compound.getShort("Health"); - this.age = compound.getShort("Age"); - this.value = compound.getShort("Value"); - this.count = Math.max(compound.getInt("Count"), 1); + public void readAdditionalSaveData(CompoundTag tag) { + this.health = tag.getShort("Health"); + this.age = tag.getShort("Age"); + this.value = tag.getShort("Value"); + this.count = Math.max(tag.getInt("Count"), 1); } @Override diff --git a/net/minecraft/world/entity/GlowSquid.java b/net/minecraft/world/entity/GlowSquid.java index c94d5c2a..8b798b1c 100644 --- a/net/minecraft/world/entity/GlowSquid.java +++ b/net/minecraft/world/entity/GlowSquid.java @@ -64,15 +64,15 @@ public class GlowSquid extends Squid { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("DarkTicksRemaining", this.getDarkTicksRemaining()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("DarkTicksRemaining", this.getDarkTicksRemaining()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setDarkTicks(compound.getInt("DarkTicksRemaining")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setDarkTicks(tag.getInt("DarkTicksRemaining")); } @Override @@ -87,8 +87,8 @@ public class GlowSquid extends Squid { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - boolean bl = super.hurtServer(serverLevel, damageSource, f); + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + boolean bl = super.hurtServer(level, damageSource, amount); if (bl) { this.setDarkTicks(100); } @@ -105,14 +105,8 @@ public class GlowSquid extends Squid { } public static boolean checkGlowSquidSpawnRules( - EntityType entityType, - ServerLevelAccessor serverLevelAccessor, - EntitySpawnReason entitySpawnReason, - BlockPos blockPos, - RandomSource randomSource + EntityType entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return blockPos.getY() <= serverLevelAccessor.getSeaLevel() - 33 - && serverLevelAccessor.getRawBrightness(blockPos, 0) == 0 - && serverLevelAccessor.getBlockState(blockPos).is(Blocks.WATER); + return pos.getY() <= level.getSeaLevel() - 33 && level.getRawBrightness(pos, 0) == 0 && level.getBlockState(pos).is(Blocks.WATER); } } diff --git a/net/minecraft/world/entity/Interaction.java b/net/minecraft/world/entity/Interaction.java index c2a55cd7..82543de7 100644 --- a/net/minecraft/world/entity/Interaction.java +++ b/net/minecraft/world/entity/Interaction.java @@ -53,50 +53,50 @@ public class Interaction extends Entity implements Attackable, Targeting { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - if (compound.contains("width", 99)) { - this.setWidth(compound.getFloat("width")); + protected void readAdditionalSaveData(CompoundTag tag) { + if (tag.contains("width", 99)) { + this.setWidth(tag.getFloat("width")); } - if (compound.contains("height", 99)) { - this.setHeight(compound.getFloat("height")); + if (tag.contains("height", 99)) { + this.setHeight(tag.getFloat("height")); } - if (compound.contains("attack")) { + if (tag.contains("attack")) { Interaction.PlayerAction.CODEC - .decode(NbtOps.INSTANCE, compound.get("attack")) + .decode(NbtOps.INSTANCE, tag.get("attack")) .resultOrPartial(Util.prefix("Interaction entity", LOGGER::error)) .ifPresent(pair -> this.attack = (Interaction.PlayerAction)pair.getFirst()); } else { this.attack = null; } - if (compound.contains("interaction")) { + if (tag.contains("interaction")) { Interaction.PlayerAction.CODEC - .decode(NbtOps.INSTANCE, compound.get("interaction")) + .decode(NbtOps.INSTANCE, tag.get("interaction")) .resultOrPartial(Util.prefix("Interaction entity", LOGGER::error)) .ifPresent(pair -> this.interaction = (Interaction.PlayerAction)pair.getFirst()); } else { this.interaction = null; } - this.setResponse(compound.getBoolean("response")); + this.setResponse(tag.getBoolean("response")); this.setBoundingBox(this.makeBoundingBox()); } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - compound.putFloat("width", this.getWidth()); - compound.putFloat("height", this.getHeight()); + protected void addAdditionalSaveData(CompoundTag tag) { + tag.putFloat("width", this.getWidth()); + tag.putFloat("height", this.getHeight()); if (this.attack != null) { - Interaction.PlayerAction.CODEC.encodeStart(NbtOps.INSTANCE, this.attack).ifSuccess(tag -> compound.put("attack", tag)); + Interaction.PlayerAction.CODEC.encodeStart(NbtOps.INSTANCE, this.attack).ifSuccess(tagx -> tag.put("attack", tagx)); } if (this.interaction != null) { - Interaction.PlayerAction.CODEC.encodeStart(NbtOps.INSTANCE, this.interaction).ifSuccess(tag -> compound.put("interaction", tag)); + Interaction.PlayerAction.CODEC.encodeStart(NbtOps.INSTANCE, this.interaction).ifSuccess(tagx -> tag.put("interaction", tagx)); } - compound.putBoolean("response", this.getResponse()); + tag.putBoolean("response", this.getResponse()); } @Override @@ -142,7 +142,7 @@ public class Interaction extends Entity implements Attackable, Targeting { } @Override - public final boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { return false; } diff --git a/net/minecraft/world/entity/Leashable.java b/net/minecraft/world/entity/Leashable.java index 9c238c8f..ca0285cb 100644 --- a/net/minecraft/world/entity/Leashable.java +++ b/net/minecraft/world/entity/Leashable.java @@ -121,7 +121,7 @@ public interface Leashable { } } - static void tickLeash(ServerLevel serverLevel, E entity) { + static void tickLeash(ServerLevel level, E entity) { Leashable.LeashData leashData = entity.getLeashData(); if (leashData != null && leashData.delayedLeashInfo != null) { restoreLeashFromSave(entity, leashData); @@ -129,7 +129,7 @@ public interface Leashable { if (leashData != null && leashData.leashHolder != null) { if (!entity.isAlive() || !leashData.leashHolder.isAlive()) { - dropLeash(entity, true, serverLevel.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)); + dropLeash(entity, true, level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)); } Entity entity2 = entity.getLeashHolder(); diff --git a/net/minecraft/world/entity/LightningBolt.java b/net/minecraft/world/entity/LightningBolt.java index 83ac6990..41b8a555 100644 --- a/net/minecraft/world/entity/LightningBolt.java +++ b/net/minecraft/world/entity/LightningBolt.java @@ -232,11 +232,11 @@ public class LightningBolt extends Entity { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { + protected void readAdditionalSaveData(CompoundTag tag) { } @Override - protected void addAdditionalSaveData(CompoundTag compound) { + protected void addAdditionalSaveData(CompoundTag tag) { } public int getBlocksSetOnFire() { @@ -248,7 +248,7 @@ public class LightningBolt extends Entity { } @Override - public final boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { return false; } } diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java index d7005a0d..5d5112a2 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java @@ -308,8 +308,8 @@ public abstract class LivingEntity extends Entity implements Attackable { } @Override - public void kill(ServerLevel serverLevel) { - this.hurtServer(serverLevel, this.damageSources().genericKill(), Float.MAX_VALUE); + public void kill(ServerLevel level) { + this.hurtServer(level, this.damageSources().genericKill(), Float.MAX_VALUE); } public boolean canAttackType(EntityType entityType) { @@ -614,7 +614,7 @@ public abstract class LivingEntity extends Entity implements Attackable { return EnchantmentHelper.processMobExperience(level, killer, this, this.getBaseExperienceReward(level)); } - protected int getBaseExperienceReward(ServerLevel serverLevel) { + protected int getBaseExperienceReward(ServerLevel level) { return 0; } @@ -718,22 +718,22 @@ public abstract class LivingEntity extends Entity implements Attackable { this.brain.clearMemories(); } - protected void triggerOnDeathMobEffects(ServerLevel serverLevel, Entity.RemovalReason removalReason) { + protected void triggerOnDeathMobEffects(ServerLevel level, Entity.RemovalReason removalReason) { for (MobEffectInstance mobEffectInstance : this.getActiveEffects()) { - mobEffectInstance.onMobRemoved(serverLevel, this, removalReason); + mobEffectInstance.onMobRemoved(level, this, removalReason); } this.activeEffects.clear(); } @Override - public void addAdditionalSaveData(CompoundTag compound) { - compound.putFloat("Health", this.getHealth()); - compound.putShort("HurtTime", (short)this.hurtTime); - compound.putInt("HurtByTimestamp", this.lastHurtByMobTimestamp); - compound.putShort("DeathTime", (short)this.deathTime); - compound.putFloat("AbsorptionAmount", this.getAbsorptionAmount()); - compound.put("attributes", this.getAttributes().save()); + public void addAdditionalSaveData(CompoundTag tag) { + tag.putFloat("Health", this.getHealth()); + tag.putShort("HurtTime", (short)this.hurtTime); + tag.putInt("HurtByTimestamp", this.lastHurtByMobTimestamp); + tag.putShort("DeathTime", (short)this.deathTime); + tag.putFloat("AbsorptionAmount", this.getAbsorptionAmount()); + tag.put("attributes", this.getAttributes().save()); if (!this.activeEffects.isEmpty()) { ListTag listTag = new ListTag(); @@ -741,28 +741,28 @@ public abstract class LivingEntity extends Entity implements Attackable { listTag.add(mobEffectInstance.save()); } - compound.put("active_effects", listTag); + tag.put("active_effects", listTag); } - compound.putBoolean("FallFlying", this.isFallFlying()); + tag.putBoolean("FallFlying", this.isFallFlying()); this.getSleepingPos().ifPresent(blockPos -> { - compound.putInt("SleepingX", blockPos.getX()); - compound.putInt("SleepingY", blockPos.getY()); - compound.putInt("SleepingZ", blockPos.getZ()); + tag.putInt("SleepingX", blockPos.getX()); + tag.putInt("SleepingY", blockPos.getY()); + tag.putInt("SleepingZ", blockPos.getZ()); }); DataResult dataResult = this.brain.serializeStart(NbtOps.INSTANCE); - dataResult.resultOrPartial(LOGGER::error).ifPresent(tag -> compound.put("Brain", tag)); + dataResult.resultOrPartial(LOGGER::error).ifPresent(tagx -> tag.put("Brain", tagx)); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - this.internalSetAbsorptionAmount(compound.getFloat("AbsorptionAmount")); - if (compound.contains("attributes", 9) && this.level() != null && !this.level().isClientSide) { - this.getAttributes().load(compound.getList("attributes", 10)); + public void readAdditionalSaveData(CompoundTag tag) { + this.internalSetAbsorptionAmount(tag.getFloat("AbsorptionAmount")); + if (tag.contains("attributes", 9) && this.level() != null && !this.level().isClientSide) { + this.getAttributes().load(tag.getList("attributes", 10)); } - if (compound.contains("active_effects", 9)) { - ListTag listTag = compound.getList("active_effects", 10); + if (tag.contains("active_effects", 9)) { + ListTag listTag = tag.getList("active_effects", 10); for (int i = 0; i < listTag.size(); i++) { CompoundTag compoundTag = listTag.getCompound(i); @@ -773,15 +773,15 @@ public abstract class LivingEntity extends Entity implements Attackable { } } - if (compound.contains("Health", 99)) { - this.setHealth(compound.getFloat("Health")); + if (tag.contains("Health", 99)) { + this.setHealth(tag.getFloat("Health")); } - this.hurtTime = compound.getShort("HurtTime"); - this.deathTime = compound.getShort("DeathTime"); - this.lastHurtByMobTimestamp = compound.getInt("HurtByTimestamp"); - if (compound.contains("Team", 8)) { - String string = compound.getString("Team"); + this.hurtTime = tag.getShort("HurtTime"); + this.deathTime = tag.getShort("DeathTime"); + this.lastHurtByMobTimestamp = tag.getInt("HurtByTimestamp"); + if (tag.contains("Team", 8)) { + String string = tag.getString("Team"); Scoreboard scoreboard = this.level().getScoreboard(); PlayerTeam playerTeam = scoreboard.getPlayerTeam(string); boolean bl = playerTeam != null && scoreboard.addPlayerToTeam(this.getStringUUID(), playerTeam); @@ -790,12 +790,12 @@ public abstract class LivingEntity extends Entity implements Attackable { } } - if (compound.getBoolean("FallFlying")) { + if (tag.getBoolean("FallFlying")) { this.setSharedFlag(7, true); } - if (compound.contains("SleepingX", 99) && compound.contains("SleepingY", 99) && compound.contains("SleepingZ", 99)) { - BlockPos blockPos = new BlockPos(compound.getInt("SleepingX"), compound.getInt("SleepingY"), compound.getInt("SleepingZ")); + if (tag.contains("SleepingX", 99) && tag.contains("SleepingY", 99) && tag.contains("SleepingZ", 99)) { + BlockPos blockPos = new BlockPos(tag.getInt("SleepingX"), tag.getInt("SleepingY"), tag.getInt("SleepingZ")); this.setSleepingPos(blockPos); this.entityData.set(DATA_POSE, Pose.SLEEPING); if (!this.firstTick) { @@ -803,8 +803,8 @@ public abstract class LivingEntity extends Entity implements Attackable { } } - if (compound.contains("Brain", 10)) { - this.brain = this.makeBrain(new Dynamic<>(NbtOps.INSTANCE, compound.get("Brain"))); + if (tag.contains("Brain", 10)) { + this.brain = this.makeBrain(new Dynamic<>(NbtOps.INSTANCE, tag.get("Brain"))); } } @@ -1066,10 +1066,10 @@ public abstract class LivingEntity extends Entity implements Attackable { } } - protected void onEffectsRemoved(Collection collection) { + protected void onEffectsRemoved(Collection effects) { this.effectsDirty = true; if (!this.level().isClientSide) { - for (MobEffectInstance mobEffectInstance : collection) { + for (MobEffectInstance mobEffectInstance : effects) { mobEffectInstance.getEffect().value().removeAttributeModifiers(this.getAttributes()); for (Entity entity : this.getPassengers()) { @@ -1130,8 +1130,8 @@ public abstract class LivingEntity extends Entity implements Attackable { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - if (this.isInvulnerableTo(serverLevel, damageSource)) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + if (this.isInvulnerableTo(level, damageSource)) { return false; } else if (this.isDeadOrDying()) { return false; @@ -1143,17 +1143,17 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.noActionTime = 0; - if (f < 0.0F) { - f = 0.0F; + if (amount < 0.0F) { + amount = 0.0F; } - float g = f; + float f = amount; boolean bl = false; - float h = 0.0F; - if (f > 0.0F && this.isDamageSourceBlocked(damageSource)) { - this.hurtCurrentlyUsedShield(f); - h = f; - f = 0.0F; + float g = 0.0F; + if (amount > 0.0F && this.isDamageSourceBlocked(damageSource)) { + this.hurtCurrentlyUsedShield(amount); + g = amount; + amount = 0.0F; if (!damageSource.is(DamageTypeTags.IS_PROJECTILE) && damageSource.getDirectEntity() instanceof LivingEntity livingEntity) { this.blockUsingShield(livingEntity); } @@ -1162,32 +1162,32 @@ public abstract class LivingEntity extends Entity implements Attackable { } if (damageSource.is(DamageTypeTags.IS_FREEZING) && this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES)) { - f *= 5.0F; + amount *= 5.0F; } if (damageSource.is(DamageTypeTags.DAMAGES_HELMET) && !this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) { - this.hurtHelmet(damageSource, f); - f *= 0.75F; + this.hurtHelmet(damageSource, amount); + amount *= 0.75F; } this.walkAnimation.setSpeed(1.5F); - if (Float.isNaN(f) || Float.isInfinite(f)) { - f = Float.MAX_VALUE; + if (Float.isNaN(amount) || Float.isInfinite(amount)) { + amount = Float.MAX_VALUE; } boolean bl2 = true; if (this.invulnerableTime > 10.0F && !damageSource.is(DamageTypeTags.BYPASSES_COOLDOWN)) { - if (f <= this.lastHurt) { + if (amount <= this.lastHurt) { return false; } - this.actuallyHurt(serverLevel, damageSource, f - this.lastHurt); - this.lastHurt = f; + this.actuallyHurt(level, damageSource, amount - this.lastHurt); + this.lastHurt = amount; bl2 = false; } else { - this.lastHurt = f; + this.lastHurt = amount; this.invulnerableTime = 20; - this.actuallyHurt(serverLevel, damageSource, f); + this.actuallyHurt(level, damageSource, amount); this.hurtDuration = 10; this.hurtTime = this.hurtDuration; } @@ -1215,12 +1215,12 @@ public abstract class LivingEntity extends Entity implements Attackable { if (bl2) { if (bl) { - serverLevel.broadcastEntityEvent(this, (byte)29); + level.broadcastEntityEvent(this, (byte)29); } else { - serverLevel.broadcastDamageEvent(this, damageSource); + level.broadcastDamageEvent(this, damageSource); } - if (!damageSource.is(DamageTypeTags.NO_IMPACT) && (!bl || f > 0.0F)) { + if (!damageSource.is(DamageTypeTags.NO_IMPACT) && (!bl || amount > 0.0F)) { this.markHurt(); } @@ -1255,25 +1255,25 @@ public abstract class LivingEntity extends Entity implements Attackable { this.playHurtSound(damageSource); } - boolean bl3 = !bl || f > 0.0F; + boolean bl3 = !bl || amount > 0.0F; if (bl3) { this.lastDamageSource = damageSource; this.lastDamageStamp = this.level().getGameTime(); for (MobEffectInstance mobEffectInstance : this.getActiveEffects()) { - mobEffectInstance.onMobHurt(serverLevel, this, damageSource, f); + mobEffectInstance.onMobHurt(level, this, damageSource, amount); } } if (this instanceof ServerPlayer serverPlayer) { - CriteriaTriggers.ENTITY_HURT_PLAYER.trigger(serverPlayer, damageSource, g, f, bl); - if (h > 0.0F && h < 3.4028235E37F) { - serverPlayer.awardStat(Stats.DAMAGE_BLOCKED_BY_SHIELD, Math.round(h * 10.0F)); + CriteriaTriggers.ENTITY_HURT_PLAYER.trigger(serverPlayer, damageSource, f, amount, bl); + if (g > 0.0F && g < 3.4028235E37F) { + serverPlayer.awardStat(Stats.DAMAGE_BLOCKED_BY_SHIELD, Math.round(g * 10.0F)); } } if (entity2 instanceof ServerPlayer serverPlayerx) { - CriteriaTriggers.PLAYER_HURT_ENTITY.trigger(serverPlayerx, this, damageSource, g, f, bl); + CriteriaTriggers.PLAYER_HURT_ENTITY.trigger(serverPlayerx, this, damageSource, f, amount, bl); } return bl3; @@ -1447,16 +1447,16 @@ public abstract class LivingEntity extends Entity implements Attackable { this.dropExperience(level, damageSource.getEntity()); } - protected void dropEquipment(ServerLevel serverLevel) { + protected void dropEquipment(ServerLevel level) { } - protected void dropExperience(ServerLevel serverLevel, @Nullable Entity entity) { + protected void dropExperience(ServerLevel level, @Nullable Entity entity) { if (!this.wasExperienceConsumed() && ( this.isAlwaysExperienceDropper() - || this.lastHurtByPlayerTime > 0 && this.shouldDropExperience() && serverLevel.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT) + || this.lastHurtByPlayerTime > 0 && this.shouldDropExperience() && level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT) )) { - ExperienceOrb.award(serverLevel, this.position(), this.getExperienceReward(serverLevel, entity)); + ExperienceOrb.award(level, this.position(), this.getExperienceReward(level, entity)); } } @@ -1472,58 +1472,58 @@ public abstract class LivingEntity extends Entity implements Attackable { return this.level() instanceof ServerLevel serverLevel ? EnchantmentHelper.modifyKnockback(serverLevel, this.getWeaponItem(), attacker, damageSource, f) : f; } - protected void dropFromLootTable(ServerLevel serverLevel, DamageSource damageSource, boolean bl) { + protected void dropFromLootTable(ServerLevel level, DamageSource damageSource, boolean playerKill) { Optional> optional = this.getLootTable(); if (!optional.isEmpty()) { - LootTable lootTable = serverLevel.getServer().reloadableRegistries().getLootTable((ResourceKey)optional.get()); - LootParams.Builder builder = new LootParams.Builder(serverLevel) + LootTable lootTable = level.getServer().reloadableRegistries().getLootTable((ResourceKey)optional.get()); + LootParams.Builder builder = new LootParams.Builder(level) .withParameter(LootContextParams.THIS_ENTITY, this) .withParameter(LootContextParams.ORIGIN, this.position()) .withParameter(LootContextParams.DAMAGE_SOURCE, damageSource) .withOptionalParameter(LootContextParams.ATTACKING_ENTITY, damageSource.getEntity()) .withOptionalParameter(LootContextParams.DIRECT_ATTACKING_ENTITY, damageSource.getDirectEntity()); - if (bl && this.lastHurtByPlayer != null) { + if (playerKill && this.lastHurtByPlayer != null) { builder = builder.withParameter(LootContextParams.LAST_DAMAGE_PLAYER, this.lastHurtByPlayer).withLuck(this.lastHurtByPlayer.getLuck()); } LootParams lootParams = builder.create(LootContextParamSets.ENTITY); - lootTable.getRandomItems(lootParams, this.getLootTableSeed(), itemStack -> this.spawnAtLocation(serverLevel, itemStack)); + lootTable.getRandomItems(lootParams, this.getLootTableSeed(), itemStack -> this.spawnAtLocation(level, itemStack)); } } - public boolean dropFromGiftLootTable(ServerLevel serverLevel, ResourceKey resourceKey, BiConsumer biConsumer) { + public boolean dropFromGiftLootTable(ServerLevel level, ResourceKey lootTable, BiConsumer dropConsumer) { return this.dropFromLootTable( - serverLevel, - resourceKey, + level, + lootTable, builder -> builder.withParameter(LootContextParams.ORIGIN, this.position()) .withParameter(LootContextParams.THIS_ENTITY, this) .create(LootContextParamSets.GIFT), - biConsumer + dropConsumer ); } protected void dropFromShearingLootTable( - ServerLevel serverLevel, ResourceKey resourceKey, ItemStack itemStack, BiConsumer biConsumer + ServerLevel level, ResourceKey lootTable, ItemStack shears, BiConsumer dropConsumer ) { this.dropFromLootTable( - serverLevel, - resourceKey, + level, + lootTable, builder -> builder.withParameter(LootContextParams.ORIGIN, this.position()) .withParameter(LootContextParams.THIS_ENTITY, this) - .withParameter(LootContextParams.TOOL, itemStack) + .withParameter(LootContextParams.TOOL, shears) .create(LootContextParamSets.SHEARING), - biConsumer + dropConsumer ); } protected boolean dropFromLootTable( - ServerLevel serverLevel, ResourceKey resourceKey, Function function, BiConsumer biConsumer + ServerLevel level, ResourceKey lootTable, Function paramsBuilder, BiConsumer dropConsumer ) { - LootTable lootTable = serverLevel.getServer().reloadableRegistries().getLootTable(resourceKey); - LootParams lootParams = (LootParams)function.apply(new LootParams.Builder(serverLevel)); - List list = lootTable.getRandomItems(lootParams); + LootTable lootTable2 = level.getServer().reloadableRegistries().getLootTable(lootTable); + LootParams lootParams = (LootParams)paramsBuilder.apply(new LootParams.Builder(level)); + List list = lootTable2.getRandomItems(lootParams); if (!list.isEmpty()) { - list.forEach(itemStack -> biConsumer.accept(serverLevel, itemStack)); + list.forEach(itemStack -> dropConsumer.accept(level, itemStack)); return true; } else { return false; @@ -1586,9 +1586,9 @@ public abstract class LivingEntity extends Entity implements Attackable { } } - public Map> activeLocationDependentEnchantments(EquipmentSlot equipmentSlot) { + public Map> activeLocationDependentEnchantments(EquipmentSlot slot) { return (Map>)this.activeLocationDependentEnchantments - .computeIfAbsent(equipmentSlot, equipmentSlotx -> new Reference2ObjectArrayMap()); + .computeIfAbsent(slot, equipmentSlot -> new Reference2ObjectArrayMap()); } public LivingEntity.Fallsounds getFallSounds() { @@ -1635,20 +1635,20 @@ public abstract class LivingEntity extends Entity implements Attackable { } public boolean isLookingAtMe( - LivingEntity livingEntity, double d, boolean bl, boolean bl2, Predicate predicate, DoubleSupplier... doubleSuppliers + LivingEntity entity, double tolerance, boolean scaleByDistance, boolean visual, Predicate filter, DoubleSupplier... yValues ) { - if (!predicate.test(livingEntity)) { + if (!filter.test(entity)) { return false; } else { - Vec3 vec3 = livingEntity.getViewVector(1.0F).normalize(); + Vec3 vec3 = entity.getViewVector(1.0F).normalize(); - for (DoubleSupplier doubleSupplier : doubleSuppliers) { - Vec3 vec32 = new Vec3(this.getX() - livingEntity.getX(), doubleSupplier.getAsDouble() - livingEntity.getEyeY(), this.getZ() - livingEntity.getZ()); - double e = vec32.length(); + for (DoubleSupplier doubleSupplier : yValues) { + Vec3 vec32 = new Vec3(this.getX() - entity.getX(), doubleSupplier.getAsDouble() - entity.getEyeY(), this.getZ() - entity.getZ()); + double d = vec32.length(); vec32 = vec32.normalize(); - double f = vec3.dot(vec32); - if (f > 1.0 - d / (bl ? e : 1.0)) { - return livingEntity.hasLineOfSight(this, bl2 ? Block.VISUAL : Block.COLLIDER, net.minecraft.world.level.ClipContext.Fluid.NONE, doubleSupplier); + double e = vec3.dot(vec32); + if (e > 1.0 - tolerance / (scaleByDistance ? d : 1.0)) { + return entity.hasLineOfSight(this, visual ? Block.VISUAL : Block.COLLIDER, net.minecraft.world.level.ClipContext.Fluid.NONE, doubleSupplier); } } @@ -1799,15 +1799,15 @@ public abstract class LivingEntity extends Entity implements Attackable { } } - protected void actuallyHurt(ServerLevel serverLevel, DamageSource damageSource, float f) { - if (!this.isInvulnerableTo(serverLevel, damageSource)) { - f = this.getDamageAfterArmorAbsorb(damageSource, f); - f = this.getDamageAfterMagicAbsorb(damageSource, f); - float var10 = Math.max(f - this.getAbsorptionAmount(), 0.0F); - this.setAbsorptionAmount(this.getAbsorptionAmount() - (f - var10)); - float h = f - var10; - if (h > 0.0F && h < 3.4028235E37F && damageSource.getEntity() instanceof ServerPlayer serverPlayer) { - serverPlayer.awardStat(Stats.DAMAGE_DEALT_ABSORBED, Math.round(h * 10.0F)); + protected void actuallyHurt(ServerLevel level, DamageSource damageSource, float amount) { + if (!this.isInvulnerableTo(level, damageSource)) { + amount = this.getDamageAfterArmorAbsorb(damageSource, amount); + amount = this.getDamageAfterMagicAbsorb(damageSource, amount); + float var10 = Math.max(amount - this.getAbsorptionAmount(), 0.0F); + this.setAbsorptionAmount(this.getAbsorptionAmount() - (amount - var10)); + float g = amount - var10; + if (g > 0.0F && g < 3.4028235E37F && damageSource.getEntity() instanceof ServerPlayer serverPlayer) { + serverPlayer.awardStat(Stats.DAMAGE_DEALT_ABSORBED, Math.round(g * 10.0F)); } if (var10 != 0.0F) { @@ -2048,8 +2048,8 @@ public abstract class LivingEntity extends Entity implements Attackable { return this.getItemBySlot(EquipmentSlot.OFFHAND); } - public ItemStack getItemHeldByArm(HumanoidArm humanoidArm) { - return this.getMainArm() == humanoidArm ? this.getMainHandItem() : this.getOffhandItem(); + public ItemStack getItemHeldByArm(HumanoidArm arm) { + return this.getMainArm() == arm ? this.getMainHandItem() : this.getOffhandItem(); } @NotNull @@ -2270,15 +2270,15 @@ public abstract class LivingEntity extends Entity implements Attackable { } } - private void travelInAir(Vec3 vec3) { + private void travelInAir(Vec3 travelVector) { BlockPos blockPos = this.getBlockPosBelowThatAffectsMyMovement(); float f = this.onGround() ? this.level().getBlockState(blockPos).getBlock().getFriction() : 1.0F; float g = f * 0.91F; - Vec3 vec32 = this.handleRelativeFrictionAndCalculateMovement(vec3, f); - double d = vec32.y; + Vec3 vec3 = this.handleRelativeFrictionAndCalculateMovement(travelVector, f); + double d = vec3.y; MobEffectInstance mobEffectInstance = this.getEffect(MobEffects.LEVITATION); if (mobEffectInstance != null) { - d += (0.05 * (mobEffectInstance.getAmplifier() + 1) - vec32.y) * 0.2; + d += (0.05 * (mobEffectInstance.getAmplifier() + 1) - vec3.y) * 0.2; } else if (!this.level().isClientSide || this.level().hasChunkAt(blockPos)) { d -= this.getEffectiveGravity(); } else if (this.getY() > this.level().getMinY()) { @@ -2288,14 +2288,14 @@ public abstract class LivingEntity extends Entity implements Attackable { } if (this.shouldDiscardFriction()) { - this.setDeltaMovement(vec32.x, d, vec32.z); + this.setDeltaMovement(vec3.x, d, vec3.z); } else { float h = this instanceof FlyingAnimal ? g : 0.98F; - this.setDeltaMovement(vec32.x * g, d * h, vec32.z * g); + this.setDeltaMovement(vec3.x * g, d * h, vec3.z * g); } } - private void travelInFluid(Vec3 vec3) { + private void travelInFluid(Vec3 travelVector) { boolean bl = this.getDeltaMovement().y <= 0.0; double d = this.getY(); double e = this.getEffectiveGravity(); @@ -2316,22 +2316,22 @@ public abstract class LivingEntity extends Entity implements Attackable { f = 0.96F; } - this.moveRelative(g, vec3); + this.moveRelative(g, travelVector); this.move(MoverType.SELF, this.getDeltaMovement()); - Vec3 vec32 = this.getDeltaMovement(); + Vec3 vec3 = this.getDeltaMovement(); if (this.horizontalCollision && this.onClimbable()) { - vec32 = new Vec3(vec32.x, 0.2, vec32.z); + vec3 = new Vec3(vec3.x, 0.2, vec3.z); } - vec32 = vec32.multiply(f, 0.8F, f); - this.setDeltaMovement(this.getFluidFallingAdjustedMovement(e, bl, vec32)); + vec3 = vec3.multiply(f, 0.8F, f); + this.setDeltaMovement(this.getFluidFallingAdjustedMovement(e, bl, vec3)); } else { - this.moveRelative(0.02F, vec3); + this.moveRelative(0.02F, travelVector); this.move(MoverType.SELF, this.getDeltaMovement()); if (this.getFluidHeight(FluidTags.LAVA) <= this.getFluidJumpThreshold()) { this.setDeltaMovement(this.getDeltaMovement().multiply(0.5, 0.8F, 0.5)); - Vec3 vec33 = this.getFluidFallingAdjustedMovement(e, bl, this.getDeltaMovement()); - this.setDeltaMovement(vec33); + Vec3 vec32 = this.getFluidFallingAdjustedMovement(e, bl, this.getDeltaMovement()); + this.setDeltaMovement(vec32); } else { this.setDeltaMovement(this.getDeltaMovement().scale(0.5)); } @@ -2341,9 +2341,9 @@ public abstract class LivingEntity extends Entity implements Attackable { } } - Vec3 vec33 = this.getDeltaMovement(); - if (this.horizontalCollision && this.isFree(vec33.x, vec33.y + 0.6F - this.getY() + d, vec33.z)) { - this.setDeltaMovement(vec33.x, 0.3F, vec33.z); + Vec3 vec32 = this.getDeltaMovement(); + if (this.horizontalCollision && this.isFree(vec32.x, vec32.y + 0.6F - this.getY() + d, vec32.z)) { + this.setDeltaMovement(vec32.x, 0.3F, vec32.z); } } @@ -2358,38 +2358,38 @@ public abstract class LivingEntity extends Entity implements Attackable { } } - private Vec3 updateFallFlyingMovement(Vec3 vec3) { - Vec3 vec32 = this.getLookAngle(); + private Vec3 updateFallFlyingMovement(Vec3 deltaMovement) { + Vec3 vec3 = this.getLookAngle(); float f = this.getXRot() * (float) (Math.PI / 180.0); - double d = Math.sqrt(vec32.x * vec32.x + vec32.z * vec32.z); - double e = vec3.horizontalDistance(); + double d = Math.sqrt(vec3.x * vec3.x + vec3.z * vec3.z); + double e = deltaMovement.horizontalDistance(); double g = this.getEffectiveGravity(); double h = Mth.square(Math.cos(f)); - vec3 = vec3.add(0.0, g * (-1.0 + h * 0.75), 0.0); - if (vec3.y < 0.0 && d > 0.0) { - double i = vec3.y * -0.1 * h; - vec3 = vec3.add(vec32.x * i / d, i, vec32.z * i / d); + deltaMovement = deltaMovement.add(0.0, g * (-1.0 + h * 0.75), 0.0); + if (deltaMovement.y < 0.0 && d > 0.0) { + double i = deltaMovement.y * -0.1 * h; + deltaMovement = deltaMovement.add(vec3.x * i / d, i, vec3.z * i / d); } if (f < 0.0F && d > 0.0) { double i = e * -Mth.sin(f) * 0.04; - vec3 = vec3.add(-vec32.x * i / d, i * 3.2, -vec32.z * i / d); + deltaMovement = deltaMovement.add(-vec3.x * i / d, i * 3.2, -vec3.z * i / d); } if (d > 0.0) { - vec3 = vec3.add((vec32.x / d * e - vec3.x) * 0.1, 0.0, (vec32.z / d * e - vec3.z) * 0.1); + deltaMovement = deltaMovement.add((vec3.x / d * e - deltaMovement.x) * 0.1, 0.0, (vec3.z / d * e - deltaMovement.z) * 0.1); } - return vec3.multiply(0.99F, 0.98F, 0.99F); + return deltaMovement.multiply(0.99F, 0.98F, 0.99F); } - private void handleFallFlyingCollisions(double d, double e) { + private void handleFallFlyingCollisions(double oldSpeed, double newSpeed) { if (this.horizontalCollision) { - double f = d - e; - float g = (float)(f * 10.0 - 3.0); - if (g > 0.0F) { - this.playSound(this.getFallDamageSound((int)g), 1.0F, 1.0F); - this.hurt(this.damageSources().flyIntoWall(), g); + double d = oldSpeed - newSpeed; + float f = (float)(d * 10.0 - 3.0); + if (f > 0.0F) { + this.playSound(this.getFallDamageSound((int)f), 1.0F, 1.0F); + this.hurt(this.damageSources().flyIntoWall(), f); } } } @@ -2497,8 +2497,8 @@ public abstract class LivingEntity extends Entity implements Attackable { this.speed = speed; } - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { - this.setLastHurtMob(entity); + public boolean doHurtTarget(ServerLevel level, Entity source) { + this.setLastHurtMob(source); return false; } @@ -3098,13 +3098,15 @@ public abstract class LivingEntity extends Entity implements Attackable { return this.hasLineOfSight(entity, Block.COLLIDER, net.minecraft.world.level.ClipContext.Fluid.NONE, entity::getEyeY); } - public boolean hasLineOfSight(Entity entity, Block block, net.minecraft.world.level.ClipContext.Fluid fluid, DoubleSupplier doubleSupplier) { + public boolean hasLineOfSight(Entity entity, Block blockClipContext, net.minecraft.world.level.ClipContext.Fluid fluidClipContext, DoubleSupplier eyeY) { if (entity.level() != this.level()) { return false; } else { Vec3 vec3 = new Vec3(this.getX(), this.getEyeY(), this.getZ()); - Vec3 vec32 = new Vec3(entity.getX(), doubleSupplier.getAsDouble(), entity.getZ()); - return vec32.distanceTo(vec3) > 128.0 ? false : this.level().clip(new ClipContext(vec3, vec32, block, fluid, this)).getType() == Type.MISS; + Vec3 vec32 = new Vec3(entity.getX(), eyeY.getAsDouble(), entity.getZ()); + return vec32.distanceTo(vec3) > 128.0 + ? false + : this.level().clip(new ClipContext(vec3, vec32, blockClipContext, fluidClipContext, this)).getType() == Type.MISS; } } @@ -3319,7 +3321,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } } - public void handleExtraItemsCreatedOnUse(ItemStack itemStack) { + public void handleExtraItemsCreatedOnUse(ItemStack stack) { } public ItemStack getUseItem() { @@ -3603,23 +3605,23 @@ public abstract class LivingEntity extends Entity implements Attackable { this.stopLocationBasedEffects(this.getItemBySlot(slot), slot, this.attributes); } - private void stopLocationBasedEffects(ItemStack itemStack, EquipmentSlot equipmentSlot, AttributeMap attributeMap) { - itemStack.forEachModifier(equipmentSlot, (holder, attributeModifier) -> { + private void stopLocationBasedEffects(ItemStack stack, EquipmentSlot slot, AttributeMap attributeMap) { + stack.forEachModifier(slot, (holder, attributeModifier) -> { AttributeInstance attributeInstance = attributeMap.getInstance(holder); if (attributeInstance != null) { attributeInstance.removeModifier(attributeModifier); } }); - EnchantmentHelper.stopLocationBasedEffects(itemStack, this, equipmentSlot); + EnchantmentHelper.stopLocationBasedEffects(stack, this, slot); } public static EquipmentSlot getSlotForHand(InteractionHand hand) { return hand == InteractionHand.MAIN_HAND ? EquipmentSlot.MAINHAND : EquipmentSlot.OFFHAND; } - public final boolean canEquipWithDispenser(ItemStack itemStack) { + public final boolean canEquipWithDispenser(ItemStack stack) { if (this.isAlive() && !this.isSpectator()) { - Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); + Equippable equippable = stack.get(DataComponents.EQUIPPABLE); if (equippable != null && equippable.dispensable()) { EquipmentSlot equipmentSlot = equippable.slot(); return this.canUseSlot(equipmentSlot) && equippable.canBeEquippedBy(this.getType()) @@ -3633,7 +3635,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } } - protected boolean canDispenserEquipIntoSlot(EquipmentSlot equipmentSlot) { + protected boolean canDispenserEquipIntoSlot(EquipmentSlot slot) { return true; } @@ -3642,11 +3644,11 @@ public abstract class LivingEntity extends Entity implements Attackable { return equippable != null && this.canUseSlot(equippable.slot()) ? equippable.slot() : EquipmentSlot.MAINHAND; } - public final boolean isEquippableInSlot(ItemStack itemStack, EquipmentSlot equipmentSlot) { - Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); + public final boolean isEquippableInSlot(ItemStack stack, EquipmentSlot slot) { + Equippable equippable = stack.get(DataComponents.EQUIPPABLE); return equippable == null - ? equipmentSlot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND) - : equipmentSlot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.getType()); + ? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND) + : slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.getType()); } private static SlotAccess createEquipmentSlotAccess(LivingEntity entity, EquipmentSlot slot) { @@ -3750,16 +3752,16 @@ public abstract class LivingEntity extends Entity implements Attackable { return false; } - public boolean isInvulnerableTo(ServerLevel serverLevel, DamageSource damageSource) { - return this.isInvulnerableToBase(damageSource) || EnchantmentHelper.isImmuneToDamage(serverLevel, this, damageSource); + public boolean isInvulnerableTo(ServerLevel level, DamageSource damageSource) { + return this.isInvulnerableToBase(damageSource) || EnchantmentHelper.isImmuneToDamage(level, this, damageSource); } - public static boolean canGlideUsing(ItemStack itemStack, EquipmentSlot equipmentSlot) { - if (!itemStack.has(DataComponents.GLIDER)) { + public static boolean canGlideUsing(ItemStack stack, EquipmentSlot slot) { + if (!stack.has(DataComponents.GLIDER)) { return false; } else { - Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); - return equippable != null && equipmentSlot == equippable.slot() && !itemStack.nextDamageWillBreak(); + Equippable equippable = stack.get(DataComponents.EQUIPPABLE); + return equippable != null && slot == equippable.slot() && !stack.nextDamageWillBreak(); } } diff --git a/net/minecraft/world/entity/Marker.java b/net/minecraft/world/entity/Marker.java index 100c7f86..2c16672c 100644 --- a/net/minecraft/world/entity/Marker.java +++ b/net/minecraft/world/entity/Marker.java @@ -28,13 +28,13 @@ public class Marker extends Entity { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - this.data = compound.getCompound("data"); + protected void readAdditionalSaveData(CompoundTag tag) { + this.data = tag.getCompound("data"); } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - compound.put("data", this.data.copy()); + protected void addAdditionalSaveData(CompoundTag tag) { + tag.put("data", this.data.copy()); } @Override @@ -68,7 +68,7 @@ public class Marker extends Entity { } @Override - public final boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { return false; } } diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java index daa99937..3a02887a 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java @@ -50,6 +50,7 @@ import net.minecraft.world.entity.ai.control.LookControl; import net.minecraft.world.entity.ai.control.MoveControl; import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ai.goal.GoalSelector; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.memory.MemoryModuleType; import net.minecraft.world.entity.ai.navigation.GroundPathNavigation; import net.minecraft.world.entity.ai.navigation.PathNavigation; @@ -298,7 +299,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } @Override - protected int getBaseExperienceReward(ServerLevel serverLevel) { + protected int getBaseExperienceReward(ServerLevel level) { if (this.xpReward > 0) { int i = this.xpReward; @@ -358,9 +359,9 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab protected void updateControlFlags() { boolean bl = !(this.getControllingPassenger() instanceof Mob); boolean bl2 = !(this.getVehicle() instanceof AbstractBoat); - this.goalSelector.setControlFlag(Goal.Flag.MOVE, bl); - this.goalSelector.setControlFlag(Goal.Flag.JUMP, bl && bl2); - this.goalSelector.setControlFlag(Goal.Flag.LOOK, bl); + this.goalSelector.setControlFlag(Flag.MOVE, bl); + this.goalSelector.setControlFlag(Flag.JUMP, bl && bl2); + this.goalSelector.setControlFlag(Flag.LOOK, bl); } @Override @@ -375,10 +376,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("CanPickUpLoot", this.canPickUpLoot()); - compound.putBoolean("PersistenceRequired", this.persistenceRequired); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("CanPickUpLoot", this.canPickUpLoot()); + tag.putBoolean("PersistenceRequired", this.persistenceRequired); ListTag listTag = new ListTag(); for (ItemStack itemStack : this.armorItems) { @@ -389,14 +390,14 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } } - compound.put("ArmorItems", listTag); + tag.put("ArmorItems", listTag); ListTag listTag2 = new ListTag(); for (float f : this.armorDropChances) { listTag2.add(FloatTag.valueOf(f)); } - compound.put("ArmorDropChances", listTag2); + tag.put("ArmorDropChances", listTag2); ListTag listTag3 = new ListTag(); for (ItemStack itemStack2 : this.handItems) { @@ -407,43 +408,43 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } } - compound.put("HandItems", listTag3); + tag.put("HandItems", listTag3); ListTag listTag4 = new ListTag(); for (float g : this.handDropChances) { listTag4.add(FloatTag.valueOf(g)); } - compound.put("HandDropChances", listTag4); + tag.put("HandDropChances", listTag4); if (!this.bodyArmorItem.isEmpty()) { - compound.put("body_armor_item", this.bodyArmorItem.save(this.registryAccess())); - compound.putFloat("body_armor_drop_chance", this.bodyArmorDropChance); + tag.put("body_armor_item", this.bodyArmorItem.save(this.registryAccess())); + tag.putFloat("body_armor_drop_chance", this.bodyArmorDropChance); } - this.writeLeashData(compound, this.leashData); - compound.putBoolean("LeftHanded", this.isLeftHanded()); + this.writeLeashData(tag, this.leashData); + tag.putBoolean("LeftHanded", this.isLeftHanded()); if (this.lootTable.isPresent()) { - compound.putString("DeathLootTable", ((ResourceKey)this.lootTable.get()).location().toString()); + tag.putString("DeathLootTable", ((ResourceKey)this.lootTable.get()).location().toString()); if (this.lootTableSeed != 0L) { - compound.putLong("DeathLootTableSeed", this.lootTableSeed); + tag.putLong("DeathLootTableSeed", this.lootTableSeed); } } if (this.isNoAi()) { - compound.putBoolean("NoAI", this.isNoAi()); + tag.putBoolean("NoAI", this.isNoAi()); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("CanPickUpLoot", 99)) { - this.setCanPickUpLoot(compound.getBoolean("CanPickUpLoot")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("CanPickUpLoot", 99)) { + this.setCanPickUpLoot(tag.getBoolean("CanPickUpLoot")); } - this.persistenceRequired = compound.getBoolean("PersistenceRequired"); - if (compound.contains("ArmorItems", 9)) { - ListTag listTag = compound.getList("ArmorItems", 10); + this.persistenceRequired = tag.getBoolean("PersistenceRequired"); + if (tag.contains("ArmorItems", 9)) { + ListTag listTag = tag.getList("ArmorItems", 10); for (int i = 0; i < this.armorItems.size(); i++) { CompoundTag compoundTag = listTag.getCompound(i); @@ -451,16 +452,16 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } } - if (compound.contains("ArmorDropChances", 9)) { - ListTag listTag = compound.getList("ArmorDropChances", 5); + if (tag.contains("ArmorDropChances", 9)) { + ListTag listTag = tag.getList("ArmorDropChances", 5); for (int i = 0; i < listTag.size(); i++) { this.armorDropChances[i] = listTag.getFloat(i); } } - if (compound.contains("HandItems", 9)) { - ListTag listTag = compound.getList("HandItems", 10); + if (tag.contains("HandItems", 9)) { + ListTag listTag = tag.getList("HandItems", 10); for (int i = 0; i < this.handItems.size(); i++) { CompoundTag compoundTag = listTag.getCompound(i); @@ -468,34 +469,34 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } } - if (compound.contains("HandDropChances", 9)) { - ListTag listTag = compound.getList("HandDropChances", 5); + if (tag.contains("HandDropChances", 9)) { + ListTag listTag = tag.getList("HandDropChances", 5); for (int i = 0; i < listTag.size(); i++) { this.handDropChances[i] = listTag.getFloat(i); } } - if (compound.contains("body_armor_item", 10)) { - this.bodyArmorItem = (ItemStack)ItemStack.parse(this.registryAccess(), compound.getCompound("body_armor_item")).orElse(ItemStack.EMPTY); - this.bodyArmorDropChance = compound.getFloat("body_armor_drop_chance"); + if (tag.contains("body_armor_item", 10)) { + this.bodyArmorItem = (ItemStack)ItemStack.parse(this.registryAccess(), tag.getCompound("body_armor_item")).orElse(ItemStack.EMPTY); + this.bodyArmorDropChance = tag.getFloat("body_armor_drop_chance"); } else { this.bodyArmorItem = ItemStack.EMPTY; } - this.leashData = this.readLeashData(compound); - this.setLeftHanded(compound.getBoolean("LeftHanded")); - if (compound.contains("DeathLootTable", 8)) { - this.lootTable = Optional.of(ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.parse(compound.getString("DeathLootTable")))); - this.lootTableSeed = compound.getLong("DeathLootTableSeed"); + this.leashData = this.readLeashData(tag); + this.setLeftHanded(tag.getBoolean("LeftHanded")); + if (tag.contains("DeathLootTable", 8)) { + this.lootTable = Optional.of(ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.parse(tag.getString("DeathLootTable")))); + this.lootTableSeed = tag.getLong("DeathLootTableSeed"); } - this.setNoAi(compound.getBoolean("NoAI")); + this.setNoAi(tag.getBoolean("NoAI")); } @Override - protected void dropFromLootTable(ServerLevel serverLevel, DamageSource damageSource, boolean bl) { - super.dropFromLootTable(serverLevel, damageSource, bl); + protected void dropFromLootTable(ServerLevel level, DamageSource damageSource, boolean playerKill) { + super.dropFromLootTable(level, damageSource, playerKill); this.lootTable = Optional.empty(); } @@ -560,38 +561,38 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab return ITEM_PICKUP_REACH; } - protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) { - ItemStack itemStack = itemEntity.getItem(); - ItemStack itemStack2 = this.equipItemIfPossible(serverLevel, itemStack.copy()); + protected void pickUpItem(ServerLevel level, ItemEntity entity) { + ItemStack itemStack = entity.getItem(); + ItemStack itemStack2 = this.equipItemIfPossible(level, itemStack.copy()); if (!itemStack2.isEmpty()) { - this.onItemPickup(itemEntity); - this.take(itemEntity, itemStack2.getCount()); + this.onItemPickup(entity); + this.take(entity, itemStack2.getCount()); itemStack.shrink(itemStack2.getCount()); if (itemStack.isEmpty()) { - itemEntity.discard(); + entity.discard(); } } } - public ItemStack equipItemIfPossible(ServerLevel serverLevel, ItemStack itemStack) { - EquipmentSlot equipmentSlot = this.getEquipmentSlotForItem(itemStack); - ItemStack itemStack2 = this.getItemBySlot(equipmentSlot); - boolean bl = this.canReplaceCurrentItem(itemStack, itemStack2, equipmentSlot); + public ItemStack equipItemIfPossible(ServerLevel level, ItemStack stack) { + EquipmentSlot equipmentSlot = this.getEquipmentSlotForItem(stack); + ItemStack itemStack = this.getItemBySlot(equipmentSlot); + boolean bl = this.canReplaceCurrentItem(stack, itemStack, equipmentSlot); if (equipmentSlot.isArmor() && !bl) { equipmentSlot = EquipmentSlot.MAINHAND; - itemStack2 = this.getItemBySlot(equipmentSlot); - bl = itemStack2.isEmpty(); + itemStack = this.getItemBySlot(equipmentSlot); + bl = itemStack.isEmpty(); } - if (bl && this.canHoldItem(itemStack)) { + if (bl && this.canHoldItem(stack)) { double d = this.getEquipmentDropChance(equipmentSlot); - if (!itemStack2.isEmpty() && Math.max(this.random.nextFloat() - 0.1F, 0.0F) < d) { - this.spawnAtLocation(serverLevel, itemStack2); + if (!itemStack.isEmpty() && Math.max(this.random.nextFloat() - 0.1F, 0.0F) < d) { + this.spawnAtLocation(level, itemStack); } - ItemStack itemStack3 = equipmentSlot.limit(itemStack); - this.setItemSlotAndDropWhenKilled(equipmentSlot, itemStack3); - return itemStack3; + ItemStack itemStack2 = equipmentSlot.limit(stack); + this.setItemSlotAndDropWhenKilled(equipmentSlot, itemStack2); + return itemStack2; } else { return ItemStack.EMPTY; } @@ -616,51 +617,51 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } } - protected boolean canReplaceCurrentItem(ItemStack itemStack, ItemStack itemStack2, EquipmentSlot equipmentSlot) { - if (itemStack2.isEmpty()) { + protected boolean canReplaceCurrentItem(ItemStack newItem, ItemStack currentItem, EquipmentSlot slot) { + if (currentItem.isEmpty()) { return true; - } else if (itemStack.getItem() instanceof SwordItem) { - if (!(itemStack2.getItem() instanceof SwordItem)) { + } else if (newItem.getItem() instanceof SwordItem) { + if (!(currentItem.getItem() instanceof SwordItem)) { return true; } else { - double d = this.getApproximateAttributeWith(itemStack, Attributes.ATTACK_DAMAGE, equipmentSlot); - double e = this.getApproximateAttributeWith(itemStack2, Attributes.ATTACK_DAMAGE, equipmentSlot); - return d != e ? d > e : this.canReplaceEqualItem(itemStack, itemStack2); + double d = this.getApproximateAttributeWith(newItem, Attributes.ATTACK_DAMAGE, slot); + double e = this.getApproximateAttributeWith(currentItem, Attributes.ATTACK_DAMAGE, slot); + return d != e ? d > e : this.canReplaceEqualItem(newItem, currentItem); } - } else if (itemStack.getItem() instanceof BowItem && itemStack2.getItem() instanceof BowItem) { - return this.canReplaceEqualItem(itemStack, itemStack2); - } else if (itemStack.getItem() instanceof CrossbowItem && itemStack2.getItem() instanceof CrossbowItem) { - return this.canReplaceEqualItem(itemStack, itemStack2); - } else if (itemStack.getItem() instanceof ArmorItem) { - if (EnchantmentHelper.has(itemStack2, EnchantmentEffectComponents.PREVENT_ARMOR_CHANGE)) { + } else if (newItem.getItem() instanceof BowItem && currentItem.getItem() instanceof BowItem) { + return this.canReplaceEqualItem(newItem, currentItem); + } else if (newItem.getItem() instanceof CrossbowItem && currentItem.getItem() instanceof CrossbowItem) { + return this.canReplaceEqualItem(newItem, currentItem); + } else if (newItem.getItem() instanceof ArmorItem) { + if (EnchantmentHelper.has(currentItem, EnchantmentEffectComponents.PREVENT_ARMOR_CHANGE)) { return false; - } else if (!(itemStack2.getItem() instanceof ArmorItem)) { + } else if (!(currentItem.getItem() instanceof ArmorItem)) { return true; } else { - double d = this.getApproximateAttributeWith(itemStack, Attributes.ARMOR, equipmentSlot); - double e = this.getApproximateAttributeWith(itemStack2, Attributes.ARMOR, equipmentSlot); - double f = this.getApproximateAttributeWith(itemStack, Attributes.ARMOR_TOUGHNESS, equipmentSlot); - double g = this.getApproximateAttributeWith(itemStack2, Attributes.ARMOR_TOUGHNESS, equipmentSlot); + double d = this.getApproximateAttributeWith(newItem, Attributes.ARMOR, slot); + double e = this.getApproximateAttributeWith(currentItem, Attributes.ARMOR, slot); + double f = this.getApproximateAttributeWith(newItem, Attributes.ARMOR_TOUGHNESS, slot); + double g = this.getApproximateAttributeWith(currentItem, Attributes.ARMOR_TOUGHNESS, slot); if (d != e) { return d > e; } else { - return f != g ? f > g : this.canReplaceEqualItem(itemStack, itemStack2); + return f != g ? f > g : this.canReplaceEqualItem(newItem, currentItem); } } } else { - if (itemStack.getItem() instanceof DiggerItem) { - if (itemStack2.getItem() instanceof BlockItem) { + if (newItem.getItem() instanceof DiggerItem) { + if (currentItem.getItem() instanceof BlockItem) { return true; } - if (itemStack2.getItem() instanceof DiggerItem) { - double d = this.getApproximateAttributeWith(itemStack, Attributes.ATTACK_DAMAGE, equipmentSlot); - double e = this.getApproximateAttributeWith(itemStack2, Attributes.ATTACK_DAMAGE, equipmentSlot); + if (currentItem.getItem() instanceof DiggerItem) { + double d = this.getApproximateAttributeWith(newItem, Attributes.ATTACK_DAMAGE, slot); + double e = this.getApproximateAttributeWith(currentItem, Attributes.ATTACK_DAMAGE, slot); if (d != e) { return d > e; } - return this.canReplaceEqualItem(itemStack, itemStack2); + return this.canReplaceEqualItem(newItem, currentItem); } } @@ -668,10 +669,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } } - private double getApproximateAttributeWith(ItemStack itemStack, Holder holder, EquipmentSlot equipmentSlot) { - double d = this.getAttributes().hasAttribute(holder) ? this.getAttributeBaseValue(holder) : 0.0; - ItemAttributeModifiers itemAttributeModifiers = itemStack.getOrDefault(DataComponents.ATTRIBUTE_MODIFIERS, ItemAttributeModifiers.EMPTY); - return itemAttributeModifiers.compute(d, equipmentSlot); + private double getApproximateAttributeWith(ItemStack item, Holder attribute, EquipmentSlot slot) { + double d = this.getAttributes().hasAttribute(attribute) ? this.getAttributeBaseValue(attribute) : 0.0; + ItemAttributeModifiers itemAttributeModifiers = item.getOrDefault(DataComponents.ATTRIBUTE_MODIFIERS, ItemAttributeModifiers.EMPTY); + return itemAttributeModifiers.compute(d, slot); } public boolean canReplaceEqualItem(ItemStack candidate, ItemStack existing) { @@ -688,8 +689,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab return true; } - public boolean wantsToPickUp(ServerLevel serverLevel, ItemStack itemStack) { - return this.canHoldItem(itemStack); + public boolean wantsToPickUp(ServerLevel level, ItemStack stack) { + return this.canHoldItem(stack); } public boolean removeWhenFarAway(double distanceToClosestPlayer) { @@ -777,7 +778,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab DebugPackets.sendGoalSelector(this.level(), this, this.goalSelector); } - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { } /** @@ -841,13 +842,13 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } public static boolean checkMobSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - BlockPos blockPos2 = blockPos.below(); - return EntitySpawnReason.isSpawner(entitySpawnReason) || levelAccessor.getBlockState(blockPos2).isValidSpawn(levelAccessor, blockPos2, entityType); + BlockPos blockPos = pos.below(); + return EntitySpawnReason.isSpawner(spawnReason) || level.getBlockState(blockPos).isValidSpawn(level, blockPos, entityType); } - public boolean checkSpawnRules(LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason) { + public boolean checkSpawnRules(LevelAccessor level, EntitySpawnReason spawnReason) { return true; } @@ -975,23 +976,23 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab }; } - public void dropPreservedEquipment(ServerLevel serverLevel) { - this.dropPreservedEquipment(serverLevel, itemStack -> true); + public void dropPreservedEquipment(ServerLevel level) { + this.dropPreservedEquipment(level, itemStack -> true); } - public Set dropPreservedEquipment(ServerLevel serverLevel, Predicate predicate) { + public Set dropPreservedEquipment(ServerLevel level, Predicate filter) { Set set = new HashSet(); for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES) { ItemStack itemStack = this.getItemBySlot(equipmentSlot); if (!itemStack.isEmpty()) { - if (!predicate.test(itemStack)) { + if (!filter.test(itemStack)) { set.add(equipmentSlot); } else { double d = this.getEquipmentDropChance(equipmentSlot); if (d > 1.0) { this.setItemSlot(equipmentSlot, ItemStack.EMPTY); - this.spawnAtLocation(serverLevel, itemStack); + this.spawnAtLocation(level, itemStack); } } } @@ -1136,9 +1137,9 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Nullable public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - RandomSource randomSource = serverLevelAccessor.getRandom(); + RandomSource randomSource = level.getRandom(); AttributeInstance attributeInstance = (AttributeInstance)Objects.requireNonNull(this.getAttribute(Attributes.FOLLOW_RANGE)); if (!attributeInstance.hasModifier(RANDOM_SPAWN_BONUS_ID)) { attributeInstance.addPermanentModifier( @@ -1181,7 +1182,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } @Override - protected boolean canDispenserEquipIntoSlot(EquipmentSlot equipmentSlot) { + protected boolean canDispenserEquipIntoSlot(EquipmentSlot slot) { return this.canPickUpLoot(); } @@ -1283,12 +1284,12 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Nullable public T convertTo( - EntityType entityType, ConversionParams conversionParams, EntitySpawnReason entitySpawnReason, ConversionParams.AfterConversion afterConversion + EntityType entityType, ConversionParams conversionParams, EntitySpawnReason spawnReason, ConversionParams.AfterConversion afterConversion ) { if (this.isRemoved()) { return null; } else { - T mob = (T)entityType.create(this.level(), entitySpawnReason); + T mob = (T)entityType.create(this.level(), spawnReason); if (mob == null) { return null; } else { @@ -1308,8 +1309,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } @Nullable - public T convertTo(EntityType entityType, ConversionParams conversionParams, ConversionParams.AfterConversion afterConversion) { - return this.convertTo(entityType, conversionParams, EntitySpawnReason.CONVERSION, afterConversion); + public T convertTo(EntityType entityType, ConversionParams coversionParams, ConversionParams.AfterConversion afterConversion) { + return this.convertTo(entityType, coversionParams, EntitySpawnReason.CONVERSION, afterConversion); } @Nullable @@ -1334,7 +1335,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Override public void leashTooFarBehaviour() { Leashable.super.leashTooFarBehaviour(); - this.goalSelector.disableControlFlag(Goal.Flag.MOVE); + this.goalSelector.disableControlFlag(Flag.MOVE); } @Override @@ -1422,26 +1423,26 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { + public boolean doHurtTarget(ServerLevel level, Entity source) { float f = (float)this.getAttributeValue(Attributes.ATTACK_DAMAGE); ItemStack itemStack = this.getWeaponItem(); DamageSource damageSource = (DamageSource)Optional.ofNullable(itemStack.getItem().getDamageSource(this)).orElse(this.damageSources().mobAttack(this)); - f = EnchantmentHelper.modifyDamage(serverLevel, itemStack, entity, damageSource, f); - f += itemStack.getItem().getAttackDamageBonus(entity, f, damageSource); - boolean bl = entity.hurtServer(serverLevel, damageSource, f); + f = EnchantmentHelper.modifyDamage(level, itemStack, source, damageSource, f); + f += itemStack.getItem().getAttackDamageBonus(source, f, damageSource); + boolean bl = source.hurtServer(level, damageSource, f); if (bl) { - float g = this.getKnockback(entity, damageSource); - if (g > 0.0F && entity instanceof LivingEntity livingEntity) { + float g = this.getKnockback(source, damageSource); + if (g > 0.0F && source instanceof LivingEntity livingEntity) { livingEntity.knockback(g * 0.5F, Mth.sin(this.getYRot() * (float) (Math.PI / 180.0)), -Mth.cos(this.getYRot() * (float) (Math.PI / 180.0))); this.setDeltaMovement(this.getDeltaMovement().multiply(0.6, 1.0, 0.6)); } - if (entity instanceof LivingEntity livingEntity) { + if (source instanceof LivingEntity livingEntity) { itemStack.hurtEnemy(livingEntity, this); } - EnchantmentHelper.doPostAttackEffects(serverLevel, entity, damageSource); - this.setLastHurtMob(entity); + EnchantmentHelper.doPostAttackEffects(level, source, damageSource); + this.setLastHurtMob(source); this.playAttackSound(); } diff --git a/net/minecraft/world/entity/NeutralMob.java b/net/minecraft/world/entity/NeutralMob.java index cce694d3..78a74d83 100644 --- a/net/minecraft/world/entity/NeutralMob.java +++ b/net/minecraft/world/entity/NeutralMob.java @@ -75,26 +75,24 @@ public interface NeutralMob { } } - default boolean isAngryAt(LivingEntity livingEntity, ServerLevel serverLevel) { - if (!this.canAttack(livingEntity)) { + default boolean isAngryAt(LivingEntity entity, ServerLevel level) { + if (!this.canAttack(entity)) { return false; } else { - return livingEntity.getType() == EntityType.PLAYER && this.isAngryAtAllPlayers(serverLevel) - ? true - : livingEntity.getUUID().equals(this.getPersistentAngerTarget()); + return entity.getType() == EntityType.PLAYER && this.isAngryAtAllPlayers(level) ? true : entity.getUUID().equals(this.getPersistentAngerTarget()); } } - default boolean isAngryAtAllPlayers(ServerLevel serverLevel) { - return serverLevel.getGameRules().getBoolean(GameRules.RULE_UNIVERSAL_ANGER) && this.isAngry() && this.getPersistentAngerTarget() == null; + default boolean isAngryAtAllPlayers(ServerLevel level) { + return level.getGameRules().getBoolean(GameRules.RULE_UNIVERSAL_ANGER) && this.isAngry() && this.getPersistentAngerTarget() == null; } default boolean isAngry() { return this.getRemainingPersistentAngerTime() > 0; } - default void playerDied(ServerLevel serverLevel, Player player) { - if (serverLevel.getGameRules().getBoolean(GameRules.RULE_FORGIVE_DEAD_PLAYERS)) { + default void playerDied(ServerLevel level, Player player) { + if (level.getGameRules().getBoolean(GameRules.RULE_FORGIVE_DEAD_PLAYERS)) { if (player.getUUID().equals(this.getPersistentAngerTarget())) { this.stopBeingAngry(); } diff --git a/net/minecraft/world/entity/OminousItemSpawner.java b/net/minecraft/world/entity/OminousItemSpawner.java index 0b7f3f73..ef58ebb9 100644 --- a/net/minecraft/world/entity/OminousItemSpawner.java +++ b/net/minecraft/world/entity/OminousItemSpawner.java @@ -52,14 +52,14 @@ public class OminousItemSpawner extends Entity { } } - private void tickServer(ServerLevel serverLevel) { + private void tickServer(ServerLevel level) { if (this.tickCount == this.spawnItemAfterTicks - 36L) { - serverLevel.playSound(null, this.blockPosition(), SoundEvents.TRIAL_SPAWNER_ABOUT_TO_SPAWN_ITEM, SoundSource.NEUTRAL); + level.playSound(null, this.blockPosition(), SoundEvents.TRIAL_SPAWNER_ABOUT_TO_SPAWN_ITEM, SoundSource.NEUTRAL); } if (this.tickCount >= this.spawnItemAfterTicks) { this.spawnItem(); - this.kill(serverLevel); + this.kill(level); } } @@ -88,14 +88,14 @@ public class OminousItemSpawner extends Entity { } } - private Entity spawnProjectile(ServerLevel serverLevel, ProjectileItem projectileItem, ItemStack itemStack) { + private Entity spawnProjectile(ServerLevel level, ProjectileItem projectileItem, ItemStack stack) { DispenseConfig dispenseConfig = projectileItem.createDispenseConfig(); - dispenseConfig.overrideDispenseEvent().ifPresent(i -> serverLevel.levelEvent(i, this.blockPosition(), 0)); + dispenseConfig.overrideDispenseEvent().ifPresent(i -> level.levelEvent(i, this.blockPosition(), 0)); Direction direction = Direction.DOWN; Projectile projectile = Projectile.spawnProjectileUsingShoot( - projectileItem.asProjectile(serverLevel, this.position(), itemStack, direction), - serverLevel, - itemStack, + projectileItem.asProjectile(level, this.position(), stack, direction), + level, + stack, direction.getStepX(), direction.getStepY(), direction.getStepZ(), @@ -112,21 +112,21 @@ public class OminousItemSpawner extends Entity { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - ItemStack itemStack = compound.contains("item", 10) - ? (ItemStack)ItemStack.parse(this.registryAccess(), compound.getCompound("item")).orElse(ItemStack.EMPTY) + protected void readAdditionalSaveData(CompoundTag tag) { + ItemStack itemStack = tag.contains("item", 10) + ? (ItemStack)ItemStack.parse(this.registryAccess(), tag.getCompound("item")).orElse(ItemStack.EMPTY) : ItemStack.EMPTY; this.setItem(itemStack); - this.spawnItemAfterTicks = compound.getLong("spawn_item_after_ticks"); + this.spawnItemAfterTicks = tag.getLong("spawn_item_after_ticks"); } @Override - protected void addAdditionalSaveData(CompoundTag compound) { + protected void addAdditionalSaveData(CompoundTag tag) { if (!this.getItem().isEmpty()) { - compound.put("item", this.getItem().save(this.registryAccess()).copy()); + tag.put("item", this.getItem().save(this.registryAccess()).copy()); } - compound.putLong("spawn_item_after_ticks", this.spawnItemAfterTicks); + tag.putLong("spawn_item_after_ticks", this.spawnItemAfterTicks); } @Override @@ -179,7 +179,7 @@ public class OminousItemSpawner extends Entity { } @Override - public final boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { return false; } } diff --git a/net/minecraft/world/entity/PathfinderMob.java b/net/minecraft/world/entity/PathfinderMob.java index 41106bc8..26764ed8 100644 --- a/net/minecraft/world/entity/PathfinderMob.java +++ b/net/minecraft/world/entity/PathfinderMob.java @@ -1,9 +1,9 @@ package net.minecraft.world.entity; import net.minecraft.core.BlockPos; -import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ai.goal.PanicGoal; import net.minecraft.world.entity.ai.goal.WrappedGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.memory.MemoryModuleType; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; @@ -26,8 +26,8 @@ public abstract class PathfinderMob extends Mob { } @Override - public boolean checkSpawnRules(LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason) { - return this.getWalkTargetValue(this.blockPosition(), levelAccessor) >= 0.0F; + public boolean checkSpawnRules(LevelAccessor level, EntitySpawnReason spawnReason) { + return this.getWalkTargetValue(this.blockPosition(), level) >= 0.0F; } /** @@ -59,7 +59,7 @@ public abstract class PathfinderMob extends Mob { public void closeRangeLeashBehaviour(Entity entity) { super.closeRangeLeashBehaviour(entity); if (this.shouldStayCloseToLeashHolder() && !this.isPanicking()) { - this.goalSelector.enableControlFlag(Goal.Flag.MOVE); + this.goalSelector.enableControlFlag(Flag.MOVE); float f = 2.0F; float g = this.distanceTo(entity); Vec3 vec3 = new Vec3(entity.getX() - this.getX(), entity.getY() - this.getY(), entity.getZ() - this.getZ()).normalize().scale(Math.max(g - 2.0F, 0.0F)); diff --git a/net/minecraft/world/entity/PortalProcessor.java b/net/minecraft/world/entity/PortalProcessor.java index 5cfb342b..e9f6d785 100644 --- a/net/minecraft/world/entity/PortalProcessor.java +++ b/net/minecraft/world/entity/PortalProcessor.java @@ -29,8 +29,8 @@ public class PortalProcessor { } @Nullable - public TeleportTransition getPortalDestination(ServerLevel serverLevel, Entity entity) { - return this.portal.getPortalDestination(serverLevel, entity, this.entryPosition); + public TeleportTransition getPortalDestination(ServerLevel level, Entity entity) { + return this.portal.getPortalDestination(level, entity, this.entryPosition); } public Portal.Transition getPortalLocalTransition() { diff --git a/net/minecraft/world/entity/PositionMoveRotation.java b/net/minecraft/world/entity/PositionMoveRotation.java index d13497d2..bf513e72 100644 --- a/net/minecraft/world/entity/PositionMoveRotation.java +++ b/net/minecraft/world/entity/PositionMoveRotation.java @@ -34,32 +34,32 @@ public record PositionMoveRotation(Vec3 position, Vec3 deltaMovement, float yRot return new PositionMoveRotation(teleportTransition.position(), teleportTransition.deltaMovement(), teleportTransition.yRot(), teleportTransition.xRot()); } - public static PositionMoveRotation calculateAbsolute(PositionMoveRotation positionMoveRotation, PositionMoveRotation positionMoveRotation2, Set set) { - double d = set.contains(Relative.X) ? positionMoveRotation.position.x : 0.0; - double e = set.contains(Relative.Y) ? positionMoveRotation.position.y : 0.0; - double f = set.contains(Relative.Z) ? positionMoveRotation.position.z : 0.0; - float g = set.contains(Relative.Y_ROT) ? positionMoveRotation.yRot : 0.0F; - float h = set.contains(Relative.X_ROT) ? positionMoveRotation.xRot : 0.0F; - Vec3 vec3 = new Vec3(d + positionMoveRotation2.position.x, e + positionMoveRotation2.position.y, f + positionMoveRotation2.position.z); - float i = g + positionMoveRotation2.yRot; - float j = h + positionMoveRotation2.xRot; - Vec3 vec32 = positionMoveRotation.deltaMovement; - if (set.contains(Relative.ROTATE_DELTA)) { - float k = positionMoveRotation.yRot - i; - float l = positionMoveRotation.xRot - j; + public static PositionMoveRotation calculateAbsolute(PositionMoveRotation current, PositionMoveRotation after, Set relatives) { + double d = relatives.contains(Relative.X) ? current.position.x : 0.0; + double e = relatives.contains(Relative.Y) ? current.position.y : 0.0; + double f = relatives.contains(Relative.Z) ? current.position.z : 0.0; + float g = relatives.contains(Relative.Y_ROT) ? current.yRot : 0.0F; + float h = relatives.contains(Relative.X_ROT) ? current.xRot : 0.0F; + Vec3 vec3 = new Vec3(d + after.position.x, e + after.position.y, f + after.position.z); + float i = g + after.yRot; + float j = h + after.xRot; + Vec3 vec32 = current.deltaMovement; + if (relatives.contains(Relative.ROTATE_DELTA)) { + float k = current.yRot - i; + float l = current.xRot - j; vec32 = vec32.xRot((float)Math.toRadians(l)); vec32 = vec32.yRot((float)Math.toRadians(k)); } Vec3 vec33 = new Vec3( - calculateDelta(vec32.x, positionMoveRotation2.deltaMovement.x, set, Relative.DELTA_X), - calculateDelta(vec32.y, positionMoveRotation2.deltaMovement.y, set, Relative.DELTA_Y), - calculateDelta(vec32.z, positionMoveRotation2.deltaMovement.z, set, Relative.DELTA_Z) + calculateDelta(vec32.x, after.deltaMovement.x, relatives, Relative.DELTA_X), + calculateDelta(vec32.y, after.deltaMovement.y, relatives, Relative.DELTA_Y), + calculateDelta(vec32.z, after.deltaMovement.z, relatives, Relative.DELTA_Z) ); return new PositionMoveRotation(vec3, vec33, i, j); } - private static double calculateDelta(double d, double e, Set set, Relative relative) { - return set.contains(relative) ? d + e : e; + private static double calculateDelta(double position, double deltaMovement, Set relatives, Relative deltaRelative) { + return relatives.contains(deltaRelative) ? position + deltaMovement : deltaMovement; } } diff --git a/net/minecraft/world/entity/Relative.java b/net/minecraft/world/entity/Relative.java index 288acc80..71c3405e 100644 --- a/net/minecraft/world/entity/Relative.java +++ b/net/minecraft/world/entity/Relative.java @@ -35,23 +35,23 @@ public enum Relative { return hashSet; } - private Relative(final int j) { - this.bit = j; + private Relative(final int bit) { + this.bit = bit; } private int getMask() { return 1 << this.bit; } - private boolean isSet(int i) { - return (i & this.getMask()) == this.getMask(); + private boolean isSet(int data) { + return (data & this.getMask()) == this.getMask(); } - public static Set unpack(int i) { + public static Set unpack(int data) { Set set = EnumSet.noneOf(Relative.class); for (Relative relative : values()) { - if (relative.isSet(i)) { + if (relative.isSet(data)) { set.add(relative); } } @@ -59,10 +59,10 @@ public enum Relative { return set; } - public static int pack(Set set) { + public static int pack(Set relatives) { int i = 0; - for (Relative relative : set) { + for (Relative relative : relatives) { i |= relative.getMask(); } diff --git a/net/minecraft/world/entity/Shearable.java b/net/minecraft/world/entity/Shearable.java index 51d7eb6a..ca5b3c3a 100644 --- a/net/minecraft/world/entity/Shearable.java +++ b/net/minecraft/world/entity/Shearable.java @@ -5,7 +5,7 @@ import net.minecraft.sounds.SoundSource; import net.minecraft.world.item.ItemStack; public interface Shearable { - void shear(ServerLevel serverLevel, SoundSource soundSource, ItemStack itemStack); + void shear(ServerLevel level, SoundSource soundSource, ItemStack shears); boolean readyForShearing(); } diff --git a/net/minecraft/world/entity/SpawnPlacements.java b/net/minecraft/world/entity/SpawnPlacements.java index bd0636ab..40336c0c 100644 --- a/net/minecraft/world/entity/SpawnPlacements.java +++ b/net/minecraft/world/entity/SpawnPlacements.java @@ -71,10 +71,10 @@ public class SpawnPlacements { } public static boolean checkSpawnRules( - EntityType entityType, ServerLevelAccessor serverLevelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { SpawnPlacements.Data data = (SpawnPlacements.Data)DATA_BY_TYPE.get(entityType); - return data == null || data.predicate.test(entityType, serverLevelAccessor, entitySpawnReason, blockPos, randomSource); + return data == null || data.predicate.test(entityType, level, spawnReason, pos, random); } static { diff --git a/net/minecraft/world/entity/TamableAnimal.java b/net/minecraft/world/entity/TamableAnimal.java index c00a9ec5..fe7fba65 100644 --- a/net/minecraft/world/entity/TamableAnimal.java +++ b/net/minecraft/world/entity/TamableAnimal.java @@ -52,23 +52,23 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (this.getOwnerUUID() != null) { - compound.putUUID("Owner", this.getOwnerUUID()); + tag.putUUID("Owner", this.getOwnerUUID()); } - compound.putBoolean("Sitting", this.orderedToSit); + tag.putBoolean("Sitting", this.orderedToSit); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); UUID uUID; - if (compound.hasUUID("Owner")) { - uUID = compound.getUUID("Owner"); + if (tag.hasUUID("Owner")) { + uUID = tag.getUUID("Owner"); } else { - String string = compound.getString("Owner"); + String string = tag.getString("Owner"); uUID = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), string); } @@ -81,7 +81,7 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { } } - this.orderedToSit = compound.getBoolean("Sitting"); + this.orderedToSit = tag.getBoolean("Sitting"); this.setInSittingPose(this.orderedToSit); } diff --git a/net/minecraft/world/entity/WalkAnimationState.java b/net/minecraft/world/entity/WalkAnimationState.java index 32fd811e..f1c62f56 100644 --- a/net/minecraft/world/entity/WalkAnimationState.java +++ b/net/minecraft/world/entity/WalkAnimationState.java @@ -12,11 +12,11 @@ public class WalkAnimationState { this.speed = speed; } - public void update(float f, float g, float h) { + public void update(float movementSpeed, float multiplier, float positionScale) { this.speedOld = this.speed; - this.speed = this.speed + (f - this.speed) * g; + this.speed = this.speed + (movementSpeed - this.speed) * multiplier; this.position = this.position + this.speed; - this.positionScale = h; + this.positionScale = positionScale; } public void stop() { diff --git a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java index e5b4771c..be29dadc 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java @@ -110,8 +110,8 @@ public class AttributeInstance { this.permanentModifiers.put(modifier.id(), modifier); } - public void addPermanentModifiers(Collection collection) { - for (AttributeModifier attributeModifier : collection) { + public void addPermanentModifiers(Collection modifiers) { + for (AttributeModifier attributeModifier : modifiers) { this.addPermanentModifier(attributeModifier); } } diff --git a/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/net/minecraft/world/entity/ai/attributes/AttributeMap.java index c2b154c4..efe3628a 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeMap.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeMap.java @@ -117,8 +117,8 @@ public class AttributeMap { }); } - public void assignPermanentModifiers(AttributeMap attributeMap) { - attributeMap.attributes.values().forEach(attributeInstance -> { + public void assignPermanentModifiers(AttributeMap map) { + map.attributes.values().forEach(attributeInstance -> { AttributeInstance attributeInstance2 = this.getInstance(attributeInstance.getAttribute()); if (attributeInstance2 != null) { attributeInstance2.addPermanentModifiers(attributeInstance.getPermanentModifiers()); diff --git a/net/minecraft/world/entity/ai/behavior/GiveGiftToHero.java b/net/minecraft/world/entity/ai/behavior/GiveGiftToHero.java index 2c376f28..1f15025e 100644 --- a/net/minecraft/world/entity/ai/behavior/GiveGiftToHero.java +++ b/net/minecraft/world/entity/ai/behavior/GiveGiftToHero.java @@ -100,9 +100,9 @@ public class GiveGiftToHero extends Behavior { entity.getBrain().eraseMemory(MemoryModuleType.LOOK_TARGET); } - private void throwGift(ServerLevel serverLevel, Villager villager, LivingEntity livingEntity) { + private void throwGift(ServerLevel level, Villager villager, LivingEntity target) { villager.dropFromGiftLootTable( - serverLevel, getLootTableToThrow(villager), (serverLevelx, itemStack) -> BehaviorUtils.throwItem(villager, itemStack, livingEntity.position()) + level, getLootTableToThrow(villager), (serverLevel, itemStack) -> BehaviorUtils.throwItem(villager, itemStack, target.position()) ); } diff --git a/net/minecraft/world/entity/ai/behavior/MeleeAttack.java b/net/minecraft/world/entity/ai/behavior/MeleeAttack.java index 85d033b7..5281863c 100644 --- a/net/minecraft/world/entity/ai/behavior/MeleeAttack.java +++ b/net/minecraft/world/entity/ai/behavior/MeleeAttack.java @@ -11,11 +11,11 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ProjectileWeaponItem; public class MeleeAttack { - public static OneShot create(int cooldownBetweenAttacks) { - return create(mob -> true, cooldownBetweenAttacks); + public static OneShot create(int attackCooldown) { + return create(mob -> true, attackCooldown); } - public static OneShot create(Predicate predicate, int i) { + public static OneShot create(Predicate canAttack, int attackCooldown) { return BehaviorBuilder.create( instance -> instance.group( instance.registered(MemoryModuleType.LOOK_TARGET), @@ -27,14 +27,14 @@ public class MeleeAttack { instance, (memoryAccessor, memoryAccessor2, memoryAccessor3, memoryAccessor4) -> (serverLevel, mob, l) -> { LivingEntity livingEntity = instance.get(memoryAccessor2); - if (predicate.test(mob) + if (canAttack.test(mob) && !isHoldingUsableProjectileWeapon(mob) && mob.isWithinMeleeAttackRange(livingEntity) && instance.get(memoryAccessor4).contains(livingEntity)) { memoryAccessor.set(new EntityTracker(livingEntity, true)); mob.swing(InteractionHand.MAIN_HAND); mob.doHurtTarget(serverLevel, livingEntity); - memoryAccessor3.setWithExpiry(true, i); + memoryAccessor3.setWithExpiry(true, attackCooldown); return true; } else { return false; diff --git a/net/minecraft/world/entity/ai/behavior/StartAttacking.java b/net/minecraft/world/entity/ai/behavior/StartAttacking.java index e79565d6..de913dad 100644 --- a/net/minecraft/world/entity/ai/behavior/StartAttacking.java +++ b/net/minecraft/world/entity/ai/behavior/StartAttacking.java @@ -12,13 +12,11 @@ public class StartAttacking { return create((serverLevel, mob) -> true, targetFinder); } - public static BehaviorControl create( - StartAttacking.StartAttackingCondition startAttackingCondition, StartAttacking.TargetFinder targetFinder - ) { + public static BehaviorControl create(StartAttacking.StartAttackingCondition condition, StartAttacking.TargetFinder targetFinder) { return BehaviorBuilder.create( instance -> instance.group(instance.absent(MemoryModuleType.ATTACK_TARGET), instance.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE)) .apply(instance, (memoryAccessor, memoryAccessor2) -> (serverLevel, mob, l) -> { - if (!startAttackingCondition.test(serverLevel, (E)mob)) { + if (!condition.test(serverLevel, (E)mob)) { return false; } else { Optional optional = targetFinder.get(serverLevel, (E)mob); diff --git a/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java b/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java index c9818452..0a4cab63 100644 --- a/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java +++ b/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java @@ -10,12 +10,12 @@ import net.minecraft.world.entity.ai.memory.MemoryModuleType; public class StopAttackingIfTargetInvalid { private static final int TIMEOUT_TO_GET_WITHIN_ATTACK_RANGE = 200; - public static BehaviorControl create(StopAttackingIfTargetInvalid.TargetErasedCallback targetErasedCallback) { - return create((serverLevel, livingEntity) -> false, targetErasedCallback, true); + public static BehaviorControl create(StopAttackingIfTargetInvalid.TargetErasedCallback onStopAttacking) { + return create((serverLevel, livingEntity) -> false, onStopAttacking, true); } - public static BehaviorControl create(StopAttackingIfTargetInvalid.StopAttackCondition stopAttackCondition) { - return create(stopAttackCondition, (serverLevel, mob, livingEntity) -> {}, true); + public static BehaviorControl create(StopAttackingIfTargetInvalid.StopAttackCondition canStopAttacking) { + return create(canStopAttacking, (serverLevel, mob, livingEntity) -> {}, true); } public static BehaviorControl create() { @@ -23,7 +23,9 @@ public class StopAttackingIfTargetInvalid { } public static BehaviorControl create( - StopAttackingIfTargetInvalid.StopAttackCondition stopAttackCondition, StopAttackingIfTargetInvalid.TargetErasedCallback targetErasedCallback, boolean bl + StopAttackingIfTargetInvalid.StopAttackCondition canStopAttacking, + StopAttackingIfTargetInvalid.TargetErasedCallback onStopAttacking, + boolean canGrowTiredOfTryingToReachTarget ) { return BehaviorBuilder.create( instance -> instance.group(instance.present(MemoryModuleType.ATTACK_TARGET), instance.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE)) @@ -32,13 +34,13 @@ public class StopAttackingIfTargetInvalid { (memoryAccessor, memoryAccessor2) -> (serverLevel, mob, l) -> { LivingEntity livingEntity = instance.get(memoryAccessor); if (mob.canAttack(livingEntity) - && (!bl || !isTiredOfTryingToReachTarget(mob, instance.tryGet(memoryAccessor2))) + && (!canGrowTiredOfTryingToReachTarget || !isTiredOfTryingToReachTarget(mob, instance.tryGet(memoryAccessor2))) && livingEntity.isAlive() && livingEntity.level() == mob.level() - && !stopAttackCondition.test(serverLevel, livingEntity)) { + && !canStopAttacking.test(serverLevel, livingEntity)) { return true; } else { - targetErasedCallback.accept(serverLevel, (E)mob, livingEntity); + onStopAttacking.accept(serverLevel, (E)mob, livingEntity); memoryAccessor.erase(); return true; } diff --git a/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java b/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java index 87270545..ef76c271 100644 --- a/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java +++ b/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java @@ -74,7 +74,7 @@ public class WorkAtComposter extends WorkAtPoi { level.levelEvent(1500, pos, postState != preState ? 1 : 0); } - private void makeBread(ServerLevel serverLevel, Villager villager) { + private void makeBread(ServerLevel level, Villager villager) { SimpleContainer simpleContainer = villager.getInventory(); if (simpleContainer.countItem(Items.BREAD) <= 36) { int i = simpleContainer.countItem(Items.WHEAT); @@ -86,7 +86,7 @@ public class WorkAtComposter extends WorkAtPoi { simpleContainer.removeItemType(Items.WHEAT, m); ItemStack itemStack = simpleContainer.addItem(new ItemStack(Items.BREAD, l)); if (!itemStack.isEmpty()) { - villager.spawnAtLocation(serverLevel, itemStack, 0.5F); + villager.spawnAtLocation(level, itemStack, 0.5F); } } } diff --git a/net/minecraft/world/entity/ai/control/Control.java b/net/minecraft/world/entity/ai/control/Control.java index 49b686ea..ca118494 100644 --- a/net/minecraft/world/entity/ai/control/Control.java +++ b/net/minecraft/world/entity/ai/control/Control.java @@ -3,9 +3,9 @@ package net.minecraft.world.entity.ai.control; import net.minecraft.util.Mth; public interface Control { - default float rotateTowards(float f, float g, float h) { - float i = Mth.degreesDifference(f, g); - float j = Mth.clamp(i, -h, h); - return f + j; + default float rotateTowards(float current, float wanted, float maxSpeed) { + float f = Mth.degreesDifference(current, wanted); + float g = Mth.clamp(f, -maxSpeed, maxSpeed); + return current + g; } } diff --git a/net/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.java b/net/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.java index d48de988..21835a26 100644 --- a/net/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.java +++ b/net/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.java @@ -5,7 +5,7 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.Mob; -import net.minecraft.world.entity.ai.goal.Goal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.targeting.TargetingConditions; import net.minecraft.world.entity.player.Player; import net.minecraft.world.phys.AABB; @@ -26,19 +26,21 @@ public class NearestAttackableTargetGoal extends TargetG this(mob, targetType, 10, mustSee, false, null); } - public NearestAttackableTargetGoal(Mob mob, Class class_, boolean bl, TargetingConditions.Selector selector) { - this(mob, class_, 10, bl, false, selector); + public NearestAttackableTargetGoal(Mob mob, Class targetType, boolean mustSee, TargetingConditions.Selector selector) { + this(mob, targetType, 10, mustSee, false, selector); } public NearestAttackableTargetGoal(Mob mob, Class targetType, boolean mustSee, boolean mustReach) { this(mob, targetType, 10, mustSee, mustReach, null); } - public NearestAttackableTargetGoal(Mob mob, Class class_, int i, boolean bl, boolean bl2, @Nullable TargetingConditions.Selector selector) { - super(mob, bl, bl2); - this.targetType = class_; - this.randomInterval = reducedTickDelay(i); - this.setFlags(EnumSet.of(Goal.Flag.TARGET)); + public NearestAttackableTargetGoal( + Mob mob, Class targetType, int interval, boolean mustSee, boolean mustReach, @Nullable TargetingConditions.Selector selector + ) { + super(mob, mustSee, mustReach); + this.targetType = targetType; + this.randomInterval = reducedTickDelay(interval); + this.setFlags(EnumSet.of(Flag.TARGET)); this.targetConditions = TargetingConditions.forCombat().range(this.getFollowDistance()).selector(selector); } diff --git a/net/minecraft/world/entity/ai/goal/target/NearestAttackableWitchTargetGoal.java b/net/minecraft/world/entity/ai/goal/target/NearestAttackableWitchTargetGoal.java index ebc577c4..307a2649 100644 --- a/net/minecraft/world/entity/ai/goal/target/NearestAttackableWitchTargetGoal.java +++ b/net/minecraft/world/entity/ai/goal/target/NearestAttackableWitchTargetGoal.java @@ -8,12 +8,14 @@ import org.jetbrains.annotations.Nullable; public class NearestAttackableWitchTargetGoal extends NearestAttackableTargetGoal { private boolean canAttack = true; - public NearestAttackableWitchTargetGoal(Raider raider, Class class_, int i, boolean bl, boolean bl2, @Nullable TargetingConditions.Selector selector) { - super(raider, class_, i, bl, bl2, selector); + public NearestAttackableWitchTargetGoal( + Raider raider, Class targetType, int interval, boolean mustSee, boolean mustReach, @Nullable TargetingConditions.Selector selector + ) { + super(raider, targetType, interval, mustSee, mustReach, selector); } - public void setCanAttack(boolean active) { - this.canAttack = active; + public void setCanAttack(boolean canAttack) { + this.canAttack = canAttack; } @Override diff --git a/net/minecraft/world/entity/ai/goal/target/NearestHealableRaiderTargetGoal.java b/net/minecraft/world/entity/ai/goal/target/NearestHealableRaiderTargetGoal.java index ccdb135d..5f5cbbbe 100644 --- a/net/minecraft/world/entity/ai/goal/target/NearestHealableRaiderTargetGoal.java +++ b/net/minecraft/world/entity/ai/goal/target/NearestHealableRaiderTargetGoal.java @@ -9,8 +9,8 @@ public class NearestHealableRaiderTargetGoal extends Nea private static final int DEFAULT_COOLDOWN = 200; private int cooldown = 0; - public NearestHealableRaiderTargetGoal(Raider raider, Class class_, boolean bl, @Nullable TargetingConditions.Selector selector) { - super(raider, class_, 500, bl, false, selector); + public NearestHealableRaiderTargetGoal(Raider raider, Class targetType, boolean mustSee, @Nullable TargetingConditions.Selector selector) { + super(raider, targetType, 500, mustSee, false, selector); } public int getCooldown() { diff --git a/net/minecraft/world/entity/ai/goal/target/NonTameRandomTargetGoal.java b/net/minecraft/world/entity/ai/goal/target/NonTameRandomTargetGoal.java index 9848f704..d2882576 100644 --- a/net/minecraft/world/entity/ai/goal/target/NonTameRandomTargetGoal.java +++ b/net/minecraft/world/entity/ai/goal/target/NonTameRandomTargetGoal.java @@ -8,9 +8,9 @@ import org.jetbrains.annotations.Nullable; public class NonTameRandomTargetGoal extends NearestAttackableTargetGoal { private final TamableAnimal tamableMob; - public NonTameRandomTargetGoal(TamableAnimal tamableAnimal, Class class_, boolean bl, @Nullable TargetingConditions.Selector selector) { - super(tamableAnimal, class_, 10, bl, false, selector); - this.tamableMob = tamableAnimal; + public NonTameRandomTargetGoal(TamableAnimal tamableMob, Class targetType, boolean mustSee, @Nullable TargetingConditions.Selector selector) { + super(tamableMob, targetType, 10, mustSee, false, selector); + this.tamableMob = tamableMob; } @Override diff --git a/net/minecraft/world/entity/ai/memory/NearestVisibleLivingEntities.java b/net/minecraft/world/entity/ai/memory/NearestVisibleLivingEntities.java index 845f37cb..79f883d0 100644 --- a/net/minecraft/world/entity/ai/memory/NearestVisibleLivingEntities.java +++ b/net/minecraft/world/entity/ai/memory/NearestVisibleLivingEntities.java @@ -20,11 +20,11 @@ public class NearestVisibleLivingEntities { this.lineOfSightTest = livingEntity -> false; } - public NearestVisibleLivingEntities(ServerLevel serverLevel, LivingEntity livingEntity, List list) { - this.nearbyEntities = list; - Object2BooleanOpenHashMap object2BooleanOpenHashMap = new Object2BooleanOpenHashMap<>(list.size()); - Predicate predicate = livingEntity2 -> Sensor.isEntityTargetable(serverLevel, livingEntity, livingEntity2); - this.lineOfSightTest = livingEntityx -> object2BooleanOpenHashMap.computeIfAbsent(livingEntityx, predicate); + public NearestVisibleLivingEntities(ServerLevel level, LivingEntity entity, List nearbyEntities) { + this.nearbyEntities = nearbyEntities; + Object2BooleanOpenHashMap object2BooleanOpenHashMap = new Object2BooleanOpenHashMap<>(nearbyEntities.size()); + Predicate predicate = livingEntity2 -> Sensor.isEntityTargetable(level, entity, livingEntity2); + this.lineOfSightTest = livingEntity -> object2BooleanOpenHashMap.computeIfAbsent(livingEntity, predicate); } public static NearestVisibleLivingEntities empty() { diff --git a/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/net/minecraft/world/entity/ai/navigation/PathNavigation.java index 4fd8564e..c0865f9c 100644 --- a/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -75,8 +75,8 @@ public abstract class PathNavigation { this.pathFinder.setMaxVisitedNodes(i); } - public void setRequiredPathLength(float f) { - this.requiredPathLength = f; + public void setRequiredPathLength(float requiredPathLength) { + this.requiredPathLength = requiredPathLength; this.updatePathfinderMaxVisitedNodes(); } diff --git a/net/minecraft/world/entity/ai/sensing/AxolotlAttackablesSensor.java b/net/minecraft/world/entity/ai/sensing/AxolotlAttackablesSensor.java index 13559d30..097c6cb1 100644 --- a/net/minecraft/world/entity/ai/sensing/AxolotlAttackablesSensor.java +++ b/net/minecraft/world/entity/ai/sensing/AxolotlAttackablesSensor.java @@ -9,11 +9,11 @@ public class AxolotlAttackablesSensor extends NearestVisibleLivingEntitySensor { public static final float TARGET_DETECTION_DISTANCE = 8.0F; @Override - protected boolean isMatchingEntity(ServerLevel serverLevel, LivingEntity livingEntity, LivingEntity livingEntity2) { - return this.isClose(livingEntity, livingEntity2) - && livingEntity2.isInWaterOrBubble() - && (this.isHostileTarget(livingEntity2) || this.isHuntTarget(livingEntity, livingEntity2)) - && Sensor.isEntityAttackable(serverLevel, livingEntity, livingEntity2); + protected boolean isMatchingEntity(ServerLevel level, LivingEntity entity, LivingEntity target) { + return this.isClose(entity, target) + && target.isInWaterOrBubble() + && (this.isHostileTarget(target) || this.isHuntTarget(entity, target)) + && Sensor.isEntityAttackable(level, entity, target); } private boolean isHuntTarget(LivingEntity attacker, LivingEntity target) { diff --git a/net/minecraft/world/entity/ai/sensing/FrogAttackablesSensor.java b/net/minecraft/world/entity/ai/sensing/FrogAttackablesSensor.java index 6bc23ad4..e1ae132a 100644 --- a/net/minecraft/world/entity/ai/sensing/FrogAttackablesSensor.java +++ b/net/minecraft/world/entity/ai/sensing/FrogAttackablesSensor.java @@ -12,12 +12,12 @@ public class FrogAttackablesSensor extends NearestVisibleLivingEntitySensor { public static final float TARGET_DETECTION_DISTANCE = 10.0F; @Override - protected boolean isMatchingEntity(ServerLevel serverLevel, LivingEntity livingEntity, LivingEntity livingEntity2) { - return !livingEntity.getBrain().hasMemoryValue(MemoryModuleType.HAS_HUNTING_COOLDOWN) - && Sensor.isEntityAttackable(serverLevel, livingEntity, livingEntity2) - && Frog.canEat(livingEntity2) - && !this.isUnreachableAttackTarget(livingEntity, livingEntity2) - ? livingEntity2.closerThan(livingEntity, 10.0) + protected boolean isMatchingEntity(ServerLevel level, LivingEntity entity, LivingEntity target) { + return !entity.getBrain().hasMemoryValue(MemoryModuleType.HAS_HUNTING_COOLDOWN) + && Sensor.isEntityAttackable(level, entity, target) + && Frog.canEat(target) + && !this.isUnreachableAttackTarget(entity, target) + ? target.closerThan(entity, 10.0) : false; } diff --git a/net/minecraft/world/entity/ai/sensing/NearestVisibleLivingEntitySensor.java b/net/minecraft/world/entity/ai/sensing/NearestVisibleLivingEntitySensor.java index 1a907b88..0a5bf561 100644 --- a/net/minecraft/world/entity/ai/sensing/NearestVisibleLivingEntitySensor.java +++ b/net/minecraft/world/entity/ai/sensing/NearestVisibleLivingEntitySensor.java @@ -9,7 +9,7 @@ import net.minecraft.world.entity.ai.memory.MemoryModuleType; import net.minecraft.world.entity.ai.memory.NearestVisibleLivingEntities; public abstract class NearestVisibleLivingEntitySensor extends Sensor { - protected abstract boolean isMatchingEntity(ServerLevel serverLevel, LivingEntity livingEntity, LivingEntity livingEntity2); + protected abstract boolean isMatchingEntity(ServerLevel level, LivingEntity entity, LivingEntity target); protected abstract MemoryModuleType getMemory(); @@ -23,11 +23,9 @@ public abstract class NearestVisibleLivingEntitySensor extends Sensor getNearestEntity(ServerLevel serverLevel, LivingEntity livingEntity) { - return this.getVisibleEntities(livingEntity) - .flatMap( - nearestVisibleLivingEntities -> nearestVisibleLivingEntities.findClosest(livingEntity2 -> this.isMatchingEntity(serverLevel, livingEntity, livingEntity2)) - ); + private Optional getNearestEntity(ServerLevel level, LivingEntity enttiy) { + return this.getVisibleEntities(enttiy) + .flatMap(nearestVisibleLivingEntities -> nearestVisibleLivingEntities.findClosest(livingEntity2 -> this.isMatchingEntity(level, enttiy, livingEntity2))); } protected Optional getVisibleEntities(LivingEntity entity) { diff --git a/net/minecraft/world/entity/ai/sensing/PlayerSensor.java b/net/minecraft/world/entity/ai/sensing/PlayerSensor.java index 91ee8020..c30ec754 100644 --- a/net/minecraft/world/entity/ai/sensing/PlayerSensor.java +++ b/net/minecraft/world/entity/ai/sensing/PlayerSensor.java @@ -36,7 +36,7 @@ public class PlayerSensor extends Sensor { brain.setMemory(MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, optional); } - protected double getFollowDistance(LivingEntity livingEntity) { - return livingEntity.getAttributeValue(Attributes.FOLLOW_RANGE); + protected double getFollowDistance(LivingEntity entity) { + return entity.getAttributeValue(Attributes.FOLLOW_RANGE); } } diff --git a/net/minecraft/world/entity/ai/sensing/Sensor.java b/net/minecraft/world/entity/ai/sensing/Sensor.java index c793a4a7..b1d595d7 100644 --- a/net/minecraft/world/entity/ai/sensing/Sensor.java +++ b/net/minecraft/world/entity/ai/sensing/Sensor.java @@ -47,8 +47,8 @@ public abstract class Sensor { } } - private void updateTargetingConditionRanges(E livingEntity) { - double d = livingEntity.getAttributeValue(Attributes.FOLLOW_RANGE); + private void updateTargetingConditionRanges(E entity) { + double d = entity.getAttributeValue(Attributes.FOLLOW_RANGE); TARGET_CONDITIONS.range(d); TARGET_CONDITIONS_IGNORE_INVISIBILITY_TESTING.range(d); ATTACK_TARGET_CONDITIONS.range(d); @@ -61,33 +61,33 @@ public abstract class Sensor { public abstract Set> requires(); - public static boolean isEntityTargetable(ServerLevel serverLevel, LivingEntity livingEntity, LivingEntity livingEntity2) { - return livingEntity.getBrain().isMemoryValue(MemoryModuleType.ATTACK_TARGET, livingEntity2) - ? TARGET_CONDITIONS_IGNORE_INVISIBILITY_TESTING.test(serverLevel, livingEntity, livingEntity2) - : TARGET_CONDITIONS.test(serverLevel, livingEntity, livingEntity2); + public static boolean isEntityTargetable(ServerLevel level, LivingEntity entity, LivingEntity target) { + return entity.getBrain().isMemoryValue(MemoryModuleType.ATTACK_TARGET, target) + ? TARGET_CONDITIONS_IGNORE_INVISIBILITY_TESTING.test(level, entity, target) + : TARGET_CONDITIONS.test(level, entity, target); } - public static boolean isEntityAttackable(ServerLevel serverLevel, LivingEntity livingEntity, LivingEntity livingEntity2) { - return livingEntity.getBrain().isMemoryValue(MemoryModuleType.ATTACK_TARGET, livingEntity2) - ? ATTACK_TARGET_CONDITIONS_IGNORE_INVISIBILITY_TESTING.test(serverLevel, livingEntity, livingEntity2) - : ATTACK_TARGET_CONDITIONS.test(serverLevel, livingEntity, livingEntity2); + public static boolean isEntityAttackable(ServerLevel level, LivingEntity entity, LivingEntity target) { + return entity.getBrain().isMemoryValue(MemoryModuleType.ATTACK_TARGET, target) + ? ATTACK_TARGET_CONDITIONS_IGNORE_INVISIBILITY_TESTING.test(level, entity, target) + : ATTACK_TARGET_CONDITIONS.test(level, entity, target); } - public static BiPredicate wasEntityAttackableLastNTicks(LivingEntity livingEntity, int i) { - return rememberPositives(i, (serverLevel, livingEntity2) -> isEntityAttackable(serverLevel, livingEntity, livingEntity2)); + public static BiPredicate wasEntityAttackableLastNTicks(LivingEntity entity, int ticks) { + return rememberPositives(ticks, (serverLevel, livingEntity2) -> isEntityAttackable(serverLevel, entity, livingEntity2)); } - public static boolean isEntityAttackableIgnoringLineOfSight(ServerLevel serverLevel, LivingEntity livingEntity, LivingEntity livingEntity2) { - return livingEntity.getBrain().isMemoryValue(MemoryModuleType.ATTACK_TARGET, livingEntity2) - ? ATTACK_TARGET_CONDITIONS_IGNORE_INVISIBILITY_AND_LINE_OF_SIGHT.test(serverLevel, livingEntity, livingEntity2) - : ATTACK_TARGET_CONDITIONS_IGNORE_LINE_OF_SIGHT.test(serverLevel, livingEntity, livingEntity2); + public static boolean isEntityAttackableIgnoringLineOfSight(ServerLevel level, LivingEntity entity, LivingEntity target) { + return entity.getBrain().isMemoryValue(MemoryModuleType.ATTACK_TARGET, target) + ? ATTACK_TARGET_CONDITIONS_IGNORE_INVISIBILITY_AND_LINE_OF_SIGHT.test(level, entity, target) + : ATTACK_TARGET_CONDITIONS_IGNORE_LINE_OF_SIGHT.test(level, entity, target); } - static BiPredicate rememberPositives(int i, BiPredicate biPredicate) { + static BiPredicate rememberPositives(int ticks, BiPredicate predicate) { AtomicInteger atomicInteger = new AtomicInteger(0); return (object, object2) -> { - if (biPredicate.test(object, object2)) { - atomicInteger.set(i); + if (predicate.test(object, object2)) { + atomicInteger.set(ticks); return true; } else { return atomicInteger.decrementAndGet() >= 0; diff --git a/net/minecraft/world/entity/ai/sensing/VillagerHostilesSensor.java b/net/minecraft/world/entity/ai/sensing/VillagerHostilesSensor.java index f1019f80..5668019c 100644 --- a/net/minecraft/world/entity/ai/sensing/VillagerHostilesSensor.java +++ b/net/minecraft/world/entity/ai/sensing/VillagerHostilesSensor.java @@ -22,8 +22,8 @@ public class VillagerHostilesSensor extends NearestVisibleLivingEntitySensor { .build(); @Override - protected boolean isMatchingEntity(ServerLevel serverLevel, LivingEntity livingEntity, LivingEntity livingEntity2) { - return this.isHostile(livingEntity2) && this.isClose(livingEntity, livingEntity2); + protected boolean isMatchingEntity(ServerLevel level, LivingEntity entity, LivingEntity target) { + return this.isHostile(target) && this.isClose(entity, target); } private boolean isClose(LivingEntity attacker, LivingEntity target) { diff --git a/net/minecraft/world/entity/ai/targeting/TargetingConditions.java b/net/minecraft/world/entity/ai/targeting/TargetingConditions.java index 487c6630..6c6e2ae4 100644 --- a/net/minecraft/world/entity/ai/targeting/TargetingConditions.java +++ b/net/minecraft/world/entity/ai/targeting/TargetingConditions.java @@ -57,34 +57,33 @@ public class TargetingConditions { return this; } - public boolean test(ServerLevel serverLevel, @Nullable LivingEntity livingEntity, LivingEntity livingEntity2) { - if (livingEntity == livingEntity2) { + public boolean test(ServerLevel level, @Nullable LivingEntity entity, LivingEntity target) { + if (entity == target) { return false; - } else if (!livingEntity2.canBeSeenByAnyone()) { + } else if (!target.canBeSeenByAnyone()) { return false; - } else if (this.selector != null && !this.selector.test(livingEntity2, serverLevel)) { + } else if (this.selector != null && !this.selector.test(target, level)) { return false; } else { - if (livingEntity == null) { - if (this.isCombat && (!livingEntity2.canBeSeenAsEnemy() || serverLevel.getDifficulty() == Difficulty.PEACEFUL)) { + if (entity == null) { + if (this.isCombat && (!target.canBeSeenAsEnemy() || level.getDifficulty() == Difficulty.PEACEFUL)) { return false; } } else { - if (this.isCombat - && (!livingEntity.canAttack(livingEntity2) || !livingEntity.canAttackType(livingEntity2.getType()) || livingEntity.isAlliedTo(livingEntity2))) { + if (this.isCombat && (!entity.canAttack(target) || !entity.canAttackType(target.getType()) || entity.isAlliedTo(target))) { return false; } if (this.range > 0.0) { - double d = this.testInvisible ? livingEntity2.getVisibilityPercent(livingEntity) : 1.0; + double d = this.testInvisible ? target.getVisibilityPercent(entity) : 1.0; double e = Math.max(this.range * d, 2.0); - double f = livingEntity.distanceToSqr(livingEntity2.getX(), livingEntity2.getY(), livingEntity2.getZ()); + double f = entity.distanceToSqr(target.getX(), target.getY(), target.getZ()); if (f > e * e) { return false; } } - if (this.checkLineOfSight && livingEntity instanceof Mob mob && !mob.getSensing().hasLineOfSight(livingEntity2)) { + if (this.checkLineOfSight && entity instanceof Mob mob && !mob.getSensing().hasLineOfSight(target)) { return false; } } @@ -95,6 +94,6 @@ public class TargetingConditions { @FunctionalInterface public interface Selector { - boolean test(LivingEntity livingEntity, ServerLevel serverLevel); + boolean test(LivingEntity entity, ServerLevel level); } } diff --git a/net/minecraft/world/entity/ai/village/poi/PoiRecord.java b/net/minecraft/world/entity/ai/village/poi/PoiRecord.java index cdfc39e5..e36a9335 100644 --- a/net/minecraft/world/entity/ai/village/poi/PoiRecord.java +++ b/net/minecraft/world/entity/ai/village/poi/PoiRecord.java @@ -94,8 +94,8 @@ public class PoiRecord { .apply(instance, PoiRecord.Packed::new) ); - public PoiRecord unpack(Runnable runnable) { - return new PoiRecord(this.pos, this.poiType, this.freeTickets, runnable); + public PoiRecord unpack(Runnable setDirty) { + return new PoiRecord(this.pos, this.poiType, this.freeTickets, setDirty); } } } diff --git a/net/minecraft/world/entity/ai/village/poi/PoiSection.java b/net/minecraft/world/entity/ai/village/poi/PoiSection.java index e48bb39b..b7469f51 100644 --- a/net/minecraft/world/entity/ai/village/poi/PoiSection.java +++ b/net/minecraft/world/entity/ai/village/poi/PoiSection.java @@ -151,8 +151,8 @@ public class PoiSection { .apply(instance, PoiSection.Packed::new) ); - public PoiSection unpack(Runnable runnable) { - return new PoiSection(runnable, this.isValid, this.records.stream().map(packed -> packed.unpack(runnable)).toList()); + public PoiSection unpack(Runnable setDirty) { + return new PoiSection(setDirty, this.isValid, this.records.stream().map(packed -> packed.unpack(setDirty)).toList()); } } } diff --git a/net/minecraft/world/entity/ambient/Bat.java b/net/minecraft/world/entity/ambient/Bat.java index 755882ce..16c8a132 100644 --- a/net/minecraft/world/entity/ambient/Bat.java +++ b/net/minecraft/world/entity/ambient/Bat.java @@ -128,31 +128,31 @@ public class Bat extends AmbientCreature { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { - super.customServerAiStep(serverLevel); + protected void customServerAiStep(ServerLevel level) { + super.customServerAiStep(level); BlockPos blockPos = this.blockPosition(); BlockPos blockPos2 = blockPos.above(); if (this.isResting()) { boolean bl = this.isSilent(); - if (serverLevel.getBlockState(blockPos2).isRedstoneConductor(serverLevel, blockPos)) { + if (level.getBlockState(blockPos2).isRedstoneConductor(level, blockPos)) { if (this.random.nextInt(200) == 0) { this.yHeadRot = this.random.nextInt(360); } - if (serverLevel.getNearestPlayer(BAT_RESTING_TARGETING, this) != null) { + if (level.getNearestPlayer(BAT_RESTING_TARGETING, this) != null) { this.setResting(false); if (!bl) { - serverLevel.levelEvent(null, 1025, blockPos, 0); + level.levelEvent(null, 1025, blockPos, 0); } } } else { this.setResting(false); if (!bl) { - serverLevel.levelEvent(null, 1025, blockPos, 0); + level.levelEvent(null, 1025, blockPos, 0); } } } else { - if (this.targetPosition != null && (!serverLevel.isEmptyBlock(this.targetPosition) || this.targetPosition.getY() <= serverLevel.getMinY())) { + if (this.targetPosition != null && (!level.isEmptyBlock(this.targetPosition) || this.targetPosition.getY() <= level.getMinY())) { this.targetPosition = null; } @@ -174,7 +174,7 @@ public class Bat extends AmbientCreature { float h = Mth.wrapDegrees(g - this.getYRot()); this.zza = 0.5F; this.setYRot(this.getYRot() + h); - if (this.random.nextInt(100) == 0 && serverLevel.getBlockState(blockPos2).isRedstoneConductor(serverLevel, blockPos2)) { + if (this.random.nextInt(100) == 0 && level.getBlockState(blockPos2).isRedstoneConductor(level, blockPos2)) { this.setResting(true); } } @@ -195,37 +195,37 @@ public class Bat extends AmbientCreature { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - if (this.isInvulnerableTo(serverLevel, damageSource)) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + if (this.isInvulnerableTo(level, damageSource)) { return false; } else { if (this.isResting()) { this.setResting(false); } - return super.hurtServer(serverLevel, damageSource, f); + return super.hurtServer(level, damageSource, amount); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.entityData.set(DATA_ID_FLAGS, compound.getByte("BatFlags")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.entityData.set(DATA_ID_FLAGS, tag.getByte("BatFlags")); } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putByte("BatFlags", this.entityData.get(DATA_ID_FLAGS)); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putByte("BatFlags", this.entityData.get(DATA_ID_FLAGS)); } public static boolean checkBatSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource randomSource ) { - if (blockPos.getY() >= levelAccessor.getHeightmapPos(Heightmap.Types.WORLD_SURFACE, blockPos).getY()) { + if (pos.getY() >= level.getHeightmapPos(Heightmap.Types.WORLD_SURFACE, pos).getY()) { return false; } else { - int i = levelAccessor.getMaxLocalRawBrightness(blockPos); + int i = level.getMaxLocalRawBrightness(pos); int j = 4; if (isHalloween()) { j = 7; @@ -236,9 +236,7 @@ public class Bat extends AmbientCreature { if (i > randomSource.nextInt(j)) { return false; } else { - return !levelAccessor.getBlockState(blockPos.below()).is(BlockTags.BATS_SPAWNABLE_ON) - ? false - : checkMobSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource); + return !level.getBlockState(pos.below()).is(BlockTags.BATS_SPAWNABLE_ON) ? false : checkMobSpawnRules(entityType, level, spawnReason, pos, randomSource); } } } diff --git a/net/minecraft/world/entity/animal/AbstractFish.java b/net/minecraft/world/entity/animal/AbstractFish.java index aa68f422..f8dad1c7 100644 --- a/net/minecraft/world/entity/animal/AbstractFish.java +++ b/net/minecraft/world/entity/animal/AbstractFish.java @@ -73,15 +73,15 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("FromBucket", this.fromBucket()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("FromBucket", this.fromBucket()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setFromBucket(compound.getBoolean("FromBucket")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setFromBucket(tag.getBoolean("FromBucket")); } @Override diff --git a/net/minecraft/world/entity/animal/AbstractSchoolingFish.java b/net/minecraft/world/entity/animal/AbstractSchoolingFish.java index 7a02bf60..ee7eb50b 100644 --- a/net/minecraft/world/entity/animal/AbstractSchoolingFish.java +++ b/net/minecraft/world/entity/animal/AbstractSchoolingFish.java @@ -101,9 +101,9 @@ public abstract class AbstractSchoolingFish extends AbstractFish { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); if (spawnGroupData == null) { spawnGroupData = new AbstractSchoolingFish.SchoolSpawnGroupData(this); } else { diff --git a/net/minecraft/world/entity/animal/AgeableWaterCreature.java b/net/minecraft/world/entity/animal/AgeableWaterCreature.java index bff3bb29..fb1dd3f7 100644 --- a/net/minecraft/world/entity/animal/AgeableWaterCreature.java +++ b/net/minecraft/world/entity/animal/AgeableWaterCreature.java @@ -30,13 +30,13 @@ public abstract class AgeableWaterCreature extends AgeableMob { } @Override - public int getBaseExperienceReward(ServerLevel serverLevel) { + public int getBaseExperienceReward(ServerLevel level) { return 1 + this.random.nextInt(3); } - protected void handleAirSupply(int i) { + protected void handleAirSupply(int airSupply) { if (this.isAlive() && !this.isInWaterOrBubble()) { - this.setAirSupply(i - 1); + this.setAirSupply(airSupply - 1); if (this.getAirSupply() == -20) { this.setAirSupply(0); this.hurt(this.damageSources().drown(), 2.0F); @@ -64,17 +64,10 @@ public abstract class AgeableWaterCreature extends AgeableMob { } public static boolean checkSurfaceAgeableWaterCreatureSpawnRules( - EntityType entityType, - LevelAccessor levelAccessor, - EntitySpawnReason entitySpawnReason, - BlockPos blockPos, - RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - int i = levelAccessor.getSeaLevel(); + int i = level.getSeaLevel(); int j = i - 13; - return blockPos.getY() >= j - && blockPos.getY() <= i - && levelAccessor.getFluidState(blockPos.below()).is(FluidTags.WATER) - && levelAccessor.getBlockState(blockPos.above()).is(Blocks.WATER); + return pos.getY() >= j && pos.getY() <= i && level.getFluidState(pos.below()).is(FluidTags.WATER) && level.getBlockState(pos.above()).is(Blocks.WATER); } } diff --git a/net/minecraft/world/entity/animal/Animal.java b/net/minecraft/world/entity/animal/Animal.java index 90cb8f02..5c5fb344 100644 --- a/net/minecraft/world/entity/animal/Animal.java +++ b/net/minecraft/world/entity/animal/Animal.java @@ -51,12 +51,12 @@ public abstract class Animal extends AgeableMob { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { if (this.getAge() != 0) { this.inLove = 0; } - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } @Override @@ -78,9 +78,9 @@ public abstract class Animal extends AgeableMob { } @Override - protected void actuallyHurt(ServerLevel serverLevel, DamageSource damageSource, float f) { + protected void actuallyHurt(ServerLevel level, DamageSource damageSource, float amount) { this.resetLove(); - super.actuallyHurt(serverLevel, damageSource, f); + super.actuallyHurt(level, damageSource, amount); } @Override @@ -89,26 +89,26 @@ public abstract class Animal extends AgeableMob { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("InLove", this.inLove); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("InLove", this.inLove); if (this.loveCause != null) { - compound.putUUID("LoveCause", this.loveCause); + tag.putUUID("LoveCause", this.loveCause); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.inLove = compound.getInt("InLove"); - this.loveCause = compound.hasUUID("LoveCause") ? compound.getUUID("LoveCause") : null; + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.inLove = tag.getInt("InLove"); + this.loveCause = tag.hasUUID("LoveCause") ? tag.getUUID("LoveCause") : null; } public static boolean checkAnimalSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - boolean bl = EntitySpawnReason.ignoresLightRequirements(entitySpawnReason) || isBrightEnoughToSpawn(levelAccessor, blockPos); - return levelAccessor.getBlockState(blockPos.below()).is(BlockTags.ANIMALS_SPAWNABLE_ON) && bl; + boolean bl = EntitySpawnReason.ignoresLightRequirements(spawnReason) || isBrightEnoughToSpawn(level, pos); + return level.getBlockState(pos.below()).is(BlockTags.ANIMALS_SPAWNABLE_ON) && bl; } protected static boolean isBrightEnoughToSpawn(BlockAndTintGetter level, BlockPos pos) { @@ -126,7 +126,7 @@ public abstract class Animal extends AgeableMob { } @Override - protected int getBaseExperienceReward(ServerLevel serverLevel) { + protected int getBaseExperienceReward(ServerLevel level) { return 1 + this.random.nextInt(3); } diff --git a/net/minecraft/world/entity/animal/Bee.java b/net/minecraft/world/entity/animal/Bee.java index 7f8e80dc..238eaf6f 100644 --- a/net/minecraft/world/entity/animal/Bee.java +++ b/net/minecraft/world/entity/animal/Bee.java @@ -53,6 +53,7 @@ import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ai.goal.GoalSelector; import net.minecraft.world.entity.ai.goal.MeleeAttackGoal; import net.minecraft.world.entity.ai.goal.TemptGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.ai.goal.target.ResetUniversalAngerTargetGoal; @@ -187,44 +188,44 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (this.hasHive()) { - compound.put("hive_pos", NbtUtils.writeBlockPos(this.getHivePos())); + tag.put("hive_pos", NbtUtils.writeBlockPos(this.getHivePos())); } if (this.hasSavedFlowerPos()) { - compound.put("flower_pos", NbtUtils.writeBlockPos(this.getSavedFlowerPos())); + tag.put("flower_pos", NbtUtils.writeBlockPos(this.getSavedFlowerPos())); } - compound.putBoolean("HasNectar", this.hasNectar()); - compound.putBoolean("HasStung", this.hasStung()); - compound.putInt("TicksSincePollination", this.ticksWithoutNectarSinceExitingHive); - compound.putInt("CannotEnterHiveTicks", this.stayOutOfHiveCountdown); - compound.putInt("CropsGrownSincePollination", this.numCropsGrownSincePollination); - this.addPersistentAngerSaveData(compound); + tag.putBoolean("HasNectar", this.hasNectar()); + tag.putBoolean("HasStung", this.hasStung()); + tag.putInt("TicksSincePollination", this.ticksWithoutNectarSinceExitingHive); + tag.putInt("CannotEnterHiveTicks", this.stayOutOfHiveCountdown); + tag.putInt("CropsGrownSincePollination", this.numCropsGrownSincePollination); + this.addPersistentAngerSaveData(tag); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setHasNectar(compound.getBoolean("HasNectar")); - this.setHasStung(compound.getBoolean("HasStung")); - this.ticksWithoutNectarSinceExitingHive = compound.getInt("TicksSincePollination"); - this.stayOutOfHiveCountdown = compound.getInt("CannotEnterHiveTicks"); - this.numCropsGrownSincePollination = compound.getInt("CropsGrownSincePollination"); - this.hivePos = (BlockPos)NbtUtils.readBlockPos(compound, "hive_pos").orElse(null); - this.savedFlowerPos = (BlockPos)NbtUtils.readBlockPos(compound, "flower_pos").orElse(null); - this.readPersistentAngerSaveData(this.level(), compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setHasNectar(tag.getBoolean("HasNectar")); + this.setHasStung(tag.getBoolean("HasStung")); + this.ticksWithoutNectarSinceExitingHive = tag.getInt("TicksSincePollination"); + this.stayOutOfHiveCountdown = tag.getInt("CannotEnterHiveTicks"); + this.numCropsGrownSincePollination = tag.getInt("CropsGrownSincePollination"); + this.hivePos = (BlockPos)NbtUtils.readBlockPos(tag, "hive_pos").orElse(null); + this.savedFlowerPos = (BlockPos)NbtUtils.readBlockPos(tag, "flower_pos").orElse(null); + this.readPersistentAngerSaveData(this.level(), tag); } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { + public boolean doHurtTarget(ServerLevel level, Entity source) { DamageSource damageSource = this.damageSources().sting(this); - boolean bl = entity.hurtServer(serverLevel, damageSource, (int)this.getAttributeValue(Attributes.ATTACK_DAMAGE)); + boolean bl = source.hurtServer(level, damageSource, (int)this.getAttributeValue(Attributes.ATTACK_DAMAGE)); if (bl) { - EnchantmentHelper.doPostAttackEffects(serverLevel, entity, damageSource); - if (entity instanceof LivingEntity livingEntity) { + EnchantmentHelper.doPostAttackEffects(level, source, damageSource); + if (source instanceof LivingEntity livingEntity) { livingEntity.setStingerCount(livingEntity.getStingerCount() + 1); int i = 0; if (this.level().getDifficulty() == Difficulty.NORMAL) { @@ -358,7 +359,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { boolean bl = this.hasStung(); if (this.isInWaterOrBubble()) { this.underWaterTicks++; @@ -367,13 +368,13 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { } if (this.underWaterTicks > 20) { - this.hurtServer(serverLevel, this.damageSources().drown(), 1.0F); + this.hurtServer(level, this.damageSources().drown(), 1.0F); } if (bl) { this.timeSinceSting++; if (this.timeSinceSting % 5 == 0 && this.random.nextInt(Mth.clamp(1200 - this.timeSinceSting, 1, 1200)) == 0) { - this.hurtServer(serverLevel, this.damageSources().generic(), this.getHealth()); + this.hurtServer(level, this.damageSources().generic(), this.getHealth()); } } @@ -381,7 +382,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { this.ticksWithoutNectarSinceExitingHive++; } - this.updatePersistentAnger(serverLevel, false); + this.updatePersistentAnger(level, false); } public void resetTicksWithoutNectarSinceExitingHive() { @@ -623,12 +624,12 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - if (this.isInvulnerableTo(serverLevel, damageSource)) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + if (this.isInvulnerableTo(level, damageSource)) { return false; } else { this.beePollinateGoal.stopPollinating(); - return super.hurtServer(serverLevel, damageSource, f); + return super.hurtServer(level, damageSource, amount); } } @@ -752,7 +753,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { private int ticksStuck; BeeGoToHiveGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override @@ -862,7 +863,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { int travellingTicks = Bee.this.level().random.nextInt(10); BeeGoToKnownFlowerGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override @@ -1070,7 +1071,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { private Long2LongOpenHashMap unreachableFlowerCache = new Long2LongOpenHashMap(); BeePollinateGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override @@ -1227,7 +1228,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { class BeeWanderGoal extends Goal { BeeWanderGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override @@ -1292,8 +1293,8 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { return false; } - private boolean isFlower(BlockPos blockPos) { - return Bee.this.level().getBlockState(blockPos).is(BlockTags.FLOWERS); + private boolean isFlower(BlockPos pos) { + return Bee.this.level().getBlockState(pos).is(BlockTags.FLOWERS); } } diff --git a/net/minecraft/world/entity/animal/Cat.java b/net/minecraft/world/entity/animal/Cat.java index 300d6577..96d0576b 100644 --- a/net/minecraft/world/entity/animal/Cat.java +++ b/net/minecraft/world/entity/animal/Cat.java @@ -155,26 +155,26 @@ public class Cat extends TamableAnimal implements VariantHolder ResourceKey.create(Registries.CAT_VARIANT, resourceLocation)) .flatMap(BuiltInRegistries.CAT_VARIANT::get) .ifPresent(this::setVariant); - if (compound.contains("CollarColor", 99)) { - this.setCollarColor(DyeColor.byId(compound.getInt("CollarColor"))); + if (tag.contains("CollarColor", 99)) { + this.setCollarColor(DyeColor.byId(tag.getInt("CollarColor"))); } } @Override - public void customServerAiStep(ServerLevel serverLevel) { + public void customServerAiStep(ServerLevel level) { if (this.getMoveControl().hasWanted()) { double d = this.getMoveControl().getSpeedModifier(); if (d == 0.6) { @@ -338,13 +338,13 @@ public class Cat extends TamableAnimal implements VariantHolder 0.9F; + spawnGroupData = super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); + boolean bl = level.getMoonBrightness() > 0.9F; TagKey tagKey = bl ? CatVariantTags.FULL_MOON_SPAWNS : CatVariantTags.DEFAULT_SPAWNS; - BuiltInRegistries.CAT_VARIANT.getRandomElementOf(tagKey, serverLevelAccessor.getRandom()).ifPresent(this::setVariant); - ServerLevel serverLevel = serverLevelAccessor.getLevel(); + BuiltInRegistries.CAT_VARIANT.getRandomElementOf(tagKey, level.getRandom()).ifPresent(this::setVariant); + ServerLevel serverLevel = level.getLevel(); if (serverLevel.structureManager().getStructureWithPieceAt(this.blockPosition(), StructureTags.CATS_SPAWN_AS_BLACK).isValid()) { this.setVariant(BuiltInRegistries.CAT_VARIANT.getOrThrow(CatVariant.ALL_BLACK)); this.setPersistenceRequired(); diff --git a/net/minecraft/world/entity/animal/Chicken.java b/net/minecraft/world/entity/animal/Chicken.java index b4056dbf..c62da71b 100644 --- a/net/minecraft/world/entity/animal/Chicken.java +++ b/net/minecraft/world/entity/animal/Chicken.java @@ -141,24 +141,24 @@ public class Chicken extends Animal { } @Override - protected int getBaseExperienceReward(ServerLevel serverLevel) { - return this.isChickenJockey() ? 10 : super.getBaseExperienceReward(serverLevel); + protected int getBaseExperienceReward(ServerLevel level) { + return this.isChickenJockey() ? 10 : super.getBaseExperienceReward(level); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.isChickenJockey = compound.getBoolean("IsChickenJockey"); - if (compound.contains("EggLayTime")) { - this.eggTime = compound.getInt("EggLayTime"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.isChickenJockey = tag.getBoolean("IsChickenJockey"); + if (tag.contains("EggLayTime")) { + this.eggTime = tag.getInt("EggLayTime"); } } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("IsChickenJockey", this.isChickenJockey); - compound.putInt("EggLayTime", this.eggTime); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("IsChickenJockey", this.isChickenJockey); + tag.putInt("EggLayTime", this.eggTime); } @Override diff --git a/net/minecraft/world/entity/animal/Dolphin.java b/net/minecraft/world/entity/animal/Dolphin.java index 148bf7b1..c8f7fa48 100644 --- a/net/minecraft/world/entity/animal/Dolphin.java +++ b/net/minecraft/world/entity/animal/Dolphin.java @@ -47,6 +47,7 @@ import net.minecraft.world.entity.ai.goal.MeleeAttackGoal; import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; import net.minecraft.world.entity.ai.goal.RandomSwimmingGoal; import net.minecraft.world.entity.ai.goal.TryFindWaterGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraft.world.entity.ai.navigation.PathNavigation; import net.minecraft.world.entity.ai.navigation.WaterBoundPathNavigation; @@ -82,17 +83,17 @@ public class Dolphin extends AgeableWaterCreature { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { this.setAirSupply(this.getMaxAirSupply()); this.setXRot(0.0F); SpawnGroupData spawnGroupData2 = (SpawnGroupData)Objects.requireNonNullElseGet(spawnGroupData, () -> new AgeableMob.AgeableMobGroupData(0.1F)); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData2); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData2); } @Nullable - public Dolphin getBreedOffspring(ServerLevel serverLevel, AgeableMob ageableMob) { - return EntityType.DOLPHIN.create(serverLevel, EntitySpawnReason.BREEDING); + public Dolphin getBreedOffspring(ServerLevel level, AgeableMob otherParent) { + return EntityType.DOLPHIN.create(level, EntitySpawnReason.BREEDING); } @Override @@ -101,7 +102,7 @@ public class Dolphin extends AgeableWaterCreature { } @Override - protected void handleAirSupply(int i) { + protected void handleAirSupply(int airSupply) { } public void setTreasurePos(BlockPos pos) { @@ -137,24 +138,24 @@ public class Dolphin extends AgeableWaterCreature { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("TreasurePosX", this.getTreasurePos().getX()); - compound.putInt("TreasurePosY", this.getTreasurePos().getY()); - compound.putInt("TreasurePosZ", this.getTreasurePos().getZ()); - compound.putBoolean("GotFish", this.gotFish()); - compound.putInt("Moistness", this.getMoistnessLevel()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("TreasurePosX", this.getTreasurePos().getX()); + tag.putInt("TreasurePosY", this.getTreasurePos().getY()); + tag.putInt("TreasurePosZ", this.getTreasurePos().getZ()); + tag.putBoolean("GotFish", this.gotFish()); + tag.putInt("Moistness", this.getMoistnessLevel()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - int i = compound.getInt("TreasurePosX"); - int j = compound.getInt("TreasurePosY"); - int k = compound.getInt("TreasurePosZ"); + public void readAdditionalSaveData(CompoundTag tag) { + int i = tag.getInt("TreasurePosX"); + int j = tag.getInt("TreasurePosY"); + int k = tag.getInt("TreasurePosZ"); this.setTreasurePos(new BlockPos(i, j, k)); - super.readAdditionalSaveData(compound); - this.setGotFish(compound.getBoolean("GotFish")); - this.setMoisntessLevel(compound.getInt("Moistness")); + super.readAdditionalSaveData(tag); + this.setGotFish(tag.getBoolean("GotFish")); + this.setMoisntessLevel(tag.getInt("Moistness")); } @Override @@ -219,20 +220,20 @@ public class Dolphin extends AgeableWaterCreature { } @Override - protected boolean canDispenserEquipIntoSlot(EquipmentSlot equipmentSlot) { - return equipmentSlot == EquipmentSlot.MAINHAND && this.canPickUpLoot(); + protected boolean canDispenserEquipIntoSlot(EquipmentSlot slot) { + return slot == EquipmentSlot.MAINHAND && this.canPickUpLoot(); } @Override - protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) { + protected void pickUpItem(ServerLevel level, ItemEntity entity) { if (this.getItemBySlot(EquipmentSlot.MAINHAND).isEmpty()) { - ItemStack itemStack = itemEntity.getItem(); + ItemStack itemStack = entity.getItem(); if (this.canHoldItem(itemStack)) { - this.onItemPickup(itemEntity); + this.onItemPickup(entity); this.setItemSlot(EquipmentSlot.MAINHAND, itemStack); this.setGuaranteedDrop(EquipmentSlot.MAINHAND); - this.take(itemEntity, itemStack.getCount()); - itemEntity.discard(); + this.take(entity, itemStack.getCount()); + entity.discard(); } } } @@ -370,7 +371,7 @@ public class Dolphin extends AgeableWaterCreature { DolphinSwimToTreasureGoal(Dolphin dolphin) { this.dolphin = dolphin; - this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK)); + this.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK)); } @Override @@ -456,7 +457,7 @@ public class Dolphin extends AgeableWaterCreature { DolphinSwimWithPlayerGoal(Dolphin dolphin, double speedModifier) { this.dolphin = dolphin; this.speedModifier = speedModifier; - this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK)); + this.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK)); } @Override diff --git a/net/minecraft/world/entity/animal/Fox.java b/net/minecraft/world/entity/animal/Fox.java index 9e70ade0..b320263c 100644 --- a/net/minecraft/world/entity/animal/Fox.java +++ b/net/minecraft/world/entity/animal/Fox.java @@ -68,6 +68,7 @@ import net.minecraft.world.entity.ai.goal.MoveToBlockGoal; import net.minecraft.world.entity.ai.goal.PanicGoal; import net.minecraft.world.entity.ai.goal.StrollThroughVillageGoal; import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.ai.targeting.TargetingConditions; import net.minecraft.world.entity.item.ItemEntity; @@ -300,18 +301,16 @@ public class Fox extends Animal implements VariantHolder { return fox; } - public static boolean checkFoxSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource - ) { - return levelAccessor.getBlockState(blockPos.below()).is(BlockTags.FOXES_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos); + public static boolean checkFoxSpawnRules(EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) { + return level.getBlockState(pos.below()).is(BlockTags.FOXES_SPAWNABLE_ON) && isBrightEnoughToSpawn(level, pos); } @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - Holder holder = serverLevelAccessor.getBiome(this.blockPosition()); + Holder holder = level.getBiome(this.blockPosition()); Fox.Variant variant = Fox.Variant.byBiome(holder); boolean bl = false; if (spawnGroupData instanceof Fox.FoxGroupData foxGroupData) { @@ -328,12 +327,12 @@ public class Fox extends Animal implements VariantHolder { this.setAge(-24000); } - if (serverLevelAccessor instanceof ServerLevel) { + if (level instanceof ServerLevel) { this.setTargetGoals(); } - this.populateDefaultEquipmentSlots(serverLevelAccessor.getRandom(), difficultyInstance); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + this.populateDefaultEquipmentSlots(level.getRandom(), difficulty); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } private void setTargetGoals() { @@ -387,8 +386,8 @@ public class Fox extends Animal implements VariantHolder { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); List list = this.getTrustedUUIDs(); ListTag listTag = new ListTag(); @@ -396,25 +395,25 @@ public class Fox extends Animal implements VariantHolder { listTag.add(NbtUtils.createUUID(uUID)); } - compound.put("Trusted", listTag); - compound.putBoolean("Sleeping", this.isSleeping()); - compound.putString("Type", this.getVariant().getSerializedName()); - compound.putBoolean("Sitting", this.isSitting()); - compound.putBoolean("Crouching", this.isCrouching()); + tag.put("Trusted", listTag); + tag.putBoolean("Sleeping", this.isSleeping()); + tag.putString("Type", this.getVariant().getSerializedName()); + tag.putBoolean("Sitting", this.isSitting()); + tag.putBoolean("Crouching", this.isCrouching()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); - for (Tag tag : compound.getList("Trusted", 11)) { - this.addTrustedUUID(NbtUtils.loadUUID(tag)); + for (Tag tag2 : tag.getList("Trusted", 11)) { + this.addTrustedUUID(NbtUtils.loadUUID(tag2)); } - this.setSleeping(compound.getBoolean("Sleeping")); - this.setVariant(Fox.Variant.byName(compound.getString("Type"))); - this.setSitting(compound.getBoolean("Sitting")); - this.setIsCrouching(compound.getBoolean("Crouching")); + this.setSleeping(tag.getBoolean("Sleeping")); + this.setVariant(Fox.Variant.byName(tag.getString("Type"))); + this.setSitting(tag.getBoolean("Sitting")); + this.setIsCrouching(tag.getBoolean("Crouching")); if (this.level() instanceof ServerLevel) { this.setTargetGoals(); } @@ -466,8 +465,8 @@ public class Fox extends Animal implements VariantHolder { } @Override - protected boolean canDispenserEquipIntoSlot(EquipmentSlot equipmentSlot) { - return equipmentSlot == EquipmentSlot.MAINHAND && this.canPickUpLoot(); + protected boolean canDispenserEquipIntoSlot(EquipmentSlot slot) { + return slot == EquipmentSlot.MAINHAND && this.canPickUpLoot(); } @Override @@ -492,8 +491,8 @@ public class Fox extends Animal implements VariantHolder { } @Override - protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) { - ItemStack itemStack = itemEntity.getItem(); + protected void pickUpItem(ServerLevel level, ItemEntity entity) { + ItemStack itemStack = entity.getItem(); if (this.canHoldItem(itemStack)) { int i = itemStack.getCount(); if (i > 1) { @@ -501,11 +500,11 @@ public class Fox extends Animal implements VariantHolder { } this.spitOutItem(this.getItemBySlot(EquipmentSlot.MAINHAND)); - this.onItemPickup(itemEntity); + this.onItemPickup(entity); this.setItemSlot(EquipmentSlot.MAINHAND, itemStack.split(1)); this.setGuaranteedDrop(EquipmentSlot.MAINHAND); - this.take(itemEntity, itemStack.getCount()); - itemEntity.discard(); + this.take(entity, itemStack.getCount()); + entity.discard(); this.ticksSinceEaten = 0; } } @@ -711,8 +710,10 @@ public class Fox extends Animal implements VariantHolder { private LivingEntity trustedLastHurt; private int timestamp; - public DefendTrustedTargetGoal(final Class class_, final boolean bl, final boolean bl2, @Nullable final TargetingConditions.Selector selector) { - super(Fox.this, class_, 10, bl, bl2, selector); + public DefendTrustedTargetGoal( + final Class targetType, final boolean mustSee, final boolean mustReach, @Nullable final TargetingConditions.Selector selector + ) { + super(Fox.this, targetType, 10, mustSee, mustReach, selector); } @Override @@ -754,7 +755,7 @@ public class Fox extends Animal implements VariantHolder { int countdown; public FaceplantGoal() { - this.setFlags(EnumSet.of(Goal.Flag.LOOK, Goal.Flag.JUMP, Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.LOOK, Flag.JUMP, Flag.MOVE)); } @Override @@ -1189,7 +1190,7 @@ public class Fox extends Animal implements VariantHolder { class FoxSearchForItemsGoal extends Goal { public FoxSearchForItemsGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override @@ -1259,7 +1260,7 @@ public class Fox extends Animal implements VariantHolder { private int looksRemaining; public PerchAndSearchGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK)); + this.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK)); } @Override @@ -1349,7 +1350,7 @@ public class Fox extends Animal implements VariantHolder { private int countdown = Fox.this.random.nextInt(WAIT_TIME_BEFORE_SLEEP); public SleepGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK, Goal.Flag.JUMP)); + this.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK, Flag.JUMP)); } @Override @@ -1391,7 +1392,7 @@ public class Fox extends Animal implements VariantHolder { class StalkPreyGoal extends Goal { public StalkPreyGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK)); + this.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK)); } @Override @@ -1455,9 +1456,9 @@ public class Fox extends Animal implements VariantHolder { private final int id; private final String name; - private Variant(final int j, final String string2) { - this.id = j; - this.name = string2; + private Variant(final int id, final String name) { + this.id = id; + this.name = name; } @Override @@ -1469,16 +1470,16 @@ public class Fox extends Animal implements VariantHolder { return this.id; } - public static Fox.Variant byName(String string) { - return (Fox.Variant)CODEC.byName(string, RED); + public static Fox.Variant byName(String name) { + return (Fox.Variant)CODEC.byName(name, RED); } - public static Fox.Variant byId(int i) { - return (Fox.Variant)BY_ID.apply(i); + public static Fox.Variant byId(int id) { + return (Fox.Variant)BY_ID.apply(id); } - public static Fox.Variant byBiome(Holder holder) { - return holder.is(BiomeTags.SPAWNS_SNOW_FOXES) ? SNOW : RED; + public static Fox.Variant byBiome(Holder biome) { + return biome.is(BiomeTags.SPAWNS_SNOW_FOXES) ? SNOW : RED; } } } diff --git a/net/minecraft/world/entity/animal/IronGolem.java b/net/minecraft/world/entity/animal/IronGolem.java index 956b1f4c..99a53cde 100644 --- a/net/minecraft/world/entity/animal/IronGolem.java +++ b/net/minecraft/world/entity/animal/IronGolem.java @@ -143,17 +143,17 @@ public class IronGolem extends AbstractGolem implements NeutralMob { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("PlayerCreated", this.isPlayerCreated()); - this.addPersistentAngerSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("PlayerCreated", this.isPlayerCreated()); + this.addPersistentAngerSaveData(tag); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setPlayerCreated(compound.getBoolean("PlayerCreated")); - this.readPersistentAngerSaveData(this.level(), compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setPlayerCreated(tag.getBoolean("PlayerCreated")); + this.readPersistentAngerSaveData(this.level(), tag); } @Override @@ -187,18 +187,18 @@ public class IronGolem extends AbstractGolem implements NeutralMob { } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { + public boolean doHurtTarget(ServerLevel level, Entity source) { this.attackAnimationTick = 10; - serverLevel.broadcastEntityEvent(this, (byte)4); + level.broadcastEntityEvent(this, (byte)4); float f = this.getAttackDamage(); float g = (int)f > 0 ? f / 2.0F + this.random.nextInt((int)f) : f; DamageSource damageSource = this.damageSources().mobAttack(this); - boolean bl = entity.hurtServer(serverLevel, damageSource, g); + boolean bl = source.hurtServer(level, damageSource, g); if (bl) { - double d = entity instanceof LivingEntity livingEntity ? livingEntity.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE) : 0.0; + double d = source instanceof LivingEntity livingEntity ? livingEntity.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE) : 0.0; double e = Math.max(0.0, 1.0 - d); - entity.setDeltaMovement(entity.getDeltaMovement().add(0.0, 0.4F * e, 0.0)); - EnchantmentHelper.doPostAttackEffects(serverLevel, entity, damageSource); + source.setDeltaMovement(source.getDeltaMovement().add(0.0, 0.4F * e, 0.0)); + EnchantmentHelper.doPostAttackEffects(level, source, damageSource); } this.playSound(SoundEvents.IRON_GOLEM_ATTACK, 1.0F, 1.0F); @@ -206,10 +206,10 @@ public class IronGolem extends AbstractGolem implements NeutralMob { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - net.minecraft.world.entity.Crackiness.Level level = this.getCrackiness(); - boolean bl = super.hurtServer(serverLevel, damageSource, f); - if (bl && this.getCrackiness() != level) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + net.minecraft.world.entity.Crackiness.Level level2 = this.getCrackiness(); + boolean bl = super.hurtServer(level, damageSource, amount); + if (bl && this.getCrackiness() != level2) { this.playSound(SoundEvents.IRON_GOLEM_DAMAGE, 1.0F, 1.0F); } diff --git a/net/minecraft/world/entity/animal/MushroomCow.java b/net/minecraft/world/entity/animal/MushroomCow.java index 9872d3df..a70a2453 100644 --- a/net/minecraft/world/entity/animal/MushroomCow.java +++ b/net/minecraft/world/entity/animal/MushroomCow.java @@ -66,9 +66,9 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return levelAccessor.getBlockState(blockPos.below()).is(BlockTags.MOOSHROOMS_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos); + return level.getBlockState(pos.below()).is(BlockTags.MOOSHROOMS_SPAWNABLE_ON) && isBrightEnoughToSpawn(level, pos); } @Override @@ -167,13 +167,13 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder { - serverLevel.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(0.5), this.getZ(), 1, 0.0, 0.0, 0.0, 0.0); - this.dropFromShearingLootTable(serverLevel, BuiltInLootTables.SHEAR_MOOSHROOM, itemStack, (serverLevelxx, itemStackxx) -> { - for (int i = 0; i < itemStackxx.getCount(); i++) { - serverLevelxx.addFreshEntity(new ItemEntity(this.level(), this.getX(), this.getY(1.0), this.getZ(), itemStackxx.copyWithCount(1))); + level.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(0.5), this.getZ(), 1, 0.0, 0.0, 0.0, 0.0); + this.dropFromShearingLootTable(level, BuiltInLootTables.SHEAR_MOOSHROOM, shears, (serverLevelx, itemStackx) -> { + for (int i = 0; i < itemStackx.getCount(); i++) { + serverLevelx.addFreshEntity(new ItemEntity(this.level(), this.getX(), this.getY(1.0), this.getZ(), itemStackx.copyWithCount(1))); } }); }); @@ -185,22 +185,20 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder compound.put("stew_effects", tag)); + SuspiciousStewEffects.CODEC.encodeStart(NbtOps.INSTANCE, this.stewEffects).ifSuccess(tagx -> tag.put("stew_effects", tagx)); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setVariant(MushroomCow.Variant.byName(compound.getString("Type"))); - if (compound.contains("stew_effects", 9)) { - SuspiciousStewEffects.CODEC - .parse(NbtOps.INSTANCE, compound.get("stew_effects")) - .ifSuccess(suspiciousStewEffects -> this.stewEffects = suspiciousStewEffects); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setVariant(MushroomCow.Variant.byName(tag.getString("Type"))); + if (tag.contains("stew_effects", 9)) { + SuspiciousStewEffects.CODEC.parse(NbtOps.INSTANCE, tag.get("stew_effects")).ifSuccess(suspiciousStewEffects -> this.stewEffects = suspiciousStewEffects); } } @@ -227,9 +225,9 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return randomSource.nextInt(3) != 0; + return random.nextInt(3) != 0; } @Override @@ -247,13 +247,13 @@ public class Ocelot extends Animal { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { if (spawnGroupData == null) { spawnGroupData = new AgeableMob.AgeableMobGroupData(1.0F); } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override diff --git a/net/minecraft/world/entity/animal/Panda.java b/net/minecraft/world/entity/animal/Panda.java index 3161e3e8..e39c6195 100644 --- a/net/minecraft/world/entity/animal/Panda.java +++ b/net/minecraft/world/entity/animal/Panda.java @@ -51,6 +51,7 @@ import net.minecraft.world.entity.ai.goal.PanicGoal; import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; import net.minecraft.world.entity.ai.goal.TemptGoal; import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraft.world.entity.ai.targeting.TargetingConditions; import net.minecraft.world.entity.item.ItemEntity; @@ -107,8 +108,8 @@ public class Panda extends Animal { } @Override - protected boolean canDispenserEquipIntoSlot(EquipmentSlot equipmentSlot) { - return equipmentSlot == EquipmentSlot.MAINHAND && this.canPickUpLoot(); + protected boolean canDispenserEquipIntoSlot(EquipmentSlot slot) { + return slot == EquipmentSlot.MAINHAND && this.canPickUpLoot(); } public int getUnhappyCounter() { @@ -227,17 +228,17 @@ public class Panda extends Animal { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putString("MainGene", this.getMainGene().getSerializedName()); - compound.putString("HiddenGene", this.getHiddenGene().getSerializedName()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putString("MainGene", this.getMainGene().getSerializedName()); + tag.putString("HiddenGene", this.getHiddenGene().getSerializedName()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setMainGene(Panda.Gene.byName(compound.getString("MainGene"))); - this.setHiddenGene(Panda.Gene.byName(compound.getString("HiddenGene"))); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setMainGene(Panda.Gene.byName(tag.getString("MainGene"))); + this.setHiddenGene(Panda.Gene.byName(tag.getString("HiddenGene"))); } @Nullable @@ -315,12 +316,12 @@ public class Panda extends Animal { } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { + public boolean doHurtTarget(ServerLevel level, Entity source) { if (!this.isAggressive()) { this.didBite = true; } - return super.doHurtTarget(serverLevel, entity); + return super.doHurtTarget(level, source); } @Override @@ -521,29 +522,29 @@ public class Panda extends Animal { } @Override - protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) { - if (this.getItemBySlot(EquipmentSlot.MAINHAND).isEmpty() && canPickUpAndEat(itemEntity)) { - this.onItemPickup(itemEntity); - ItemStack itemStack = itemEntity.getItem(); + protected void pickUpItem(ServerLevel level, ItemEntity entity) { + if (this.getItemBySlot(EquipmentSlot.MAINHAND).isEmpty() && canPickUpAndEat(entity)) { + this.onItemPickup(entity); + ItemStack itemStack = entity.getItem(); this.setItemSlot(EquipmentSlot.MAINHAND, itemStack); this.setGuaranteedDrop(EquipmentSlot.MAINHAND); - this.take(itemEntity, itemStack.getCount()); - itemEntity.discard(); + this.take(entity, itemStack.getCount()); + entity.discard(); } } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { this.sit(false); - return super.hurtServer(serverLevel, damageSource, f); + return super.hurtServer(level, damageSource, amount); } @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - RandomSource randomSource = serverLevelAccessor.getRandom(); + RandomSource randomSource = level.getRandom(); this.setMainGene(Panda.Gene.getRandom(randomSource)); this.setHiddenGene(Panda.Gene.getRandom(randomSource)); this.setAttributes(); @@ -551,7 +552,7 @@ public class Panda extends Animal { spawnGroupData = new AgeableMob.AgeableMobGroupData(0.2F); } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } public void setGeneFromParents(Panda father, @Nullable Panda mother) { @@ -984,7 +985,7 @@ public class Panda extends Animal { public PandaRollGoal(Panda panda) { this.panda = panda; - this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK, Goal.Flag.JUMP)); + this.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK, Flag.JUMP)); } @Override @@ -1029,7 +1030,7 @@ public class Panda extends Animal { private int cooldown; public PandaSitGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override diff --git a/net/minecraft/world/entity/animal/Parrot.java b/net/minecraft/world/entity/animal/Parrot.java index fa859962..e78943e0 100644 --- a/net/minecraft/world/entity/animal/Parrot.java +++ b/net/minecraft/world/entity/animal/Parrot.java @@ -134,14 +134,14 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return levelAccessor.getBlockState(blockPos.below()).is(BlockTags.PARROTS_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos); + return level.getBlockState(pos.below()).is(BlockTags.PARROTS_SPAWNABLE_ON) && isBrightEnoughToSpawn(level, pos); } @Override @@ -387,12 +387,12 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - Holder holder = levelAccessor.getBiome(blockPos); + Holder holder = level.getBiome(pos); return !holder.is(BiomeTags.POLAR_BEARS_SPAWN_ON_ALTERNATE_BLOCKS) - ? checkAnimalSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource) - : isBrightEnoughToSpawn(levelAccessor, blockPos) && levelAccessor.getBlockState(blockPos.below()).is(BlockTags.POLAR_BEARS_SPAWNABLE_ON_ALTERNATE); + ? checkAnimalSpawnRules(entityType, level, spawnReason, pos, random) + : isBrightEnoughToSpawn(level, pos) && level.getBlockState(pos.below()).is(BlockTags.POLAR_BEARS_SPAWNABLE_ON_ALTERNATE); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.readPersistentAngerSaveData(this.level(), compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.readPersistentAngerSaveData(this.level(), tag); } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - this.addPersistentAngerSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + this.addPersistentAngerSaveData(tag); } @Override @@ -236,13 +236,13 @@ public class PolarBear extends Animal implements NeutralMob { @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { if (spawnGroupData == null) { spawnGroupData = new AgeableMob.AgeableMobGroupData(1.0F); } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } class PolarBearAttackPlayersGoal extends NearestAttackableTargetGoal { diff --git a/net/minecraft/world/entity/animal/Pufferfish.java b/net/minecraft/world/entity/animal/Pufferfish.java index 16a6c12c..b1246828 100644 --- a/net/minecraft/world/entity/animal/Pufferfish.java +++ b/net/minecraft/world/entity/animal/Pufferfish.java @@ -68,15 +68,15 @@ public class Pufferfish extends AbstractFish { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("PuffState", this.getPuffState()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("PuffState", this.getPuffState()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setPuffState(Math.min(compound.getInt("PuffState"), 2)); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setPuffState(Math.min(tag.getInt("PuffState"), 2)); } @Override @@ -131,9 +131,9 @@ public class Pufferfish extends AbstractFish { } } - private void touch(ServerLevel serverLevel, Mob mob) { + private void touch(ServerLevel level, Mob mob) { int i = this.getPuffState(); - if (mob.hurtServer(serverLevel, this.damageSources().mobAttack(this), 1 + i)) { + if (mob.hurtServer(level, this.damageSources().mobAttack(this), 1 + i)) { mob.addEffect(new MobEffectInstance(MobEffects.POISON, 60 * i, 0), this); this.playSound(SoundEvents.PUFFER_FISH_STING, 1.0F, 1.0F); } diff --git a/net/minecraft/world/entity/animal/Rabbit.java b/net/minecraft/world/entity/animal/Rabbit.java index b055c926..1f101025 100644 --- a/net/minecraft/world/entity/animal/Rabbit.java +++ b/net/minecraft/world/entity/animal/Rabbit.java @@ -175,7 +175,7 @@ public class Rabbit extends Animal implements VariantHolder { } @Override - public void customServerAiStep(ServerLevel serverLevel) { + public void customServerAiStep(ServerLevel level) { if (this.jumpDelayTicks > 0) { this.jumpDelayTicks--; } @@ -270,17 +270,17 @@ public class Rabbit extends Animal implements VariantHolder { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("RabbitType", this.getVariant().id); - compound.putInt("MoreCarrotTicks", this.moreCarrotTicks); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("RabbitType", this.getVariant().id); + tag.putInt("MoreCarrotTicks", this.moreCarrotTicks); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setVariant(Rabbit.Variant.byId(compound.getInt("RabbitType"))); - this.moreCarrotTicks = compound.getInt("MoreCarrotTicks"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setVariant(Rabbit.Variant.byId(tag.getInt("RabbitType"))); + this.moreCarrotTicks = tag.getInt("MoreCarrotTicks"); } protected SoundEvent getJumpSound() { @@ -364,9 +364,9 @@ public class Rabbit extends Animal implements VariantHolder { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - Rabbit.Variant variant = getRandomRabbitVariant(serverLevelAccessor, this.blockPosition()); + Rabbit.Variant variant = getRandomRabbitVariant(level, this.blockPosition()); if (spawnGroupData instanceof Rabbit.RabbitGroupData) { variant = ((Rabbit.RabbitGroupData)spawnGroupData).variant; } else { @@ -374,7 +374,7 @@ public class Rabbit extends Animal implements VariantHolder { } this.setVariant(variant); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } private static Rabbit.Variant getRandomRabbitVariant(LevelAccessor level, BlockPos pos) { @@ -390,9 +390,9 @@ public class Rabbit extends Animal implements VariantHolder { } public static boolean checkRabbitSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return levelAccessor.getBlockState(blockPos.below()).is(BlockTags.RABBITS_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos); + return level.getBlockState(pos.below()).is(BlockTags.RABBITS_SPAWNABLE_ON) && isBrightEnoughToSpawn(level, pos); } /** diff --git a/net/minecraft/world/entity/animal/Salmon.java b/net/minecraft/world/entity/animal/Salmon.java index 3ece0b72..aa173a01 100644 --- a/net/minecraft/world/entity/animal/Salmon.java +++ b/net/minecraft/world/entity/animal/Salmon.java @@ -78,15 +78,15 @@ public class Salmon extends AbstractSchoolingFish implements VariantHolder builder = SimpleWeightedRandomList.builder(); builder.add(Salmon.Variant.SMALL, 30); builder.add(Salmon.Variant.MEDIUM, 50); builder.add(Salmon.Variant.LARGE, 15); builder.build().getRandomValue(this.random).ifPresent(this::setVariant); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } public float getSalmonScale() { @@ -140,9 +140,9 @@ public class Salmon extends AbstractSchoolingFish implements VariantHolder { - for (int i = 0; i < itemStackx.getCount(); i++) { - ItemEntity itemEntity = this.spawnAtLocation(serverLevelx, itemStackx.copyWithCount(1), 1.0F); + shears, + (serverLevel, itemStack) -> { + for (int i = 0; i < itemStack.getCount(); i++) { + ItemEntity itemEntity = this.spawnAtLocation(serverLevel, itemStack.copyWithCount(1), 1.0F); if (itemEntity != null) { itemEntity.setDeltaMovement( itemEntity.getDeltaMovement() @@ -202,17 +202,17 @@ public class Sheep extends Animal implements Shearable { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("Sheared", this.isSheared()); - compound.putByte("Color", (byte)this.getColor().getId()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("Sheared", this.isSheared()); + tag.putByte("Color", (byte)this.getColor().getId()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setSheared(compound.getBoolean("Sheared")); - this.setColor(DyeColor.byId(compound.getByte("Color"))); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setSheared(tag.getBoolean("Sheared")); + this.setColor(DyeColor.byId(tag.getByte("Color"))); } @Override @@ -306,24 +306,24 @@ public class Sheep extends Animal implements Shearable { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - this.setColor(getRandomSheepColor(serverLevelAccessor.getRandom())); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + this.setColor(getRandomSheepColor(level.getRandom())); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } - private DyeColor getOffspringColor(ServerLevel serverLevel, Sheep sheep, Sheep sheep2) { - DyeColor dyeColor = sheep.getColor(); - DyeColor dyeColor2 = sheep2.getColor(); + private DyeColor getOffspringColor(ServerLevel level, Sheep father, Sheep mother) { + DyeColor dyeColor = father.getColor(); + DyeColor dyeColor2 = mother.getColor(); CraftingInput craftingInput = makeCraftInput(dyeColor, dyeColor2); - return (DyeColor)serverLevel.recipeAccess() - .getRecipeFor(RecipeType.CRAFTING, craftingInput, serverLevel) - .map(recipeHolder -> ((CraftingRecipe)recipeHolder.value()).assemble(craftingInput, serverLevel.registryAccess())) + return (DyeColor)level.recipeAccess() + .getRecipeFor(RecipeType.CRAFTING, craftingInput, level) + .map(recipeHolder -> ((CraftingRecipe)recipeHolder.value()).assemble(craftingInput, level.registryAccess())) .map(ItemStack::getItem) .filter(DyeItem.class::isInstance) .map(DyeItem.class::cast) .map(DyeItem::getDyeColor) - .orElseGet(() -> serverLevel.random.nextBoolean() ? dyeColor : dyeColor2); + .orElseGet(() -> level.random.nextBoolean() ? dyeColor : dyeColor2); } private static CraftingInput makeCraftInput(DyeColor color1, DyeColor color2) { diff --git a/net/minecraft/world/entity/animal/SnowGolem.java b/net/minecraft/world/entity/animal/SnowGolem.java index 5e7b2f13..812769e8 100644 --- a/net/minecraft/world/entity/animal/SnowGolem.java +++ b/net/minecraft/world/entity/animal/SnowGolem.java @@ -71,16 +71,16 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("Pumpkin", this.hasPumpkin()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("Pumpkin", this.hasPumpkin()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("Pumpkin")) { - this.setPumpkin(compound.getBoolean("Pumpkin")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("Pumpkin")) { + this.setPumpkin(tag.getBoolean("Pumpkin")); } } @@ -149,14 +149,11 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM } @Override - public void shear(ServerLevel serverLevel, SoundSource soundSource, ItemStack itemStack) { - serverLevel.playSound(null, this, SoundEvents.SNOW_GOLEM_SHEAR, soundSource, 1.0F, 1.0F); + public void shear(ServerLevel level, SoundSource soundSource, ItemStack shears) { + level.playSound(null, this, SoundEvents.SNOW_GOLEM_SHEAR, soundSource, 1.0F, 1.0F); this.setPumpkin(false); this.dropFromShearingLootTable( - serverLevel, - BuiltInLootTables.SHEAR_SNOW_GOLEM, - itemStack, - (serverLevelx, itemStackx) -> this.spawnAtLocation(serverLevelx, itemStackx, this.getEyeHeight()) + level, BuiltInLootTables.SHEAR_SNOW_GOLEM, shears, (serverLevel, itemStack) -> this.spawnAtLocation(serverLevel, itemStack, this.getEyeHeight()) ); } diff --git a/net/minecraft/world/entity/animal/Squid.java b/net/minecraft/world/entity/animal/Squid.java index 92fa3641..9accd655 100644 --- a/net/minecraft/world/entity/animal/Squid.java +++ b/net/minecraft/world/entity/animal/Squid.java @@ -172,8 +172,8 @@ public class Squid extends AgeableWaterCreature { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - if (super.hurtServer(serverLevel, damageSource, f) && this.getLastHurtByMob() != null) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + if (super.hurtServer(level, damageSource, amount) && this.getLastHurtByMob() != null) { this.spawnInk(); return true; } else { @@ -225,10 +225,10 @@ public class Squid extends AgeableWaterCreature { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { SpawnGroupData spawnGroupData2 = (SpawnGroupData)Objects.requireNonNullElseGet(spawnGroupData, () -> new AgeableMob.AgeableMobGroupData(0.05F)); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData2); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData2); } class SquidFleeGoal extends Goal { diff --git a/net/minecraft/world/entity/animal/TropicalFish.java b/net/minecraft/world/entity/animal/TropicalFish.java index 8eeabf84..084625c9 100644 --- a/net/minecraft/world/entity/animal/TropicalFish.java +++ b/net/minecraft/world/entity/animal/TropicalFish.java @@ -95,15 +95,15 @@ public class TropicalFish extends AbstractSchoolingFish implements VariantHolder } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Variant", this.getPackedVariant()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("Variant", this.getPackedVariant()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setPackedVariant(compound.getInt("Variant")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setPackedVariant(tag.getInt("Variant")); } private void setPackedVariant(int packedVariant) { @@ -180,10 +180,10 @@ public class TropicalFish extends AbstractSchoolingFish implements VariantHolder @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - spawnGroupData = super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); - RandomSource randomSource = serverLevelAccessor.getRandom(); + spawnGroupData = super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); + RandomSource randomSource = level.getRandom(); TropicalFish.Variant variant; if (spawnGroupData instanceof TropicalFish.TropicalFishGroupData tropicalFishGroupData) { variant = tropicalFishGroupData.variant; @@ -205,13 +205,13 @@ public class TropicalFish extends AbstractSchoolingFish implements VariantHolder } public static boolean checkTropicalFishSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return levelAccessor.getFluidState(blockPos.below()).is(FluidTags.WATER) - && levelAccessor.getBlockState(blockPos.above()).is(Blocks.WATER) + return level.getFluidState(pos.below()).is(FluidTags.WATER) + && level.getBlockState(pos.above()).is(Blocks.WATER) && ( - levelAccessor.getBiome(blockPos).is(BiomeTags.ALLOWS_TROPICAL_FISH_SPAWNS_AT_ANY_HEIGHT) - || WaterAnimal.checkSurfaceWaterAnimalSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource) + level.getBiome(pos).is(BiomeTags.ALLOWS_TROPICAL_FISH_SPAWNS_AT_ANY_HEIGHT) + || WaterAnimal.checkSurfaceWaterAnimalSpawnRules(entityType, level, spawnReason, pos, random) ); } diff --git a/net/minecraft/world/entity/animal/Turtle.java b/net/minecraft/world/entity/animal/Turtle.java index 22af76c0..ccec3487 100644 --- a/net/minecraft/world/entity/animal/Turtle.java +++ b/net/minecraft/world/entity/animal/Turtle.java @@ -146,45 +146,45 @@ public class Turtle extends Animal { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("HomePosX", this.getHomePos().getX()); - compound.putInt("HomePosY", this.getHomePos().getY()); - compound.putInt("HomePosZ", this.getHomePos().getZ()); - compound.putBoolean("HasEgg", this.hasEgg()); - compound.putInt("TravelPosX", this.getTravelPos().getX()); - compound.putInt("TravelPosY", this.getTravelPos().getY()); - compound.putInt("TravelPosZ", this.getTravelPos().getZ()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("HomePosX", this.getHomePos().getX()); + tag.putInt("HomePosY", this.getHomePos().getY()); + tag.putInt("HomePosZ", this.getHomePos().getZ()); + tag.putBoolean("HasEgg", this.hasEgg()); + tag.putInt("TravelPosX", this.getTravelPos().getX()); + tag.putInt("TravelPosY", this.getTravelPos().getY()); + tag.putInt("TravelPosZ", this.getTravelPos().getZ()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - int i = compound.getInt("HomePosX"); - int j = compound.getInt("HomePosY"); - int k = compound.getInt("HomePosZ"); + public void readAdditionalSaveData(CompoundTag tag) { + int i = tag.getInt("HomePosX"); + int j = tag.getInt("HomePosY"); + int k = tag.getInt("HomePosZ"); this.setHomePos(new BlockPos(i, j, k)); - super.readAdditionalSaveData(compound); - this.setHasEgg(compound.getBoolean("HasEgg")); - int l = compound.getInt("TravelPosX"); - int m = compound.getInt("TravelPosY"); - int n = compound.getInt("TravelPosZ"); + super.readAdditionalSaveData(tag); + this.setHasEgg(tag.getBoolean("HasEgg")); + int l = tag.getInt("TravelPosX"); + int m = tag.getInt("TravelPosY"); + int n = tag.getInt("TravelPosZ"); this.setTravelPos(new BlockPos(l, m, n)); } @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { this.setHomePos(this.blockPosition()); this.setTravelPos(BlockPos.ZERO); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } public static boolean checkTurtleSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return blockPos.getY() < levelAccessor.getSeaLevel() + 4 && TurtleEggBlock.onSand(levelAccessor, blockPos) && isBrightEnoughToSpawn(levelAccessor, blockPos); + return pos.getY() < level.getSeaLevel() + 4 && TurtleEggBlock.onSand(level, pos) && isBrightEnoughToSpawn(level, pos); } @Override diff --git a/net/minecraft/world/entity/animal/WaterAnimal.java b/net/minecraft/world/entity/animal/WaterAnimal.java index a7cd9cb1..a3249ef6 100644 --- a/net/minecraft/world/entity/animal/WaterAnimal.java +++ b/net/minecraft/world/entity/animal/WaterAnimal.java @@ -32,7 +32,7 @@ public abstract class WaterAnimal extends PathfinderMob { } @Override - protected int getBaseExperienceReward(ServerLevel serverLevel) { + protected int getBaseExperienceReward(ServerLevel level) { return 1 + this.random.nextInt(3); } @@ -66,13 +66,10 @@ public abstract class WaterAnimal extends PathfinderMob { } public static boolean checkSurfaceWaterAnimalSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - int i = levelAccessor.getSeaLevel(); + int i = level.getSeaLevel(); int j = i - 13; - return blockPos.getY() >= j - && blockPos.getY() <= i - && levelAccessor.getFluidState(blockPos.below()).is(FluidTags.WATER) - && levelAccessor.getBlockState(blockPos.above()).is(Blocks.WATER); + return pos.getY() >= j && pos.getY() <= i && level.getFluidState(pos.below()).is(FluidTags.WATER) && level.getBlockState(pos.above()).is(Blocks.WATER); } } diff --git a/net/minecraft/world/entity/animal/Wolf.java b/net/minecraft/world/entity/animal/Wolf.java index c5550a24..fa2e566f 100644 --- a/net/minecraft/world/entity/animal/Wolf.java +++ b/net/minecraft/world/entity/animal/Wolf.java @@ -177,33 +177,33 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder compound.putString("variant", resourceKey.location().toString())); - this.addPersistentAngerSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putByte("CollarColor", (byte)this.getCollarColor().getId()); + this.getVariant().unwrapKey().ifPresent(resourceKey -> tag.putString("variant", resourceKey.location().toString())); + this.addPersistentAngerSaveData(tag); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - Optional.ofNullable(ResourceLocation.tryParse(compound.getString("variant"))) + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + Optional.ofNullable(ResourceLocation.tryParse(tag.getString("variant"))) .map(resourceLocation -> ResourceKey.create(Registries.WOLF_VARIANT, resourceLocation)) .flatMap(resourceKey -> this.registryAccess().lookupOrThrow(Registries.WOLF_VARIANT).get(resourceKey)) .ifPresent(this::setVariant); - if (compound.contains("CollarColor", 99)) { - this.setCollarColor(DyeColor.byId(compound.getInt("CollarColor"))); + if (tag.contains("CollarColor", 99)) { + this.setCollarColor(DyeColor.byId(tag.getInt("CollarColor"))); } - this.readPersistentAngerSaveData(this.level(), compound); + this.readPersistentAngerSaveData(this.level(), tag); } @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - Holder holder = serverLevelAccessor.getBiome(this.blockPosition()); + Holder holder = level.getBiome(this.blockPosition()); Holder holder2; if (spawnGroupData instanceof Wolf.WolfPackData wolfPackData) { holder2 = wolfPackData.type; @@ -213,7 +213,7 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource - ) { - return levelAccessor.getBlockState(blockPos.below()).is(BlockTags.WOLVES_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos); + public static boolean checkWolfSpawnRules(EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) { + return level.getBlockState(pos.below()).is(BlockTags.WOLVES_SPAWNABLE_ON) && isBrightEnoughToSpawn(level, pos); } class WolfAvoidEntityGoal extends AvoidEntityGoal { diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java index 10954c0e..288810a7 100644 --- a/net/minecraft/world/entity/animal/allay/Allay.java +++ b/net/minecraft/world/entity/animal/allay/Allay.java @@ -197,7 +197,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (damageSource.getEntity() instanceof Player player) { Optional optional = this.getBrain().getMemory(MemoryModuleType.LIKED_PLAYER); if (optional.isPresent() && player.getUUID().equals(optional.get())) { @@ -205,7 +205,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS } } - return super.hurtServer(serverLevel, damageSource, f); + return super.hurtServer(level, damageSource, amount); } @Override @@ -237,15 +237,15 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("allayBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.pop(); profilerFiller.push("allayActivityUpdate"); AllayAi.updateActivity(this); profilerFiller.pop(); - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } @Override @@ -307,7 +307,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS } @Override - protected boolean canDispenserEquipIntoSlot(EquipmentSlot equipmentSlot) { + protected boolean canDispenserEquipIntoSlot(EquipmentSlot slot) { return false; } @@ -372,12 +372,12 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS } @Override - public boolean wantsToPickUp(ServerLevel serverLevel, ItemStack itemStack) { - ItemStack itemStack2 = this.getItemInHand(InteractionHand.MAIN_HAND); - return !itemStack2.isEmpty() - && serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) - && this.inventory.canAddItem(itemStack) - && this.allayConsidersItemEqual(itemStack2, itemStack); + public boolean wantsToPickUp(ServerLevel level, ItemStack stack) { + ItemStack itemStack = this.getItemInHand(InteractionHand.MAIN_HAND); + return !itemStack.isEmpty() + && level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) + && this.inventory.canAddItem(stack) + && this.allayConsidersItemEqual(itemStack, stack); } private boolean allayConsidersItemEqual(ItemStack first, ItemStack second) { @@ -391,8 +391,8 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS } @Override - protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) { - InventoryCarrier.pickUpItem(serverLevel, this, this, itemEntity); + protected void pickUpItem(ServerLevel level, ItemEntity entity) { + InventoryCarrier.pickUpItem(level, this, this, entity); } @Override @@ -449,12 +449,12 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS } @Override - protected void dropEquipment(ServerLevel serverLevel) { - super.dropEquipment(serverLevel); - this.inventory.removeAllItems().forEach(itemStackx -> this.spawnAtLocation(serverLevel, itemStackx)); + protected void dropEquipment(ServerLevel level) { + super.dropEquipment(level); + this.inventory.removeAllItems().forEach(itemStackx -> this.spawnAtLocation(level, itemStackx)); ItemStack itemStack = this.getItemBySlot(EquipmentSlot.MAINHAND); if (!itemStack.isEmpty() && !EnchantmentHelper.has(itemStack, EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) { - this.spawnAtLocation(serverLevel, itemStack); + this.spawnAtLocation(level, itemStack); this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY); } } @@ -465,32 +465,32 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - this.writeInventoryToTag(compound, this.registryAccess()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + this.writeInventoryToTag(tag, this.registryAccess()); RegistryOps registryOps = this.registryAccess().createSerializationContext(NbtOps.INSTANCE); Data.CODEC .encodeStart(registryOps, this.vibrationData) .resultOrPartial(string -> LOGGER.error("Failed to encode vibration listener for Allay: '{}'", string)) - .ifPresent(tag -> compound.put("listener", tag)); - compound.putLong("DuplicationCooldown", this.duplicationCooldown); - compound.putBoolean("CanDuplicate", this.canDuplicate()); + .ifPresent(tagx -> tag.put("listener", tagx)); + tag.putLong("DuplicationCooldown", this.duplicationCooldown); + tag.putBoolean("CanDuplicate", this.canDuplicate()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.readInventoryFromTag(compound, this.registryAccess()); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.readInventoryFromTag(tag, this.registryAccess()); RegistryOps registryOps = this.registryAccess().createSerializationContext(NbtOps.INSTANCE); - if (compound.contains("listener", 10)) { + if (tag.contains("listener", 10)) { Data.CODEC - .parse(registryOps, compound.getCompound("listener")) + .parse(registryOps, tag.getCompound("listener")) .resultOrPartial(string -> LOGGER.error("Failed to parse vibration listener for Allay: '{}'", string)) .ifPresent(data -> this.vibrationData = data); } - this.duplicationCooldown = compound.getInt("DuplicationCooldown"); - this.entityData.set(DATA_CAN_DUPLICATE, compound.getBoolean("CanDuplicate")); + this.duplicationCooldown = tag.getInt("DuplicationCooldown"); + this.entityData.set(DATA_CAN_DUPLICATE, tag.getBoolean("CanDuplicate")); } @Override diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java index e30ef362..0c939260 100644 --- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java +++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java @@ -134,16 +134,16 @@ public class Armadillo extends Animal { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("armadilloBrain"); - ((Brain)this.brain).tick(serverLevel, this); + ((Brain)this.brain).tick(level, this); profilerFiller.pop(); profilerFiller.push("armadilloActivityUpdate"); ArmadilloAi.updateActivity(this); profilerFiller.pop(); if (this.isAlive() && !this.isBaby() && --this.scuteTime <= 0) { - if (this.dropFromGiftLootTable(serverLevel, BuiltInLootTables.ARMADILLO_SHED, this::spawnAtLocation)) { + if (this.dropFromGiftLootTable(level, BuiltInLootTables.ARMADILLO_SHED, this::spawnAtLocation)) { this.playSound(SoundEvents.ARMADILLO_SCUTE_DROP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); this.gameEvent(GameEvent.ENTITY_PLACE); } @@ -151,7 +151,7 @@ public class Armadillo extends Animal { this.scuteTime = this.pickNextScuteDropTime(); } - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } private int pickNextScuteDropTime() { @@ -227,9 +227,9 @@ public class Armadillo extends Animal { } public static boolean checkArmadilloSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return levelAccessor.getBlockState(blockPos.below()).is(BlockTags.ARMADILLO_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos); + return level.getBlockState(pos.below()).is(BlockTags.ARMADILLO_SPAWNABLE_ON) && isBrightEnoughToSpawn(level, pos); } public boolean isScaredBy(LivingEntity entity) { @@ -247,18 +247,18 @@ public class Armadillo extends Animal { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putString("state", this.getState().getSerializedName()); - compound.putInt("scute_time", this.scuteTime); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putString("state", this.getState().getSerializedName()); + tag.putInt("scute_time", this.scuteTime); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.switchToState(Armadillo.ArmadilloState.fromName(compound.getString("state"))); - if (compound.contains("scute_time")) { - this.scuteTime = compound.getInt("scute_time"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.switchToState(Armadillo.ArmadilloState.fromName(tag.getString("state"))); + if (tag.contains("scute_time")) { + this.scuteTime = tag.getInt("scute_time"); } } @@ -281,17 +281,17 @@ public class Armadillo extends Animal { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (this.isScared()) { - f = (f - 1.0F) / 2.0F; + amount = (amount - 1.0F) / 2.0F; } - return super.hurtServer(serverLevel, damageSource, f); + return super.hurtServer(level, damageSource, amount); } @Override - protected void actuallyHurt(ServerLevel serverLevel, DamageSource damageSource, float f) { - super.actuallyHurt(serverLevel, damageSource, f); + protected void actuallyHurt(ServerLevel level, DamageSource damageSource, float amount) { + super.actuallyHurt(level, damageSource, amount); if (!this.isNoAi() && !this.isDeadOrDying()) { if (damageSource.getEntity() instanceof LivingEntity) { this.getBrain().setMemoryWithExpiry(MemoryModuleType.DANGER_DETECTED_RECENTLY, true, 80L); diff --git a/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/net/minecraft/world/entity/animal/axolotl/Axolotl.java index c5c5c272..1d7a1740 100644 --- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java @@ -131,17 +131,17 @@ public class Axolotl extends Animal implements VariantHolder, B } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Variant", this.getVariant().getId()); - compound.putBoolean("FromBucket", this.fromBucket()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("Variant", this.getVariant().getId()); + tag.putBoolean("FromBucket", this.fromBucket()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setVariant(Axolotl.Variant.byId(compound.getInt("Variant"))); - this.setFromBucket(compound.getBoolean("FromBucket")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setVariant(Axolotl.Variant.byId(tag.getInt("Variant"))); + this.setFromBucket(tag.getBoolean("FromBucket")); } @Override @@ -153,13 +153,13 @@ public class Axolotl extends Animal implements VariantHolder, B @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { boolean bl = false; - if (entitySpawnReason == EntitySpawnReason.BUCKET) { + if (spawnReason == EntitySpawnReason.BUCKET) { return spawnGroupData; } else { - RandomSource randomSource = serverLevelAccessor.getRandom(); + RandomSource randomSource = level.getRandom(); if (spawnGroupData instanceof Axolotl.AxolotlGroupData) { if (((Axolotl.AxolotlGroupData)spawnGroupData).getGroupSize() >= 2) { bl = true; @@ -173,7 +173,7 @@ public class Axolotl extends Animal implements VariantHolder, B this.setAge(-24000); } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } } @@ -301,10 +301,10 @@ public class Axolotl extends Animal implements VariantHolder, B } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("axolotlBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.pop(); profilerFiller.push("axolotlActivityUpdate"); AxolotlAi.updateActivity(this); @@ -334,19 +334,19 @@ public class Axolotl extends Animal implements VariantHolder, B } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - float g = this.getHealth(); + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + float f = this.getHealth(); if (!this.isNoAi() && this.level().random.nextInt(3) == 0 - && (this.level().random.nextInt(3) < f || g / this.getMaxHealth() < 0.5F) - && f < g + && (this.level().random.nextInt(3) < amount || f / this.getMaxHealth() < 0.5F) + && amount < f && this.isInWater() && (damageSource.getEntity() != null || damageSource.getDirectEntity() != null) && !this.isPlayingDead()) { this.brain.setMemory(MemoryModuleType.PLAY_DEAD_TICKS, 200); } - return super.hurtServer(serverLevel, damageSource, f); + return super.hurtServer(level, damageSource, amount); } @Override @@ -405,14 +405,14 @@ public class Axolotl extends Animal implements VariantHolder, B return !this.isPlayingDead() && super.canBeSeenAsEnemy(); } - public static void onStopAttacking(ServerLevel serverLevel, Axolotl axolotl, LivingEntity livingEntity) { - if (livingEntity.isDeadOrDying()) { - DamageSource damageSource = livingEntity.getLastDamageSource(); + public static void onStopAttacking(ServerLevel level, Axolotl axolotl, LivingEntity target) { + if (target.isDeadOrDying()) { + DamageSource damageSource = target.getLastDamageSource(); if (damageSource != null) { Entity entity = damageSource.getEntity(); if (entity != null && entity.getType() == EntityType.PLAYER) { Player player = (Player)entity; - List list = serverLevel.getEntitiesOfClass(Player.class, axolotl.getBoundingBox().inflate(20.0)); + List list = level.getEntitiesOfClass(Player.class, axolotl.getBoundingBox().inflate(20.0)); if (list.contains(player)) { axolotl.applySupportingEffects(player); } @@ -517,13 +517,9 @@ public class Axolotl extends Animal implements VariantHolder, B } public static boolean checkAxolotlSpawnRules( - EntityType entityType, - ServerLevelAccessor serverLevelAccessor, - EntitySpawnReason entitySpawnReason, - BlockPos blockPos, - RandomSource randomSource + EntityType entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return serverLevelAccessor.getBlockState(blockPos.below()).is(BlockTags.AXOLOTLS_SPAWNABLE_ON); + return level.getBlockState(pos.below()).is(BlockTags.AXOLOTLS_SPAWNABLE_ON); } public static enum AnimationState { diff --git a/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java b/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java index 6dd5454f..ec756b4d 100644 --- a/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java +++ b/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java @@ -165,7 +165,7 @@ public class AxolotlAi { return entity.isInWaterOrBubble() ? 0.5F : 0.15F; } - private static Optional findNearestValidAttackTarget(ServerLevel serverLevel, Axolotl axolotl) { + private static Optional findNearestValidAttackTarget(ServerLevel level, Axolotl axolotl) { return BehaviorUtils.isBreeding(axolotl) ? Optional.empty() : axolotl.getBrain().getMemory(MemoryModuleType.NEAREST_ATTACKABLE); } diff --git a/net/minecraft/world/entity/animal/camel/Camel.java b/net/minecraft/world/entity/animal/camel/Camel.java index 72209ccc..75034438 100644 --- a/net/minecraft/world/entity/animal/camel/Camel.java +++ b/net/minecraft/world/entity/animal/camel/Camel.java @@ -85,15 +85,15 @@ public class Camel extends AbstractHorse { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putLong("LastPoseTick", this.entityData.get(LAST_POSE_CHANGE_TICK)); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putLong("LastPoseTick", this.entityData.get(LAST_POSE_CHANGE_TICK)); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - long l = compound.getLong("LastPoseTick"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + long l = tag.getLong("LastPoseTick"); if (l < 0L) { this.setPose(Pose.SITTING); } @@ -118,11 +118,11 @@ public class Camel extends AbstractHorse { @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - CamelAi.initMemories(this, serverLevelAccessor.getRandom()); - this.resetLastPoseChangeTickToFullStand(serverLevelAccessor.getLevel().getGameTime()); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + CamelAi.initMemories(this, level.getRandom()); + this.resetLastPoseChangeTickToFullStand(level.getLevel().getGameTime()); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override @@ -145,16 +145,16 @@ public class Camel extends AbstractHorse { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("camelBrain"); Brain brain = this.getBrain(); - ((Brain)brain).tick(serverLevel, this); + ((Brain)brain).tick(level, this); profilerFiller.pop(); profilerFiller.push("camelActivityUpdate"); CamelAi.updateActivity(this); profilerFiller.pop(); - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } @Override @@ -444,9 +444,9 @@ public class Camel extends AbstractHorse { } @Override - protected void actuallyHurt(ServerLevel serverLevel, DamageSource damageSource, float f) { + protected void actuallyHurt(ServerLevel level, DamageSource damageSource, float amount) { this.standUpInstantly(); - super.actuallyHurt(serverLevel, damageSource, f); + super.actuallyHurt(level, damageSource, amount); } @Override diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java index 9e2dde66..8e48be6a 100644 --- a/net/minecraft/world/entity/animal/frog/Frog.java +++ b/net/minecraft/world/entity/animal/frog/Frog.java @@ -169,30 +169,30 @@ public class Frog extends Animal implements VariantHolder> { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putString("variant", ((ResourceKey)this.getVariant().unwrapKey().orElse(DEFAULT_VARIANT)).location().toString()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putString("variant", ((ResourceKey)this.getVariant().unwrapKey().orElse(DEFAULT_VARIANT)).location().toString()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - Optional.ofNullable(ResourceLocation.tryParse(compound.getString("variant"))) + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + Optional.ofNullable(ResourceLocation.tryParse(tag.getString("variant"))) .map(resourceLocation -> ResourceKey.create(Registries.FROG_VARIANT, resourceLocation)) .flatMap(BuiltInRegistries.FROG_VARIANT::get) .ifPresent(this::setVariant); } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("frogBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.pop(); profilerFiller.push("frogActivityUpdate"); FrogAi.updateActivity(this); profilerFiller.pop(); - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } @Override @@ -275,9 +275,9 @@ public class Frog extends Animal implements VariantHolder> { @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - Holder holder = serverLevelAccessor.getBiome(this.blockPosition()); + Holder holder = level.getBiome(this.blockPosition()); if (holder.is(BiomeTags.SPAWNS_COLD_VARIANT_FROGS)) { this.setVariant(BuiltInRegistries.FROG_VARIANT.getOrThrow(FrogVariant.COLD)); } else if (holder.is(BiomeTags.SPAWNS_WARM_VARIANT_FROGS)) { @@ -286,8 +286,8 @@ public class Frog extends Animal implements VariantHolder> { this.setVariant(BuiltInRegistries.FROG_VARIANT.getOrThrow(DEFAULT_VARIANT)); } - FrogAi.initMemories(this, serverLevelAccessor.getRandom()); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + FrogAi.initMemories(this, level.getRandom()); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } public static net.minecraft.world.entity.ai.attributes.AttributeSupplier.Builder createAttributes() { @@ -369,9 +369,9 @@ public class Frog extends Animal implements VariantHolder> { } public static boolean checkFrogSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return levelAccessor.getBlockState(blockPos.below()).is(BlockTags.FROGS_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos); + return level.getBlockState(pos.below()).is(BlockTags.FROGS_SPAWNABLE_ON) && isBrightEnoughToSpawn(level, pos); } class FrogLookControl extends LookControl { diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java index 9b844be9..c6fb5950 100644 --- a/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/net/minecraft/world/entity/animal/frog/Tadpole.java @@ -96,15 +96,15 @@ public class Tadpole extends AbstractFish { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("tadpoleBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.pop(); profilerFiller.push("tadpoleActivityUpdate"); TadpoleAi.updateActivity(this); profilerFiller.pop(); - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } public static Builder createAttributes() { @@ -120,15 +120,15 @@ public class Tadpole extends AbstractFish { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Age", this.age); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("Age", this.age); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setAge(compound.getInt("Age")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setAge(tag.getInt("Age")); } @Nullable diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java index 2a71a223..fbf87c63 100644 --- a/net/minecraft/world/entity/animal/goat/Goat.java +++ b/net/minecraft/world/entity/animal/goat/Goat.java @@ -184,15 +184,15 @@ public class Goat extends Animal { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("goatBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.pop(); profilerFiller.push("goatActivityUpdate"); GoatAi.updateActivity(this); profilerFiller.pop(); - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } @Override @@ -246,9 +246,9 @@ public class Goat extends Animal { @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - RandomSource randomSource = serverLevelAccessor.getRandom(); + RandomSource randomSource = level.getRandom(); GoatAi.initMemories(this, randomSource); this.setScreamingGoat(randomSource.nextDouble() < 0.02); this.ageBoundaryReached(); @@ -257,7 +257,7 @@ public class Goat extends Animal { this.entityData.set(entityDataAccessor, false); } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override @@ -272,19 +272,19 @@ public class Goat extends Animal { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("IsScreamingGoat", this.isScreamingGoat()); - compound.putBoolean("HasLeftHorn", this.hasLeftHorn()); - compound.putBoolean("HasRightHorn", this.hasRightHorn()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("IsScreamingGoat", this.isScreamingGoat()); + tag.putBoolean("HasLeftHorn", this.hasLeftHorn()); + tag.putBoolean("HasRightHorn", this.hasRightHorn()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setScreamingGoat(compound.getBoolean("IsScreamingGoat")); - this.entityData.set(DATA_HAS_LEFT_HORN, compound.getBoolean("HasLeftHorn")); - this.entityData.set(DATA_HAS_RIGHT_HORN, compound.getBoolean("HasRightHorn")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setScreamingGoat(tag.getBoolean("IsScreamingGoat")); + this.entityData.set(DATA_HAS_LEFT_HORN, tag.getBoolean("HasLeftHorn")); + this.entityData.set(DATA_HAS_RIGHT_HORN, tag.getBoolean("HasRightHorn")); } @Override @@ -376,8 +376,8 @@ public class Goat extends Animal { } public static boolean checkGoatSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return levelAccessor.getBlockState(blockPos.below()).is(BlockTags.GOATS_SPAWNABLE_ON) && isBrightEnoughToSpawn(levelAccessor, blockPos); + return level.getBlockState(pos.below()).is(BlockTags.GOATS_SPAWNABLE_ON) && isBrightEnoughToSpawn(level, pos); } } diff --git a/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java b/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java index 2ffab9d6..d71df444 100644 --- a/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java +++ b/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java @@ -65,18 +65,18 @@ public abstract class AbstractChestedHorse extends AbstractHorse { } @Override - protected void dropEquipment(ServerLevel serverLevel) { - super.dropEquipment(serverLevel); + protected void dropEquipment(ServerLevel level) { + super.dropEquipment(level); if (this.hasChest()) { - this.spawnAtLocation(serverLevel, Blocks.CHEST); + this.spawnAtLocation(level, Blocks.CHEST); this.setChest(false); } } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("ChestedHorse", this.hasChest()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("ChestedHorse", this.hasChest()); if (this.hasChest()) { ListTag listTag = new ListTag(); @@ -89,17 +89,17 @@ public abstract class AbstractChestedHorse extends AbstractHorse { } } - compound.put("Items", listTag); + tag.put("Items", listTag); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setChest(compound.getBoolean("ChestedHorse")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setChest(tag.getBoolean("ChestedHorse")); this.createInventory(); if (this.hasChest()) { - ListTag listTag = compound.getList("Items", 10); + ListTag listTag = tag.getList("Items", 10); for (int i = 0; i < listTag.size(); i++) { CompoundTag compoundTag = listTag.getCompound(i); diff --git a/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/net/minecraft/world/entity/animal/horse/AbstractHorse.java index 99586506..14bc06bb 100644 --- a/net/minecraft/world/entity/animal/horse/AbstractHorse.java +++ b/net/minecraft/world/entity/animal/horse/AbstractHorse.java @@ -263,8 +263,8 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, } @Override - protected boolean canDispenserEquipIntoSlot(EquipmentSlot equipmentSlot) { - return equipmentSlot == EquipmentSlot.BODY && this.isTamed() || super.canDispenserEquipIntoSlot(equipmentSlot); + protected boolean canDispenserEquipIntoSlot(EquipmentSlot slot) { + return slot == EquipmentSlot.BODY && this.isTamed() || super.canDispenserEquipIntoSlot(slot); } @Override @@ -369,8 +369,8 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - boolean bl = super.hurtServer(serverLevel, damageSource, f); + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + boolean bl = super.hurtServer(level, damageSource, amount); if (bl && this.random.nextInt(3) == 0) { this.standIfPossible(); } @@ -562,13 +562,13 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, } @Override - protected void dropEquipment(ServerLevel serverLevel) { - super.dropEquipment(serverLevel); + protected void dropEquipment(ServerLevel level) { + super.dropEquipment(level); if (this.inventory != null) { for (int i = 0; i < this.inventory.getContainerSize(); i++) { ItemStack itemStack = this.inventory.getItem(i); if (!itemStack.isEmpty() && !EnchantmentHelper.has(itemStack, EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) { - this.spawnAtLocation(serverLevel, itemStack); + this.spawnAtLocation(level, itemStack); } } } @@ -604,9 +604,9 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, } } - protected void followMommy(ServerLevel serverLevel) { + protected void followMommy(ServerLevel level) { if (this.isBred() && this.isBaby() && !this.isEating()) { - LivingEntity livingEntity = serverLevel.getNearestEntity( + LivingEntity livingEntity = level.getNearestEntity( AbstractHorse.class, MOMMY_TARGETING, this, this.getX(), this.getY(), this.getZ(), this.getBoundingBox().inflate(16.0) ); if (livingEntity != null && this.distanceToSqr(livingEntity) > 4.0) { @@ -825,33 +825,33 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("EatingHaystack", this.isEating()); - compound.putBoolean("Bred", this.isBred()); - compound.putInt("Temper", this.getTemper()); - compound.putBoolean("Tame", this.isTamed()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("EatingHaystack", this.isEating()); + tag.putBoolean("Bred", this.isBred()); + tag.putInt("Temper", this.getTemper()); + tag.putBoolean("Tame", this.isTamed()); if (this.getOwnerUUID() != null) { - compound.putUUID("Owner", this.getOwnerUUID()); + tag.putUUID("Owner", this.getOwnerUUID()); } if (!this.inventory.getItem(0).isEmpty()) { - compound.put("SaddleItem", this.inventory.getItem(0).save(this.registryAccess())); + tag.put("SaddleItem", this.inventory.getItem(0).save(this.registryAccess())); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setEating(compound.getBoolean("EatingHaystack")); - this.setBred(compound.getBoolean("Bred")); - this.setTemper(compound.getInt("Temper")); - this.setTamed(compound.getBoolean("Tame")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setEating(tag.getBoolean("EatingHaystack")); + this.setBred(tag.getBoolean("Bred")); + this.setTemper(tag.getInt("Temper")); + this.setTamed(tag.getBoolean("Tame")); UUID uUID; - if (compound.hasUUID("Owner")) { - uUID = compound.getUUID("Owner"); + if (tag.hasUUID("Owner")) { + uUID = tag.getUUID("Owner"); } else { - String string = compound.getString("Owner"); + String string = tag.getString("Owner"); uUID = OldUsersConverter.convertMobOwnerIfNecessary(this.getServer(), string); } @@ -859,8 +859,8 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, this.setOwnerUUID(uUID); } - if (compound.contains("SaddleItem", 10)) { - ItemStack itemStack = (ItemStack)ItemStack.parse(this.registryAccess(), compound.getCompound("SaddleItem")).orElse(ItemStack.EMPTY); + if (tag.contains("SaddleItem", 10)) { + ItemStack itemStack = (ItemStack)ItemStack.parse(this.registryAccess(), tag.getCompound("SaddleItem")).orElse(ItemStack.EMPTY); if (itemStack.is(Items.SADDLE)) { this.inventory.setItem(0, itemStack); } @@ -1108,14 +1108,14 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { if (spawnGroupData == null) { spawnGroupData = new AgeableMob.AgeableMobGroupData(0.2F); } - this.randomizeAttributes(serverLevelAccessor.getRandom()); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + this.randomizeAttributes(level.getRandom()); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } public boolean hasInventoryChanged(Container inventory) { diff --git a/net/minecraft/world/entity/animal/horse/Horse.java b/net/minecraft/world/entity/animal/horse/Horse.java index e482dc91..16897f33 100644 --- a/net/minecraft/world/entity/animal/horse/Horse.java +++ b/net/minecraft/world/entity/animal/horse/Horse.java @@ -58,15 +58,15 @@ public class Horse extends AbstractHorse implements VariantHolder { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Variant", this.getTypeVariant()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("Variant", this.getTypeVariant()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setTypeVariant(compound.getInt("Variant")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setTypeVariant(tag.getInt("Variant")); } private void setTypeVariant(int typeVariant) { @@ -213,9 +213,9 @@ public class Horse extends AbstractHorse implements VariantHolder { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - RandomSource randomSource = serverLevelAccessor.getRandom(); + RandomSource randomSource = level.getRandom(); Variant variant; if (spawnGroupData instanceof Horse.HorseGroupData) { variant = ((Horse.HorseGroupData)spawnGroupData).variant; @@ -225,7 +225,7 @@ public class Horse extends AbstractHorse implements VariantHolder { } this.setVariantAndMarkings(variant, Util.getRandom(Markings.values(), randomSource)); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override diff --git a/net/minecraft/world/entity/animal/horse/Llama.java b/net/minecraft/world/entity/animal/horse/Llama.java index 72347f43..ed8821e0 100644 --- a/net/minecraft/world/entity/animal/horse/Llama.java +++ b/net/minecraft/world/entity/animal/horse/Llama.java @@ -97,17 +97,17 @@ public class Llama extends AbstractChestedHorse implements VariantHolder entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return !EntitySpawnReason.isSpawner(entitySpawnReason) - ? Animal.checkAnimalSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource) - : EntitySpawnReason.ignoresLightRequirements(entitySpawnReason) || isBrightEnoughToSpawn(levelAccessor, blockPos); + return !EntitySpawnReason.isSpawner(spawnReason) + ? Animal.checkAnimalSpawnRules(entityType, level, spawnReason, pos, random) + : EntitySpawnReason.ignoresLightRequirements(spawnReason) || isBrightEnoughToSpawn(level, pos); } @Override @@ -127,17 +127,17 @@ public class SkeletonHorse extends AbstractHorse { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("SkeletonTrap", this.isTrap()); - compound.putInt("SkeletonTrapTime", this.trapTime); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("SkeletonTrap", this.isTrap()); + tag.putInt("SkeletonTrapTime", this.trapTime); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setTrap(compound.getBoolean("SkeletonTrap")); - this.trapTime = compound.getInt("SkeletonTrapTime"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setTrap(tag.getBoolean("SkeletonTrap")); + this.trapTime = tag.getInt("SkeletonTrapTime"); } @Override diff --git a/net/minecraft/world/entity/animal/horse/TraderLlama.java b/net/minecraft/world/entity/animal/horse/TraderLlama.java index cde24cf6..41d968c9 100644 --- a/net/minecraft/world/entity/animal/horse/TraderLlama.java +++ b/net/minecraft/world/entity/animal/horse/TraderLlama.java @@ -9,8 +9,8 @@ import net.minecraft.world.entity.EntitySpawnReason; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.SpawnGroupData; -import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ai.goal.PanicGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.ai.goal.target.TargetGoal; import net.minecraft.world.entity.ai.targeting.TargetingConditions; @@ -41,16 +41,16 @@ public class TraderLlama extends Llama { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("DespawnDelay", this.despawnDelay); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("DespawnDelay", this.despawnDelay); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("DespawnDelay", 99)) { - this.despawnDelay = compound.getInt("DespawnDelay"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("DespawnDelay", 99)) { + this.despawnDelay = tag.getInt("DespawnDelay"); } } @@ -109,9 +109,9 @@ public class TraderLlama extends Llama { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - if (entitySpawnReason == EntitySpawnReason.EVENT) { + if (spawnReason == EntitySpawnReason.EVENT) { this.setAge(0); } @@ -119,7 +119,7 @@ public class TraderLlama extends Llama { spawnGroupData = new AgeableMob.AgeableMobGroupData(false); } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } protected static class TraderLlamaDefendWanderingTraderGoal extends TargetGoal { @@ -130,7 +130,7 @@ public class TraderLlama extends Llama { public TraderLlamaDefendWanderingTraderGoal(Llama llama) { super(llama, false); this.llama = llama; - this.setFlags(EnumSet.of(Goal.Flag.TARGET)); + this.setFlags(EnumSet.of(Flag.TARGET)); } @Override diff --git a/net/minecraft/world/entity/animal/horse/ZombieHorse.java b/net/minecraft/world/entity/animal/horse/ZombieHorse.java index 3179a4a7..74ee21e4 100644 --- a/net/minecraft/world/entity/animal/horse/ZombieHorse.java +++ b/net/minecraft/world/entity/animal/horse/ZombieHorse.java @@ -38,11 +38,11 @@ public class ZombieHorse extends AbstractHorse { } public static boolean checkZombieHorseSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return !EntitySpawnReason.isSpawner(entitySpawnReason) - ? Animal.checkAnimalSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource) - : EntitySpawnReason.ignoresLightRequirements(entitySpawnReason) || isBrightEnoughToSpawn(levelAccessor, blockPos); + return !EntitySpawnReason.isSpawner(spawnReason) + ? Animal.checkAnimalSpawnRules(entityType, level, spawnReason, pos, random) + : EntitySpawnReason.ignoresLightRequirements(spawnReason) || isBrightEnoughToSpawn(level, pos); } @Override diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java index 84679e6b..895b07fe 100644 --- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java @@ -441,14 +441,14 @@ public class Sniffer extends Animal { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("snifferBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.popPush("snifferActivityUpdate"); SnifferAi.updateActivity(this); profilerFiller.pop(); - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } @Override diff --git a/net/minecraft/world/entity/boss/EnderDragonPart.java b/net/minecraft/world/entity/boss/EnderDragonPart.java index fc5444ff..f267673c 100644 --- a/net/minecraft/world/entity/boss/EnderDragonPart.java +++ b/net/minecraft/world/entity/boss/EnderDragonPart.java @@ -32,11 +32,11 @@ public class EnderDragonPart extends Entity { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { + protected void readAdditionalSaveData(CompoundTag tag) { } @Override - protected void addAdditionalSaveData(CompoundTag compound) { + protected void addAdditionalSaveData(CompoundTag tag) { } @Override @@ -51,8 +51,8 @@ public class EnderDragonPart extends Entity { } @Override - public final boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - return this.isInvulnerableToBase(damageSource) ? false : this.parentMob.hurt(serverLevel, this, damageSource, f); + public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + return this.isInvulnerableToBase(damageSource) ? false : this.parentMob.hurt(level, this, damageSource, amount); } @Override diff --git a/net/minecraft/world/entity/boss/enderdragon/DragonFlightHistory.java b/net/minecraft/world/entity/boss/enderdragon/DragonFlightHistory.java index 90e0cf0d..aa684467 100644 --- a/net/minecraft/world/entity/boss/enderdragon/DragonFlightHistory.java +++ b/net/minecraft/world/entity/boss/enderdragon/DragonFlightHistory.java @@ -13,13 +13,13 @@ public class DragonFlightHistory { Arrays.fill(this.samples, new DragonFlightHistory.Sample(0.0, 0.0F)); } - public void copyFrom(DragonFlightHistory dragonFlightHistory) { - System.arraycopy(dragonFlightHistory.samples, 0, this.samples, 0, 64); - this.head = dragonFlightHistory.head; + public void copyFrom(DragonFlightHistory other) { + System.arraycopy(other.samples, 0, this.samples, 0, 64); + this.head = other.head; } - public void record(double d, float f) { - DragonFlightHistory.Sample sample = new DragonFlightHistory.Sample(d, f); + public void record(double y, float yRot) { + DragonFlightHistory.Sample sample = new DragonFlightHistory.Sample(y, yRot); if (this.head < 0) { Arrays.fill(this.samples, sample); } @@ -31,14 +31,14 @@ public class DragonFlightHistory { this.samples[this.head] = sample; } - public DragonFlightHistory.Sample get(int i) { - return this.samples[this.head - i & 63]; + public DragonFlightHistory.Sample get(int index) { + return this.samples[this.head - index & 63]; } - public DragonFlightHistory.Sample get(int i, float f) { - DragonFlightHistory.Sample sample = this.get(i); - DragonFlightHistory.Sample sample2 = this.get(i + 1); - return new DragonFlightHistory.Sample(Mth.lerp((double)f, sample2.y, sample.y), Mth.rotLerp(f, sample2.yRot, sample.yRot)); + public DragonFlightHistory.Sample get(int index, float partialTick) { + DragonFlightHistory.Sample sample = this.get(index); + DragonFlightHistory.Sample sample2 = this.get(index + 1); + return new DragonFlightHistory.Sample(Mth.lerp((double)partialTick, sample2.y, sample.y), Mth.rotLerp(partialTick, sample2.yRot, sample.yRot)); } public record Sample(double y, float yRot) { diff --git a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java index df8507ec..3a69b358 100644 --- a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java +++ b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java @@ -63,19 +63,19 @@ public class EndCrystal extends Entity { } @Override - protected void addAdditionalSaveData(CompoundTag compound) { + protected void addAdditionalSaveData(CompoundTag tag) { if (this.getBeamTarget() != null) { - compound.put("beam_target", NbtUtils.writeBlockPos(this.getBeamTarget())); + tag.put("beam_target", NbtUtils.writeBlockPos(this.getBeamTarget())); } - compound.putBoolean("ShowBottom", this.showsBottom()); + tag.putBoolean("ShowBottom", this.showsBottom()); } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - NbtUtils.readBlockPos(compound, "beam_target").ifPresent(this::setBeamTarget); - if (compound.contains("ShowBottom", 1)) { - this.setShowBottom(compound.getBoolean("ShowBottom")); + protected void readAdditionalSaveData(CompoundTag tag) { + NbtUtils.readBlockPos(tag, "beam_target").ifPresent(this::setBeamTarget); + if (tag.contains("ShowBottom", 1)) { + this.setShowBottom(tag.getBoolean("ShowBottom")); } } @@ -90,7 +90,7 @@ public class EndCrystal extends Entity { } @Override - public final boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (this.isInvulnerableToBase(damageSource)) { return false; } else if (damageSource.getEntity() instanceof EnderDragon) { @@ -100,10 +100,10 @@ public class EndCrystal extends Entity { this.remove(Entity.RemovalReason.KILLED); if (!damageSource.is(DamageTypeTags.IS_EXPLOSION)) { DamageSource damageSource2 = damageSource.getEntity() != null ? this.damageSources().explosion(this, damageSource.getEntity()) : null; - serverLevel.explode(this, damageSource2, null, this.getX(), this.getY(), this.getZ(), 6.0F, false, Level.ExplosionInteraction.BLOCK); + level.explode(this, damageSource2, null, this.getX(), this.getY(), this.getZ(), 6.0F, false, Level.ExplosionInteraction.BLOCK); } - this.onDestroyedBy(serverLevel, damageSource); + this.onDestroyedBy(level, damageSource); } return true; @@ -111,13 +111,13 @@ public class EndCrystal extends Entity { } @Override - public void kill(ServerLevel serverLevel) { - this.onDestroyedBy(serverLevel, this.damageSources().generic()); - super.kill(serverLevel); + public void kill(ServerLevel level) { + this.onDestroyedBy(level, this.damageSources().generic()); + super.kill(level); } - private void onDestroyedBy(ServerLevel serverLevel, DamageSource damageSource) { - EndDragonFight endDragonFight = serverLevel.getDragonFight(); + private void onDestroyedBy(ServerLevel level, DamageSource damageSource) { + EndDragonFight endDragonFight = level.getDragonFight(); if (endDragonFight != null) { endDragonFight.onCrystalDestroyed(this, damageSource); } diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java index a579aaf6..f511b95b 100644 --- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java @@ -390,12 +390,12 @@ public class EnderDragon extends Mob implements Enemy { } } - private void hurt(ServerLevel serverLevel, List list) { - for (Entity entity : list) { + private void hurt(ServerLevel level, List entities) { + for (Entity entity : entities) { if (entity instanceof LivingEntity) { DamageSource damageSource = this.damageSources().mobAttack(this); - entity.hurtServer(serverLevel, damageSource, 10.0F); - EnchantmentHelper.doPostAttackEffects(serverLevel, entity, damageSource); + entity.hurtServer(level, damageSource, 10.0F); + EnchantmentHelper.doPostAttackEffects(level, entity, damageSource); } } } @@ -407,13 +407,13 @@ public class EnderDragon extends Mob implements Enemy { return (float)Mth.wrapDegrees(angle); } - private boolean checkWalls(ServerLevel serverLevel, AABB aABB) { - int i = Mth.floor(aABB.minX); - int j = Mth.floor(aABB.minY); - int k = Mth.floor(aABB.minZ); - int l = Mth.floor(aABB.maxX); - int m = Mth.floor(aABB.maxY); - int n = Mth.floor(aABB.maxZ); + private boolean checkWalls(ServerLevel level, AABB box) { + int i = Mth.floor(box.minX); + int j = Mth.floor(box.minY); + int k = Mth.floor(box.minZ); + int l = Mth.floor(box.maxX); + int m = Mth.floor(box.maxY); + int n = Mth.floor(box.maxZ); boolean bl = false; boolean bl2 = false; @@ -421,10 +421,10 @@ public class EnderDragon extends Mob implements Enemy { for (int p = j; p <= m; p++) { for (int q = k; q <= n; q++) { BlockPos blockPos = new BlockPos(o, p, q); - BlockState blockState = serverLevel.getBlockState(blockPos); + BlockState blockState = level.getBlockState(blockPos); if (!blockState.isAir() && !blockState.is(BlockTags.DRAGON_TRANSPARENT)) { - if (serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && !blockState.is(BlockTags.DRAGON_IMMUNE)) { - bl2 = serverLevel.removeBlock(blockPos, false) || bl2; + if (level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && !blockState.is(BlockTags.DRAGON_IMMUNE)) { + bl2 = level.removeBlock(blockPos, false) || bl2; } else { bl = true; } @@ -435,34 +435,34 @@ public class EnderDragon extends Mob implements Enemy { if (bl2) { BlockPos blockPos2 = new BlockPos(i + this.random.nextInt(l - i + 1), j + this.random.nextInt(m - j + 1), k + this.random.nextInt(n - k + 1)); - serverLevel.levelEvent(2008, blockPos2, 0); + level.levelEvent(2008, blockPos2, 0); } return bl; } - public boolean hurt(ServerLevel serverLevel, EnderDragonPart enderDragonPart, DamageSource damageSource, float f) { + public boolean hurt(ServerLevel level, EnderDragonPart part, DamageSource damageSource, float amount) { if (this.phaseManager.getCurrentPhase().getPhase() == EnderDragonPhase.DYING) { return false; } else { - f = this.phaseManager.getCurrentPhase().onHurt(damageSource, f); - if (enderDragonPart != this.head) { - f = f / 4.0F + Math.min(f, 1.0F); + amount = this.phaseManager.getCurrentPhase().onHurt(damageSource, amount); + if (part != this.head) { + amount = amount / 4.0F + Math.min(amount, 1.0F); } - if (f < 0.01F) { + if (amount < 0.01F) { return false; } else { if (damageSource.getEntity() instanceof Player || damageSource.is(DamageTypeTags.ALWAYS_HURTS_ENDER_DRAGONS)) { - float g = this.getHealth(); - this.reallyHurt(serverLevel, damageSource, f); + float f = this.getHealth(); + this.reallyHurt(level, damageSource, amount); if (this.isDeadOrDying() && !this.phaseManager.getCurrentPhase().isSitting()) { this.setHealth(1.0F); this.phaseManager.setPhase(EnderDragonPhase.DYING); } if (this.phaseManager.getCurrentPhase().isSitting()) { - this.sittingDamageReceived = this.sittingDamageReceived + g - this.getHealth(); + this.sittingDamageReceived = this.sittingDamageReceived + f - this.getHealth(); if (this.sittingDamageReceived > 0.25F * this.getMaxHealth()) { this.sittingDamageReceived = 0.0F; this.phaseManager.setPhase(EnderDragonPhase.TAKEOFF); @@ -476,16 +476,16 @@ public class EnderDragon extends Mob implements Enemy { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - return this.hurt(serverLevel, this.body, damageSource, f); + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + return this.hurt(level, this.body, damageSource, amount); } - protected void reallyHurt(ServerLevel serverLevel, DamageSource damageSource, float f) { - super.hurtServer(serverLevel, damageSource, f); + protected void reallyHurt(ServerLevel level, DamageSource damageSource, float amount) { + super.hurtServer(level, damageSource, amount); } @Override - public void kill(ServerLevel serverLevel) { + public void kill(ServerLevel level) { this.remove(Entity.RemovalReason.KILLED); this.gameEvent(GameEvent.ENTITY_DIE); if (this.dragonFight != null) { @@ -725,21 +725,21 @@ public class EnderDragon extends Mob implements Enemy { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("DragonPhase", this.phaseManager.getCurrentPhase().getPhase().getId()); - compound.putInt("DragonDeathTime", this.dragonDeathTime); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("DragonPhase", this.phaseManager.getCurrentPhase().getPhase().getId()); + tag.putInt("DragonDeathTime", this.dragonDeathTime); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("DragonPhase")) { - this.phaseManager.setPhase(EnderDragonPhase.getById(compound.getInt("DragonPhase"))); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("DragonPhase")) { + this.phaseManager.setPhase(EnderDragonPhase.getById(tag.getInt("DragonPhase"))); } - if (compound.contains("DragonDeathTime")) { - this.dragonDeathTime = compound.getInt("DragonDeathTime"); + if (tag.contains("DragonDeathTime")) { + this.dragonDeathTime = tag.getInt("DragonDeathTime"); } } @@ -802,19 +802,19 @@ public class EnderDragon extends Mob implements Enemy { return vec3; } - public void onCrystalDestroyed(ServerLevel serverLevel, EndCrystal endCrystal, BlockPos blockPos, DamageSource damageSource) { + public void onCrystalDestroyed(ServerLevel level, EndCrystal crystal, BlockPos pos, DamageSource damageSource) { Player player; if (damageSource.getEntity() instanceof Player) { player = (Player)damageSource.getEntity(); } else { - player = serverLevel.getNearestPlayer(CRYSTAL_DESTROY_TARGETING, blockPos.getX(), blockPos.getY(), blockPos.getZ()); + player = level.getNearestPlayer(CRYSTAL_DESTROY_TARGETING, pos.getX(), pos.getY(), pos.getZ()); } - if (endCrystal == this.nearestCrystal) { - this.hurt(serverLevel, this.head, this.damageSources().explosion(endCrystal, player), 10.0F); + if (crystal == this.nearestCrystal) { + this.hurt(level, this.head, this.damageSources().explosion(crystal, player), 10.0F); } - this.phaseManager.getCurrentPhase().onCrystalDestroyed(endCrystal, blockPos, damageSource, player); + this.phaseManager.getCurrentPhase().onCrystalDestroyed(crystal, pos, damageSource, player); } @Override diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/AbstractDragonPhaseInstance.java b/net/minecraft/world/entity/boss/enderdragon/phases/AbstractDragonPhaseInstance.java index 2d0bce60..fecd76c4 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/AbstractDragonPhaseInstance.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/AbstractDragonPhaseInstance.java @@ -26,7 +26,7 @@ public abstract class AbstractDragonPhaseInstance implements DragonPhaseInstance } @Override - public void doServerTick(ServerLevel serverLevel) { + public void doServerTick(ServerLevel level) { } @Override diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonChargePlayerPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonChargePlayerPhase.java index 87f6efbb..28d0d6b6 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonChargePlayerPhase.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonChargePlayerPhase.java @@ -19,7 +19,7 @@ public class DragonChargePlayerPhase extends AbstractDragonPhaseInstance { } @Override - public void doServerTick(ServerLevel serverLevel) { + public void doServerTick(ServerLevel level) { if (this.targetLocation == null) { LOGGER.warn("Aborting charge player as no target was set."); this.dragon.getPhaseManager().setPhase(EnderDragonPhase.HOLDING_PATTERN); diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java index 0acf1706..86dbdd3a 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java @@ -31,10 +31,10 @@ public class DragonDeathPhase extends AbstractDragonPhaseInstance { } @Override - public void doServerTick(ServerLevel serverLevel) { + public void doServerTick(ServerLevel level) { this.time++; if (this.targetLocation == null) { - BlockPos blockPos = serverLevel.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); + BlockPos blockPos = level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); this.targetLocation = Vec3.atBottomCenterOf(blockPos); } diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java index ff6f6d09..032d89e1 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java @@ -32,10 +32,10 @@ public class DragonHoldingPatternPhase extends AbstractDragonPhaseInstance { } @Override - public void doServerTick(ServerLevel serverLevel) { + public void doServerTick(ServerLevel level) { double d = this.targetLocation == null ? 0.0 : this.targetLocation.distanceToSqr(this.dragon.getX(), this.dragon.getY(), this.dragon.getZ()); if (d < 100.0 || d > 22500.0 || this.dragon.horizontalCollision || this.dragon.verticalCollision) { - this.findNewTarget(serverLevel); + this.findNewTarget(level); } } @@ -51,16 +51,16 @@ public class DragonHoldingPatternPhase extends AbstractDragonPhaseInstance { return this.targetLocation; } - private void findNewTarget(ServerLevel serverLevel) { + private void findNewTarget(ServerLevel level) { if (this.currentPath != null && this.currentPath.isDone()) { - BlockPos blockPos = serverLevel.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); + BlockPos blockPos = level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); int i = this.dragon.getDragonFight() == null ? 0 : this.dragon.getDragonFight().getCrystalsAlive(); if (this.dragon.getRandom().nextInt(i + 3) == 0) { this.dragon.getPhaseManager().setPhase(EnderDragonPhase.LANDING_APPROACH); return; } - Player player = serverLevel.getNearestPlayer(NEW_TARGET_TARGETING, this.dragon, blockPos.getX(), blockPos.getY(), blockPos.getZ()); + Player player = level.getNearestPlayer(NEW_TARGET_TARGETING, this.dragon, blockPos.getX(), blockPos.getY(), blockPos.getZ()); double d; if (player != null) { d = blockPos.distToCenterSqr(player.position()) / 512.0; diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoverPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoverPhase.java index 525f6cf7..e24b2f4e 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoverPhase.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoverPhase.java @@ -14,7 +14,7 @@ public class DragonHoverPhase extends AbstractDragonPhaseInstance { } @Override - public void doServerTick(ServerLevel serverLevel) { + public void doServerTick(ServerLevel level) { if (this.targetLocation == null) { this.targetLocation = this.dragon.position(); } diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java index 6e8f14b3..1b2f964e 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java @@ -36,10 +36,10 @@ public class DragonLandingApproachPhase extends AbstractDragonPhaseInstance { } @Override - public void doServerTick(ServerLevel serverLevel) { + public void doServerTick(ServerLevel level) { double d = this.targetLocation == null ? 0.0 : this.targetLocation.distanceToSqr(this.dragon.getX(), this.dragon.getY(), this.dragon.getZ()); if (d < 100.0 || d > 22500.0 || this.dragon.horizontalCollision || this.dragon.verticalCollision) { - this.findNewTarget(serverLevel); + this.findNewTarget(level); } } @@ -49,11 +49,11 @@ public class DragonLandingApproachPhase extends AbstractDragonPhaseInstance { return this.targetLocation; } - private void findNewTarget(ServerLevel serverLevel) { + private void findNewTarget(ServerLevel level) { if (this.currentPath == null || this.currentPath.isDone()) { int i = this.dragon.findClosestNode(); - BlockPos blockPos = serverLevel.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); - Player player = serverLevel.getNearestPlayer(NEAR_EGG_TARGETING, this.dragon, blockPos.getX(), blockPos.getY(), blockPos.getZ()); + BlockPos blockPos = level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); + Player player = level.getNearestPlayer(NEAR_EGG_TARGETING, this.dragon, blockPos.getX(), blockPos.getY(), blockPos.getZ()); int j; if (player != null) { Vec3 vec3 = new Vec3(player.getX(), 0.0, player.getZ()).normalize(); diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java index 1ada9384..3448bcc3 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java @@ -37,10 +37,10 @@ public class DragonLandingPhase extends AbstractDragonPhaseInstance { } @Override - public void doServerTick(ServerLevel serverLevel) { + public void doServerTick(ServerLevel level) { if (this.targetLocation == null) { this.targetLocation = Vec3.atBottomCenterOf( - serverLevel.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())) + level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())) ); } diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonPhaseInstance.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonPhaseInstance.java index a534ef87..e38f00f8 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonPhaseInstance.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonPhaseInstance.java @@ -17,7 +17,7 @@ public interface DragonPhaseInstance { */ void doClientTick(); - void doServerTick(ServerLevel serverLevel); + void doServerTick(ServerLevel level); void onCrystalDestroyed(EndCrystal crystal, BlockPos pos, DamageSource damageSource, @Nullable Player player); diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingAttackingPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingAttackingPhase.java index 6141f111..56f69b00 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingAttackingPhase.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingAttackingPhase.java @@ -29,7 +29,7 @@ public class DragonSittingAttackingPhase extends AbstractDragonSittingPhase { } @Override - public void doServerTick(ServerLevel serverLevel) { + public void doServerTick(ServerLevel level) { if (this.attackingTicks++ >= 40) { this.dragon.getPhaseManager().setPhase(EnderDragonPhase.SITTING_FLAMING); } diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java index 017cf1df..a499c7f4 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java @@ -49,7 +49,7 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase { } @Override - public void doServerTick(ServerLevel serverLevel) { + public void doServerTick(ServerLevel level) { this.flameTicks++; if (this.flameTicks >= 200) { if (this.flameCount >= 4) { @@ -66,7 +66,7 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase { double h = g; BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(d, g, e); - while (serverLevel.isEmptyBlock(mutableBlockPos)) { + while (level.isEmptyBlock(mutableBlockPos)) { if (--h < 0.0) { h = g; break; @@ -76,13 +76,13 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase { } h = Mth.floor(h) + 1; - this.flame = new AreaEffectCloud(serverLevel, d, h, e); + this.flame = new AreaEffectCloud(level, d, h, e); this.flame.setOwner(this.dragon); this.flame.setRadius(5.0F); this.flame.setDuration(200); this.flame.setParticle(ParticleTypes.DRAGON_BREATH); this.flame.addEffect(new MobEffectInstance(MobEffects.HARM)); - serverLevel.addFreshEntity(this.flame); + level.addFreshEntity(this.flame); } } diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingScanningPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingScanningPhase.java index eb667489..3eb72df7 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingScanningPhase.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingScanningPhase.java @@ -24,9 +24,9 @@ public class DragonSittingScanningPhase extends AbstractDragonSittingPhase { } @Override - public void doServerTick(ServerLevel serverLevel) { + public void doServerTick(ServerLevel level) { this.scanningTime++; - LivingEntity livingEntity = serverLevel.getNearestPlayer(this.scanTargeting, this.dragon, this.dragon.getX(), this.dragon.getY(), this.dragon.getZ()); + LivingEntity livingEntity = level.getNearestPlayer(this.scanTargeting, this.dragon, this.dragon.getX(), this.dragon.getY(), this.dragon.getZ()); if (livingEntity != null) { if (this.scanningTime > 25) { this.dragon.getPhaseManager().setPhase(EnderDragonPhase.SITTING_ATTACKING); @@ -52,7 +52,7 @@ public class DragonSittingScanningPhase extends AbstractDragonSittingPhase { } } } else if (this.scanningTime >= 100) { - livingEntity = serverLevel.getNearestPlayer(CHARGE_TARGETING, this.dragon, this.dragon.getX(), this.dragon.getY(), this.dragon.getZ()); + livingEntity = level.getNearestPlayer(CHARGE_TARGETING, this.dragon, this.dragon.getX(), this.dragon.getY(), this.dragon.getZ()); this.dragon.getPhaseManager().setPhase(EnderDragonPhase.TAKEOFF); if (livingEntity != null) { this.dragon.getPhaseManager().setPhase(EnderDragonPhase.CHARGING_PLAYER); diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java index 6017c21e..c83daf99 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java @@ -30,7 +30,7 @@ public class DragonStrafePlayerPhase extends AbstractDragonPhaseInstance { } @Override - public void doServerTick(ServerLevel serverLevel) { + public void doServerTick(ServerLevel level) { if (this.attackTarget == null) { LOGGER.warn("Skipping player strafe phase because no player was found"); this.dragon.getPhaseManager().setPhase(EnderDragonPhase.HOLDING_PATTERN); @@ -71,12 +71,12 @@ public class DragonStrafePlayerPhase extends AbstractDragonPhaseInstance { double q = this.attackTarget.getZ() - n; Vec3 vec34 = new Vec3(o, p, q); if (!this.dragon.isSilent()) { - serverLevel.levelEvent(null, 1017, this.dragon.blockPosition(), 0); + level.levelEvent(null, 1017, this.dragon.blockPosition(), 0); } - DragonFireball dragonFireball = new DragonFireball(serverLevel, this.dragon, vec34.normalize()); + DragonFireball dragonFireball = new DragonFireball(level, this.dragon, vec34.normalize()); dragonFireball.moveTo(l, m, n, 0.0F, 0.0F); - serverLevel.addFreshEntity(dragonFireball); + level.addFreshEntity(dragonFireball); this.fireballCharge = 0; if (this.currentPath != null) { while (!this.currentPath.isDone()) { diff --git a/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java b/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java index 0412e0a2..1d5c760d 100644 --- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java +++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java @@ -22,9 +22,9 @@ public class DragonTakeoffPhase extends AbstractDragonPhaseInstance { } @Override - public void doServerTick(ServerLevel serverLevel) { + public void doServerTick(ServerLevel level) { if (!this.firstTick && this.currentPath != null) { - BlockPos blockPos = serverLevel.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); + BlockPos blockPos = level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); if (!blockPos.closerToCenterThan(this.dragon.position(), 10.0)) { this.dragon.getPhaseManager().setPhase(EnderDragonPhase.HOLDING_PATTERN); } diff --git a/net/minecraft/world/entity/boss/wither/WitherBoss.java b/net/minecraft/world/entity/boss/wither/WitherBoss.java index 1360203f..54193001 100644 --- a/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/net/minecraft/world/entity/boss/wither/WitherBoss.java @@ -37,6 +37,7 @@ import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; import net.minecraft.world.entity.ai.goal.RangedAttackGoal; import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomFlyingGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.ai.navigation.FlyingPathNavigation; @@ -114,15 +115,15 @@ public class WitherBoss extends Monster implements RangedAttackMob { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Invul", this.getInvulnerableTicks()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("Invul", this.getInvulnerableTicks()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setInvulnerableTicks(compound.getInt("Invul")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setInvulnerableTicks(tag.getInt("Invul")); if (this.hasCustomName()) { this.bossEvent.setName(this.getDisplayName()); } @@ -248,14 +249,14 @@ public class WitherBoss extends Monster implements RangedAttackMob { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { if (this.getInvulnerableTicks() > 0) { int i = this.getInvulnerableTicks() - 1; this.bossEvent.setProgress(1.0F - i / 220.0F); if (i <= 0) { - serverLevel.explode(this, this.getX(), this.getEyeY(), this.getZ(), 7.0F, false, Level.ExplosionInteraction.MOB); + level.explode(this, this.getX(), this.getEyeY(), this.getZ(), 7.0F, false, Level.ExplosionInteraction.MOB); if (!this.isSilent()) { - serverLevel.globalLevelEvent(1023, this.blockPosition(), 0); + level.globalLevelEvent(1023, this.blockPosition(), 0); } } @@ -264,12 +265,12 @@ public class WitherBoss extends Monster implements RangedAttackMob { this.heal(10.0F); } } else { - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); for (int ix = 1; ix < 3; ix++) { if (this.tickCount >= this.nextHeadUpdate[ix - 1]) { this.nextHeadUpdate[ix - 1] = this.tickCount + 10 + this.random.nextInt(10); - if ((serverLevel.getDifficulty() == Difficulty.NORMAL || serverLevel.getDifficulty() == Difficulty.HARD) && this.idleHeadUpdates[ix - 1]++ > 15) { + if ((level.getDifficulty() == Difficulty.NORMAL || level.getDifficulty() == Difficulty.HARD) && this.idleHeadUpdates[ix - 1]++ > 15) { float f = 10.0F; float g = 5.0F; double d = Mth.nextDouble(this.random, this.getX() - 10.0, this.getX() + 10.0); @@ -281,7 +282,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { int j = this.getAlternativeTarget(ix); if (j > 0) { - LivingEntity livingEntity = (LivingEntity)serverLevel.getEntity(j); + LivingEntity livingEntity = (LivingEntity)level.getEntity(j); if (livingEntity != null && this.canAttack(livingEntity) && !(this.distanceToSqr(livingEntity) > 900.0) && this.hasLineOfSight(livingEntity)) { this.performRangedAttack(ix + 1, livingEntity); this.nextHeadUpdate[ix - 1] = this.tickCount + 40 + this.random.nextInt(20); @@ -290,7 +291,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { this.setAlternativeTarget(ix, 0); } } else { - List list = serverLevel.getNearbyEntities(LivingEntity.class, TARGETING_CONDITIONS, this, this.getBoundingBox().inflate(20.0, 8.0, 20.0)); + List list = level.getNearbyEntities(LivingEntity.class, TARGETING_CONDITIONS, this, this.getBoundingBox().inflate(20.0, 8.0, 20.0)); if (!list.isEmpty()) { LivingEntity livingEntity2 = (LivingEntity)list.get(this.random.nextInt(list.size())); this.setAlternativeTarget(ix, livingEntity2.getId()); @@ -307,7 +308,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { if (this.destroyBlocksTick > 0) { this.destroyBlocksTick--; - if (this.destroyBlocksTick == 0 && serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { + if (this.destroyBlocksTick == 0 && level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { boolean bl = false; int j = Mth.floor(this.getBbWidth() / 2.0F + 1.0F); int k = Mth.floor(this.getBbHeight()); @@ -315,14 +316,14 @@ public class WitherBoss extends Monster implements RangedAttackMob { for (BlockPos blockPos : BlockPos.betweenClosed( this.getBlockX() - j, this.getBlockY(), this.getBlockZ() - j, this.getBlockX() + j, this.getBlockY() + k, this.getBlockZ() + j )) { - BlockState blockState = serverLevel.getBlockState(blockPos); + BlockState blockState = level.getBlockState(blockPos); if (canDestroy(blockState)) { - bl = serverLevel.destroyBlock(blockPos, true, this) || bl; + bl = level.destroyBlock(blockPos, true, this) || bl; } } if (bl) { - serverLevel.levelEvent(null, 1022, this.blockPosition(), 0); + level.levelEvent(null, 1022, this.blockPosition(), 0); } } } @@ -437,8 +438,8 @@ public class WitherBoss extends Monster implements RangedAttackMob { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - if (this.isInvulnerableTo(serverLevel, damageSource)) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + if (this.isInvulnerableTo(level, damageSource)) { return false; } else if (damageSource.is(DamageTypeTags.WITHER_IMMUNE_TO) || damageSource.getEntity() instanceof WitherBoss) { return false; @@ -464,7 +465,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { this.idleHeadUpdates[i] = this.idleHeadUpdates[i] + 3; } - return super.hurtServer(serverLevel, damageSource, f); + return super.hurtServer(level, damageSource, amount); } } } @@ -554,7 +555,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { class WitherDoNothingGoal extends Goal { public WitherDoNothingGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.JUMP, Goal.Flag.LOOK)); + this.setFlags(EnumSet.of(Flag.MOVE, Flag.JUMP, Flag.LOOK)); } @Override diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java index 14821afc..b0be617a 100644 --- a/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/net/minecraft/world/entity/decoration/ArmorStand.java @@ -173,39 +173,39 @@ public class ArmorStand extends LivingEntity { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); ListTag listTag = new ListTag(); for (ItemStack itemStack : this.armorItems) { listTag.add(itemStack.saveOptional(this.registryAccess())); } - compound.put("ArmorItems", listTag); + tag.put("ArmorItems", listTag); ListTag listTag2 = new ListTag(); for (ItemStack itemStack2 : this.handItems) { listTag2.add(itemStack2.saveOptional(this.registryAccess())); } - compound.put("HandItems", listTag2); - compound.putBoolean("Invisible", this.isInvisible()); - compound.putBoolean("Small", this.isSmall()); - compound.putBoolean("ShowArms", this.showArms()); - compound.putInt("DisabledSlots", this.disabledSlots); - compound.putBoolean("NoBasePlate", !this.showBasePlate()); + tag.put("HandItems", listTag2); + tag.putBoolean("Invisible", this.isInvisible()); + tag.putBoolean("Small", this.isSmall()); + tag.putBoolean("ShowArms", this.showArms()); + tag.putInt("DisabledSlots", this.disabledSlots); + tag.putBoolean("NoBasePlate", !this.showBasePlate()); if (this.isMarker()) { - compound.putBoolean("Marker", this.isMarker()); + tag.putBoolean("Marker", this.isMarker()); } - compound.put("Pose", this.writePose()); + tag.put("Pose", this.writePose()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("ArmorItems", 9)) { - ListTag listTag = compound.getList("ArmorItems", 10); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("ArmorItems", 9)) { + ListTag listTag = tag.getList("ArmorItems", 10); for (int i = 0; i < this.armorItems.size(); i++) { CompoundTag compoundTag = listTag.getCompound(i); @@ -213,8 +213,8 @@ public class ArmorStand extends LivingEntity { } } - if (compound.contains("HandItems", 9)) { - ListTag listTag = compound.getList("HandItems", 10); + if (tag.contains("HandItems", 9)) { + ListTag listTag = tag.getList("HandItems", 10); for (int i = 0; i < this.handItems.size(); i++) { CompoundTag compoundTag = listTag.getCompound(i); @@ -222,14 +222,14 @@ public class ArmorStand extends LivingEntity { } } - this.setInvisible(compound.getBoolean("Invisible")); - this.setSmall(compound.getBoolean("Small")); - this.setShowArms(compound.getBoolean("ShowArms")); - this.disabledSlots = compound.getInt("DisabledSlots"); - this.setNoBasePlate(compound.getBoolean("NoBasePlate")); - this.setMarker(compound.getBoolean("Marker")); + this.setInvisible(tag.getBoolean("Invisible")); + this.setSmall(tag.getBoolean("Small")); + this.setShowArms(tag.getBoolean("ShowArms")); + this.disabledSlots = tag.getInt("DisabledSlots"); + this.setNoBasePlate(tag.getBoolean("NoBasePlate")); + this.setMarker(tag.getBoolean("Marker")); this.noPhysics = !this.hasPhysics(); - CompoundTag compoundTag2 = compound.getCompound("Pose"); + CompoundTag compoundTag2 = tag.getCompound("Pose"); this.readPose(compoundTag2); } @@ -376,30 +376,30 @@ public class ArmorStand extends LivingEntity { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (this.isRemoved()) { return false; - } else if (!serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) { + } else if (!level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) { return false; } else if (damageSource.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) { - this.kill(serverLevel); + this.kill(level); return false; - } else if (this.isInvulnerableTo(serverLevel, damageSource) || this.invisible || this.isMarker()) { + } else if (this.isInvulnerableTo(level, damageSource) || this.invisible || this.isMarker()) { return false; } else if (damageSource.is(DamageTypeTags.IS_EXPLOSION)) { - this.brokenByAnything(serverLevel, damageSource); - this.kill(serverLevel); + this.brokenByAnything(level, damageSource); + this.kill(level); return false; } else if (damageSource.is(DamageTypeTags.IGNITES_ARMOR_STANDS)) { if (this.isOnFire()) { - this.causeDamage(serverLevel, damageSource, 0.15F); + this.causeDamage(level, damageSource, 0.15F); } else { this.igniteForSeconds(5.0F); } return false; } else if (damageSource.is(DamageTypeTags.BURNS_ARMOR_STANDS) && this.getHealth() > 0.5F) { - this.causeDamage(serverLevel, damageSource, 4.0F); + this.causeDamage(level, damageSource, 4.0F); return false; } else { boolean bl = damageSource.is(DamageTypeTags.CAN_BREAK_ARMOR_STAND); @@ -411,18 +411,18 @@ public class ArmorStand extends LivingEntity { } else if (damageSource.isCreativePlayer()) { this.playBrokenSound(); this.showBreakingParticles(); - this.kill(serverLevel); + this.kill(level); return true; } else { - long l = serverLevel.getGameTime(); + long l = level.getGameTime(); if (l - this.lastHit > 5L && !bl2) { - serverLevel.broadcastEntityEvent(this, (byte)32); + level.broadcastEntityEvent(this, (byte)32); this.gameEvent(GameEvent.ENTITY_DAMAGE, damageSource.getEntity()); this.lastHit = l; } else { - this.brokenByPlayer(serverLevel, damageSource); + this.brokenByPlayer(level, damageSource); this.showBreakingParticles(); - this.kill(serverLevel); + this.kill(level); } return true; @@ -591,7 +591,7 @@ public class ArmorStand extends LivingEntity { } @Override - public void kill(ServerLevel serverLevel) { + public void kill(ServerLevel level) { this.remove(Entity.RemovalReason.KILLED); this.gameEvent(GameEvent.ENTITY_DIE); } diff --git a/net/minecraft/world/entity/decoration/BlockAttachedEntity.java b/net/minecraft/world/entity/decoration/BlockAttachedEntity.java index 118b7367..65521ca3 100644 --- a/net/minecraft/world/entity/decoration/BlockAttachedEntity.java +++ b/net/minecraft/world/entity/decoration/BlockAttachedEntity.java @@ -70,16 +70,16 @@ public abstract class BlockAttachedEntity extends Entity { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (this.isInvulnerableToBase(damageSource)) { return false; - } else if (!serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) { + } else if (!level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) { return false; } else { if (!this.isRemoved()) { - this.kill(serverLevel); + this.kill(level); this.markHurt(); - this.dropItem(serverLevel, damageSource.getEntity()); + this.dropItem(level, damageSource.getEntity()); } return true; @@ -92,8 +92,8 @@ public abstract class BlockAttachedEntity extends Entity { } @Override - public void move(MoverType type, Vec3 pos) { - if (this.level() instanceof ServerLevel serverLevel && !this.isRemoved() && pos.lengthSqr() > 0.0) { + public void move(MoverType type, Vec3 movement) { + if (this.level() instanceof ServerLevel serverLevel && !this.isRemoved() && movement.lengthSqr() > 0.0) { this.kill(serverLevel); this.dropItem(serverLevel, null); } @@ -108,16 +108,16 @@ public abstract class BlockAttachedEntity extends Entity { } @Override - public void addAdditionalSaveData(CompoundTag compound) { + public void addAdditionalSaveData(CompoundTag tag) { BlockPos blockPos = this.getPos(); - compound.putInt("TileX", blockPos.getX()); - compound.putInt("TileY", blockPos.getY()); - compound.putInt("TileZ", blockPos.getZ()); + tag.putInt("TileX", blockPos.getX()); + tag.putInt("TileY", blockPos.getY()); + tag.putInt("TileZ", blockPos.getZ()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - BlockPos blockPos = new BlockPos(compound.getInt("TileX"), compound.getInt("TileY"), compound.getInt("TileZ")); + public void readAdditionalSaveData(CompoundTag tag) { + BlockPos blockPos = new BlockPos(tag.getInt("TileX"), tag.getInt("TileY"), tag.getInt("TileZ")); if (!blockPos.closerThan(this.blockPosition(), 16.0)) { LOGGER.error("Block-attached entity at invalid position: {}", blockPos); } else { @@ -125,7 +125,7 @@ public abstract class BlockAttachedEntity extends Entity { } } - public abstract void dropItem(ServerLevel serverLevel, @Nullable Entity entity); + public abstract void dropItem(ServerLevel level, @Nullable Entity entity); @Override protected boolean repositionEntityAfterLoad() { diff --git a/net/minecraft/world/entity/decoration/HangingEntity.java b/net/minecraft/world/entity/decoration/HangingEntity.java index abd7f833..20b4325d 100644 --- a/net/minecraft/world/entity/decoration/HangingEntity.java +++ b/net/minecraft/world/entity/decoration/HangingEntity.java @@ -84,9 +84,9 @@ public abstract class HangingEntity extends BlockAttachedEntity { public abstract void playPlacementSound(); @Override - public ItemEntity spawnAtLocation(ServerLevel serverLevel, ItemStack itemStack, float f) { + public ItemEntity spawnAtLocation(ServerLevel level, ItemStack stack, float yOffset) { ItemEntity itemEntity = new ItemEntity( - this.level(), this.getX() + this.direction.getStepX() * 0.15F, this.getY() + f, this.getZ() + this.direction.getStepZ() * 0.15F, itemStack + this.level(), this.getX() + this.direction.getStepX() * 0.15F, this.getY() + yOffset, this.getZ() + this.direction.getStepZ() * 0.15F, stack ); itemEntity.setDefaultPickUpDelay(); this.level().addFreshEntity(itemEntity); diff --git a/net/minecraft/world/entity/decoration/ItemFrame.java b/net/minecraft/world/entity/decoration/ItemFrame.java index dbf19167..8f972f93 100644 --- a/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/net/minecraft/world/entity/decoration/ItemFrame.java @@ -113,9 +113,9 @@ public class ItemFrame extends HangingEntity { } @Override - public void move(MoverType type, Vec3 pos) { + public void move(MoverType type, Vec3 movement) { if (!this.fixed) { - super.move(type, pos); + super.move(type, movement); } } @@ -127,9 +127,9 @@ public class ItemFrame extends HangingEntity { } @Override - public void kill(ServerLevel serverLevel) { + public void kill(ServerLevel level) { this.removeFramedMap(this.getItem()); - super.kill(serverLevel); + super.kill(level); } private boolean shouldDamageDropItem(DamageSource damageSource) { @@ -146,20 +146,20 @@ public class ItemFrame extends HangingEntity { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (!this.fixed) { if (this.isInvulnerableToBase(damageSource)) { return false; } else if (this.shouldDamageDropItem(damageSource)) { - this.dropItem(serverLevel, damageSource.getEntity(), false); + this.dropItem(level, damageSource.getEntity(), false); this.gameEvent(GameEvent.BLOCK_CHANGE, damageSource.getEntity()); this.playSound(this.getRemoveItemSound(), 1.0F, 1.0F); return true; } else { - return super.hurtServer(serverLevel, damageSource, f); + return super.hurtServer(level, damageSource, amount); } } else { - return canHurtWhenFixed(damageSource) && super.hurtServer(serverLevel, damageSource, f); + return canHurtWhenFixed(damageSource) && super.hurtServer(level, damageSource, amount); } } @@ -175,9 +175,9 @@ public class ItemFrame extends HangingEntity { } @Override - public void dropItem(ServerLevel serverLevel, @Nullable Entity entity) { + public void dropItem(ServerLevel level, @Nullable Entity entity) { this.playSound(this.getBreakSound(), 1.0F, 1.0F); - this.dropItem(serverLevel, entity, true); + this.dropItem(level, entity, true); this.gameEvent(GameEvent.BLOCK_CHANGE, entity); } @@ -194,26 +194,26 @@ public class ItemFrame extends HangingEntity { return SoundEvents.ITEM_FRAME_PLACE; } - private void dropItem(ServerLevel serverLevel, @Nullable Entity entity, boolean bl) { + private void dropItem(ServerLevel level, @Nullable Entity entity, boolean dropItem) { if (!this.fixed) { ItemStack itemStack = this.getItem(); this.setItem(ItemStack.EMPTY); - if (!serverLevel.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { + if (!level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { if (entity == null) { this.removeFramedMap(itemStack); } } else if (entity instanceof Player player && player.hasInfiniteMaterials()) { this.removeFramedMap(itemStack); } else { - if (bl) { - this.spawnAtLocation(serverLevel, this.getFrameItemStack()); + if (dropItem) { + this.spawnAtLocation(level, this.getFrameItemStack()); } if (!itemStack.isEmpty()) { itemStack = itemStack.copy(); this.removeFramedMap(itemStack); if (this.random.nextFloat() < this.dropChance) { - this.spawnAtLocation(serverLevel, itemStack); + this.spawnAtLocation(level, itemStack); } } } @@ -311,25 +311,25 @@ public class ItemFrame extends HangingEntity { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (!this.getItem().isEmpty()) { - compound.put("Item", this.getItem().save(this.registryAccess())); - compound.putByte("ItemRotation", (byte)this.getRotation()); - compound.putFloat("ItemDropChance", this.dropChance); + tag.put("Item", this.getItem().save(this.registryAccess())); + tag.putByte("ItemRotation", (byte)this.getRotation()); + tag.putFloat("ItemDropChance", this.dropChance); } - compound.putByte("Facing", (byte)this.direction.get3DDataValue()); - compound.putBoolean("Invisible", this.isInvisible()); - compound.putBoolean("Fixed", this.fixed); + tag.putByte("Facing", (byte)this.direction.get3DDataValue()); + tag.putBoolean("Invisible", this.isInvisible()); + tag.putBoolean("Fixed", this.fixed); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); ItemStack itemStack; - if (compound.contains("Item", 10)) { - CompoundTag compoundTag = compound.getCompound("Item"); + if (tag.contains("Item", 10)) { + CompoundTag compoundTag = tag.getCompound("Item"); itemStack = (ItemStack)ItemStack.parse(this.registryAccess(), compoundTag).orElse(ItemStack.EMPTY); } else { itemStack = ItemStack.EMPTY; @@ -342,15 +342,15 @@ public class ItemFrame extends HangingEntity { this.setItem(itemStack, false); if (!itemStack.isEmpty()) { - this.setRotation(compound.getByte("ItemRotation"), false); - if (compound.contains("ItemDropChance", 99)) { - this.dropChance = compound.getFloat("ItemDropChance"); + this.setRotation(tag.getByte("ItemRotation"), false); + if (tag.contains("ItemDropChance", 99)) { + this.dropChance = tag.getFloat("ItemDropChance"); } } - this.setDirection(Direction.from3DDataValue(compound.getByte("Facing"))); - this.setInvisible(compound.getBoolean("Invisible")); - this.fixed = compound.getBoolean("Fixed"); + this.setDirection(Direction.from3DDataValue(tag.getByte("Facing"))); + this.setInvisible(tag.getBoolean("Invisible")); + this.fixed = tag.getBoolean("Fixed"); } @Override diff --git a/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java b/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java index 45784cbb..d1bbca78 100644 --- a/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java +++ b/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java @@ -56,16 +56,16 @@ public class LeashFenceKnotEntity extends BlockAttachedEntity { } @Override - public void dropItem(ServerLevel serverLevel, @Nullable Entity entity) { + public void dropItem(ServerLevel level, @Nullable Entity entity) { this.playSound(SoundEvents.LEASH_KNOT_BREAK, 1.0F, 1.0F); } @Override - public void addAdditionalSaveData(CompoundTag compound) { + public void addAdditionalSaveData(CompoundTag tag) { } @Override - public void readAdditionalSaveData(CompoundTag compound) { + public void readAdditionalSaveData(CompoundTag tag) { } @Override diff --git a/net/minecraft/world/entity/decoration/Painting.java b/net/minecraft/world/entity/decoration/Painting.java index 24eda521..95c09a98 100644 --- a/net/minecraft/world/entity/decoration/Painting.java +++ b/net/minecraft/world/entity/decoration/Painting.java @@ -111,18 +111,18 @@ public class Painting extends HangingEntity implements VariantHolder compound.merge((CompoundTag)tag)); - compound.putByte("facing", (byte)this.direction.get2DDataValue()); - super.addAdditionalSaveData(compound); + .ifSuccess(tagx -> tag.merge((CompoundTag)tagx)); + tag.putByte("facing", (byte)this.direction.get2DDataValue()); + super.addAdditionalSaveData(tag); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - VARIANT_CODEC.parse(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), compound).ifSuccess(this::setVariant); - this.direction = Direction.from2DDataValue(compound.getByte("facing")); - super.readAdditionalSaveData(compound); + public void readAdditionalSaveData(CompoundTag tag) { + VARIANT_CODEC.parse(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), tag).ifSuccess(this::setVariant); + this.direction = Direction.from2DDataValue(tag.getByte("facing")); + super.readAdditionalSaveData(tag); this.setDirection(this.direction); } @@ -147,11 +147,11 @@ public class Painting extends HangingEntity implements VariantHolder bootstrapContext, ResourceKey resourceKey, int i, int j, boolean bl) { - bootstrapContext.register( - resourceKey, + private static void register(BootstrapContext context, ResourceKey key, int width, int height, boolean hasAuthor) { + context.register( + key, new PaintingVariant( - i, - j, - resourceKey.location(), - Optional.of(Component.translatable(resourceKey.location().toLanguageKey("painting", "title")).withStyle(ChatFormatting.YELLOW)), - bl ? Optional.of(Component.translatable(resourceKey.location().toLanguageKey("painting", "author")).withStyle(ChatFormatting.GRAY)) : Optional.empty() + width, + height, + key.location(), + Optional.of(Component.translatable(key.location().toLanguageKey("painting", "title")).withStyle(ChatFormatting.YELLOW)), + hasAuthor ? Optional.of(Component.translatable(key.location().toLanguageKey("painting", "author")).withStyle(ChatFormatting.GRAY)) : Optional.empty() ) ); } diff --git a/net/minecraft/world/entity/item/FallingBlockEntity.java b/net/minecraft/world/entity/item/FallingBlockEntity.java index 79685d05..02bfe579 100644 --- a/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -100,7 +100,7 @@ public class FallingBlockEntity extends Entity { } @Override - public final boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (!this.isInvulnerableToBase(damageSource)) { this.markHurt(); } @@ -273,41 +273,41 @@ public class FallingBlockEntity extends Entity { } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - compound.put("BlockState", NbtUtils.writeBlockState(this.blockState)); - compound.putInt("Time", this.time); - compound.putBoolean("DropItem", this.dropItem); - compound.putBoolean("HurtEntities", this.hurtEntities); - compound.putFloat("FallHurtAmount", this.fallDamagePerDistance); - compound.putInt("FallHurtMax", this.fallDamageMax); + protected void addAdditionalSaveData(CompoundTag tag) { + tag.put("BlockState", NbtUtils.writeBlockState(this.blockState)); + tag.putInt("Time", this.time); + tag.putBoolean("DropItem", this.dropItem); + tag.putBoolean("HurtEntities", this.hurtEntities); + tag.putFloat("FallHurtAmount", this.fallDamagePerDistance); + tag.putInt("FallHurtMax", this.fallDamageMax); if (this.blockData != null) { - compound.put("TileEntityData", this.blockData); + tag.put("TileEntityData", this.blockData); } - compound.putBoolean("CancelDrop", this.cancelDrop); + tag.putBoolean("CancelDrop", this.cancelDrop); } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - this.blockState = NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), compound.getCompound("BlockState")); - this.time = compound.getInt("Time"); - if (compound.contains("HurtEntities", 99)) { - this.hurtEntities = compound.getBoolean("HurtEntities"); - this.fallDamagePerDistance = compound.getFloat("FallHurtAmount"); - this.fallDamageMax = compound.getInt("FallHurtMax"); + protected void readAdditionalSaveData(CompoundTag tag) { + this.blockState = NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), tag.getCompound("BlockState")); + this.time = tag.getInt("Time"); + if (tag.contains("HurtEntities", 99)) { + this.hurtEntities = tag.getBoolean("HurtEntities"); + this.fallDamagePerDistance = tag.getFloat("FallHurtAmount"); + this.fallDamageMax = tag.getInt("FallHurtMax"); } else if (this.blockState.is(BlockTags.ANVIL)) { this.hurtEntities = true; } - if (compound.contains("DropItem", 99)) { - this.dropItem = compound.getBoolean("DropItem"); + if (tag.contains("DropItem", 99)) { + this.dropItem = tag.getBoolean("DropItem"); } - if (compound.contains("TileEntityData", 10)) { - this.blockData = compound.getCompound("TileEntityData").copy(); + if (tag.contains("TileEntityData", 10)) { + this.blockData = tag.getCompound("TileEntityData").copy(); } - this.cancelDrop = compound.getBoolean("CancelDrop"); + this.cancelDrop = tag.getBoolean("CancelDrop"); if (this.blockState.isAir()) { this.blockState = Blocks.SAND.defaultBlockState(); } diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java index 4b7c2ecc..b3704e10 100644 --- a/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java @@ -202,9 +202,9 @@ public class ItemEntity extends Entity implements TraceableEntity { this.setFluidMovement(0.95F); } - private void setFluidMovement(double d) { + private void setFluidMovement(double multiplier) { Vec3 vec3 = this.getDeltaMovement(); - this.setDeltaMovement(vec3.x * d, vec3.y + (vec3.y < 0.06F ? 5.0E-4F : 0.0F), vec3.z * d); + this.setDeltaMovement(vec3.x * multiplier, vec3.y + (vec3.y < 0.06F ? 5.0E-4F : 0.0F), vec3.z * multiplier); } /** @@ -284,16 +284,16 @@ public class ItemEntity extends Entity implements TraceableEntity { } @Override - public final boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (this.isInvulnerableToBase(damageSource)) { return false; - } else if (!serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) { + } else if (!level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) { return false; } else if (!this.getItem().canBeHurtBy(damageSource)) { return false; } else { this.markHurt(); - this.health = (int)(this.health - f); + this.health = (int)(this.health - amount); this.gameEvent(GameEvent.ENTITY_DAMAGE, damageSource.getEntity()); if (this.health <= 0) { this.getItem().onDestroyed(this); @@ -310,42 +310,42 @@ public class ItemEntity extends Entity implements TraceableEntity { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - compound.putShort("Health", (short)this.health); - compound.putShort("Age", (short)this.age); - compound.putShort("PickupDelay", (short)this.pickupDelay); + public void addAdditionalSaveData(CompoundTag tag) { + tag.putShort("Health", (short)this.health); + tag.putShort("Age", (short)this.age); + tag.putShort("PickupDelay", (short)this.pickupDelay); if (this.thrower != null) { - compound.putUUID("Thrower", this.thrower); + tag.putUUID("Thrower", this.thrower); } if (this.target != null) { - compound.putUUID("Owner", this.target); + tag.putUUID("Owner", this.target); } if (!this.getItem().isEmpty()) { - compound.put("Item", this.getItem().save(this.registryAccess())); + tag.put("Item", this.getItem().save(this.registryAccess())); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - this.health = compound.getShort("Health"); - this.age = compound.getShort("Age"); - if (compound.contains("PickupDelay")) { - this.pickupDelay = compound.getShort("PickupDelay"); + public void readAdditionalSaveData(CompoundTag tag) { + this.health = tag.getShort("Health"); + this.age = tag.getShort("Age"); + if (tag.contains("PickupDelay")) { + this.pickupDelay = tag.getShort("PickupDelay"); } - if (compound.hasUUID("Owner")) { - this.target = compound.getUUID("Owner"); + if (tag.hasUUID("Owner")) { + this.target = tag.getUUID("Owner"); } - if (compound.hasUUID("Thrower")) { - this.thrower = compound.getUUID("Thrower"); + if (tag.hasUUID("Thrower")) { + this.thrower = tag.getUUID("Thrower"); this.cachedThrower = null; } - if (compound.contains("Item", 10)) { - CompoundTag compoundTag = compound.getCompound("Item"); + if (tag.contains("Item", 10)) { + CompoundTag compoundTag = tag.getCompound("Item"); this.setItem((ItemStack)ItemStack.parse(this.registryAccess(), compoundTag).orElse(ItemStack.EMPTY)); } else { this.setItem(ItemStack.EMPTY); @@ -465,8 +465,8 @@ public class ItemEntity extends Entity implements TraceableEntity { this.age = 5999; } - public static float getSpin(float f, float g) { - return f / 20.0F + g; + public static float getSpin(float age, float bobOffset) { + return age / 20.0F + bobOffset; } public ItemEntity copy() { diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java index 7c057f3c..3e6f9254 100644 --- a/net/minecraft/world/entity/item/PrimedTnt.java +++ b/net/minecraft/world/entity/item/PrimedTnt.java @@ -132,23 +132,23 @@ public class PrimedTnt extends Entity implements TraceableEntity { } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - compound.putShort("fuse", (short)this.getFuse()); - compound.put("block_state", NbtUtils.writeBlockState(this.getBlockState())); + protected void addAdditionalSaveData(CompoundTag tag) { + tag.putShort("fuse", (short)this.getFuse()); + tag.put("block_state", NbtUtils.writeBlockState(this.getBlockState())); if (this.explosionPower != 4.0F) { - compound.putFloat("explosion_power", this.explosionPower); + tag.putFloat("explosion_power", this.explosionPower); } } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - this.setFuse(compound.getShort("fuse")); - if (compound.contains("block_state", 10)) { - this.setBlockState(NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), compound.getCompound("block_state"))); + protected void readAdditionalSaveData(CompoundTag tag) { + this.setFuse(tag.getShort("fuse")); + if (tag.contains("block_state", 10)) { + this.setBlockState(NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), tag.getCompound("block_state"))); } - if (compound.contains("explosion_power", 99)) { - this.explosionPower = Mth.clamp(compound.getFloat("explosion_power"), 0.0F, 128.0F); + if (tag.contains("explosion_power", 99)) { + this.explosionPower = Mth.clamp(tag.getFloat("explosion_power"), 0.0F, 128.0F); } } @@ -203,7 +203,7 @@ public class PrimedTnt extends Entity implements TraceableEntity { } @Override - public final boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { return false; } } diff --git a/net/minecraft/world/entity/monster/AbstractSkeleton.java b/net/minecraft/world/entity/monster/AbstractSkeleton.java index e812cc11..e70d226f 100644 --- a/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java @@ -136,14 +136,14 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - spawnGroupData = super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); - RandomSource randomSource = serverLevelAccessor.getRandom(); - this.populateDefaultEquipmentSlots(randomSource, difficultyInstance); - this.populateDefaultEquipmentEnchantments(serverLevelAccessor, randomSource, difficultyInstance); + spawnGroupData = super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); + RandomSource randomSource = level.getRandom(); + this.populateDefaultEquipmentSlots(randomSource, difficulty); + this.populateDefaultEquipmentEnchantments(level, randomSource, difficulty); this.reassessWeaponGoal(); - this.setCanPickUpLoot(randomSource.nextFloat() < 0.55F * difficultyInstance.getSpecialMultiplier()); + this.setCanPickUpLoot(randomSource.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) { LocalDate localDate = LocalDate.now(); int i = localDate.get(ChronoField.DAY_OF_MONTH); @@ -213,8 +213,8 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); this.reassessWeaponGoal(); } diff --git a/net/minecraft/world/entity/monster/Blaze.java b/net/minecraft/world/entity/monster/Blaze.java index aa913cb1..9e2c4661 100644 --- a/net/minecraft/world/entity/monster/Blaze.java +++ b/net/minecraft/world/entity/monster/Blaze.java @@ -18,6 +18,7 @@ import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; import net.minecraft.world.entity.ai.goal.MoveTowardsRestrictionGoal; import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.player.Player; @@ -116,7 +117,7 @@ public class Blaze extends Monster { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { this.nextHeightOffsetChangeTick--; if (this.nextHeightOffsetChangeTick <= 0) { this.nextHeightOffsetChangeTick = 100; @@ -130,7 +131,7 @@ public class Blaze extends Monster { this.hasImpulse = true; } - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } @Override @@ -161,7 +162,7 @@ public class Blaze extends Monster { public BlazeAttackGoal(Blaze blaze) { this.blaze = blaze; - this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK)); + this.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK)); } @Override diff --git a/net/minecraft/world/entity/monster/Bogged.java b/net/minecraft/world/entity/monster/Bogged.java index 69d3f9d8..62cfc520 100644 --- a/net/minecraft/world/entity/monster/Bogged.java +++ b/net/minecraft/world/entity/monster/Bogged.java @@ -48,15 +48,15 @@ public class Bogged extends AbstractSkeleton implements Shearable { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("sheared", this.isSheared()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("sheared", this.isSheared()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setSheared(compound.getBoolean("sheared")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setSheared(tag.getBoolean("sheared")); } public boolean isSheared() { @@ -124,15 +124,15 @@ public class Bogged extends AbstractSkeleton implements Shearable { } @Override - public void shear(ServerLevel serverLevel, SoundSource soundSource, ItemStack itemStack) { - serverLevel.playSound(null, this, SoundEvents.BOGGED_SHEAR, soundSource, 1.0F, 1.0F); - this.spawnShearedMushrooms(serverLevel, itemStack); + public void shear(ServerLevel level, SoundSource soundSource, ItemStack shears) { + level.playSound(null, this, SoundEvents.BOGGED_SHEAR, soundSource, 1.0F, 1.0F); + this.spawnShearedMushrooms(level, shears); this.setSheared(true); } - private void spawnShearedMushrooms(ServerLevel serverLevel, ItemStack itemStack) { + private void spawnShearedMushrooms(ServerLevel level, ItemStack stack) { this.dropFromShearingLootTable( - serverLevel, BuiltInLootTables.BOGGED_SHEAR, itemStack, (serverLevelx, itemStackx) -> this.spawnAtLocation(serverLevelx, itemStackx, this.getBbHeight()) + level, BuiltInLootTables.BOGGED_SHEAR, stack, (serverLevel, itemStack) -> this.spawnAtLocation(serverLevel, itemStack, this.getBbHeight()) ); } diff --git a/net/minecraft/world/entity/monster/CaveSpider.java b/net/minecraft/world/entity/monster/CaveSpider.java index 79704161..e63b5f13 100644 --- a/net/minecraft/world/entity/monster/CaveSpider.java +++ b/net/minecraft/world/entity/monster/CaveSpider.java @@ -27,9 +27,9 @@ public class CaveSpider extends Spider { } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { - if (super.doHurtTarget(serverLevel, entity)) { - if (entity instanceof LivingEntity) { + public boolean doHurtTarget(ServerLevel level, Entity source) { + if (super.doHurtTarget(level, source)) { + if (source instanceof LivingEntity) { int i = 0; if (this.level().getDifficulty() == Difficulty.NORMAL) { i = 7; @@ -38,7 +38,7 @@ public class CaveSpider extends Spider { } if (i > 0) { - ((LivingEntity)entity).addEffect(new MobEffectInstance(MobEffects.POISON, i * 20, 0), this); + ((LivingEntity)source).addEffect(new MobEffectInstance(MobEffects.POISON, i * 20, 0), this); } } @@ -51,7 +51,7 @@ public class CaveSpider extends Spider { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { return spawnGroupData; } diff --git a/net/minecraft/world/entity/monster/Creeper.java b/net/minecraft/world/entity/monster/Creeper.java index c8e5e7ed..82bc2e08 100644 --- a/net/minecraft/world/entity/monster/Creeper.java +++ b/net/minecraft/world/entity/monster/Creeper.java @@ -97,30 +97,30 @@ public class Creeper extends Monster { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (this.entityData.get(DATA_IS_POWERED)) { - compound.putBoolean("powered", true); + tag.putBoolean("powered", true); } - compound.putShort("Fuse", (short)this.maxSwell); - compound.putByte("ExplosionRadius", (byte)this.explosionRadius); - compound.putBoolean("ignited", this.isIgnited()); + tag.putShort("Fuse", (short)this.maxSwell); + tag.putByte("ExplosionRadius", (byte)this.explosionRadius); + tag.putBoolean("ignited", this.isIgnited()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.entityData.set(DATA_IS_POWERED, compound.getBoolean("powered")); - if (compound.contains("Fuse", 99)) { - this.maxSwell = compound.getShort("Fuse"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.entityData.set(DATA_IS_POWERED, tag.getBoolean("powered")); + if (tag.contains("Fuse", 99)) { + this.maxSwell = tag.getShort("Fuse"); } - if (compound.contains("ExplosionRadius", 99)) { - this.explosionRadius = compound.getByte("ExplosionRadius"); + if (tag.contains("ExplosionRadius", 99)) { + this.explosionRadius = tag.getByte("ExplosionRadius"); } - if (compound.getBoolean("ignited")) { + if (tag.getBoolean("ignited")) { this.ignite(); } } @@ -181,7 +181,7 @@ public class Creeper extends Monster { } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { + public boolean doHurtTarget(ServerLevel level, Entity source) { return true; } diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java index 7c457a97..2e1a65b7 100644 --- a/net/minecraft/world/entity/monster/Drowned.java +++ b/net/minecraft/world/entity/monster/Drowned.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.ai.goal.MoveToBlockGoal; import net.minecraft.world.entity.ai.goal.RandomStrollGoal; import net.minecraft.world.entity.ai.goal.RangedAttackGoal; import net.minecraft.world.entity.ai.goal.ZombieAttackGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.ai.navigation.GroundPathNavigation; @@ -91,10 +92,10 @@ public class Drowned extends Zombie implements RangedAttackMob { @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - spawnGroupData = super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); - if (this.getItemBySlot(EquipmentSlot.OFFHAND).isEmpty() && serverLevelAccessor.getRandom().nextFloat() < 0.03F) { + spawnGroupData = super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); + if (this.getItemBySlot(EquipmentSlot.OFFHAND).isEmpty() && level.getRandom().nextFloat() < 0.03F) { this.setItemSlot(EquipmentSlot.OFFHAND, new ItemStack(Items.NAUTILUS_SHELL)); this.setGuaranteedDrop(EquipmentSlot.OFFHAND); } @@ -103,19 +104,17 @@ public class Drowned extends Zombie implements RangedAttackMob { } public static boolean checkDrownedSpawnRules( - EntityType entityType, ServerLevelAccessor serverLevelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - if (!serverLevelAccessor.getFluidState(blockPos.below()).is(FluidTags.WATER) && !EntitySpawnReason.isSpawner(entitySpawnReason)) { + if (!level.getFluidState(pos.below()).is(FluidTags.WATER) && !EntitySpawnReason.isSpawner(spawnReason)) { return false; } else { - Holder holder = serverLevelAccessor.getBiome(blockPos); - boolean bl = serverLevelAccessor.getDifficulty() != Difficulty.PEACEFUL - && (EntitySpawnReason.ignoresLightRequirements(entitySpawnReason) || isDarkEnoughToSpawn(serverLevelAccessor, blockPos, randomSource)) - && (EntitySpawnReason.isSpawner(entitySpawnReason) || serverLevelAccessor.getFluidState(blockPos).is(FluidTags.WATER)); - if (!bl || !EntitySpawnReason.isSpawner(entitySpawnReason) && entitySpawnReason != EntitySpawnReason.REINFORCEMENT) { - return holder.is(BiomeTags.MORE_FREQUENT_DROWNED_SPAWNS) - ? randomSource.nextInt(15) == 0 && bl - : randomSource.nextInt(40) == 0 && isDeepEnoughToSpawn(serverLevelAccessor, blockPos) && bl; + Holder holder = level.getBiome(pos); + boolean bl = level.getDifficulty() != Difficulty.PEACEFUL + && (EntitySpawnReason.ignoresLightRequirements(spawnReason) || isDarkEnoughToSpawn(level, pos, random)) + && (EntitySpawnReason.isSpawner(spawnReason) || level.getFluidState(pos).is(FluidTags.WATER)); + if (!bl || !EntitySpawnReason.isSpawner(spawnReason) && spawnReason != EntitySpawnReason.REINFORCEMENT) { + return holder.is(BiomeTags.MORE_FREQUENT_DROWNED_SPAWNS) ? random.nextInt(15) == 0 && bl : random.nextInt(40) == 0 && isDeepEnoughToSpawn(level, pos) && bl; } else { return true; } @@ -174,13 +173,13 @@ public class Drowned extends Zombie implements RangedAttackMob { } @Override - protected boolean canReplaceCurrentItem(ItemStack itemStack, ItemStack itemStack2, EquipmentSlot equipmentSlot) { - if (itemStack2.is(Items.NAUTILUS_SHELL)) { + protected boolean canReplaceCurrentItem(ItemStack newItem, ItemStack currentItem, EquipmentSlot slot) { + if (currentItem.is(Items.NAUTILUS_SHELL)) { return false; - } else if (itemStack2.is(Items.TRIDENT)) { - return itemStack.is(Items.TRIDENT) ? itemStack.getDamageValue() < itemStack2.getDamageValue() : false; + } else if (currentItem.is(Items.TRIDENT)) { + return newItem.is(Items.TRIDENT) ? newItem.getDamageValue() < currentItem.getDamageValue() : false; } else { - return itemStack.is(Items.TRIDENT) ? true : super.canReplaceCurrentItem(itemStack, itemStack2, equipmentSlot); + return newItem.is(Items.TRIDENT) ? true : super.canReplaceCurrentItem(newItem, currentItem, slot); } } @@ -344,7 +343,7 @@ public class Drowned extends Zombie implements RangedAttackMob { this.mob = mob; this.speedModifier = speedModifier; this.level = mob.level(); - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override diff --git a/net/minecraft/world/entity/monster/ElderGuardian.java b/net/minecraft/world/entity/monster/ElderGuardian.java index a29de57c..cdcb2be9 100644 --- a/net/minecraft/world/entity/monster/ElderGuardian.java +++ b/net/minecraft/world/entity/monster/ElderGuardian.java @@ -61,11 +61,11 @@ public class ElderGuardian extends Guardian { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { - super.customServerAiStep(serverLevel); + protected void customServerAiStep(ServerLevel level) { + super.customServerAiStep(level); if ((this.tickCount + this.getId()) % 1200 == 0) { MobEffectInstance mobEffectInstance = new MobEffectInstance(MobEffects.DIG_SLOWDOWN, 6000, 2); - List list = MobEffectUtil.addEffectToPlayersAround(serverLevel, this, this.position(), 50.0, mobEffectInstance, 1200); + List list = MobEffectUtil.addEffectToPlayersAround(level, this, this.position(), 50.0, mobEffectInstance, 1200); list.forEach( serverPlayer -> serverPlayer.connection .send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, this.isSilent() ? 0.0F : 1.0F)) diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java index 64cc1e94..5009c3b9 100644 --- a/net/minecraft/world/entity/monster/EnderMan.java +++ b/net/minecraft/world/entity/monster/EnderMan.java @@ -40,6 +40,7 @@ import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; import net.minecraft.world.entity.ai.goal.MeleeAttackGoal; import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.ai.goal.target.ResetUniversalAngerTargetGoal; @@ -189,29 +190,29 @@ public class EnderMan extends Monster implements NeutralMob { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); BlockState blockState = this.getCarriedBlock(); if (blockState != null) { - compound.put("carriedBlockState", NbtUtils.writeBlockState(blockState)); + tag.put("carriedBlockState", NbtUtils.writeBlockState(blockState)); } - this.addPersistentAngerSaveData(compound); + this.addPersistentAngerSaveData(tag); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); BlockState blockState = null; - if (compound.contains("carriedBlockState", 10)) { - blockState = NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), compound.getCompound("carriedBlockState")); + if (tag.contains("carriedBlockState", 10)) { + blockState = NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), tag.getCompound("carriedBlockState")); if (blockState.isAir()) { blockState = null; } } this.setCarriedBlock(blockState); - this.readPersistentAngerSaveData(this.level(), compound); + this.readPersistentAngerSaveData(this.level(), tag); } boolean isBeingStaredBy(Player player) { @@ -249,16 +250,16 @@ public class EnderMan extends Monster implements NeutralMob { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { - if (serverLevel.isDay() && this.tickCount >= this.targetChangeTime + 600) { + protected void customServerAiStep(ServerLevel level) { + if (level.isDay() && this.tickCount >= this.targetChangeTime + 600) { float f = this.getLightLevelDependentMagicValue(); - if (f > 0.5F && serverLevel.canSeeSky(this.blockPosition()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) { + if (f > 0.5F && level.canSeeSky(this.blockPosition()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) { this.setTarget(null); this.teleport(); } } - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } /** @@ -363,20 +364,20 @@ public class EnderMan extends Monster implements NeutralMob { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - if (this.isInvulnerableTo(serverLevel, damageSource)) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + if (this.isInvulnerableTo(level, damageSource)) { return false; } else { boolean bl = damageSource.getDirectEntity() instanceof ThrownPotion; if (!damageSource.is(DamageTypeTags.IS_PROJECTILE) && !bl) { - boolean bl2 = super.hurtServer(serverLevel, damageSource, f); + boolean bl2 = super.hurtServer(level, damageSource, amount); if (!(damageSource.getEntity() instanceof LivingEntity) && this.random.nextInt(10) != 0) { this.teleport(); } return bl2; } else { - boolean bl2 = bl && this.hurtWithCleanWater(serverLevel, damageSource, (ThrownPotion)damageSource.getDirectEntity(), f); + boolean bl2 = bl && this.hurtWithCleanWater(level, damageSource, (ThrownPotion)damageSource.getDirectEntity(), amount); for (int i = 0; i < 64; i++) { if (this.teleport()) { @@ -389,10 +390,10 @@ public class EnderMan extends Monster implements NeutralMob { } } - private boolean hurtWithCleanWater(ServerLevel serverLevel, DamageSource damageSource, ThrownPotion thrownPotion, float f) { - ItemStack itemStack = thrownPotion.getItem(); + private boolean hurtWithCleanWater(ServerLevel level, DamageSource damageSource, ThrownPotion potion, float amount) { + ItemStack itemStack = potion.getItem(); PotionContents potionContents = itemStack.getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY); - return potionContents.is(Potions.WATER) ? super.hurtServer(serverLevel, damageSource, f) : false; + return potionContents.is(Potions.WATER) ? super.hurtServer(level, damageSource, amount) : false; } public boolean isCreepy() { @@ -419,7 +420,7 @@ public class EnderMan extends Monster implements NeutralMob { public EndermanFreezeWhenLookedAt(EnderMan enderman) { this.enderman = enderman; - this.setFlags(EnumSet.of(Goal.Flag.JUMP, Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.JUMP, Flag.MOVE)); } @Override @@ -509,11 +510,11 @@ public class EnderMan extends Monster implements NeutralMob { private final TargetingConditions continueAggroTargetConditions = TargetingConditions.forCombat().ignoreLineOfSight(); private final TargetingConditions.Selector isAngerInducing; - public EndermanLookForPlayerGoal(EnderMan enderMan, @Nullable TargetingConditions.Selector selector) { - super(enderMan, Player.class, 10, false, false, selector); - this.enderman = enderMan; - this.isAngerInducing = (livingEntity, serverLevel) -> (enderMan.isBeingStaredBy((Player)livingEntity) || enderMan.isAngryAt(livingEntity, serverLevel)) - && !enderMan.hasIndirectPassenger(livingEntity); + public EndermanLookForPlayerGoal(EnderMan enderman, @Nullable TargetingConditions.Selector selector) { + super(enderman, Player.class, 10, false, false, selector); + this.enderman = enderman; + this.isAngerInducing = (livingEntity, serverLevel) -> (enderman.isBeingStaredBy((Player)livingEntity) || enderman.isAngryAt(livingEntity, serverLevel)) + && !enderman.hasIndirectPassenger(livingEntity); this.startAggroTargetConditions = TargetingConditions.forCombat().range(this.getFollowDistance()).selector(this.isAngerInducing); } diff --git a/net/minecraft/world/entity/monster/Endermite.java b/net/minecraft/world/entity/monster/Endermite.java index 6815ccbe..5c3001ba 100644 --- a/net/minecraft/world/entity/monster/Endermite.java +++ b/net/minecraft/world/entity/monster/Endermite.java @@ -76,15 +76,15 @@ public class Endermite extends Monster { } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.life = compound.getInt("Lifetime"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.life = tag.getInt("Lifetime"); } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Lifetime", this.life); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("Lifetime", this.life); } @Override @@ -127,14 +127,14 @@ public class Endermite extends Monster { } public static boolean checkEndermiteSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - if (!checkAnyLightMonsterSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource)) { + if (!checkAnyLightMonsterSpawnRules(entityType, level, spawnReason, pos, random)) { return false; - } else if (EntitySpawnReason.isSpawner(entitySpawnReason)) { + } else if (EntitySpawnReason.isSpawner(spawnReason)) { return true; } else { - Player player = levelAccessor.getNearestPlayer(blockPos.getX() + 0.5, blockPos.getY() + 0.5, blockPos.getZ() + 0.5, 5.0, true); + Player player = level.getNearestPlayer(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 5.0, true); return player == null; } } diff --git a/net/minecraft/world/entity/monster/Evoker.java b/net/minecraft/world/entity/monster/Evoker.java index db057748..7220326c 100644 --- a/net/minecraft/world/entity/monster/Evoker.java +++ b/net/minecraft/world/entity/monster/Evoker.java @@ -79,8 +79,8 @@ public class Evoker extends SpellcasterIllager { } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); } @Override @@ -89,8 +89,8 @@ public class Evoker extends SpellcasterIllager { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); } @Override diff --git a/net/minecraft/world/entity/monster/Ghast.java b/net/minecraft/world/entity/monster/Ghast.java index c277273a..323427db 100644 --- a/net/minecraft/world/entity/monster/Ghast.java +++ b/net/minecraft/world/entity/monster/Ghast.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.ai.control.MoveControl; import net.minecraft.world.entity.ai.goal.Goal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.projectile.LargeFireball; @@ -75,18 +76,18 @@ public class Ghast extends FlyingMob implements Enemy { } @Override - public boolean isInvulnerableTo(ServerLevel serverLevel, DamageSource damageSource) { + public boolean isInvulnerableTo(ServerLevel level, DamageSource damageSource) { return this.isInvulnerable() && !damageSource.is(DamageTypeTags.BYPASSES_INVULNERABILITY) - || !isReflectedFireball(damageSource) && super.isInvulnerableTo(serverLevel, damageSource); + || !isReflectedFireball(damageSource) && super.isInvulnerableTo(level, damageSource); } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (isReflectedFireball(damageSource)) { - super.hurtServer(serverLevel, damageSource, 1000.0F); + super.hurtServer(level, damageSource, 1000.0F); return true; } else { - return this.isInvulnerableTo(serverLevel, damageSource) ? false : super.hurtServer(serverLevel, damageSource, f); + return this.isInvulnerableTo(level, damageSource) ? false : super.hurtServer(level, damageSource, amount); } } @@ -125,12 +126,8 @@ public class Ghast extends FlyingMob implements Enemy { return 5.0F; } - public static boolean checkGhastSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource - ) { - return levelAccessor.getDifficulty() != Difficulty.PEACEFUL - && randomSource.nextInt(20) == 0 - && checkMobSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource); + public static boolean checkGhastSpawnRules(EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) { + return level.getDifficulty() != Difficulty.PEACEFUL && random.nextInt(20) == 0 && checkMobSpawnRules(entityType, level, spawnReason, pos, random); } @Override @@ -139,16 +136,16 @@ public class Ghast extends FlyingMob implements Enemy { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putByte("ExplosionPower", (byte)this.explosionPower); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putByte("ExplosionPower", (byte)this.explosionPower); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("ExplosionPower", 99)) { - this.explosionPower = compound.getByte("ExplosionPower"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("ExplosionPower", 99)) { + this.explosionPower = tag.getByte("ExplosionPower"); } } @@ -157,7 +154,7 @@ public class Ghast extends FlyingMob implements Enemy { public GhastLookGoal(Ghast ghast) { this.ghast = ghast; - this.setFlags(EnumSet.of(Goal.Flag.LOOK)); + this.setFlags(EnumSet.of(Flag.LOOK)); } @Override @@ -299,7 +296,7 @@ public class Ghast extends FlyingMob implements Enemy { public RandomFloatAroundGoal(Ghast ghast) { this.ghast = ghast; - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override diff --git a/net/minecraft/world/entity/monster/Guardian.java b/net/minecraft/world/entity/monster/Guardian.java index 713cb79f..216db830 100644 --- a/net/minecraft/world/entity/monster/Guardian.java +++ b/net/minecraft/world/entity/monster/Guardian.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; import net.minecraft.world.entity.ai.goal.MoveTowardsRestrictionGoal; import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; import net.minecraft.world.entity.ai.goal.RandomStrollGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.ai.navigation.PathNavigation; import net.minecraft.world.entity.ai.navigation.WaterBoundPathNavigation; @@ -79,8 +80,8 @@ public class Guardian extends Monster { this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 8.0F)); this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, Guardian.class, 12.0F, 0.01F)); this.goalSelector.addGoal(9, new RandomLookAroundGoal(this)); - this.randomStrollGoal.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK)); - moveTowardsRestrictionGoal.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK)); + this.randomStrollGoal.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK)); + moveTowardsRestrictionGoal.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK)); this.targetSelector.addGoal(1, new NearestAttackableTargetGoal(this, LivingEntity.class, 10, true, false, new Guardian.GuardianAttackSelector(this))); } @@ -294,28 +295,28 @@ public class Guardian extends Monster { } public static boolean checkGuardianSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return (randomSource.nextInt(20) == 0 || !levelAccessor.canSeeSkyFromBelowWater(blockPos)) - && levelAccessor.getDifficulty() != Difficulty.PEACEFUL - && (EntitySpawnReason.isSpawner(entitySpawnReason) || levelAccessor.getFluidState(blockPos).is(FluidTags.WATER)) - && levelAccessor.getFluidState(blockPos.below()).is(FluidTags.WATER); + return (random.nextInt(20) == 0 || !level.canSeeSkyFromBelowWater(pos)) + && level.getDifficulty() != Difficulty.PEACEFUL + && (EntitySpawnReason.isSpawner(spawnReason) || level.getFluidState(pos).is(FluidTags.WATER)) + && level.getFluidState(pos.below()).is(FluidTags.WATER); } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (!this.isMoving() && !damageSource.is(DamageTypeTags.AVOIDS_GUARDIAN_THORNS) && !damageSource.is(DamageTypes.THORNS) && damageSource.getDirectEntity() instanceof LivingEntity livingEntity) { - livingEntity.hurtServer(serverLevel, this.damageSources().thorns(this), 2.0F); + livingEntity.hurtServer(level, this.damageSources().thorns(this), 2.0F); } if (this.randomStrollGoal != null) { this.randomStrollGoal.trigger(); } - return super.hurtServer(serverLevel, damageSource, f); + return super.hurtServer(level, damageSource, amount); } @Override @@ -345,7 +346,7 @@ public class Guardian extends Monster { public GuardianAttackGoal(Guardian guardian) { this.guardian = guardian; this.elder = guardian instanceof ElderGuardian; - this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK)); + this.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK)); } @Override diff --git a/net/minecraft/world/entity/monster/Husk.java b/net/minecraft/world/entity/monster/Husk.java index 487e7ba0..f0c290ad 100644 --- a/net/minecraft/world/entity/monster/Husk.java +++ b/net/minecraft/world/entity/monster/Husk.java @@ -22,10 +22,9 @@ public class Husk extends Zombie { } public static boolean checkHuskSpawnRules( - EntityType entityType, ServerLevelAccessor serverLevelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return checkMonsterSpawnRules(entityType, serverLevelAccessor, entitySpawnReason, blockPos, randomSource) - && (EntitySpawnReason.isSpawner(entitySpawnReason) || serverLevelAccessor.canSeeSky(blockPos)); + return checkMonsterSpawnRules(entityType, level, spawnReason, pos, random) && (EntitySpawnReason.isSpawner(spawnReason) || level.canSeeSky(pos)); } @Override @@ -54,11 +53,11 @@ public class Husk extends Zombie { } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { - boolean bl = super.doHurtTarget(serverLevel, entity); - if (bl && this.getMainHandItem().isEmpty() && entity instanceof LivingEntity) { + public boolean doHurtTarget(ServerLevel level, Entity source) { + boolean bl = super.doHurtTarget(level, source); + if (bl && this.getMainHandItem().isEmpty() && source instanceof LivingEntity) { float f = this.level().getCurrentDifficultyAt(this.blockPosition()).getEffectiveDifficulty(); - ((LivingEntity)entity).addEffect(new MobEffectInstance(MobEffects.HUNGER, 140 * (int)f), this); + ((LivingEntity)source).addEffect(new MobEffectInstance(MobEffects.HUNGER, 140 * (int)f), this); } return bl; diff --git a/net/minecraft/world/entity/monster/Illusioner.java b/net/minecraft/world/entity/monster/Illusioner.java index 9bbd4b80..91d4f1a1 100644 --- a/net/minecraft/world/entity/monster/Illusioner.java +++ b/net/minecraft/world/entity/monster/Illusioner.java @@ -81,10 +81,10 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob { @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { this.setItemSlot(EquipmentSlot.MAINHAND, new ItemStack(Items.BOW)); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override diff --git a/net/minecraft/world/entity/monster/MagmaCube.java b/net/minecraft/world/entity/monster/MagmaCube.java index 90521238..8f4b209b 100644 --- a/net/minecraft/world/entity/monster/MagmaCube.java +++ b/net/minecraft/world/entity/monster/MagmaCube.java @@ -29,9 +29,9 @@ public class MagmaCube extends Slime { } public static boolean checkMagmaCubeSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return levelAccessor.getDifficulty() != Difficulty.PEACEFUL; + return level.getDifficulty() != Difficulty.PEACEFUL; } @Override diff --git a/net/minecraft/world/entity/monster/Monster.java b/net/minecraft/world/entity/monster/Monster.java index eabf799d..5b628bca 100644 --- a/net/minecraft/world/entity/monster/Monster.java +++ b/net/minecraft/world/entity/monster/Monster.java @@ -106,21 +106,17 @@ public abstract class Monster extends PathfinderMob implements Enemy { } public static boolean checkMonsterSpawnRules( - EntityType entityType, - ServerLevelAccessor serverLevelAccessor, - EntitySpawnReason entitySpawnReason, - BlockPos blockPos, - RandomSource randomSource + EntityType entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return serverLevelAccessor.getDifficulty() != Difficulty.PEACEFUL - && (EntitySpawnReason.ignoresLightRequirements(entitySpawnReason) || isDarkEnoughToSpawn(serverLevelAccessor, blockPos, randomSource)) - && checkMobSpawnRules(entityType, serverLevelAccessor, entitySpawnReason, blockPos, randomSource); + return level.getDifficulty() != Difficulty.PEACEFUL + && (EntitySpawnReason.ignoresLightRequirements(spawnReason) || isDarkEnoughToSpawn(level, pos, random)) + && checkMobSpawnRules(entityType, level, spawnReason, pos, random); } public static boolean checkAnyLightMonsterSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return levelAccessor.getDifficulty() != Difficulty.PEACEFUL && checkMobSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource); + return level.getDifficulty() != Difficulty.PEACEFUL && checkMobSpawnRules(entityType, level, spawnReason, pos, random); } public static Builder createMonsterAttributes() { @@ -137,7 +133,7 @@ public abstract class Monster extends PathfinderMob implements Enemy { return true; } - public boolean isPreventingPlayerRest(ServerLevel serverLevel, Player player) { + public boolean isPreventingPlayerRest(ServerLevel level, Player player) { return true; } diff --git a/net/minecraft/world/entity/monster/PatrollingMonster.java b/net/minecraft/world/entity/monster/PatrollingMonster.java index f8e3a343..da9bd7a5 100644 --- a/net/minecraft/world/entity/monster/PatrollingMonster.java +++ b/net/minecraft/world/entity/monster/PatrollingMonster.java @@ -13,6 +13,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.SpawnGroupData; import net.minecraft.world.entity.ai.goal.Goal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.navigation.PathNavigation; import net.minecraft.world.entity.raid.Raid; import net.minecraft.world.level.Level; @@ -40,22 +41,22 @@ public abstract class PatrollingMonster extends Monster { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (this.patrolTarget != null) { - compound.put("patrol_target", NbtUtils.writeBlockPos(this.patrolTarget)); + tag.put("patrol_target", NbtUtils.writeBlockPos(this.patrolTarget)); } - compound.putBoolean("PatrolLeader", this.patrolLeader); - compound.putBoolean("Patrolling", this.patrolling); + tag.putBoolean("PatrolLeader", this.patrolLeader); + tag.putBoolean("Patrolling", this.patrolling); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - NbtUtils.readBlockPos(compound, "patrol_target").ifPresent(blockPos -> this.patrolTarget = blockPos); - this.patrolLeader = compound.getBoolean("PatrolLeader"); - this.patrolling = compound.getBoolean("Patrolling"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + NbtUtils.readBlockPos(tag, "patrol_target").ifPresent(blockPos -> this.patrolTarget = blockPos); + this.patrolLeader = tag.getBoolean("PatrolLeader"); + this.patrolling = tag.getBoolean("Patrolling"); } public boolean canBeLeader() { @@ -65,12 +66,12 @@ public abstract class PatrollingMonster extends Monster { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - if (entitySpawnReason != EntitySpawnReason.PATROL - && entitySpawnReason != EntitySpawnReason.EVENT - && entitySpawnReason != EntitySpawnReason.STRUCTURE - && serverLevelAccessor.getRandom().nextFloat() < 0.06F + if (spawnReason != EntitySpawnReason.PATROL + && spawnReason != EntitySpawnReason.EVENT + && spawnReason != EntitySpawnReason.STRUCTURE + && level.getRandom().nextFloat() < 0.06F && this.canBeLeader()) { this.patrolLeader = true; } @@ -80,23 +81,17 @@ public abstract class PatrollingMonster extends Monster { this.setDropChance(EquipmentSlot.HEAD, 2.0F); } - if (entitySpawnReason == EntitySpawnReason.PATROL) { + if (spawnReason == EntitySpawnReason.PATROL) { this.patrolling = true; } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } public static boolean checkPatrollingMonsterSpawnRules( - EntityType entityType, - LevelAccessor levelAccessor, - EntitySpawnReason entitySpawnReason, - BlockPos blockPos, - RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource randomSource ) { - return levelAccessor.getBrightness(LightLayer.BLOCK, blockPos) > 8 - ? false - : checkAnyLightMonsterSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource); + return level.getBrightness(LightLayer.BLOCK, pos) > 8 ? false : checkAnyLightMonsterSpawnRules(entityType, level, spawnReason, pos, randomSource); } @Override @@ -155,7 +150,7 @@ public abstract class PatrollingMonster extends Monster { this.speedModifier = speedModifier; this.leaderSpeedModifier = leaderSpeedModifier; this.cooldownUntil = -1L; - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override diff --git a/net/minecraft/world/entity/monster/Phantom.java b/net/minecraft/world/entity/monster/Phantom.java index 9f3af96d..08f0b894 100644 --- a/net/minecraft/world/entity/monster/Phantom.java +++ b/net/minecraft/world/entity/monster/Phantom.java @@ -32,6 +32,7 @@ import net.minecraft.world.entity.ai.control.BodyRotationControl; import net.minecraft.world.entity.ai.control.LookControl; import net.minecraft.world.entity.ai.control.MoveControl; import net.minecraft.world.entity.ai.goal.Goal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.targeting.TargetingConditions; import net.minecraft.world.entity.animal.Cat; import net.minecraft.world.entity.player.Player; @@ -151,30 +152,30 @@ public class Phantom extends FlyingMob implements Enemy { @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { this.anchorPoint = this.blockPosition().above(5); this.setPhantomSize(0); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("AX")) { - this.anchorPoint = new BlockPos(compound.getInt("AX"), compound.getInt("AY"), compound.getInt("AZ")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("AX")) { + this.anchorPoint = new BlockPos(tag.getInt("AX"), tag.getInt("AY"), tag.getInt("AZ")); } - this.setPhantomSize(compound.getInt("Size")); + this.setPhantomSize(tag.getInt("Size")); } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("AX", this.anchorPoint.getX()); - compound.putInt("AY", this.anchorPoint.getY()); - compound.putInt("AZ", this.anchorPoint.getZ()); - compound.putInt("Size", this.getPhantomSize()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("AX", this.anchorPoint.getX()); + tag.putInt("AY", this.anchorPoint.getY()); + tag.putInt("AZ", this.anchorPoint.getZ()); + tag.putInt("Size", this.getPhantomSize()); } @Override @@ -219,8 +220,8 @@ public class Phantom extends FlyingMob implements Enemy { return entityDimensions.scale(1.0F + 0.15F * i); } - boolean canAttack(ServerLevel serverLevel, LivingEntity livingEntity, TargetingConditions targetingConditions) { - return targetingConditions.test(serverLevel, this, livingEntity); + boolean canAttack(ServerLevel level, LivingEntity entity, TargetingConditions targetingConditions) { + return targetingConditions.test(level, this, entity); } static enum AttackPhase { @@ -443,7 +444,7 @@ public class Phantom extends FlyingMob implements Enemy { abstract class PhantomMoveTargetGoal extends Goal { public PhantomMoveTargetGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } protected boolean touchingTarget() { diff --git a/net/minecraft/world/entity/monster/Pillager.java b/net/minecraft/world/entity/monster/Pillager.java index f9b590d0..e86c755e 100644 --- a/net/minecraft/world/entity/monster/Pillager.java +++ b/net/minecraft/world/entity/monster/Pillager.java @@ -110,9 +110,9 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - this.writeInventoryToTag(compound, this.registryAccess()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + this.writeInventoryToTag(tag, this.registryAccess()); } @Override @@ -127,9 +127,9 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.readInventoryFromTag(compound, this.registryAccess()); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.readInventoryFromTag(tag, this.registryAccess()); this.setCanPickUpLoot(true); } @@ -146,12 +146,12 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - RandomSource randomSource = serverLevelAccessor.getRandom(); - this.populateDefaultEquipmentSlots(randomSource, difficultyInstance); - this.populateDefaultEquipmentEnchantments(serverLevelAccessor, randomSource, difficultyInstance); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + RandomSource randomSource = level.getRandom(); + this.populateDefaultEquipmentSlots(randomSource, difficulty); + this.populateDefaultEquipmentEnchantments(level, randomSource, difficulty); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override @@ -196,15 +196,15 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve } @Override - protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) { - ItemStack itemStack = itemEntity.getItem(); + protected void pickUpItem(ServerLevel level, ItemEntity entity) { + ItemStack itemStack = entity.getItem(); if (itemStack.getItem() instanceof BannerItem) { - super.pickUpItem(serverLevel, itemEntity); + super.pickUpItem(level, entity); } else if (this.wantsItem(itemStack)) { - this.onItemPickup(itemEntity); + this.onItemPickup(entity); ItemStack itemStack2 = this.inventory.addItem(itemStack); if (itemStack2.isEmpty()) { - itemEntity.discard(); + entity.discard(); } else { itemStack.setCount(itemStack2.getCount()); } diff --git a/net/minecraft/world/entity/monster/Ravager.java b/net/minecraft/world/entity/monster/Ravager.java index 8f4b48bc..2f70c766 100644 --- a/net/minecraft/world/entity/monster/Ravager.java +++ b/net/minecraft/world/entity/monster/Ravager.java @@ -19,10 +19,10 @@ import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.ai.attributes.AttributeSupplier.Builder; import net.minecraft.world.entity.ai.goal.AvoidEntityGoal; import net.minecraft.world.entity.ai.goal.FloatGoal; -import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; import net.minecraft.world.entity.ai.goal.MeleeAttackGoal; import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.animal.IronGolem; @@ -87,10 +87,10 @@ public class Ravager extends Raider { protected void updateControlFlags() { boolean bl = !(this.getControllingPassenger() instanceof Mob) || this.getControllingPassenger().getType().is(EntityTypeTags.RAIDERS); boolean bl2 = !(this.getVehicle() instanceof AbstractBoat); - this.goalSelector.setControlFlag(Goal.Flag.MOVE, bl); - this.goalSelector.setControlFlag(Goal.Flag.JUMP, bl && bl2); - this.goalSelector.setControlFlag(Goal.Flag.LOOK, bl); - this.goalSelector.setControlFlag(Goal.Flag.TARGET, bl); + this.goalSelector.setControlFlag(Flag.MOVE, bl); + this.goalSelector.setControlFlag(Flag.JUMP, bl && bl2); + this.goalSelector.setControlFlag(Flag.LOOK, bl); + this.goalSelector.setControlFlag(Flag.TARGET, bl); } public static Builder createAttributes() { @@ -105,19 +105,19 @@ public class Ravager extends Raider { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("AttackTick", this.attackTick); - compound.putInt("StunTick", this.stunnedTick); - compound.putInt("RoarTick", this.roarTick); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("AttackTick", this.attackTick); + tag.putInt("StunTick", this.stunnedTick); + tag.putInt("RoarTick", this.roarTick); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.attackTick = compound.getInt("AttackTick"); - this.stunnedTick = compound.getInt("StunTick"); - this.roarTick = compound.getInt("RoarTick"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.attackTick = tag.getInt("AttackTick"); + this.stunnedTick = tag.getInt("StunTick"); + this.roarTick = tag.getInt("RoarTick"); } @Override @@ -283,11 +283,11 @@ public class Ravager extends Raider { } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { + public boolean doHurtTarget(ServerLevel level, Entity source) { this.attackTick = 10; - serverLevel.broadcastEntityEvent(this, (byte)4); + level.broadcastEntityEvent(this, (byte)4); this.playSound(SoundEvents.RAVAGER_ATTACK, 1.0F, 1.0F); - return super.doHurtTarget(serverLevel, entity); + return super.doHurtTarget(level, source); } @Nullable diff --git a/net/minecraft/world/entity/monster/Shulker.java b/net/minecraft/world/entity/monster/Shulker.java index 5a388172..03cfd5f3 100644 --- a/net/minecraft/world/entity/monster/Shulker.java +++ b/net/minecraft/world/entity/monster/Shulker.java @@ -38,6 +38,7 @@ import net.minecraft.world.entity.ai.control.LookControl; import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.animal.AbstractGolem; @@ -148,21 +149,21 @@ public class Shulker extends AbstractGolem implements VariantHolder 0) { - double d = (this.clientSideTeleportInterpolation - f) / 6.0; + double d = (this.clientSideTeleportInterpolation - partialTick) / 6.0; d *= d; d *= this.getScale(); BlockPos blockPos = this.blockPosition(); double e = (blockPos.getX() - this.clientOldAttachPosition.getX()) * d; - double g = (blockPos.getY() - this.clientOldAttachPosition.getY()) * d; - double h = (blockPos.getZ() - this.clientOldAttachPosition.getZ()) * d; - return new Vec3(-e, -g, -h); + double f = (blockPos.getY() - this.clientOldAttachPosition.getY()) * d; + double g = (blockPos.getZ() - this.clientOldAttachPosition.getZ()) * d; + return new Vec3(-e, -f, -g); } else { return null; } @@ -561,7 +562,7 @@ public class Shulker extends AbstractGolem implements VariantHolder entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - if (!checkAnyLightMonsterSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource)) { + if (!checkAnyLightMonsterSpawnRules(entityType, level, spawnReason, pos, random)) { return false; - } else if (EntitySpawnReason.isSpawner(entitySpawnReason)) { + } else if (EntitySpawnReason.isSpawner(spawnReason)) { return true; } else { - Player player = levelAccessor.getNearestPlayer(blockPos.getX() + 0.5, blockPos.getY() + 0.5, blockPos.getZ() + 0.5, 5.0, true); + Player player = level.getNearestPlayer(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 5.0, true); return player == null; } } @@ -130,7 +131,7 @@ public class Silverfish extends Monster { public SilverfishMergeWithStoneGoal(Silverfish silverfish) { super(silverfish, 1.0, 10); - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override diff --git a/net/minecraft/world/entity/monster/Skeleton.java b/net/minecraft/world/entity/monster/Skeleton.java index 60073f71..6ba28459 100644 --- a/net/minecraft/world/entity/monster/Skeleton.java +++ b/net/minecraft/world/entity/monster/Skeleton.java @@ -70,16 +70,16 @@ public class Skeleton extends AbstractSkeleton { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("StrayConversionTime", this.isFreezeConverting() ? this.conversionTime : -1); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("StrayConversionTime", this.isFreezeConverting() ? this.conversionTime : -1); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("StrayConversionTime", 99) && compound.getInt("StrayConversionTime") > -1) { - this.startFreezeConversion(compound.getInt("StrayConversionTime")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("StrayConversionTime", 99) && tag.getInt("StrayConversionTime") > -1) { + this.startFreezeConversion(tag.getInt("StrayConversionTime")); } } diff --git a/net/minecraft/world/entity/monster/Slime.java b/net/minecraft/world/entity/monster/Slime.java index ea893ab5..a7ed2dee 100644 --- a/net/minecraft/world/entity/monster/Slime.java +++ b/net/minecraft/world/entity/monster/Slime.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.SpawnGroupData; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.ai.control.MoveControl; import net.minecraft.world.entity.ai.goal.Goal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.animal.IronGolem; import net.minecraft.world.entity.player.Player; @@ -112,17 +113,17 @@ public class Slime extends Mob implements Enemy { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Size", this.getSize() - 1); - compound.putBoolean("wasOnGround", this.wasOnGround); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("Size", this.getSize() - 1); + tag.putBoolean("wasOnGround", this.wasOnGround); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - this.setSize(compound.getInt("Size") + 1, false); - super.readAdditionalSaveData(compound); - this.wasOnGround = compound.getBoolean("wasOnGround"); + public void readAdditionalSaveData(CompoundTag tag) { + this.setSize(tag.getInt("Size") + 1, false); + super.readAdditionalSaveData(tag); + this.wasOnGround = tag.getBoolean("wasOnGround"); } public boolean isTiny() { @@ -282,31 +283,29 @@ public class Slime extends Mob implements Enemy { return this.isTiny() ? SoundEvents.SLIME_SQUISH_SMALL : SoundEvents.SLIME_SQUISH; } - public static boolean checkSlimeSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource - ) { - if (levelAccessor.getDifficulty() != Difficulty.PEACEFUL) { - if (EntitySpawnReason.isSpawner(entitySpawnReason)) { - return checkMobSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource); + public static boolean checkSlimeSpawnRules(EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) { + if (level.getDifficulty() != Difficulty.PEACEFUL) { + if (EntitySpawnReason.isSpawner(spawnReason)) { + return checkMobSpawnRules(entityType, level, spawnReason, pos, random); } - if (levelAccessor.getBiome(blockPos).is(BiomeTags.ALLOWS_SURFACE_SLIME_SPAWNS) - && blockPos.getY() > 50 - && blockPos.getY() < 70 - && randomSource.nextFloat() < 0.5F - && randomSource.nextFloat() < levelAccessor.getMoonBrightness() - && levelAccessor.getMaxLocalRawBrightness(blockPos) <= randomSource.nextInt(8)) { - return checkMobSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource); + if (level.getBiome(pos).is(BiomeTags.ALLOWS_SURFACE_SLIME_SPAWNS) + && pos.getY() > 50 + && pos.getY() < 70 + && random.nextFloat() < 0.5F + && random.nextFloat() < level.getMoonBrightness() + && level.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) { + return checkMobSpawnRules(entityType, level, spawnReason, pos, random); } - if (!(levelAccessor instanceof WorldGenLevel)) { + if (!(level instanceof WorldGenLevel)) { return false; } - ChunkPos chunkPos = new ChunkPos(blockPos); - boolean bl = WorldgenRandom.seedSlimeChunk(chunkPos.x, chunkPos.z, ((WorldGenLevel)levelAccessor).getSeed(), 987234911L).nextInt(10) == 0; - if (randomSource.nextInt(10) == 0 && bl && blockPos.getY() < 40) { - return checkMobSpawnRules(entityType, levelAccessor, entitySpawnReason, blockPos, randomSource); + ChunkPos chunkPos = new ChunkPos(pos); + boolean bl = WorldgenRandom.seedSlimeChunk(chunkPos.x, chunkPos.z, ((WorldGenLevel)level).getSeed(), 987234911L).nextInt(10) == 0; + if (random.nextInt(10) == 0 && bl && pos.getY() < 40) { + return checkMobSpawnRules(entityType, level, spawnReason, pos, random); } } @@ -340,17 +339,17 @@ public class Slime extends Mob implements Enemy { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - RandomSource randomSource = serverLevelAccessor.getRandom(); + RandomSource randomSource = level.getRandom(); int i = randomSource.nextInt(3); - if (i < 2 && randomSource.nextFloat() < 0.5F * difficultyInstance.getSpecialMultiplier()) { + if (i < 2 && randomSource.nextFloat() < 0.5F * difficulty.getSpecialMultiplier()) { i++; } int j = 1 << i; this.setSize(j, true); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } float getSoundPitch() { @@ -373,7 +372,7 @@ public class Slime extends Mob implements Enemy { public SlimeAttackGoal(Slime slime) { this.slime = slime; - this.setFlags(EnumSet.of(Goal.Flag.LOOK)); + this.setFlags(EnumSet.of(Flag.LOOK)); } @Override @@ -425,7 +424,7 @@ public class Slime extends Mob implements Enemy { public SlimeFloatGoal(Slime slime) { this.slime = slime; - this.setFlags(EnumSet.of(Goal.Flag.JUMP, Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.JUMP, Flag.MOVE)); slime.getNavigation().setCanFloat(true); } @@ -456,7 +455,7 @@ public class Slime extends Mob implements Enemy { public SlimeKeepOnJumpingGoal(Slime slime) { this.slime = slime; - this.setFlags(EnumSet.of(Goal.Flag.JUMP, Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.JUMP, Flag.MOVE)); } @Override @@ -534,7 +533,7 @@ public class Slime extends Mob implements Enemy { public SlimeRandomDirectionGoal(Slime slime) { this.slime = slime; - this.setFlags(EnumSet.of(Goal.Flag.LOOK)); + this.setFlags(EnumSet.of(Flag.LOOK)); } @Override diff --git a/net/minecraft/world/entity/monster/SpellcasterIllager.java b/net/minecraft/world/entity/monster/SpellcasterIllager.java index e98f842f..3ae5a729 100644 --- a/net/minecraft/world/entity/monster/SpellcasterIllager.java +++ b/net/minecraft/world/entity/monster/SpellcasterIllager.java @@ -17,6 +17,7 @@ import net.minecraft.util.ByIdMap.OutOfBoundsStrategy; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.ai.goal.Goal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.level.Level; import org.jetbrains.annotations.Nullable; @@ -36,15 +37,15 @@ public abstract class SpellcasterIllager extends AbstractIllager { } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.spellCastingTickCount = compound.getInt("SpellTicks"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.spellCastingTickCount = tag.getInt("SpellTicks"); } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("SpellTicks", this.spellCastingTickCount); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("SpellTicks", this.spellCastingTickCount); } @Override @@ -70,8 +71,8 @@ public abstract class SpellcasterIllager extends AbstractIllager { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { - super.customServerAiStep(serverLevel); + protected void customServerAiStep(ServerLevel level) { + super.customServerAiStep(level); if (this.spellCastingTickCount > 0) { this.spellCastingTickCount--; } @@ -129,7 +130,7 @@ public abstract class SpellcasterIllager extends AbstractIllager { protected class SpellcasterCastingSpellGoal extends Goal { public SpellcasterCastingSpellGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK)); + this.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK)); } @Override diff --git a/net/minecraft/world/entity/monster/Spider.java b/net/minecraft/world/entity/monster/Spider.java index 135b6a86..c3f41428 100644 --- a/net/minecraft/world/entity/monster/Spider.java +++ b/net/minecraft/world/entity/monster/Spider.java @@ -148,22 +148,22 @@ public class Spider extends Monster { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - spawnGroupData = super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); - RandomSource randomSource = serverLevelAccessor.getRandom(); + spawnGroupData = super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); + RandomSource randomSource = level.getRandom(); if (randomSource.nextInt(100) == 0) { Skeleton skeleton = EntityType.SKELETON.create(this.level(), EntitySpawnReason.JOCKEY); if (skeleton != null) { skeleton.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F); - skeleton.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, null); + skeleton.finalizeSpawn(level, difficulty, spawnReason, null); skeleton.startRiding(this); } } if (spawnGroupData == null) { spawnGroupData = new Spider.SpiderEffectsGroupData(); - if (serverLevelAccessor.getDifficulty() == Difficulty.HARD && randomSource.nextFloat() < 0.1F * difficultyInstance.getSpecialMultiplier()) { + if (level.getDifficulty() == Difficulty.HARD && randomSource.nextFloat() < 0.1F * difficulty.getSpecialMultiplier()) { ((Spider.SpiderEffectsGroupData)spawnGroupData).setRandomEffect(randomSource); } } diff --git a/net/minecraft/world/entity/monster/Stray.java b/net/minecraft/world/entity/monster/Stray.java index 628eefb6..08030c66 100644 --- a/net/minecraft/world/entity/monster/Stray.java +++ b/net/minecraft/world/entity/monster/Stray.java @@ -23,16 +23,15 @@ public class Stray extends AbstractSkeleton { } public static boolean checkStraySpawnRules( - EntityType entityType, ServerLevelAccessor serverLevelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - BlockPos blockPos2 = blockPos; + BlockPos blockPos = pos; do { - blockPos2 = blockPos2.above(); - } while (serverLevelAccessor.getBlockState(blockPos2).is(Blocks.POWDER_SNOW)); + blockPos = blockPos.above(); + } while (level.getBlockState(blockPos).is(Blocks.POWDER_SNOW)); - return checkMonsterSpawnRules(entityType, serverLevelAccessor, entitySpawnReason, blockPos, randomSource) - && (EntitySpawnReason.isSpawner(entitySpawnReason) || serverLevelAccessor.canSeeSky(blockPos2.below())); + return checkMonsterSpawnRules(entityType, level, spawnReason, pos, random) && (EntitySpawnReason.isSpawner(spawnReason) || level.canSeeSky(blockPos.below())); } @Override diff --git a/net/minecraft/world/entity/monster/Strider.java b/net/minecraft/world/entity/monster/Strider.java index 846aa20c..b5cd7fad 100644 --- a/net/minecraft/world/entity/monster/Strider.java +++ b/net/minecraft/world/entity/monster/Strider.java @@ -95,15 +95,15 @@ public class Strider extends Animal implements ItemSteerable, Saddleable { } public static boolean checkStriderSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - BlockPos.MutableBlockPos mutableBlockPos = blockPos.mutable(); + BlockPos.MutableBlockPos mutableBlockPos = pos.mutable(); do { mutableBlockPos.move(Direction.UP); - } while (levelAccessor.getFluidState(mutableBlockPos).is(FluidTags.LAVA)); + } while (level.getFluidState(mutableBlockPos).is(FluidTags.LAVA)); - return levelAccessor.getBlockState(mutableBlockPos).isAir(); + return level.getBlockState(mutableBlockPos).isAir(); } @Override @@ -124,15 +124,15 @@ public class Strider extends Animal implements ItemSteerable, Saddleable { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - this.steering.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + this.steering.addAdditionalSaveData(tag); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.steering.readAdditionalSaveData(compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.steering.readAdditionalSaveData(tag); } @Override @@ -394,10 +394,10 @@ public class Strider extends Animal implements ItemSteerable, Saddleable { } @Override - protected void dropEquipment(ServerLevel serverLevel) { - super.dropEquipment(serverLevel); + protected void dropEquipment(ServerLevel level) { + super.dropEquipment(level); if (this.isSaddled()) { - this.spawnAtLocation(serverLevel, Items.SADDLE); + this.spawnAtLocation(level, Items.SADDLE); } } @@ -443,30 +443,30 @@ public class Strider extends Animal implements ItemSteerable, Saddleable { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { if (this.isBaby()) { - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } else { - RandomSource randomSource = serverLevelAccessor.getRandom(); + RandomSource randomSource = level.getRandom(); if (randomSource.nextInt(30) == 0) { - Mob mob = EntityType.ZOMBIFIED_PIGLIN.create(serverLevelAccessor.getLevel(), EntitySpawnReason.JOCKEY); + Mob mob = EntityType.ZOMBIFIED_PIGLIN.create(level.getLevel(), EntitySpawnReason.JOCKEY); if (mob != null) { - spawnGroupData = this.spawnJockey(serverLevelAccessor, difficultyInstance, mob, new Zombie.ZombieGroupData(Zombie.getSpawnAsBabyOdds(randomSource), false)); + spawnGroupData = this.spawnJockey(level, difficulty, mob, new Zombie.ZombieGroupData(Zombie.getSpawnAsBabyOdds(randomSource), false)); mob.setItemSlot(EquipmentSlot.MAINHAND, new ItemStack(Items.WARPED_FUNGUS_ON_A_STICK)); this.equipSaddle(new ItemStack(Items.SADDLE), null); } } else if (randomSource.nextInt(10) == 0) { - AgeableMob ageableMob = EntityType.STRIDER.create(serverLevelAccessor.getLevel(), EntitySpawnReason.JOCKEY); + AgeableMob ageableMob = EntityType.STRIDER.create(level.getLevel(), EntitySpawnReason.JOCKEY); if (ageableMob != null) { ageableMob.setAge(-24000); - spawnGroupData = this.spawnJockey(serverLevelAccessor, difficultyInstance, ageableMob, null); + spawnGroupData = this.spawnJockey(level, difficulty, ageableMob, null); } } else { spawnGroupData = new AgeableMob.AgeableMobGroupData(0.5F); } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } } diff --git a/net/minecraft/world/entity/monster/Vex.java b/net/minecraft/world/entity/monster/Vex.java index db9df8c8..c7a6782f 100644 --- a/net/minecraft/world/entity/monster/Vex.java +++ b/net/minecraft/world/entity/monster/Vex.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.ai.control.MoveControl; import net.minecraft.world.entity.ai.goal.FloatGoal; import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.ai.goal.target.TargetGoal; @@ -104,14 +105,14 @@ public class Vex extends Monster implements TraceableEntity { } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("BoundX")) { - this.boundOrigin = new BlockPos(compound.getInt("BoundX"), compound.getInt("BoundY"), compound.getInt("BoundZ")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("BoundX")) { + this.boundOrigin = new BlockPos(tag.getInt("BoundX"), tag.getInt("BoundY"), tag.getInt("BoundZ")); } - if (compound.contains("LifeTicks")) { - this.setLimitedLife(compound.getInt("LifeTicks")); + if (tag.contains("LifeTicks")) { + this.setLimitedLife(tag.getInt("LifeTicks")); } } @@ -124,16 +125,16 @@ public class Vex extends Monster implements TraceableEntity { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (this.boundOrigin != null) { - compound.putInt("BoundX", this.boundOrigin.getX()); - compound.putInt("BoundY", this.boundOrigin.getY()); - compound.putInt("BoundZ", this.boundOrigin.getZ()); + tag.putInt("BoundX", this.boundOrigin.getX()); + tag.putInt("BoundY", this.boundOrigin.getY()); + tag.putInt("BoundZ", this.boundOrigin.getZ()); } if (this.hasLimitedLife) { - compound.putInt("LifeTicks", this.limitedLifeTicks); + tag.putInt("LifeTicks", this.limitedLifeTicks); } } @@ -207,12 +208,12 @@ public class Vex extends Monster implements TraceableEntity { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - RandomSource randomSource = serverLevelAccessor.getRandom(); - this.populateDefaultEquipmentSlots(randomSource, difficultyInstance); - this.populateDefaultEquipmentEnchantments(serverLevelAccessor, randomSource, difficultyInstance); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + RandomSource randomSource = level.getRandom(); + this.populateDefaultEquipmentSlots(randomSource, difficulty); + this.populateDefaultEquipmentEnchantments(level, randomSource, difficulty); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override @@ -223,7 +224,7 @@ public class Vex extends Monster implements TraceableEntity { class VexChargeAttackGoal extends Goal { public VexChargeAttackGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override @@ -330,7 +331,7 @@ public class Vex extends Monster implements TraceableEntity { class VexRandomMoveGoal extends Goal { public VexRandomMoveGoal() { - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override diff --git a/net/minecraft/world/entity/monster/Vindicator.java b/net/minecraft/world/entity/monster/Vindicator.java index 97c8db98..f2c33ec5 100644 --- a/net/minecraft/world/entity/monster/Vindicator.java +++ b/net/minecraft/world/entity/monster/Vindicator.java @@ -23,10 +23,10 @@ import net.minecraft.world.entity.ai.attributes.AttributeSupplier.Builder; import net.minecraft.world.entity.ai.goal.AvoidEntityGoal; import net.minecraft.world.entity.ai.goal.BreakDoorGoal; import net.minecraft.world.entity.ai.goal.FloatGoal; -import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; import net.minecraft.world.entity.ai.goal.MeleeAttackGoal; import net.minecraft.world.entity.ai.goal.RandomStrollGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.ai.navigation.GroundPathNavigation; @@ -75,13 +75,13 @@ public class Vindicator extends AbstractIllager { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { if (!this.isNoAi() && GoalUtils.hasGroundPathNavigation(this)) { - boolean bl = serverLevel.isRaided(this.blockPosition()); + boolean bl = level.isRaided(this.blockPosition()); ((GroundPathNavigation)this.getNavigation()).setCanOpenDoors(bl); } - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } public static Builder createAttributes() { @@ -93,10 +93,10 @@ public class Vindicator extends AbstractIllager { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (this.isJohnny) { - compound.putBoolean("Johnny", true); + tag.putBoolean("Johnny", true); } } @@ -110,10 +110,10 @@ public class Vindicator extends AbstractIllager { } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("Johnny", 99)) { - this.isJohnny = compound.getBoolean("Johnny"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("Johnny", 99)) { + this.isJohnny = tag.getBoolean("Johnny"); } } @@ -125,13 +125,13 @@ public class Vindicator extends AbstractIllager { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - SpawnGroupData spawnGroupData2 = super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + SpawnGroupData spawnGroupData2 = super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); ((GroundPathNavigation)this.getNavigation()).setCanOpenDoors(true); - RandomSource randomSource = serverLevelAccessor.getRandom(); - this.populateDefaultEquipmentSlots(randomSource, difficultyInstance); - this.populateDefaultEquipmentEnchantments(serverLevelAccessor, randomSource, difficultyInstance); + RandomSource randomSource = level.getRandom(); + this.populateDefaultEquipmentSlots(randomSource, difficulty); + this.populateDefaultEquipmentEnchantments(level, randomSource, difficulty); return spawnGroupData2; } @@ -183,7 +183,7 @@ public class Vindicator extends AbstractIllager { static class VindicatorBreakDoorGoal extends BreakDoorGoal { public VindicatorBreakDoorGoal(Mob mob) { super(mob, 6, Vindicator.DOOR_BREAKING_PREDICATE); - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override diff --git a/net/minecraft/world/entity/monster/WitherSkeleton.java b/net/minecraft/world/entity/monster/WitherSkeleton.java index 3fb32f37..22f9bbdb 100644 --- a/net/minecraft/world/entity/monster/WitherSkeleton.java +++ b/net/minecraft/world/entity/monster/WitherSkeleton.java @@ -78,21 +78,21 @@ public class WitherSkeleton extends AbstractSkeleton { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - SpawnGroupData spawnGroupData2 = super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + SpawnGroupData spawnGroupData2 = super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); this.getAttribute(Attributes.ATTACK_DAMAGE).setBaseValue(4.0); this.reassessWeaponGoal(); return spawnGroupData2; } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { - if (!super.doHurtTarget(serverLevel, entity)) { + public boolean doHurtTarget(ServerLevel level, Entity source) { + if (!super.doHurtTarget(level, source)) { return false; } else { - if (entity instanceof LivingEntity) { - ((LivingEntity)entity).addEffect(new MobEffectInstance(MobEffects.WITHER, 200), this); + if (source instanceof LivingEntity) { + ((LivingEntity)source).addEffect(new MobEffectInstance(MobEffects.WITHER, 200), this); } return true; diff --git a/net/minecraft/world/entity/monster/Zoglin.java b/net/minecraft/world/entity/monster/Zoglin.java index d6c9ccd2..599057b0 100644 --- a/net/minecraft/world/entity/monster/Zoglin.java +++ b/net/minecraft/world/entity/monster/Zoglin.java @@ -135,16 +135,16 @@ public class Zoglin extends Monster implements HoglinBase { ); } - private Optional findNearestValidAttackTarget(ServerLevel serverLevel) { + private Optional findNearestValidAttackTarget(ServerLevel level) { return ((NearestVisibleLivingEntities)this.getBrain() .getMemory(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES) .orElse(NearestVisibleLivingEntities.empty())) - .findClosest(livingEntity -> this.isTargetable(serverLevel, livingEntity)); + .findClosest(livingEntity -> this.isTargetable(level, livingEntity)); } - private boolean isTargetable(ServerLevel serverLevel, LivingEntity livingEntity) { - EntityType entityType = livingEntity.getType(); - return entityType != EntityType.ZOGLIN && entityType != EntityType.CREEPER && Sensor.isEntityAttackable(serverLevel, this, livingEntity); + private boolean isTargetable(ServerLevel level, LivingEntity entity) { + EntityType entityType = entity.getType(); + return entityType != EntityType.ZOGLIN && entityType != EntityType.CREEPER && Sensor.isEntityAttackable(level, this, entity); } @Override @@ -164,13 +164,13 @@ public class Zoglin extends Monster implements HoglinBase { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - if (serverLevelAccessor.getRandom().nextFloat() < 0.2F) { + if (level.getRandom().nextFloat() < 0.2F) { this.setBaby(true); } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } public static net.minecraft.world.entity.ai.attributes.AttributeSupplier.Builder createAttributes() { @@ -187,12 +187,12 @@ public class Zoglin extends Monster implements HoglinBase { } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { - if (entity instanceof LivingEntity livingEntity) { + public boolean doHurtTarget(ServerLevel level, Entity source) { + if (source instanceof LivingEntity livingEntity) { this.attackAnimationRemainingTicks = 10; - serverLevel.broadcastEntityEvent(this, (byte)4); + level.broadcastEntityEvent(this, (byte)4); this.makeSound(SoundEvents.ZOGLIN_ATTACK); - return HoglinBase.hurtAndThrowTarget(serverLevel, this, livingEntity); + return HoglinBase.hurtAndThrowTarget(level, this, livingEntity); } else { return false; } @@ -211,8 +211,8 @@ public class Zoglin extends Monster implements HoglinBase { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - boolean bl = super.hurtServer(serverLevel, damageSource, f); + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + boolean bl = super.hurtServer(level, damageSource, amount); if (bl && damageSource.getEntity() instanceof LivingEntity livingEntity) { if (this.canAttack(livingEntity) && !BehaviorUtils.isOtherTargetMuchFurtherAwayThanCurrentAttackTarget(this, livingEntity, 4.0)) { this.setAttackTarget(livingEntity); @@ -246,10 +246,10 @@ public class Zoglin extends Monster implements HoglinBase { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("zoglinBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.pop(); this.updateActivity(); } @@ -332,17 +332,17 @@ public class Zoglin extends Monster implements HoglinBase { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (this.isBaby()) { - compound.putBoolean("IsBaby", true); + tag.putBoolean("IsBaby", true); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.getBoolean("IsBaby")) { + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.getBoolean("IsBaby")) { this.setBaby(true); } } diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java index ef7728e7..033f4511 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java @@ -170,12 +170,12 @@ public class Zombie extends Monster { } @Override - protected int getBaseExperienceReward(ServerLevel serverLevel) { + protected int getBaseExperienceReward(ServerLevel level) { if (this.isBaby()) { this.xpReward = (int)(this.xpReward * 2.5); } - return super.getBaseExperienceReward(serverLevel); + return super.getBaseExperienceReward(level); } @Override @@ -275,20 +275,20 @@ public class Zombie extends Monster { } @VisibleForTesting - public boolean convertVillagerToZombieVillager(ServerLevel serverLevel, Villager villager) { + public boolean convertVillagerToZombieVillager(ServerLevel level, Villager villager) { ZombieVillager zombieVillager = villager.convertTo( EntityType.ZOMBIE_VILLAGER, ConversionParams.single(villager, true, true), zombieVillagerx -> { zombieVillagerx.finalizeSpawn( - serverLevel, serverLevel.getCurrentDifficultyAt(zombieVillagerx.blockPosition()), EntitySpawnReason.CONVERSION, new Zombie.ZombieGroupData(false, true) + level, level.getCurrentDifficultyAt(zombieVillagerx.blockPosition()), EntitySpawnReason.CONVERSION, new Zombie.ZombieGroupData(false, true) ); zombieVillagerx.setVillagerData(villager.getVillagerData()); zombieVillagerx.setGossips(villager.getGossips().store(NbtOps.INSTANCE)); zombieVillagerx.setTradeOffers(villager.getOffers().copy()); zombieVillagerx.setVillagerXp(villager.getVillagerXp()); if (!this.isSilent()) { - serverLevel.levelEvent(null, 1026, this.blockPosition(), 0); + level.levelEvent(null, 1026, this.blockPosition(), 0); } } ); @@ -300,8 +300,8 @@ public class Zombie extends Monster { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - if (!super.hurtServer(serverLevel, damageSource, f)) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + if (!super.hurtServer(level, damageSource, amount)) { return false; } else { LivingEntity livingEntity = this.getTarget(); @@ -310,14 +310,14 @@ public class Zombie extends Monster { } if (livingEntity != null - && serverLevel.getDifficulty() == Difficulty.HARD + && level.getDifficulty() == Difficulty.HARD && this.random.nextFloat() < this.getAttributeValue(Attributes.SPAWN_REINFORCEMENTS_CHANCE) - && serverLevel.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING)) { + && level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING)) { int i = Mth.floor(this.getX()); int j = Mth.floor(this.getY()); int k = Mth.floor(this.getZ()); EntityType entityType = this.getType(); - Zombie zombie = entityType.create(serverLevel, EntitySpawnReason.REINFORCEMENT); + Zombie zombie = entityType.create(level, EntitySpawnReason.REINFORCEMENT); if (zombie == null) { return true; } @@ -327,16 +327,16 @@ public class Zombie extends Monster { int n = j + Mth.nextInt(this.random, 7, 40) * Mth.nextInt(this.random, -1, 1); int o = k + Mth.nextInt(this.random, 7, 40) * Mth.nextInt(this.random, -1, 1); BlockPos blockPos = new BlockPos(m, n, o); - if (SpawnPlacements.isSpawnPositionOk(entityType, serverLevel, blockPos) - && SpawnPlacements.checkSpawnRules(entityType, serverLevel, EntitySpawnReason.REINFORCEMENT, blockPos, serverLevel.random)) { + if (SpawnPlacements.isSpawnPositionOk(entityType, level, blockPos) + && SpawnPlacements.checkSpawnRules(entityType, level, EntitySpawnReason.REINFORCEMENT, blockPos, level.random)) { zombie.setPos(m, n, o); - if (!serverLevel.hasNearbyAlivePlayer(m, n, o, 7.0) - && serverLevel.isUnobstructed(zombie) - && serverLevel.noCollision(zombie) - && (zombie.canSpawnInLiquids() || !serverLevel.containsAnyLiquid(zombie.getBoundingBox()))) { + if (!level.hasNearbyAlivePlayer(m, n, o, 7.0) + && level.isUnobstructed(zombie) + && level.noCollision(zombie) + && (zombie.canSpawnInLiquids() || !level.containsAnyLiquid(zombie.getBoundingBox()))) { zombie.setTarget(livingEntity); - zombie.finalizeSpawn(serverLevel, serverLevel.getCurrentDifficultyAt(zombie.blockPosition()), EntitySpawnReason.REINFORCEMENT, null); - serverLevel.addFreshEntityWithPassengers(zombie); + zombie.finalizeSpawn(level, level.getCurrentDifficultyAt(zombie.blockPosition()), EntitySpawnReason.REINFORCEMENT, null); + level.addFreshEntityWithPassengers(zombie); AttributeInstance attributeInstance = this.getAttribute(Attributes.SPAWN_REINFORCEMENTS_CHANCE); AttributeModifier attributeModifier = attributeInstance.getModifier(REINFORCEMENT_CALLER_CHARGE_ID); double d = attributeModifier != null ? attributeModifier.amount() : 0.0; @@ -354,12 +354,12 @@ public class Zombie extends Monster { } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { - boolean bl = super.doHurtTarget(serverLevel, entity); + public boolean doHurtTarget(ServerLevel level, Entity source) { + boolean bl = super.doHurtTarget(level, source); if (bl) { float f = this.level().getCurrentDifficultyAt(this.blockPosition()).getEffectiveDifficulty(); if (this.getMainHandItem().isEmpty() && this.isOnFire() && this.random.nextFloat() < f * 0.3F) { - entity.igniteForSeconds(2 * (int)f); + source.igniteForSeconds(2 * (int)f); } } @@ -413,22 +413,22 @@ public class Zombie extends Monster { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("IsBaby", this.isBaby()); - compound.putBoolean("CanBreakDoors", this.canBreakDoors()); - compound.putInt("InWaterTime", this.isInWater() ? this.inWaterTime : -1); - compound.putInt("DrownedConversionTime", this.isUnderWaterConverting() ? this.conversionTime : -1); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("IsBaby", this.isBaby()); + tag.putBoolean("CanBreakDoors", this.canBreakDoors()); + tag.putInt("InWaterTime", this.isInWater() ? this.inWaterTime : -1); + tag.putInt("DrownedConversionTime", this.isUnderWaterConverting() ? this.conversionTime : -1); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setBaby(compound.getBoolean("IsBaby")); - this.setCanBreakDoors(compound.getBoolean("CanBreakDoors")); - this.inWaterTime = compound.getInt("InWaterTime"); - if (compound.contains("DrownedConversionTime", 99) && compound.getInt("DrownedConversionTime") > -1) { - this.startUnderWaterConversion(compound.getInt("DrownedConversionTime")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setBaby(tag.getBoolean("IsBaby")); + this.setCanBreakDoors(tag.getBoolean("CanBreakDoors")); + this.inWaterTime = tag.getInt("InWaterTime"); + if (tag.contains("DrownedConversionTime", 99) && tag.getInt("DrownedConversionTime") > -1) { + this.startUnderWaterConversion(tag.getInt("DrownedConversionTime")); } } @@ -459,19 +459,19 @@ public class Zombie extends Monster { } @Override - public boolean wantsToPickUp(ServerLevel serverLevel, ItemStack itemStack) { - return itemStack.is(Items.GLOW_INK_SAC) ? false : super.wantsToPickUp(serverLevel, itemStack); + public boolean wantsToPickUp(ServerLevel level, ItemStack stack) { + return stack.is(Items.GLOW_INK_SAC) ? false : super.wantsToPickUp(level, stack); } @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - RandomSource randomSource = serverLevelAccessor.getRandom(); - spawnGroupData = super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); - float f = difficultyInstance.getSpecialMultiplier(); - if (entitySpawnReason != EntitySpawnReason.CONVERSION) { + RandomSource randomSource = level.getRandom(); + spawnGroupData = super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); + float f = difficulty.getSpecialMultiplier(); + if (spawnReason != EntitySpawnReason.CONVERSION) { this.setCanPickUpLoot(randomSource.nextFloat() < 0.55F * f); } @@ -484,9 +484,7 @@ public class Zombie extends Monster { this.setBaby(true); if (zombieGroupData.canSpawnJockey) { if (randomSource.nextFloat() < 0.05) { - List list = serverLevelAccessor.getEntitiesOfClass( - Chicken.class, this.getBoundingBox().inflate(5.0, 3.0, 5.0), EntitySelector.ENTITY_NOT_BEING_RIDDEN - ); + List list = level.getEntitiesOfClass(Chicken.class, this.getBoundingBox().inflate(5.0, 3.0, 5.0), EntitySelector.ENTITY_NOT_BEING_RIDDEN); if (!list.isEmpty()) { Chicken chicken = (Chicken)list.get(0); chicken.setChickenJockey(true); @@ -496,19 +494,19 @@ public class Zombie extends Monster { Chicken chicken2 = EntityType.CHICKEN.create(this.level(), EntitySpawnReason.JOCKEY); if (chicken2 != null) { chicken2.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F); - chicken2.finalizeSpawn(serverLevelAccessor, difficultyInstance, EntitySpawnReason.JOCKEY, null); + chicken2.finalizeSpawn(level, difficulty, EntitySpawnReason.JOCKEY, null); chicken2.setChickenJockey(true); this.startRiding(chicken2); - serverLevelAccessor.addFreshEntity(chicken2); + level.addFreshEntity(chicken2); } } } } this.setCanBreakDoors(randomSource.nextFloat() < f * 0.1F); - if (entitySpawnReason != EntitySpawnReason.CONVERSION) { - this.populateDefaultEquipmentSlots(randomSource, difficultyInstance); - this.populateDefaultEquipmentEnchantments(serverLevelAccessor, randomSource, difficultyInstance); + if (spawnReason != EntitySpawnReason.CONVERSION) { + this.populateDefaultEquipmentSlots(randomSource, difficulty); + this.populateDefaultEquipmentEnchantments(level, randomSource, difficulty); } } @@ -527,13 +525,13 @@ public class Zombie extends Monster { } @VisibleForTesting - public void setInWaterTime(int i) { - this.inWaterTime = i; + public void setInWaterTime(int inWaterTime) { + this.inWaterTime = inWaterTime; } @VisibleForTesting - public void setConversionTime(int i) { - this.conversionTime = i; + public void setConversionTime(int conversionTime) { + this.conversionTime = conversionTime; } public static boolean getSpawnAsBabyOdds(RandomSource random) { diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java index 8f987605..a1ab7932 100644 --- a/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/net/minecraft/world/entity/monster/ZombieVillager.java @@ -85,50 +85,50 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - VillagerData.CODEC.encodeStart(NbtOps.INSTANCE, this.getVillagerData()).resultOrPartial(LOGGER::error).ifPresent(tag -> compound.put("VillagerData", tag)); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + VillagerData.CODEC.encodeStart(NbtOps.INSTANCE, this.getVillagerData()).resultOrPartial(LOGGER::error).ifPresent(tagx -> tag.put("VillagerData", tagx)); if (this.tradeOffers != null) { - compound.put("Offers", MerchantOffers.CODEC.encodeStart(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), this.tradeOffers).getOrThrow()); + tag.put("Offers", MerchantOffers.CODEC.encodeStart(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), this.tradeOffers).getOrThrow()); } if (this.gossips != null) { - compound.put("Gossips", this.gossips); + tag.put("Gossips", this.gossips); } - compound.putInt("ConversionTime", this.isConverting() ? this.villagerConversionTime : -1); + tag.putInt("ConversionTime", this.isConverting() ? this.villagerConversionTime : -1); if (this.conversionStarter != null) { - compound.putUUID("ConversionPlayer", this.conversionStarter); + tag.putUUID("ConversionPlayer", this.conversionStarter); } - compound.putInt("Xp", this.villagerXp); + tag.putInt("Xp", this.villagerXp); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("VillagerData", 10)) { - DataResult dataResult = VillagerData.CODEC.parse(new Dynamic<>(NbtOps.INSTANCE, compound.get("VillagerData"))); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("VillagerData", 10)) { + DataResult dataResult = VillagerData.CODEC.parse(new Dynamic<>(NbtOps.INSTANCE, tag.get("VillagerData"))); dataResult.resultOrPartial(LOGGER::error).ifPresent(this::setVillagerData); } - if (compound.contains("Offers")) { + if (tag.contains("Offers")) { MerchantOffers.CODEC - .parse(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), compound.get("Offers")) + .parse(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), tag.get("Offers")) .resultOrPartial(Util.prefix("Failed to load offers: ", LOGGER::warn)) .ifPresent(merchantOffers -> this.tradeOffers = merchantOffers); } - if (compound.contains("Gossips", 9)) { - this.gossips = compound.getList("Gossips", 10); + if (tag.contains("Gossips", 9)) { + this.gossips = tag.getList("Gossips", 10); } - if (compound.contains("ConversionTime", 99) && compound.getInt("ConversionTime") > -1) { - this.startConverting(compound.hasUUID("ConversionPlayer") ? compound.getUUID("ConversionPlayer") : null, compound.getInt("ConversionTime")); + if (tag.contains("ConversionTime", 99) && tag.getInt("ConversionTime") > -1) { + this.startConverting(tag.hasUUID("ConversionPlayer") ? tag.getUUID("ConversionPlayer") : null, tag.getInt("ConversionTime")); } - if (compound.contains("Xp", 3)) { - this.villagerXp = compound.getInt("Xp"); + if (tag.contains("Xp", 3)) { + this.villagerXp = tag.getInt("Xp"); } } @@ -255,8 +255,8 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { } @VisibleForTesting - public void setVillagerConversionTime(int i) { - this.villagerConversionTime = i; + public void setVillagerConversionTime(int villagerConversionTime) { + this.villagerConversionTime = villagerConversionTime; } private int getConversionProgress() { @@ -325,10 +325,10 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - this.setVillagerData(this.getVillagerData().setType(VillagerType.byBiome(serverLevelAccessor.getBiome(this.blockPosition())))); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + this.setVillagerData(this.getVillagerData().setType(VillagerType.byBiome(level.getBiome(this.blockPosition())))); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override diff --git a/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/net/minecraft/world/entity/monster/ZombifiedPiglin.java index 4a887f31..aa0fe6e7 100644 --- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java +++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java @@ -91,7 +91,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { AttributeInstance attributeInstance = this.getAttribute(Attributes.MOVEMENT_SPEED); if (this.isAngry()) { if (!this.isBaby() && !attributeInstance.hasModifier(SPEED_MODIFIER_ATTACKING_ID)) { @@ -103,7 +103,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { attributeInstance.removeModifier(SPEED_MODIFIER_ATTACKING_ID); } - this.updatePersistentAnger(serverLevel, true); + this.updatePersistentAnger(level, true); if (this.getTarget() != null) { this.maybeAlertOthers(); } @@ -112,7 +112,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { this.lastHurtByPlayerTime = this.tickCount; } - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } private void maybePlayFirstAngerSound() { @@ -172,9 +172,9 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { } public static boolean checkZombifiedPiglinSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return levelAccessor.getDifficulty() != Difficulty.PEACEFUL && !levelAccessor.getBlockState(blockPos.below()).is(Blocks.NETHER_WART_BLOCK); + return level.getDifficulty() != Difficulty.PEACEFUL && !level.getBlockState(pos.below()).is(Blocks.NETHER_WART_BLOCK); } @Override @@ -183,15 +183,15 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - this.addPersistentAngerSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + this.addPersistentAngerSaveData(tag); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.readPersistentAngerSaveData(this.level(), compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.readPersistentAngerSaveData(this.level(), tag); } @Override @@ -241,12 +241,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { } @Override - public boolean isPreventingPlayerRest(ServerLevel serverLevel, Player player) { - return this.isAngryAt(player, serverLevel); + public boolean isPreventingPlayerRest(ServerLevel level, Player player) { + return this.isAngryAt(player, level); } @Override - public boolean wantsToPickUp(ServerLevel serverLevel, ItemStack itemStack) { - return this.canHoldItem(itemStack); + public boolean wantsToPickUp(ServerLevel level, ItemStack stack) { + return this.canHoldItem(stack); } } diff --git a/net/minecraft/world/entity/monster/breeze/Breeze.java b/net/minecraft/world/entity/monster/breeze/Breeze.java index 6c9f5e47..7b9a9d6e 100644 --- a/net/minecraft/world/entity/monster/breeze/Breeze.java +++ b/net/minecraft/world/entity/monster/breeze/Breeze.java @@ -235,14 +235,14 @@ public class Breeze extends Monster { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("breezeBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.popPush("breezeActivityUpdate"); BreezeAi.updateActivity(this); profilerFiller.pop(); - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } @Override @@ -272,8 +272,8 @@ public class Breeze extends Monster { } @Override - public boolean isInvulnerableTo(ServerLevel serverLevel, DamageSource damageSource) { - return damageSource.getEntity() instanceof Breeze || super.isInvulnerableTo(serverLevel, damageSource); + public boolean isInvulnerableTo(ServerLevel level, DamageSource damageSource) { + return damageSource.getEntity() instanceof Breeze || super.isInvulnerableTo(level, damageSource); } @Override diff --git a/net/minecraft/world/entity/monster/creaking/Creaking.java b/net/minecraft/world/entity/monster/creaking/Creaking.java index f6a33e6e..84c18e0e 100644 --- a/net/minecraft/world/entity/monster/creaking/Creaking.java +++ b/net/minecraft/world/entity/monster/creaking/Creaking.java @@ -100,13 +100,13 @@ public class Creaking extends Monster { } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { - if (!(entity instanceof LivingEntity)) { + public boolean doHurtTarget(ServerLevel level, Entity source) { + if (!(source instanceof LivingEntity)) { return false; } else { this.attackAnimationRemainingTicks = 20; this.level().broadcastEntityEvent(this, (byte)4); - return super.doHurtTarget(serverLevel, entity); + return super.doHurtTarget(level, source); } } @@ -121,7 +121,7 @@ public class Creaking extends Monster { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("creakingBrain"); this.getBrain().tick((ServerLevel)this.level(), this); @@ -254,8 +254,8 @@ public class Creaking extends Monster { } } - public void setIsActive(boolean bl) { - this.entityData.set(IS_ACTIVE, bl); + public void setIsActive(boolean isActive) { + this.entityData.set(IS_ACTIVE, isActive); } public boolean isActive() { @@ -268,8 +268,8 @@ public class Creaking extends Monster { } class CreakingBodyRotationControl extends BodyRotationControl { - public CreakingBodyRotationControl(final Creaking creaking2) { - super(creaking2); + public CreakingBodyRotationControl(final Creaking creaking) { + super(creaking); } @Override @@ -281,8 +281,8 @@ public class Creaking extends Monster { } class CreakingJumpControl extends JumpControl { - public CreakingJumpControl(final Creaking creaking2) { - super(creaking2); + public CreakingJumpControl(final Creaking creaking) { + super(creaking); } @Override @@ -296,8 +296,8 @@ public class Creaking extends Monster { } class CreakingLookControl extends LookControl { - public CreakingLookControl(final Creaking creaking2) { - super(creaking2); + public CreakingLookControl(final Creaking creaking) { + super(creaking); } @Override @@ -309,8 +309,8 @@ public class Creaking extends Monster { } class CreakingMoveControl extends MoveControl { - public CreakingMoveControl(final Creaking creaking2) { - super(creaking2); + public CreakingMoveControl(final Creaking creaking) { + super(creaking); } @Override diff --git a/net/minecraft/world/entity/monster/creaking/CreakingTransient.java b/net/minecraft/world/entity/monster/creaking/CreakingTransient.java index d327131c..87c02c35 100644 --- a/net/minecraft/world/entity/monster/creaking/CreakingTransient.java +++ b/net/minecraft/world/entity/monster/creaking/CreakingTransient.java @@ -35,17 +35,17 @@ public class CreakingTransient extends Creaking { super(entityType, level); } - public void bindToCreakingHeart(BlockPos blockPos) { - this.homePos = blockPos; + public void bindToCreakingHeart(BlockPos homePos) { + this.homePos = homePos; } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (this.level().isClientSide) { - return super.hurtServer(serverLevel, damageSource, f); + return super.hurtServer(level, damageSource, amount); } else if (damageSource.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) { - return super.hurtServer(serverLevel, damageSource, f); - } else if (!this.isInvulnerableTo(serverLevel, damageSource) && this.invulnerabilityAnimationRemainingTicks <= 0) { + return super.hurtServer(level, damageSource, amount); + } else if (!this.isInvulnerableTo(level, damageSource) && this.invulnerabilityAnimationRemainingTicks <= 0) { this.invulnerabilityAnimationRemainingTicks = 8; this.level().broadcastEntityEvent(this, (byte)66); if (this.level().getBlockEntity(this.homePos) instanceof CreakingHeartBlockEntity creakingHeartBlockEntity && creakingHeartBlockEntity.isProtector(this)) { diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java index 4a48465b..032a3b78 100644 --- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java +++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java @@ -94,8 +94,8 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { } @VisibleForTesting - public void setTimeInOverworld(int i) { - this.timeInOverworld = i; + public void setTimeInOverworld(int timeInOverworld) { + this.timeInOverworld = timeInOverworld; } @Override @@ -113,13 +113,13 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { - if (entity instanceof LivingEntity livingEntity) { + public boolean doHurtTarget(ServerLevel level, Entity source) { + if (source instanceof LivingEntity livingEntity) { this.attackAnimationRemainingTicks = 10; this.level().broadcastEntityEvent(this, (byte)4); this.makeSound(SoundEvents.HOGLIN_ATTACK); HoglinAi.onHitTarget(this, livingEntity); - return HoglinBase.hurtAndThrowTarget(serverLevel, this, livingEntity); + return HoglinBase.hurtAndThrowTarget(level, this, livingEntity); } else { return false; } @@ -133,10 +133,10 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - boolean bl = super.hurtServer(serverLevel, damageSource, f); + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + boolean bl = super.hurtServer(level, damageSource, amount); if (bl && damageSource.getEntity() instanceof LivingEntity livingEntity) { - HoglinAi.wasHurtBy(serverLevel, this, livingEntity); + HoglinAi.wasHurtBy(level, this, livingEntity); } return bl; @@ -158,10 +158,10 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("hoglinBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.pop(); HoglinAi.updateActivity(this); if (this.isConverting()) { @@ -196,21 +196,21 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { } public static boolean checkHoglinSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return !levelAccessor.getBlockState(blockPos.below()).is(Blocks.NETHER_WART_BLOCK); + return !level.getBlockState(pos.below()).is(Blocks.NETHER_WART_BLOCK); } @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - if (serverLevelAccessor.getRandom().nextFloat() < 0.2F) { + if (level.getRandom().nextFloat() < 0.2F) { this.setBaby(true); } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override @@ -258,7 +258,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { } @Override - protected int getBaseExperienceReward(ServerLevel serverLevel) { + protected int getBaseExperienceReward(ServerLevel level) { return this.xpReward; } @@ -282,24 +282,24 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (this.isImmuneToZombification()) { - compound.putBoolean("IsImmuneToZombification", true); + tag.putBoolean("IsImmuneToZombification", true); } - compound.putInt("TimeInOverworld", this.timeInOverworld); + tag.putInt("TimeInOverworld", this.timeInOverworld); if (this.cannotBeHunted) { - compound.putBoolean("CannotBeHunted", true); + tag.putBoolean("CannotBeHunted", true); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setImmuneToZombification(compound.getBoolean("IsImmuneToZombification")); - this.timeInOverworld = compound.getInt("TimeInOverworld"); - this.setCannotBeHunted(compound.getBoolean("CannotBeHunted")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setImmuneToZombification(tag.getBoolean("IsImmuneToZombification")); + this.timeInOverworld = tag.getInt("TimeInOverworld"); + this.setCannotBeHunted(tag.getBoolean("CannotBeHunted")); } public void setImmuneToZombification(boolean immuneToZombification) { diff --git a/net/minecraft/world/entity/monster/hoglin/HoglinAi.java b/net/minecraft/world/entity/monster/hoglin/HoglinAi.java index e2dbe24d..df08991e 100644 --- a/net/minecraft/world/entity/monster/hoglin/HoglinAi.java +++ b/net/minecraft/world/entity/monster/hoglin/HoglinAi.java @@ -164,7 +164,7 @@ public class HoglinAi { hoglin.getBrain().setMemoryWithExpiry(MemoryModuleType.AVOID_TARGET, target, RETREAT_DURATION.sample(hoglin.level().random)); } - private static Optional findNearestValidAttackTarget(ServerLevel serverLevel, Hoglin hoglin) { + private static Optional findNearestValidAttackTarget(ServerLevel level, Hoglin hoglin) { return !isPacified(hoglin) && !isBreeding(hoglin) ? hoglin.getBrain().getMemory(MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER) : Optional.empty(); } @@ -187,24 +187,24 @@ public class HoglinAi { } } - protected static void wasHurtBy(ServerLevel serverLevel, Hoglin hoglin, LivingEntity livingEntity) { + protected static void wasHurtBy(ServerLevel level, Hoglin hoglin, LivingEntity entity) { Brain brain = hoglin.getBrain(); brain.eraseMemory(MemoryModuleType.PACIFIED); brain.eraseMemory(MemoryModuleType.BREED_TARGET); if (hoglin.isBaby()) { - retreatFromNearestTarget(hoglin, livingEntity); + retreatFromNearestTarget(hoglin, entity); } else { - maybeRetaliate(serverLevel, hoglin, livingEntity); + maybeRetaliate(level, hoglin, entity); } } - private static void maybeRetaliate(ServerLevel serverLevel, Hoglin hoglin, LivingEntity livingEntity) { - if (!hoglin.getBrain().isActive(Activity.AVOID) || livingEntity.getType() != EntityType.PIGLIN) { - if (livingEntity.getType() != EntityType.HOGLIN) { - if (!BehaviorUtils.isOtherTargetMuchFurtherAwayThanCurrentAttackTarget(hoglin, livingEntity, 4.0)) { - if (Sensor.isEntityAttackable(serverLevel, hoglin, livingEntity)) { - setAttackTarget(hoglin, livingEntity); - broadcastAttackTarget(hoglin, livingEntity); + private static void maybeRetaliate(ServerLevel level, Hoglin hoglin, LivingEntity entity) { + if (!hoglin.getBrain().isActive(Activity.AVOID) || entity.getType() != EntityType.PIGLIN) { + if (entity.getType() != EntityType.HOGLIN) { + if (!BehaviorUtils.isOtherTargetMuchFurtherAwayThanCurrentAttackTarget(hoglin, entity, 4.0)) { + if (Sensor.isEntityAttackable(level, hoglin, entity)) { + setAttackTarget(hoglin, entity); + broadcastAttackTarget(hoglin, entity); } } } diff --git a/net/minecraft/world/entity/monster/hoglin/HoglinBase.java b/net/minecraft/world/entity/monster/hoglin/HoglinBase.java index b122b850..756e42d8 100644 --- a/net/minecraft/world/entity/monster/hoglin/HoglinBase.java +++ b/net/minecraft/world/entity/monster/hoglin/HoglinBase.java @@ -13,21 +13,21 @@ public interface HoglinBase { int getAttackAnimationRemainingTicks(); - static boolean hurtAndThrowTarget(ServerLevel serverLevel, LivingEntity livingEntity, LivingEntity livingEntity2) { - float f = (float)livingEntity.getAttributeValue(Attributes.ATTACK_DAMAGE); + static boolean hurtAndThrowTarget(ServerLevel level, LivingEntity entity, LivingEntity target) { + float f = (float)entity.getAttributeValue(Attributes.ATTACK_DAMAGE); float g; - if (!livingEntity.isBaby() && (int)f > 0) { - g = f / 2.0F + serverLevel.random.nextInt((int)f); + if (!entity.isBaby() && (int)f > 0) { + g = f / 2.0F + level.random.nextInt((int)f); } else { g = f; } - DamageSource damageSource = livingEntity.damageSources().mobAttack(livingEntity); - boolean bl = livingEntity2.hurtServer(serverLevel, damageSource, g); + DamageSource damageSource = entity.damageSources().mobAttack(entity); + boolean bl = target.hurtServer(level, damageSource, g); if (bl) { - EnchantmentHelper.doPostAttackEffects(serverLevel, livingEntity2, damageSource); - if (!livingEntity.isBaby()) { - throwTarget(livingEntity, livingEntity2); + EnchantmentHelper.doPostAttackEffects(level, target, damageSource); + if (!entity.isBaby()) { + throwTarget(entity, target); } } diff --git a/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java b/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java index f30ed6bb..6162b3cc 100644 --- a/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java +++ b/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java @@ -59,25 +59,25 @@ public abstract class AbstractPiglin extends Monster { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (this.isImmuneToZombification()) { - compound.putBoolean("IsImmuneToZombification", true); + tag.putBoolean("IsImmuneToZombification", true); } - compound.putInt("TimeInOverworld", this.timeInOverworld); + tag.putInt("TimeInOverworld", this.timeInOverworld); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setImmuneToZombification(compound.getBoolean("IsImmuneToZombification")); - this.timeInOverworld = compound.getInt("TimeInOverworld"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setImmuneToZombification(tag.getBoolean("IsImmuneToZombification")); + this.timeInOverworld = tag.getInt("TimeInOverworld"); } @Override - protected void customServerAiStep(ServerLevel serverLevel) { - super.customServerAiStep(serverLevel); + protected void customServerAiStep(ServerLevel level) { + super.customServerAiStep(level); if (this.isConverting()) { this.timeInOverworld++; } else { @@ -86,13 +86,13 @@ public abstract class AbstractPiglin extends Monster { if (this.timeInOverworld > 300) { this.playConvertedSound(); - this.finishConversion(serverLevel); + this.finishConversion(level); } } @VisibleForTesting - public void setTimeInOverworld(int i) { - this.timeInOverworld = i; + public void setTimeInOverworld(int timeInOverworld) { + this.timeInOverworld = timeInOverworld; } public boolean isConverting() { diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java index bf8c9bf0..f0a580f2 100644 --- a/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/net/minecraft/world/entity/monster/piglin/Piglin.java @@ -127,25 +127,25 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (this.isBaby()) { - compound.putBoolean("IsBaby", true); + tag.putBoolean("IsBaby", true); } if (this.cannotHunt) { - compound.putBoolean("CannotHunt", true); + tag.putBoolean("CannotHunt", true); } - this.writeInventoryToTag(compound, this.registryAccess()); + this.writeInventoryToTag(tag, this.registryAccess()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setBaby(compound.getBoolean("IsBaby")); - this.setCannotHunt(compound.getBoolean("CannotHunt")); - this.readInventoryFromTag(compound, this.registryAccess()); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setBaby(tag.getBoolean("IsBaby")); + this.setCannotHunt(tag.getBoolean("CannotHunt")); + this.readInventoryFromTag(tag, this.registryAccess()); } @VisibleForDebug @@ -195,18 +195,18 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento } public static boolean checkPiglinSpawnRules( - EntityType entityType, LevelAccessor levelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource + EntityType entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random ) { - return !levelAccessor.getBlockState(blockPos.below()).is(Blocks.NETHER_WART_BLOCK); + return !level.getBlockState(pos.below()).is(Blocks.NETHER_WART_BLOCK); } @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - RandomSource randomSource = serverLevelAccessor.getRandom(); - if (entitySpawnReason != EntitySpawnReason.STRUCTURE) { + RandomSource randomSource = level.getRandom(); + if (spawnReason != EntitySpawnReason.STRUCTURE) { if (randomSource.nextFloat() < 0.2F) { this.setBaby(true); } else if (this.isAdult()) { @@ -214,10 +214,10 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento } } - PiglinAi.initMemories(this, serverLevelAccessor.getRandom()); - this.populateDefaultEquipmentSlots(randomSource, difficultyInstance); - this.populateDefaultEquipmentEnchantments(serverLevelAccessor, randomSource, difficultyInstance); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + PiglinAi.initMemories(this, level.getRandom()); + this.populateDefaultEquipmentSlots(randomSource, difficulty); + this.populateDefaultEquipmentEnchantments(level, randomSource, difficulty); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override @@ -306,17 +306,17 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("piglinBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.pop(); PiglinAi.updateActivity(this); - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } @Override - protected int getBaseExperienceReward(ServerLevel serverLevel) { + protected int getBaseExperienceReward(ServerLevel level) { return this.xpReward; } @@ -369,10 +369,10 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - boolean bl = super.hurtServer(serverLevel, damageSource, f); + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + boolean bl = super.hurtServer(level, damageSource, amount); if (bl && damageSource.getEntity() instanceof LivingEntity livingEntity) { - PiglinAi.wasHurtBy(serverLevel, this, livingEntity); + PiglinAi.wasHurtBy(level, this, livingEntity); } return bl; @@ -402,8 +402,8 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento } @Override - public boolean wantsToPickUp(ServerLevel serverLevel, ItemStack itemStack) { - return serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && this.canPickUpLoot() && PiglinAi.wantsToPickup(this, itemStack); + public boolean wantsToPickUp(ServerLevel level, ItemStack stack) { + return level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && this.canPickUpLoot() && PiglinAi.wantsToPickup(this, stack); } protected boolean canReplaceCurrentItem(ItemStack candidate) { @@ -413,28 +413,26 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento } @Override - protected boolean canReplaceCurrentItem(ItemStack itemStack, ItemStack itemStack2, EquipmentSlot equipmentSlot) { - if (EnchantmentHelper.has(itemStack2, EnchantmentEffectComponents.PREVENT_ARMOR_CHANGE)) { + protected boolean canReplaceCurrentItem(ItemStack newItem, ItemStack currentItem, EquipmentSlot slot) { + if (EnchantmentHelper.has(currentItem, EnchantmentEffectComponents.PREVENT_ARMOR_CHANGE)) { return false; } else { - boolean bl = PiglinAi.isLovedItem(itemStack) || itemStack.is(Items.CROSSBOW); - boolean bl2 = PiglinAi.isLovedItem(itemStack2) || itemStack2.is(Items.CROSSBOW); + boolean bl = PiglinAi.isLovedItem(newItem) || newItem.is(Items.CROSSBOW); + boolean bl2 = PiglinAi.isLovedItem(currentItem) || currentItem.is(Items.CROSSBOW); if (bl && !bl2) { return true; } else if (!bl && bl2) { return false; } else { - return this.isAdult() && !itemStack.is(Items.CROSSBOW) && itemStack2.is(Items.CROSSBOW) - ? false - : super.canReplaceCurrentItem(itemStack, itemStack2, equipmentSlot); + return this.isAdult() && !newItem.is(Items.CROSSBOW) && currentItem.is(Items.CROSSBOW) ? false : super.canReplaceCurrentItem(newItem, currentItem, slot); } } } @Override - protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) { - this.onItemPickup(itemEntity); - PiglinAi.pickUpItem(serverLevel, this, itemEntity); + protected void pickUpItem(ServerLevel level, ItemEntity entity) { + this.onItemPickup(entity); + PiglinAi.pickUpItem(level, this, entity); } @Override diff --git a/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/net/minecraft/world/entity/monster/piglin/PiglinAi.java index 3726b915..1d8cac47 100644 --- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java @@ -322,7 +322,7 @@ public class PiglinAi { } } - protected static void pickUpItem(ServerLevel serverLevel, Piglin piglin, ItemEntity itemEntity) { + protected static void pickUpItem(ServerLevel level, Piglin piglin, ItemEntity itemEntity) { stopWalking(piglin); ItemStack itemStack; if (itemEntity.getItem().is(Items.GOLD_NUGGET)) { @@ -336,24 +336,24 @@ public class PiglinAi { if (isLovedItem(itemStack)) { piglin.getBrain().eraseMemory(MemoryModuleType.TIME_TRYING_TO_REACH_ADMIRE_ITEM); - holdInOffhand(serverLevel, piglin, itemStack); + holdInOffhand(level, piglin, itemStack); admireGoldItem(piglin); } else if (isFood(itemStack) && !hasEatenRecently(piglin)) { eat(piglin); } else { - boolean bl = !piglin.equipItemIfPossible(serverLevel, itemStack).equals(ItemStack.EMPTY); + boolean bl = !piglin.equipItemIfPossible(level, itemStack).equals(ItemStack.EMPTY); if (!bl) { putInInventory(piglin, itemStack); } } } - private static void holdInOffhand(ServerLevel serverLevel, Piglin piglin, ItemStack itemStack) { + private static void holdInOffhand(ServerLevel level, Piglin piglin, ItemStack stack) { if (isHoldingItemInOffHand(piglin)) { - piglin.spawnAtLocation(serverLevel, piglin.getItemInHand(InteractionHand.OFF_HAND)); + piglin.spawnAtLocation(level, piglin.getItemInHand(InteractionHand.OFF_HAND)); } - piglin.holdInOffHand(itemStack); + piglin.holdInOffHand(stack); } private static ItemStack removeOneItemFromItemEntity(ItemEntity itemEntity) { @@ -368,22 +368,22 @@ public class PiglinAi { return itemStack2; } - protected static void stopHoldingOffHandItem(ServerLevel serverLevel, Piglin piglin, boolean bl) { + protected static void stopHoldingOffHandItem(ServerLevel level, Piglin piglin, boolean barter) { ItemStack itemStack = piglin.getItemInHand(InteractionHand.OFF_HAND); piglin.setItemInHand(InteractionHand.OFF_HAND, ItemStack.EMPTY); if (piglin.isAdult()) { - boolean bl2 = isBarterCurrency(itemStack); - if (bl && bl2) { + boolean bl = isBarterCurrency(itemStack); + if (barter && bl) { throwItems(piglin, getBarterResponseItems(piglin)); - } else if (!bl2) { - boolean bl3 = !piglin.equipItemIfPossible(serverLevel, itemStack).isEmpty(); - if (!bl3) { + } else if (!bl) { + boolean bl2 = !piglin.equipItemIfPossible(level, itemStack).isEmpty(); + if (!bl2) { putInInventory(piglin, itemStack); } } } else { - boolean bl2 = !piglin.equipItemIfPossible(serverLevel, itemStack).isEmpty(); - if (!bl2) { + boolean bl = !piglin.equipItemIfPossible(level, itemStack).isEmpty(); + if (!bl) { ItemStack itemStack2 = piglin.getMainHandItem(); if (isLovedItem(itemStack2)) { putInInventory(piglin, itemStack2); @@ -396,9 +396,9 @@ public class PiglinAi { } } - protected static void cancelAdmiring(ServerLevel serverLevel, Piglin piglin) { + protected static void cancelAdmiring(ServerLevel level, Piglin piglin) { if (isAdmiringItem(piglin) && !piglin.getOffhandItem().isEmpty()) { - piglin.spawnAtLocation(serverLevel, piglin.getOffhandItem()); + piglin.spawnAtLocation(level, piglin.getOffhandItem()); piglin.setItemInHand(InteractionHand.OFF_HAND, ItemStack.EMPTY); } } @@ -478,8 +478,8 @@ public class PiglinAi { : !mob.isBaby() || !mob.isAlive() || wasHurtRecently(piglin) || wasHurtRecently(mob) || mob instanceof Piglin && mob.getVehicle() == null; } - private static boolean isNearestValidAttackTarget(ServerLevel serverLevel, Piglin piglin, LivingEntity livingEntity) { - return findNearestValidAttackTarget(serverLevel, piglin).filter(livingEntity2 -> livingEntity2 == livingEntity).isPresent(); + private static boolean isNearestValidAttackTarget(ServerLevel level, Piglin piglin, LivingEntity target) { + return findNearestValidAttackTarget(level, piglin).filter(livingEntity2 -> livingEntity2 == target).isPresent(); } private static boolean isNearZombified(Piglin piglin) { @@ -492,13 +492,13 @@ public class PiglinAi { } } - private static Optional findNearestValidAttackTarget(ServerLevel serverLevel, Piglin piglin) { + private static Optional findNearestValidAttackTarget(ServerLevel level, Piglin piglin) { Brain brain = piglin.getBrain(); if (isNearZombified(piglin)) { return Optional.empty(); } else { Optional optional = BehaviorUtils.getLivingEntityFromUUIDMemory(piglin, MemoryModuleType.ANGRY_AT); - if (optional.isPresent() && Sensor.isEntityAttackableIgnoringLineOfSight(serverLevel, piglin, (LivingEntity)optional.get())) { + if (optional.isPresent() && Sensor.isEntityAttackableIgnoringLineOfSight(level, piglin, (LivingEntity)optional.get())) { return optional; } else { if (brain.hasMemoryValue(MemoryModuleType.UNIVERSAL_ANGER)) { @@ -513,28 +513,28 @@ public class PiglinAi { return optional2; } else { Optional optional3 = brain.getMemory(MemoryModuleType.NEAREST_TARGETABLE_PLAYER_NOT_WEARING_GOLD); - return optional3.isPresent() && Sensor.isEntityAttackable(serverLevel, piglin, (LivingEntity)optional3.get()) ? optional3 : Optional.empty(); + return optional3.isPresent() && Sensor.isEntityAttackable(level, piglin, (LivingEntity)optional3.get()) ? optional3 : Optional.empty(); } } } } - public static void angerNearbyPiglins(ServerLevel serverLevel, Player player, boolean bl) { + public static void angerNearbyPiglins(ServerLevel level, Player player, boolean requireLineOfSight) { List list = player.level().getEntitiesOfClass(Piglin.class, player.getBoundingBox().inflate(16.0)); - list.stream().filter(PiglinAi::isIdle).filter(piglin -> !bl || BehaviorUtils.canSee(piglin, player)).forEach(piglin -> { - if (serverLevel.getGameRules().getBoolean(GameRules.RULE_UNIVERSAL_ANGER)) { - setAngerTargetToNearestTargetablePlayerIfFound(serverLevel, piglin, player); + list.stream().filter(PiglinAi::isIdle).filter(piglin -> !requireLineOfSight || BehaviorUtils.canSee(piglin, player)).forEach(piglin -> { + if (level.getGameRules().getBoolean(GameRules.RULE_UNIVERSAL_ANGER)) { + setAngerTargetToNearestTargetablePlayerIfFound(level, piglin, player); } else { - setAngerTarget(serverLevel, piglin, player); + setAngerTarget(level, piglin, player); } }); } - public static InteractionResult mobInteract(ServerLevel serverLevel, Piglin piglin, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public static InteractionResult mobInteract(ServerLevel level, Piglin piglin, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); if (canAdmire(piglin, itemStack)) { ItemStack itemStack2 = itemStack.consumeAndReturn(1, player); - holdInOffhand(serverLevel, piglin, itemStack2); + holdInOffhand(level, piglin, itemStack2); admireGoldItem(piglin); stopWalking(piglin); return InteractionResult.SUCCESS; @@ -547,49 +547,49 @@ public class PiglinAi { return !isAdmiringDisabled(piglin) && !isAdmiringItem(piglin) && piglin.isAdult() && isBarterCurrency(stack); } - protected static void wasHurtBy(ServerLevel serverLevel, Piglin piglin, LivingEntity livingEntity) { - if (!(livingEntity instanceof Piglin)) { + protected static void wasHurtBy(ServerLevel level, Piglin piglin, LivingEntity entity) { + if (!(entity instanceof Piglin)) { if (isHoldingItemInOffHand(piglin)) { - stopHoldingOffHandItem(serverLevel, piglin, false); + stopHoldingOffHandItem(level, piglin, false); } Brain brain = piglin.getBrain(); brain.eraseMemory(MemoryModuleType.CELEBRATE_LOCATION); brain.eraseMemory(MemoryModuleType.DANCING); brain.eraseMemory(MemoryModuleType.ADMIRING_ITEM); - if (livingEntity instanceof Player) { + if (entity instanceof Player) { brain.setMemoryWithExpiry(MemoryModuleType.ADMIRING_DISABLED, true, 400L); } getAvoidTarget(piglin).ifPresent(livingEntity2 -> { - if (livingEntity2.getType() != livingEntity.getType()) { + if (livingEntity2.getType() != entity.getType()) { brain.eraseMemory(MemoryModuleType.AVOID_TARGET); } }); if (piglin.isBaby()) { - brain.setMemoryWithExpiry(MemoryModuleType.AVOID_TARGET, livingEntity, 100L); - if (Sensor.isEntityAttackableIgnoringLineOfSight(serverLevel, piglin, livingEntity)) { - broadcastAngerTarget(serverLevel, piglin, livingEntity); + brain.setMemoryWithExpiry(MemoryModuleType.AVOID_TARGET, entity, 100L); + if (Sensor.isEntityAttackableIgnoringLineOfSight(level, piglin, entity)) { + broadcastAngerTarget(level, piglin, entity); } - } else if (livingEntity.getType() == EntityType.HOGLIN && hoglinsOutnumberPiglins(piglin)) { - setAvoidTargetAndDontHuntForAWhile(piglin, livingEntity); - broadcastRetreat(piglin, livingEntity); + } else if (entity.getType() == EntityType.HOGLIN && hoglinsOutnumberPiglins(piglin)) { + setAvoidTargetAndDontHuntForAWhile(piglin, entity); + broadcastRetreat(piglin, entity); } else { - maybeRetaliate(serverLevel, piglin, livingEntity); + maybeRetaliate(level, piglin, entity); } } } - protected static void maybeRetaliate(ServerLevel serverLevel, AbstractPiglin abstractPiglin, LivingEntity livingEntity) { - if (!abstractPiglin.getBrain().isActive(Activity.AVOID)) { - if (Sensor.isEntityAttackableIgnoringLineOfSight(serverLevel, abstractPiglin, livingEntity)) { - if (!BehaviorUtils.isOtherTargetMuchFurtherAwayThanCurrentAttackTarget(abstractPiglin, livingEntity, 4.0)) { - if (livingEntity.getType() == EntityType.PLAYER && serverLevel.getGameRules().getBoolean(GameRules.RULE_UNIVERSAL_ANGER)) { - setAngerTargetToNearestTargetablePlayerIfFound(serverLevel, abstractPiglin, livingEntity); - broadcastUniversalAnger(serverLevel, abstractPiglin); + protected static void maybeRetaliate(ServerLevel level, AbstractPiglin piglin, LivingEntity entity) { + if (!piglin.getBrain().isActive(Activity.AVOID)) { + if (Sensor.isEntityAttackableIgnoringLineOfSight(level, piglin, entity)) { + if (!BehaviorUtils.isOtherTargetMuchFurtherAwayThanCurrentAttackTarget(piglin, entity, 4.0)) { + if (entity.getType() == EntityType.PLAYER && level.getGameRules().getBoolean(GameRules.RULE_UNIVERSAL_ANGER)) { + setAngerTargetToNearestTargetablePlayerIfFound(level, piglin, entity); + broadcastUniversalAnger(level, piglin); } else { - setAngerTarget(serverLevel, abstractPiglin, livingEntity); - broadcastAngerTarget(serverLevel, abstractPiglin, livingEntity); + setAngerTarget(level, piglin, entity); + broadcastAngerTarget(level, piglin, entity); } } } @@ -633,8 +633,8 @@ public class PiglinAi { return (List)piglin.getBrain().getMemory(MemoryModuleType.NEARBY_ADULT_PIGLINS).orElse(ImmutableList.of()); } - public static boolean isWearingSafeArmor(LivingEntity livingEntity) { - for (ItemStack itemStack : livingEntity.getArmorAndBodyArmorSlots()) { + public static boolean isWearingSafeArmor(LivingEntity entity) { + for (ItemStack itemStack : entity.getArmorAndBodyArmorSlots()) { if (itemStack.is(ItemTags.PIGLIN_SAFE_ARMOR)) { return true; } @@ -658,47 +658,47 @@ public class PiglinAi { ); } - protected static void broadcastAngerTarget(ServerLevel serverLevel, AbstractPiglin abstractPiglin, LivingEntity livingEntity) { - getAdultPiglins(abstractPiglin).forEach(abstractPiglinx -> { - if (livingEntity.getType() != EntityType.HOGLIN || abstractPiglinx.canHunt() && ((Hoglin)livingEntity).canBeHunted()) { - setAngerTargetIfCloserThanCurrent(serverLevel, abstractPiglinx, livingEntity); + protected static void broadcastAngerTarget(ServerLevel level, AbstractPiglin piglin, LivingEntity angerTarget) { + getAdultPiglins(piglin).forEach(abstractPiglin -> { + if (angerTarget.getType() != EntityType.HOGLIN || abstractPiglin.canHunt() && ((Hoglin)angerTarget).canBeHunted()) { + setAngerTargetIfCloserThanCurrent(level, abstractPiglin, angerTarget); } }); } - protected static void broadcastUniversalAnger(ServerLevel serverLevel, AbstractPiglin abstractPiglin) { - getAdultPiglins(abstractPiglin) - .forEach(abstractPiglinx -> getNearestVisibleTargetablePlayer(abstractPiglinx).ifPresent(player -> setAngerTarget(serverLevel, abstractPiglinx, player))); + protected static void broadcastUniversalAnger(ServerLevel level, AbstractPiglin piglin) { + getAdultPiglins(piglin) + .forEach(abstractPiglin -> getNearestVisibleTargetablePlayer(abstractPiglin).ifPresent(player -> setAngerTarget(level, abstractPiglin, player))); } - protected static void setAngerTarget(ServerLevel serverLevel, AbstractPiglin abstractPiglin, LivingEntity livingEntity) { - if (Sensor.isEntityAttackableIgnoringLineOfSight(serverLevel, abstractPiglin, livingEntity)) { - abstractPiglin.getBrain().eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE); - abstractPiglin.getBrain().setMemoryWithExpiry(MemoryModuleType.ANGRY_AT, livingEntity.getUUID(), 600L); - if (livingEntity.getType() == EntityType.HOGLIN && abstractPiglin.canHunt()) { - dontKillAnyMoreHoglinsForAWhile(abstractPiglin); + protected static void setAngerTarget(ServerLevel level, AbstractPiglin piglin, LivingEntity angerTarget) { + if (Sensor.isEntityAttackableIgnoringLineOfSight(level, piglin, angerTarget)) { + piglin.getBrain().eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE); + piglin.getBrain().setMemoryWithExpiry(MemoryModuleType.ANGRY_AT, angerTarget.getUUID(), 600L); + if (angerTarget.getType() == EntityType.HOGLIN && piglin.canHunt()) { + dontKillAnyMoreHoglinsForAWhile(piglin); } - if (livingEntity.getType() == EntityType.PLAYER && serverLevel.getGameRules().getBoolean(GameRules.RULE_UNIVERSAL_ANGER)) { - abstractPiglin.getBrain().setMemoryWithExpiry(MemoryModuleType.UNIVERSAL_ANGER, true, 600L); + if (angerTarget.getType() == EntityType.PLAYER && level.getGameRules().getBoolean(GameRules.RULE_UNIVERSAL_ANGER)) { + piglin.getBrain().setMemoryWithExpiry(MemoryModuleType.UNIVERSAL_ANGER, true, 600L); } } } - private static void setAngerTargetToNearestTargetablePlayerIfFound(ServerLevel serverLevel, AbstractPiglin abstractPiglin, LivingEntity livingEntity) { - Optional optional = getNearestVisibleTargetablePlayer(abstractPiglin); + private static void setAngerTargetToNearestTargetablePlayerIfFound(ServerLevel level, AbstractPiglin piglin, LivingEntity entity) { + Optional optional = getNearestVisibleTargetablePlayer(piglin); if (optional.isPresent()) { - setAngerTarget(serverLevel, abstractPiglin, (LivingEntity)optional.get()); + setAngerTarget(level, piglin, (LivingEntity)optional.get()); } else { - setAngerTarget(serverLevel, abstractPiglin, livingEntity); + setAngerTarget(level, piglin, entity); } } - private static void setAngerTargetIfCloserThanCurrent(ServerLevel serverLevel, AbstractPiglin abstractPiglin, LivingEntity livingEntity) { - Optional optional = getAngerTarget(abstractPiglin); - LivingEntity livingEntity2 = BehaviorUtils.getNearestTarget(abstractPiglin, optional, livingEntity); - if (!optional.isPresent() || optional.get() != livingEntity2) { - setAngerTarget(serverLevel, abstractPiglin, livingEntity2); + private static void setAngerTargetIfCloserThanCurrent(ServerLevel level, AbstractPiglin piglin, LivingEntity angerTarget) { + Optional optional = getAngerTarget(piglin); + LivingEntity livingEntity = BehaviorUtils.getNearestTarget(piglin, optional, angerTarget); + if (!optional.isPresent() || optional.get() != livingEntity) { + setAngerTarget(level, piglin, livingEntity); } } diff --git a/net/minecraft/world/entity/monster/piglin/PiglinBrute.java b/net/minecraft/world/entity/monster/piglin/PiglinBrute.java index b5aeb993..a3a9a7a4 100644 --- a/net/minecraft/world/entity/monster/piglin/PiglinBrute.java +++ b/net/minecraft/world/entity/monster/piglin/PiglinBrute.java @@ -77,11 +77,11 @@ public class PiglinBrute extends AbstractPiglin { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { PiglinBruteAi.initMemories(this); - this.populateDefaultEquipmentSlots(serverLevelAccessor.getRandom(), difficultyInstance); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + this.populateDefaultEquipmentSlots(level.getRandom(), difficulty); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override @@ -110,19 +110,19 @@ public class PiglinBrute extends AbstractPiglin { } @Override - public boolean wantsToPickUp(ServerLevel serverLevel, ItemStack itemStack) { - return itemStack.is(Items.GOLDEN_AXE) ? super.wantsToPickUp(serverLevel, itemStack) : false; + public boolean wantsToPickUp(ServerLevel level, ItemStack stack) { + return stack.is(Items.GOLDEN_AXE) ? super.wantsToPickUp(level, stack) : false; } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("piglinBruteBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.pop(); PiglinBruteAi.updateActivity(this); PiglinBruteAi.maybePlayActivitySound(this); - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } @Override @@ -131,10 +131,10 @@ public class PiglinBrute extends AbstractPiglin { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - boolean bl = super.hurtServer(serverLevel, damageSource, f); + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + boolean bl = super.hurtServer(level, damageSource, amount); if (bl && damageSource.getEntity() instanceof LivingEntity livingEntity) { - PiglinBruteAi.wasHurtBy(serverLevel, this, livingEntity); + PiglinBruteAi.wasHurtBy(level, this, livingEntity); } return bl; diff --git a/net/minecraft/world/entity/monster/piglin/PiglinBruteAi.java b/net/minecraft/world/entity/monster/piglin/PiglinBruteAi.java index ecb2741a..68f5b804 100644 --- a/net/minecraft/world/entity/monster/piglin/PiglinBruteAi.java +++ b/net/minecraft/world/entity/monster/piglin/PiglinBruteAi.java @@ -125,23 +125,23 @@ public class PiglinBruteAi { piglinBrute.setAggressive(brain.hasMemoryValue(MemoryModuleType.ATTACK_TARGET)); } - private static boolean isNearestValidAttackTarget(ServerLevel serverLevel, AbstractPiglin abstractPiglin, LivingEntity livingEntity) { - return findNearestValidAttackTarget(serverLevel, abstractPiglin).filter(livingEntity2 -> livingEntity2 == livingEntity).isPresent(); + private static boolean isNearestValidAttackTarget(ServerLevel level, AbstractPiglin piglin, LivingEntity entity) { + return findNearestValidAttackTarget(level, piglin).filter(livingEntity2 -> livingEntity2 == entity).isPresent(); } - private static Optional findNearestValidAttackTarget(ServerLevel serverLevel, AbstractPiglin abstractPiglin) { - Optional optional = BehaviorUtils.getLivingEntityFromUUIDMemory(abstractPiglin, MemoryModuleType.ANGRY_AT); - if (optional.isPresent() && Sensor.isEntityAttackableIgnoringLineOfSight(serverLevel, abstractPiglin, (LivingEntity)optional.get())) { + private static Optional findNearestValidAttackTarget(ServerLevel level, AbstractPiglin piglin) { + Optional optional = BehaviorUtils.getLivingEntityFromUUIDMemory(piglin, MemoryModuleType.ANGRY_AT); + if (optional.isPresent() && Sensor.isEntityAttackableIgnoringLineOfSight(level, piglin, (LivingEntity)optional.get())) { return optional; } else { - Optional optional2 = abstractPiglin.getBrain().getMemory(MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER); - return optional2.isPresent() ? optional2 : abstractPiglin.getBrain().getMemory(MemoryModuleType.NEAREST_VISIBLE_NEMESIS); + Optional optional2 = piglin.getBrain().getMemory(MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER); + return optional2.isPresent() ? optional2 : piglin.getBrain().getMemory(MemoryModuleType.NEAREST_VISIBLE_NEMESIS); } } - protected static void wasHurtBy(ServerLevel serverLevel, PiglinBrute piglinBrute, LivingEntity livingEntity) { - if (!(livingEntity instanceof AbstractPiglin)) { - PiglinAi.maybeRetaliate(serverLevel, piglinBrute, livingEntity); + protected static void wasHurtBy(ServerLevel level, PiglinBrute piglinBrute, LivingEntity entity) { + if (!(entity instanceof AbstractPiglin)) { + PiglinAi.maybeRetaliate(level, piglinBrute, entity); } } diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java index 51d71da5..c9439310 100644 --- a/net/minecraft/world/entity/monster/warden/Warden.java +++ b/net/minecraft/world/entity/monster/warden/Warden.java @@ -160,8 +160,8 @@ public class Warden extends Monster implements VibrationSystem { } @Override - public boolean isInvulnerableTo(ServerLevel serverLevel, DamageSource damageSource) { - return this.isDiggingOrEmerging() && !damageSource.is(DamageTypeTags.BYPASSES_INVULNERABILITY) ? true : super.isInvulnerableTo(serverLevel, damageSource); + public boolean isInvulnerableTo(ServerLevel level, DamageSource damageSource) { + return this.isDiggingOrEmerging() && !damageSource.is(DamageTypeTags.BYPASSES_INVULNERABILITY) ? true : super.isInvulnerableTo(level, damageSource); } boolean isDiggingOrEmerging() { @@ -225,11 +225,11 @@ public class Warden extends Monster implements VibrationSystem { } @Override - public boolean doHurtTarget(ServerLevel serverLevel, Entity entity) { - serverLevel.broadcastEntityEvent(this, (byte)4); + public boolean doHurtTarget(ServerLevel level, Entity source) { + level.broadcastEntityEvent(this, (byte)4); this.playSound(SoundEvents.WARDEN_ATTACK_IMPACT, 10.0F, this.getVoicePitch()); SonicBoom.setCooldown(this, 40); - return super.doHurtTarget(serverLevel, entity); + return super.doHurtTarget(level, source); } @Override @@ -285,18 +285,18 @@ public class Warden extends Monster implements VibrationSystem { } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("wardenBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.pop(); - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); if ((this.tickCount + this.getId()) % 120 == 0) { - applyDarknessAround(serverLevel, this.position(), this, 20); + applyDarknessAround(level, this.position(), this, 20); } if (this.tickCount % 20 == 0) { - this.angerManagement.tick(serverLevel, this::canTargetEntity); + this.angerManagement.tick(level, this::canTargetEntity); this.syncClientAngerLevel(); } @@ -413,34 +413,34 @@ public class Warden extends Monster implements VibrationSystem { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); RegistryOps registryOps = this.registryAccess().createSerializationContext(NbtOps.INSTANCE); AngerManagement.codec(this::canTargetEntity) .encodeStart(registryOps, this.angerManagement) .resultOrPartial(string -> LOGGER.error("Failed to encode anger state for Warden: '{}'", string)) - .ifPresent(tag -> compound.put("anger", tag)); + .ifPresent(tagx -> tag.put("anger", tagx)); Data.CODEC .encodeStart(registryOps, this.vibrationData) .resultOrPartial(string -> LOGGER.error("Failed to encode vibration listener for Warden: '{}'", string)) - .ifPresent(tag -> compound.put("listener", tag)); + .ifPresent(tagx -> tag.put("listener", tagx)); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); RegistryOps registryOps = this.registryAccess().createSerializationContext(NbtOps.INSTANCE); - if (compound.contains("anger")) { + if (tag.contains("anger")) { AngerManagement.codec(this::canTargetEntity) - .parse(registryOps, compound.get("anger")) + .parse(registryOps, tag.get("anger")) .resultOrPartial(string -> LOGGER.error("Failed to parse anger state for Warden: '{}'", string)) .ifPresent(angerManagement -> this.angerManagement = angerManagement); this.syncClientAngerLevel(); } - if (compound.contains("listener", 10)) { + if (tag.contains("listener", 10)) { Data.CODEC - .parse(registryOps, compound.getCompound("listener")) + .parse(registryOps, tag.getCompound("listener")) .resultOrPartial(string -> LOGGER.error("Failed to parse vibration listener for Warden: '{}'", string)) .ifPresent(data -> this.vibrationData = data); } @@ -502,21 +502,21 @@ public class Warden extends Monster implements VibrationSystem { @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { this.getBrain().setMemoryWithExpiry(MemoryModuleType.DIG_COOLDOWN, Unit.INSTANCE, 1200L); - if (entitySpawnReason == EntitySpawnReason.TRIGGERED) { + if (spawnReason == EntitySpawnReason.TRIGGERED) { this.setPose(Pose.EMERGING); this.getBrain().setMemoryWithExpiry(MemoryModuleType.IS_EMERGING, Unit.INSTANCE, WardenAi.EMERGE_DURATION); this.playSound(SoundEvents.WARDEN_AGITATED, 5.0F, 1.0F); } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - boolean bl = super.hurtServer(serverLevel, damageSource, f); + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + boolean bl = super.hurtServer(level, damageSource, amount); if (!this.isNoAi() && !this.isDiggingOrEmerging()) { Entity entity = damageSource.getEntity(); this.increaseAngerAt(entity, AngerLevel.ANGRY.getMinimumAnger() + 20, false); diff --git a/net/minecraft/world/entity/monster/warden/WardenAi.java b/net/minecraft/world/entity/monster/warden/WardenAi.java index 9dea602e..911ed6ef 100644 --- a/net/minecraft/world/entity/monster/warden/WardenAi.java +++ b/net/minecraft/world/entity/monster/warden/WardenAi.java @@ -189,9 +189,9 @@ public class WardenAi { return warden.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).filter(livingEntity2 -> livingEntity2 == entity).isPresent(); } - private static void onTargetInvalid(ServerLevel serverLevel, Warden warden, LivingEntity livingEntity) { - if (!warden.canTargetEntity(livingEntity)) { - warden.clearAnger(livingEntity); + private static void onTargetInvalid(ServerLevel level, Warden warden, LivingEntity target) { + if (!warden.canTargetEntity(target)) { + warden.clearAnger(target); } setDigCooldown(warden); diff --git a/net/minecraft/world/entity/npc/AbstractVillager.java b/net/minecraft/world/entity/npc/AbstractVillager.java index bd1fcb91..d6245143 100644 --- a/net/minecraft/world/entity/npc/AbstractVillager.java +++ b/net/minecraft/world/entity/npc/AbstractVillager.java @@ -25,6 +25,7 @@ import net.minecraft.world.entity.EntitySpawnReason; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.SlotAccess; import net.minecraft.world.entity.SpawnGroupData; +import net.minecraft.world.entity.npc.VillagerTrades.ItemListing; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.trading.Merchant; @@ -57,13 +58,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { if (spawnGroupData == null) { spawnGroupData = new AgeableMob.AgeableMobGroupData(false); } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } public int getUnhappyCounter() { @@ -161,29 +162,29 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (!this.level().isClientSide) { MerchantOffers merchantOffers = this.getOffers(); if (!merchantOffers.isEmpty()) { - compound.put("Offers", MerchantOffers.CODEC.encodeStart(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), merchantOffers).getOrThrow()); + tag.put("Offers", MerchantOffers.CODEC.encodeStart(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), merchantOffers).getOrThrow()); } } - this.writeInventoryToTag(compound, this.registryAccess()); + this.writeInventoryToTag(tag, this.registryAccess()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("Offers")) { + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("Offers")) { MerchantOffers.CODEC - .parse(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), compound.get("Offers")) + .parse(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), tag.get("Offers")) .resultOrPartial(Util.prefix("Failed to load offers: ", LOGGER::warn)) .ifPresent(merchantOffers -> this.offers = merchantOffers); } - this.readInventoryFromTag(compound, this.registryAccess()); + this.readInventoryFromTag(tag, this.registryAccess()); } @Nullable @@ -233,12 +234,12 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa /** * Adds limited numbers of trades to the given {@link net.minecraft.world.item.trading.MerchantOffers}. */ - protected void addOffersFromItemListings(MerchantOffers givenMerchantOffers, VillagerTrades.ItemListing[] newTrades, int maxNumbers) { - ArrayList arrayList = Lists.newArrayList(newTrades); + protected void addOffersFromItemListings(MerchantOffers givenMerchantOffers, ItemListing[] newTrades, int maxNumbers) { + ArrayList arrayList = Lists.newArrayList(newTrades); int i = 0; while (i < maxNumbers && !arrayList.isEmpty()) { - MerchantOffer merchantOffer = ((VillagerTrades.ItemListing)arrayList.remove(this.random.nextInt(arrayList.size()))).getOffer(this, this.random); + MerchantOffer merchantOffer = ((ItemListing)arrayList.remove(this.random.nextInt(arrayList.size()))).getOffer(this, this.random); if (merchantOffer != null) { givenMerchantOffers.add(merchantOffer); i++; diff --git a/net/minecraft/world/entity/npc/InventoryCarrier.java b/net/minecraft/world/entity/npc/InventoryCarrier.java index 9a52f1e7..34d7c7a1 100644 --- a/net/minecraft/world/entity/npc/InventoryCarrier.java +++ b/net/minecraft/world/entity/npc/InventoryCarrier.java @@ -13,10 +13,10 @@ public interface InventoryCarrier { SimpleContainer getInventory(); - static void pickUpItem(ServerLevel serverLevel, Mob mob, InventoryCarrier inventoryCarrier, ItemEntity itemEntity) { + static void pickUpItem(ServerLevel level, Mob mob, InventoryCarrier carrier, ItemEntity itemEntity) { ItemStack itemStack = itemEntity.getItem(); - if (mob.wantsToPickUp(serverLevel, itemStack)) { - SimpleContainer simpleContainer = inventoryCarrier.getInventory(); + if (mob.wantsToPickUp(level, itemStack)) { + SimpleContainer simpleContainer = carrier.getInventory(); boolean bl = simpleContainer.canAddItem(itemStack); if (!bl) { return; diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java index 98968687..4b4314c8 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java @@ -75,6 +75,7 @@ import net.minecraft.world.entity.ai.village.poi.PoiType; import net.minecraft.world.entity.ai.village.poi.PoiTypes; import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.entity.monster.Witch; +import net.minecraft.world.entity.npc.VillagerTrades.ItemListing; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.raid.Raid; import net.minecraft.world.entity.schedule.Activity; @@ -262,10 +263,10 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } @Override - protected void customServerAiStep(ServerLevel serverLevel) { + protected void customServerAiStep(ServerLevel level) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("villagerBrain"); - this.getBrain().tick(serverLevel, this); + this.getBrain().tick(level, this); profilerFiller.pop(); if (this.assignProfessionWhenSpawned) { this.assignProfessionWhenSpawned = false; @@ -284,15 +285,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } if (this.lastTradedPlayer != null) { - serverLevel.onReputationEvent(ReputationEventType.TRADE, this.lastTradedPlayer, this); - serverLevel.broadcastEntityEvent(this, (byte)14); + level.onReputationEvent(ReputationEventType.TRADE, this.lastTradedPlayer, this); + level.broadcastEntityEvent(this, (byte)14); this.lastTradedPlayer = null; } if (!this.isNoAi() && this.random.nextInt(100) == 0) { - Raid raid = serverLevel.getRaidAt(this.blockPosition()); + Raid raid = level.getRaidAt(this.blockPosition()); if (raid != null && raid.isActive() && !raid.isOver()) { - serverLevel.broadcastEntityEvent(this, (byte)42); + level.broadcastEntityEvent(this, (byte)42); } } @@ -300,7 +301,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler this.stopTrading(); } - super.customServerAiStep(serverLevel); + super.customServerAiStep(level); } @Override @@ -488,49 +489,49 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - VillagerData.CODEC.encodeStart(NbtOps.INSTANCE, this.getVillagerData()).resultOrPartial(LOGGER::error).ifPresent(tag -> compound.put("VillagerData", tag)); - compound.putByte("FoodLevel", (byte)this.foodLevel); - compound.put("Gossips", this.gossips.store(NbtOps.INSTANCE)); - compound.putInt("Xp", this.villagerXp); - compound.putLong("LastRestock", this.lastRestockGameTime); - compound.putLong("LastGossipDecay", this.lastGossipDecayTime); - compound.putInt("RestocksToday", this.numberOfRestocksToday); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + VillagerData.CODEC.encodeStart(NbtOps.INSTANCE, this.getVillagerData()).resultOrPartial(LOGGER::error).ifPresent(tagx -> tag.put("VillagerData", tagx)); + tag.putByte("FoodLevel", (byte)this.foodLevel); + tag.put("Gossips", this.gossips.store(NbtOps.INSTANCE)); + tag.putInt("Xp", this.villagerXp); + tag.putLong("LastRestock", this.lastRestockGameTime); + tag.putLong("LastGossipDecay", this.lastGossipDecayTime); + tag.putInt("RestocksToday", this.numberOfRestocksToday); if (this.assignProfessionWhenSpawned) { - compound.putBoolean("AssignProfessionWhenSpawned", true); + tag.putBoolean("AssignProfessionWhenSpawned", true); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("VillagerData", 10)) { + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("VillagerData", 10)) { VillagerData.CODEC - .parse(NbtOps.INSTANCE, compound.get("VillagerData")) + .parse(NbtOps.INSTANCE, tag.get("VillagerData")) .resultOrPartial(LOGGER::error) .ifPresent(villagerData -> this.entityData.set(DATA_VILLAGER_DATA, villagerData)); } - if (compound.contains("FoodLevel", 1)) { - this.foodLevel = compound.getByte("FoodLevel"); + if (tag.contains("FoodLevel", 1)) { + this.foodLevel = tag.getByte("FoodLevel"); } - ListTag listTag = compound.getList("Gossips", 10); + ListTag listTag = tag.getList("Gossips", 10); this.gossips.update(new Dynamic<>(NbtOps.INSTANCE, listTag)); - if (compound.contains("Xp", 3)) { - this.villagerXp = compound.getInt("Xp"); + if (tag.contains("Xp", 3)) { + this.villagerXp = tag.getInt("Xp"); } - this.lastRestockGameTime = compound.getLong("LastRestock"); - this.lastGossipDecayTime = compound.getLong("LastGossipDecay"); + this.lastRestockGameTime = tag.getLong("LastRestock"); + this.lastGossipDecayTime = tag.getLong("LastGossipDecay"); if (this.level() instanceof ServerLevel) { this.refreshBrain((ServerLevel)this.level()); } - this.numberOfRestocksToday = compound.getInt("RestocksToday"); - if (compound.contains("AssignProfessionWhenSpawned")) { - this.assignProfessionWhenSpawned = compound.getBoolean("AssignProfessionWhenSpawned"); + this.numberOfRestocksToday = tag.getInt("RestocksToday"); + if (tag.contains("AssignProfessionWhenSpawned")) { + this.assignProfessionWhenSpawned = tag.getBoolean("AssignProfessionWhenSpawned"); } } @@ -737,24 +738,24 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - if (entitySpawnReason == EntitySpawnReason.BREEDING) { + if (spawnReason == EntitySpawnReason.BREEDING) { this.setVillagerData(this.getVillagerData().setProfession(VillagerProfession.NONE)); } - if (entitySpawnReason == EntitySpawnReason.COMMAND - || entitySpawnReason == EntitySpawnReason.SPAWN_ITEM_USE - || EntitySpawnReason.isSpawner(entitySpawnReason) - || entitySpawnReason == EntitySpawnReason.DISPENSER) { - this.setVillagerData(this.getVillagerData().setType(VillagerType.byBiome(serverLevelAccessor.getBiome(this.blockPosition())))); + if (spawnReason == EntitySpawnReason.COMMAND + || spawnReason == EntitySpawnReason.SPAWN_ITEM_USE + || EntitySpawnReason.isSpawner(spawnReason) + || spawnReason == EntitySpawnReason.DISPENSER) { + this.setVillagerData(this.getVillagerData().setType(VillagerType.byBiome(level.getBiome(this.blockPosition())))); } - if (entitySpawnReason == EntitySpawnReason.STRUCTURE) { + if (spawnReason == EntitySpawnReason.STRUCTURE) { this.assignProfessionWhenSpawned = true; } - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } @Nullable @@ -792,15 +793,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } @Override - protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) { - InventoryCarrier.pickUpItem(serverLevel, this, this, itemEntity); + protected void pickUpItem(ServerLevel level, ItemEntity entity) { + InventoryCarrier.pickUpItem(level, this, this, entity); } @Override - public boolean wantsToPickUp(ServerLevel serverLevel, ItemStack itemStack) { - Item item = itemStack.getItem(); - return (itemStack.is(ItemTags.VILLAGER_PICKS_UP) || this.getVillagerData().getProfession().requestedItems().contains(item)) - && this.getInventory().canAddItem(itemStack); + public boolean wantsToPickUp(ServerLevel level, ItemStack stack) { + Item item = stack.getItem(); + return (stack.is(ItemTags.VILLAGER_PICKS_UP) || this.getVillagerData().getProfession().requestedItems().contains(item)) + && this.getInventory().canAddItem(stack); } /** @@ -832,17 +833,16 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @Override protected void updateTrades() { VillagerData villagerData = this.getVillagerData(); - Int2ObjectMap int2ObjectMap2; + Int2ObjectMap int2ObjectMap2; if (this.level().enabledFeatures().contains(FeatureFlags.TRADE_REBALANCE)) { - Int2ObjectMap int2ObjectMap = (Int2ObjectMap)VillagerTrades.EXPERIMENTAL_TRADES - .get(villagerData.getProfession()); + Int2ObjectMap int2ObjectMap = (Int2ObjectMap)VillagerTrades.EXPERIMENTAL_TRADES.get(villagerData.getProfession()); int2ObjectMap2 = int2ObjectMap != null ? int2ObjectMap : (Int2ObjectMap)VillagerTrades.TRADES.get(villagerData.getProfession()); } else { - int2ObjectMap2 = (Int2ObjectMap)VillagerTrades.TRADES.get(villagerData.getProfession()); + int2ObjectMap2 = (Int2ObjectMap)VillagerTrades.TRADES.get(villagerData.getProfession()); } if (int2ObjectMap2 != null && !int2ObjectMap2.isEmpty()) { - VillagerTrades.ItemListing[] itemListings = int2ObjectMap2.get(villagerData.getLevel()); + ItemListing[] itemListings = int2ObjectMap2.get(villagerData.getLevel()); if (itemListings != null) { MerchantOffers merchantOffers = this.getOffers(); this.addOffersFromItemListings(merchantOffers, itemListings, 2); diff --git a/net/minecraft/world/entity/npc/WanderingTrader.java b/net/minecraft/world/entity/npc/WanderingTrader.java index 21738ed2..af1a9055 100644 --- a/net/minecraft/world/entity/npc/WanderingTrader.java +++ b/net/minecraft/world/entity/npc/WanderingTrader.java @@ -26,6 +26,7 @@ import net.minecraft.world.entity.ai.goal.PanicGoal; import net.minecraft.world.entity.ai.goal.TradeWithPlayerGoal; import net.minecraft.world.entity.ai.goal.UseItemGoal; import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.monster.Evoker; import net.minecraft.world.entity.monster.Illusioner; import net.minecraft.world.entity.monster.Pillager; @@ -33,6 +34,7 @@ import net.minecraft.world.entity.monster.Vex; import net.minecraft.world.entity.monster.Vindicator; import net.minecraft.world.entity.monster.Zoglin; import net.minecraft.world.entity.monster.Zombie; +import net.minecraft.world.entity.npc.VillagerTrades.ItemListing; import net.minecraft.world.entity.player.Player; import net.minecraft.world.flag.FeatureFlags; import net.minecraft.world.item.ItemStack; @@ -133,13 +135,13 @@ public class WanderingTrader extends AbstractVillager implements Consumable.Over if (this.level().enabledFeatures().contains(FeatureFlags.TRADE_REBALANCE)) { this.experimentalUpdateTrades(); } else { - VillagerTrades.ItemListing[] itemListings = VillagerTrades.WANDERING_TRADER_TRADES.get(1); - VillagerTrades.ItemListing[] itemListings2 = VillagerTrades.WANDERING_TRADER_TRADES.get(2); + ItemListing[] itemListings = VillagerTrades.WANDERING_TRADER_TRADES.get(1); + ItemListing[] itemListings2 = VillagerTrades.WANDERING_TRADER_TRADES.get(2); if (itemListings != null && itemListings2 != null) { MerchantOffers merchantOffers = this.getOffers(); this.addOffersFromItemListings(merchantOffers, itemListings, 5); int i = this.random.nextInt(itemListings2.length); - VillagerTrades.ItemListing itemListing = itemListings2[i]; + ItemListing itemListing = itemListings2[i]; MerchantOffer merchantOffer = itemListing.getOffer(this, this.random); if (merchantOffer != null) { merchantOffers.add(merchantOffer); @@ -151,29 +153,29 @@ public class WanderingTrader extends AbstractVillager implements Consumable.Over private void experimentalUpdateTrades() { MerchantOffers merchantOffers = this.getOffers(); - for (Pair pair : VillagerTrades.EXPERIMENTAL_WANDERING_TRADER_TRADES) { - VillagerTrades.ItemListing[] itemListings = pair.getLeft(); + for (Pair pair : VillagerTrades.EXPERIMENTAL_WANDERING_TRADER_TRADES) { + ItemListing[] itemListings = pair.getLeft(); this.addOffersFromItemListings(merchantOffers, itemListings, pair.getRight()); } } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("DespawnDelay", this.despawnDelay); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("DespawnDelay", this.despawnDelay); if (this.wanderTarget != null) { - compound.put("wander_target", NbtUtils.writeBlockPos(this.wanderTarget)); + tag.put("wander_target", NbtUtils.writeBlockPos(this.wanderTarget)); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("DespawnDelay", 99)) { - this.despawnDelay = compound.getInt("DespawnDelay"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("DespawnDelay", 99)) { + this.despawnDelay = tag.getInt("DespawnDelay"); } - NbtUtils.readBlockPos(compound, "wander_target").ifPresent(blockPos -> this.wanderTarget = blockPos); + NbtUtils.readBlockPos(tag, "wander_target").ifPresent(blockPos -> this.wanderTarget = blockPos); this.setAge(Math.max(0, this.getAge())); } @@ -206,8 +208,8 @@ public class WanderingTrader extends AbstractVillager implements Consumable.Over } @Override - public SoundEvent getConsumeSound(ItemStack itemStack) { - return itemStack.is(Items.MILK_BUCKET) ? SoundEvents.WANDERING_TRADER_DRINK_MILK : SoundEvents.WANDERING_TRADER_DRINK_POTION; + public SoundEvent getConsumeSound(ItemStack stack) { + return stack.is(Items.MILK_BUCKET) ? SoundEvents.WANDERING_TRADER_DRINK_MILK : SoundEvents.WANDERING_TRADER_DRINK_POTION; } @Override @@ -260,7 +262,7 @@ public class WanderingTrader extends AbstractVillager implements Consumable.Over this.trader = trader; this.stopDistance = stopDistance; this.speedModifier = speedModifier; - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override diff --git a/net/minecraft/world/entity/player/Inventory.java b/net/minecraft/world/entity/player/Inventory.java index 7b2cebfe..7985a45d 100644 --- a/net/minecraft/world/entity/player/Inventory.java +++ b/net/minecraft/world/entity/player/Inventory.java @@ -120,14 +120,14 @@ public class Inventory implements Container, Nameable { return -1; } - public static boolean isUsableForCrafting(ItemStack itemStack) { - return !itemStack.isDamaged() && !itemStack.isEnchanted() && !itemStack.has(DataComponents.CUSTOM_NAME); + public static boolean isUsableForCrafting(ItemStack stack) { + return !stack.isDamaged() && !stack.isEnchanted() && !stack.has(DataComponents.CUSTOM_NAME); } - public int findSlotMatchingCraftingIngredient(Holder holder) { + public int findSlotMatchingCraftingIngredient(Holder ingredient) { for (int i = 0; i < this.items.size(); i++) { ItemStack itemStack = this.items.get(i); - if (!itemStack.isEmpty() && itemStack.is(holder) && isUsableForCrafting(itemStack)) { + if (!itemStack.isEmpty() && itemStack.is(ingredient) && isUsableForCrafting(itemStack)) { return i; } } @@ -153,8 +153,8 @@ public class Inventory implements Container, Nameable { return this.selected; } - public void setSelectedHotbarSlot(int i) { - this.selected = i; + public void setSelectedHotbarSlot(int selectedHotbarSlot) { + this.selected = selectedHotbarSlot; } public int clearOrCountMatchingItems(Predicate stackPredicate, int maxCount, Container inventory) { @@ -317,8 +317,8 @@ public class Inventory implements Container, Nameable { } } - public ClientboundSetPlayerInventoryPacket createInventoryUpdatePacket(int i) { - return new ClientboundSetPlayerInventoryPacket(i, this.getItem(i).copy()); + public ClientboundSetPlayerInventoryPacket createInventoryUpdatePacket(int slot) { + return new ClientboundSetPlayerInventoryPacket(slot, this.getItem(slot).copy()); } @Override @@ -587,9 +587,9 @@ public class Inventory implements Container, Nameable { } } - public void fillStackedContents(StackedItemContents stackedItemContents) { + public void fillStackedContents(StackedItemContents contents) { for (ItemStack itemStack : this.items) { - stackedItemContents.accountSimpleStack(itemStack); + contents.accountSimpleStack(itemStack); } } diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java index 684f626a..b3349f31 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java @@ -693,9 +693,9 @@ public abstract class Player extends LivingEntity { } @Override - protected void dropEquipment(ServerLevel serverLevel) { - super.dropEquipment(serverLevel); - if (!serverLevel.getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY)) { + protected void dropEquipment(ServerLevel level) { + super.dropEquipment(level); + if (!level.getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY)) { this.destroyVanishingCursedItems(); this.inventory.dropAll(); } @@ -720,7 +720,7 @@ public abstract class Player extends LivingEntity { return SoundEvents.PLAYER_DEATH; } - public void handleCreativeModeItemDrop(ItemStack itemStack) { + public void handleCreativeModeItemDrop(ItemStack stack) { } /** @@ -780,104 +780,104 @@ public abstract class Player extends LivingEntity { } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); this.setUUID(this.gameProfile.getId()); - ListTag listTag = compound.getList("Inventory", 10); + ListTag listTag = tag.getList("Inventory", 10); this.inventory.load(listTag); - this.inventory.selected = compound.getInt("SelectedItemSlot"); - this.sleepCounter = compound.getShort("SleepTimer"); - this.experienceProgress = compound.getFloat("XpP"); - this.experienceLevel = compound.getInt("XpLevel"); - this.totalExperience = compound.getInt("XpTotal"); - this.enchantmentSeed = compound.getInt("XpSeed"); + this.inventory.selected = tag.getInt("SelectedItemSlot"); + this.sleepCounter = tag.getShort("SleepTimer"); + this.experienceProgress = tag.getFloat("XpP"); + this.experienceLevel = tag.getInt("XpLevel"); + this.totalExperience = tag.getInt("XpTotal"); + this.enchantmentSeed = tag.getInt("XpSeed"); if (this.enchantmentSeed == 0) { this.enchantmentSeed = this.random.nextInt(); } - this.setScore(compound.getInt("Score")); - this.foodData.readAdditionalSaveData(compound); - this.abilities.loadSaveData(compound); + this.setScore(tag.getInt("Score")); + this.foodData.readAdditionalSaveData(tag); + this.abilities.loadSaveData(tag); this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(this.abilities.getWalkingSpeed()); - if (compound.contains("EnderItems", 9)) { - this.enderChestInventory.fromTag(compound.getList("EnderItems", 10), this.registryAccess()); + if (tag.contains("EnderItems", 9)) { + this.enderChestInventory.fromTag(tag.getList("EnderItems", 10), this.registryAccess()); } - if (compound.contains("ShoulderEntityLeft", 10)) { - this.setShoulderEntityLeft(compound.getCompound("ShoulderEntityLeft")); + if (tag.contains("ShoulderEntityLeft", 10)) { + this.setShoulderEntityLeft(tag.getCompound("ShoulderEntityLeft")); } - if (compound.contains("ShoulderEntityRight", 10)) { - this.setShoulderEntityRight(compound.getCompound("ShoulderEntityRight")); + if (tag.contains("ShoulderEntityRight", 10)) { + this.setShoulderEntityRight(tag.getCompound("ShoulderEntityRight")); } - if (compound.contains("LastDeathLocation", 10)) { - this.setLastDeathLocation(GlobalPos.CODEC.parse(NbtOps.INSTANCE, compound.get("LastDeathLocation")).resultOrPartial(LOGGER::error)); + if (tag.contains("LastDeathLocation", 10)) { + this.setLastDeathLocation(GlobalPos.CODEC.parse(NbtOps.INSTANCE, tag.get("LastDeathLocation")).resultOrPartial(LOGGER::error)); } - if (compound.contains("current_explosion_impact_pos", 9)) { + if (tag.contains("current_explosion_impact_pos", 9)) { Vec3.CODEC - .parse(NbtOps.INSTANCE, compound.get("current_explosion_impact_pos")) + .parse(NbtOps.INSTANCE, tag.get("current_explosion_impact_pos")) .resultOrPartial(LOGGER::error) .ifPresent(vec3 -> this.currentImpulseImpactPos = vec3); } - this.ignoreFallDamageFromCurrentImpulse = compound.getBoolean("ignore_fall_damage_from_current_explosion"); - this.currentImpulseContextResetGraceTime = compound.getInt("current_impulse_context_reset_grace_time"); + this.ignoreFallDamageFromCurrentImpulse = tag.getBoolean("ignore_fall_damage_from_current_explosion"); + this.currentImpulseContextResetGraceTime = tag.getInt("current_impulse_context_reset_grace_time"); } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - NbtUtils.addCurrentDataVersion(compound); - compound.put("Inventory", this.inventory.save(new ListTag())); - compound.putInt("SelectedItemSlot", this.inventory.selected); - compound.putShort("SleepTimer", (short)this.sleepCounter); - compound.putFloat("XpP", this.experienceProgress); - compound.putInt("XpLevel", this.experienceLevel); - compound.putInt("XpTotal", this.totalExperience); - compound.putInt("XpSeed", this.enchantmentSeed); - compound.putInt("Score", this.getScore()); - this.foodData.addAdditionalSaveData(compound); - this.abilities.addSaveData(compound); - compound.put("EnderItems", this.enderChestInventory.createTag(this.registryAccess())); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + NbtUtils.addCurrentDataVersion(tag); + tag.put("Inventory", this.inventory.save(new ListTag())); + tag.putInt("SelectedItemSlot", this.inventory.selected); + tag.putShort("SleepTimer", (short)this.sleepCounter); + tag.putFloat("XpP", this.experienceProgress); + tag.putInt("XpLevel", this.experienceLevel); + tag.putInt("XpTotal", this.totalExperience); + tag.putInt("XpSeed", this.enchantmentSeed); + tag.putInt("Score", this.getScore()); + this.foodData.addAdditionalSaveData(tag); + this.abilities.addSaveData(tag); + tag.put("EnderItems", this.enderChestInventory.createTag(this.registryAccess())); if (!this.getShoulderEntityLeft().isEmpty()) { - compound.put("ShoulderEntityLeft", this.getShoulderEntityLeft()); + tag.put("ShoulderEntityLeft", this.getShoulderEntityLeft()); } if (!this.getShoulderEntityRight().isEmpty()) { - compound.put("ShoulderEntityRight", this.getShoulderEntityRight()); + tag.put("ShoulderEntityRight", this.getShoulderEntityRight()); } this.getLastDeathLocation() .flatMap(globalPos -> GlobalPos.CODEC.encodeStart(NbtOps.INSTANCE, globalPos).resultOrPartial(LOGGER::error)) - .ifPresent(tag -> compound.put("LastDeathLocation", tag)); + .ifPresent(tagx -> tag.put("LastDeathLocation", tagx)); if (this.currentImpulseImpactPos != null) { - compound.put("current_explosion_impact_pos", Vec3.CODEC.encodeStart(NbtOps.INSTANCE, this.currentImpulseImpactPos).getOrThrow()); + tag.put("current_explosion_impact_pos", Vec3.CODEC.encodeStart(NbtOps.INSTANCE, this.currentImpulseImpactPos).getOrThrow()); } - compound.putBoolean("ignore_fall_damage_from_current_explosion", this.ignoreFallDamageFromCurrentImpulse); - compound.putInt("current_impulse_context_reset_grace_time", this.currentImpulseContextResetGraceTime); + tag.putBoolean("ignore_fall_damage_from_current_explosion", this.ignoreFallDamageFromCurrentImpulse); + tag.putInt("current_impulse_context_reset_grace_time", this.currentImpulseContextResetGraceTime); } @Override - public boolean isInvulnerableTo(ServerLevel serverLevel, DamageSource damageSource) { - if (super.isInvulnerableTo(serverLevel, damageSource)) { + public boolean isInvulnerableTo(ServerLevel level, DamageSource damageSource) { + if (super.isInvulnerableTo(level, damageSource)) { return true; } else if (damageSource.is(DamageTypeTags.IS_DROWNING)) { - return !serverLevel.getGameRules().getBoolean(GameRules.RULE_DROWNING_DAMAGE); + return !level.getGameRules().getBoolean(GameRules.RULE_DROWNING_DAMAGE); } else if (damageSource.is(DamageTypeTags.IS_FALL)) { - return !serverLevel.getGameRules().getBoolean(GameRules.RULE_FALL_DAMAGE); + return !level.getGameRules().getBoolean(GameRules.RULE_FALL_DAMAGE); } else if (damageSource.is(DamageTypeTags.IS_FIRE)) { - return !serverLevel.getGameRules().getBoolean(GameRules.RULE_FIRE_DAMAGE); + return !level.getGameRules().getBoolean(GameRules.RULE_FIRE_DAMAGE); } else { - return damageSource.is(DamageTypeTags.IS_FREEZING) ? !serverLevel.getGameRules().getBoolean(GameRules.RULE_FREEZE_DAMAGE) : false; + return damageSource.is(DamageTypeTags.IS_FREEZING) ? !level.getGameRules().getBoolean(GameRules.RULE_FREEZE_DAMAGE) : false; } } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { - if (this.isInvulnerableTo(serverLevel, damageSource)) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { + if (this.isInvulnerableTo(level, damageSource)) { return false; } else if (this.abilities.invulnerable && !damageSource.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) { return false; @@ -888,20 +888,20 @@ public abstract class Player extends LivingEntity { } else { this.removeEntitiesOnShoulder(); if (damageSource.scalesWithDifficulty()) { - if (serverLevel.getDifficulty() == Difficulty.PEACEFUL) { - f = 0.0F; + if (level.getDifficulty() == Difficulty.PEACEFUL) { + amount = 0.0F; } - if (serverLevel.getDifficulty() == Difficulty.EASY) { - f = Math.min(f / 2.0F + 1.0F, f); + if (level.getDifficulty() == Difficulty.EASY) { + amount = Math.min(amount / 2.0F + 1.0F, amount); } - if (serverLevel.getDifficulty() == Difficulty.HARD) { - f = f * 3.0F / 2.0F; + if (level.getDifficulty() == Difficulty.HARD) { + amount = amount * 3.0F / 2.0F; } } - return f == 0.0F ? false : super.hurtServer(serverLevel, damageSource, f); + return amount == 0.0F ? false : super.hurtServer(level, damageSource, amount); } } } @@ -966,15 +966,15 @@ public abstract class Player extends LivingEntity { } @Override - protected void actuallyHurt(ServerLevel serverLevel, DamageSource damageSource, float f) { - if (!this.isInvulnerableTo(serverLevel, damageSource)) { - f = this.getDamageAfterArmorAbsorb(damageSource, f); - f = this.getDamageAfterMagicAbsorb(damageSource, f); - float var8 = Math.max(f - this.getAbsorptionAmount(), 0.0F); - this.setAbsorptionAmount(this.getAbsorptionAmount() - (f - var8)); - float h = f - var8; - if (h > 0.0F && h < 3.4028235E37F) { - this.awardStat(Stats.DAMAGE_ABSORBED, Math.round(h * 10.0F)); + protected void actuallyHurt(ServerLevel level, DamageSource damageSource, float amount) { + if (!this.isInvulnerableTo(level, damageSource)) { + amount = this.getDamageAfterArmorAbsorb(damageSource, amount); + amount = this.getDamageAfterMagicAbsorb(damageSource, amount); + float var8 = Math.max(amount - this.getAbsorptionAmount(), 0.0F); + this.setAbsorptionAmount(this.getAbsorptionAmount() - (amount - var8)); + float g = amount - var8; + if (g > 0.0F && g < 3.4028235E37F) { + this.awardStat(Stats.DAMAGE_ABSORBED, Math.round(g * 10.0F)); } if (var8 != 0.0F) { @@ -1311,8 +1311,8 @@ public abstract class Player extends LivingEntity { this.attack(target); } - public void disableShield(ItemStack itemStack) { - this.getCooldowns().addCooldown(itemStack, 100); + public void disableShield(ItemStack stack) { + this.getCooldowns().addCooldown(stack, 100); this.stopUsingItem(); this.level().broadcastEntityEvent(this, (byte)30); } @@ -1728,8 +1728,8 @@ public abstract class Player extends LivingEntity { } @Override - protected int getBaseExperienceReward(ServerLevel serverLevel) { - return !serverLevel.getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY) && !this.isSpectator() ? Math.min(this.experienceLevel * 7, 100) : 0; + protected int getBaseExperienceReward(ServerLevel level) { + return !level.getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY) && !this.isSpectator() ? Math.min(this.experienceLevel * 7, 100) : 0; } @Override @@ -2025,8 +2025,8 @@ public abstract class Player extends LivingEntity { return 0; } - public boolean hasPermissions(int i) { - return this.getPermissionLevel() >= i; + public boolean hasPermissions(int permissionLevel) { + return this.getPermissionLevel() >= permissionLevel; } @Override diff --git a/net/minecraft/world/entity/player/StackedContents.java b/net/minecraft/world/entity/player/StackedContents.java index b6da1b1a..00ab15d7 100644 --- a/net/minecraft/world/entity/player/StackedContents.java +++ b/net/minecraft/world/entity/player/StackedContents.java @@ -12,39 +12,39 @@ import org.jetbrains.annotations.Nullable; public class StackedContents { public final Reference2IntOpenHashMap amounts = new Reference2IntOpenHashMap<>(); - boolean hasAnyAmount(T object) { - return this.amounts.getInt(object) > 0; + boolean hasAnyAmount(T item) { + return this.amounts.getInt(item) > 0; } - boolean hasAtLeast(T object, int i) { - return this.amounts.getInt(object) >= i; + boolean hasAtLeast(T item, int amount) { + return this.amounts.getInt(item) >= amount; } - void take(T object, int i) { - int j = this.amounts.addTo(object, -i); - if (j < i) { - throw new IllegalStateException("Took " + i + " items, but only had " + j); + void take(T item, int amount) { + int i = this.amounts.addTo(item, -amount); + if (i < amount) { + throw new IllegalStateException("Took " + amount + " items, but only had " + i); } } - void put(T object, int i) { - this.amounts.addTo(object, i); + void put(T item, int amount) { + this.amounts.addTo(item, amount); } - public boolean tryPick(List> list, int i, @Nullable StackedContents.Output output) { - return new StackedContents.RecipePicker(list).tryPick(i, output); + public boolean tryPick(List> ingredients, int amount, @Nullable StackedContents.Output output) { + return new StackedContents.RecipePicker(ingredients).tryPick(amount, output); } - public int tryPickAll(List> list, int i, @Nullable StackedContents.Output output) { - return new StackedContents.RecipePicker(list).tryPickAll(i, output); + public int tryPickAll(List> ingredients, int amount, @Nullable StackedContents.Output output) { + return new StackedContents.RecipePicker(ingredients).tryPickAll(amount, output); } public void clear() { this.amounts.clear(); } - public void account(T object, int i) { - this.put(object, i); + public void account(T item, int amount) { + this.put(item, amount); } public record IngredientInfo(List allowedItems) { @@ -70,8 +70,8 @@ public class StackedContents { private final BitSet data; private final IntList path = new IntArrayList(); - public RecipePicker(final List> list) { - this.ingredients = list; + public RecipePicker(final List> ingredients) { + this.ingredients = ingredients; this.ingredientCount = this.ingredients.size(); this.items = this.getUniqueAvailableIngredientItems(); this.itemCount = this.items.size(); @@ -91,27 +91,27 @@ public class StackedContents { } } - public boolean tryPick(int i, @Nullable StackedContents.Output output) { - if (i <= 0) { + public boolean tryPick(int amount, @Nullable StackedContents.Output output) { + if (amount <= 0) { return true; } else { - int j = 0; + int i = 0; while (true) { - IntList intList = this.tryAssigningNewItem(i); + IntList intList = this.tryAssigningNewItem(amount); if (intList == null) { - boolean bl = j == this.ingredientCount; + boolean bl = i == this.ingredientCount; boolean bl2 = bl && output != null; this.clearAllVisited(); this.clearSatisfied(); - for (int l = 0; l < this.ingredientCount; l++) { - for (int m = 0; m < this.itemCount; m++) { - if (this.isAssigned(m, l)) { - this.unassign(m, l); - StackedContents.this.put((T)this.items.get(m), i); + for (int k = 0; k < this.ingredientCount; k++) { + for (int l = 0; l < this.itemCount; l++) { + if (this.isAssigned(l, k)) { + this.unassign(l, k); + StackedContents.this.put((T)this.items.get(l), amount); if (bl2) { - output.accept((T)this.items.get(m)); + output.accept((T)this.items.get(l)); } break; } @@ -123,29 +123,29 @@ public class StackedContents { return bl; } - int k = intList.getInt(0); - StackedContents.this.take((T)this.items.get(k), i); - int l = intList.size() - 1; - this.setSatisfied(intList.getInt(l)); - j++; + int j = intList.getInt(0); + StackedContents.this.take((T)this.items.get(j), amount); + int k = intList.size() - 1; + this.setSatisfied(intList.getInt(k)); + i++; - for (int mx = 0; mx < intList.size() - 1; mx++) { - if (isPathIndexItem(mx)) { - int n = intList.getInt(mx); - int o = intList.getInt(mx + 1); - this.assign(n, o); + for (int lx = 0; lx < intList.size() - 1; lx++) { + if (isPathIndexItem(lx)) { + int m = intList.getInt(lx); + int n = intList.getInt(lx + 1); + this.assign(m, n); } else { - int n = intList.getInt(mx + 1); - int o = intList.getInt(mx); - this.unassign(n, o); + int m = intList.getInt(lx + 1); + int n = intList.getInt(lx); + this.unassign(m, n); } } } } } - private static boolean isPathIndexItem(int i) { - return (i & 1) == 0; + private static boolean isPathIndexItem(int index) { + return (index & 1) == 0; } private List getUniqueAvailableIngredientItems() { @@ -160,12 +160,12 @@ public class StackedContents { } @Nullable - private IntList tryAssigningNewItem(int i) { + private IntList tryAssigningNewItem(int amount) { this.clearAllVisited(); - for (int j = 0; j < this.itemCount; j++) { - if (StackedContents.this.hasAtLeast((T)this.items.get(j), i)) { - IntList intList = this.findNewItemAssignmentPath(j); + for (int i = 0; i < this.itemCount; i++) { + if (StackedContents.this.hasAtLeast((T)this.items.get(i), amount)) { + IntList intList = this.findNewItemAssignmentPath(i); if (intList != null) { return intList; } @@ -176,43 +176,43 @@ public class StackedContents { } @Nullable - private IntList findNewItemAssignmentPath(int i) { + private IntList findNewItemAssignmentPath(int amount) { this.path.clear(); - this.visitItem(i); - this.path.add(i); + this.visitItem(amount); + this.path.add(amount); while (!this.path.isEmpty()) { - int j = this.path.size(); - if (isPathIndexItem(j - 1)) { - int k = this.path.getInt(j - 1); + int i = this.path.size(); + if (isPathIndexItem(i - 1)) { + int j = this.path.getInt(i - 1); - for (int l = 0; l < this.ingredientCount; l++) { - if (!this.hasVisitedIngredient(l) && this.hasConnection(k, l) && !this.isAssigned(k, l)) { - this.visitIngredient(l); - this.path.add(l); + for (int k = 0; k < this.ingredientCount; k++) { + if (!this.hasVisitedIngredient(k) && this.hasConnection(j, k) && !this.isAssigned(j, k)) { + this.visitIngredient(k); + this.path.add(k); break; } } } else { - int k = this.path.getInt(j - 1); - if (!this.isSatisfied(k)) { + int j = this.path.getInt(i - 1); + if (!this.isSatisfied(j)) { return this.path; } - for (int lx = 0; lx < this.itemCount; lx++) { - if (!this.hasVisitedItem(lx) && this.isAssigned(lx, k)) { - assert this.hasConnection(lx, k); + for (int kx = 0; kx < this.itemCount; kx++) { + if (!this.hasVisitedItem(kx) && this.isAssigned(kx, j)) { + assert this.hasConnection(kx, j); - this.visitItem(lx); - this.path.add(lx); + this.visitItem(kx); + this.path.add(kx); break; } } } - int k = this.path.size(); - if (k == j) { - this.path.removeInt(k - 1); + int j = this.path.size(); + if (j == i) { + this.path.removeInt(j - 1); } } @@ -277,76 +277,76 @@ public class StackedContents { this.clearRange(this.satisfiedOffset(), this.satisfiedCount()); } - private void setConnection(int i, int j) { - this.data.set(this.getConnectionIndex(i, j)); + private void setConnection(int itemIndex, int ingredientIndex) { + this.data.set(this.getConnectionIndex(itemIndex, ingredientIndex)); } - private boolean hasConnection(int i, int j) { - return this.data.get(this.getConnectionIndex(i, j)); + private boolean hasConnection(int itemIndex, int ingredientIndex) { + return this.data.get(this.getConnectionIndex(itemIndex, ingredientIndex)); } - private int getConnectionIndex(int i, int j) { - assert i >= 0 && i < this.itemCount; + private int getConnectionIndex(int itemIndex, int ingredientIndex) { + assert itemIndex >= 0 && itemIndex < this.itemCount; - assert j >= 0 && j < this.ingredientCount; + assert ingredientIndex >= 0 && ingredientIndex < this.ingredientCount; - return this.connectionOffset() + i * this.ingredientCount + j; + return this.connectionOffset() + itemIndex * this.ingredientCount + ingredientIndex; } - private boolean isAssigned(int i, int j) { - return this.data.get(this.getResidualIndex(i, j)); + private boolean isAssigned(int itemIndex, int ingredientIndex) { + return this.data.get(this.getResidualIndex(itemIndex, ingredientIndex)); } - private void assign(int i, int j) { - int k = this.getResidualIndex(i, j); + private void assign(int itemIndex, int ingredientIndex) { + int i = this.getResidualIndex(itemIndex, ingredientIndex); - assert !this.data.get(k); + assert !this.data.get(i); - this.data.set(k); + this.data.set(i); } - private void unassign(int i, int j) { - int k = this.getResidualIndex(i, j); + private void unassign(int itemIndex, int ingredientIndex) { + int i = this.getResidualIndex(itemIndex, ingredientIndex); - assert this.data.get(k); + assert this.data.get(i); - this.data.clear(k); + this.data.clear(i); } - private int getResidualIndex(int i, int j) { - assert i >= 0 && i < this.itemCount; + private int getResidualIndex(int itemIndex, int ingredientIndex) { + assert itemIndex >= 0 && itemIndex < this.itemCount; - assert j >= 0 && j < this.ingredientCount; + assert ingredientIndex >= 0 && ingredientIndex < this.ingredientCount; - return this.residualOffset() + i * this.ingredientCount + j; + return this.residualOffset() + itemIndex * this.ingredientCount + ingredientIndex; } - private void visitIngredient(int i) { - this.data.set(this.getVisitedIngredientIndex(i)); + private void visitIngredient(int ingredientIndex) { + this.data.set(this.getVisitedIngredientIndex(ingredientIndex)); } - private boolean hasVisitedIngredient(int i) { - return this.data.get(this.getVisitedIngredientIndex(i)); + private boolean hasVisitedIngredient(int ingredientIndex) { + return this.data.get(this.getVisitedIngredientIndex(ingredientIndex)); } - private int getVisitedIngredientIndex(int i) { - assert i >= 0 && i < this.ingredientCount; + private int getVisitedIngredientIndex(int ingredientIndex) { + assert ingredientIndex >= 0 && ingredientIndex < this.ingredientCount; - return this.visitedIngredientOffset() + i; + return this.visitedIngredientOffset() + ingredientIndex; } - private void visitItem(int i) { - this.data.set(this.getVisitiedItemIndex(i)); + private void visitItem(int itemIndex) { + this.data.set(this.getVisitiedItemIndex(itemIndex)); } - private boolean hasVisitedItem(int i) { - return this.data.get(this.getVisitiedItemIndex(i)); + private boolean hasVisitedItem(int itemIndex) { + return this.data.get(this.getVisitiedItemIndex(itemIndex)); } - private int getVisitiedItemIndex(int i) { - assert i >= 0 && i < this.itemCount; + private int getVisitiedItemIndex(int itemIndex) { + assert itemIndex >= 0 && itemIndex < this.itemCount; - return this.visitedItemOffset() + i; + return this.visitedItemOffset() + itemIndex; } private void clearAllVisited() { @@ -354,28 +354,28 @@ public class StackedContents { this.clearRange(this.visitedItemOffset(), this.visitedItemCount()); } - private void clearRange(int i, int j) { - this.data.clear(i, i + j); + private void clearRange(int offset, int count) { + this.data.clear(offset, offset + count); } - public int tryPickAll(int i, @Nullable StackedContents.Output output) { - int j = 0; - int k = Math.min(i, this.getMinIngredientCount()) + 1; + public int tryPickAll(int amount, @Nullable StackedContents.Output output) { + int i = 0; + int j = Math.min(amount, this.getMinIngredientCount()) + 1; while (true) { - int l = (j + k) / 2; - if (this.tryPick(l, null)) { - if (k - j <= 1) { - if (l > 0) { - this.tryPick(l, output); + int k = (i + j) / 2; + if (this.tryPick(k, null)) { + if (j - i <= 1) { + if (k > 0) { + this.tryPick(k, output); } - return l; + return k; } - j = l; + i = k; } else { - k = l; + j = k; } } } diff --git a/net/minecraft/world/entity/player/StackedItemContents.java b/net/minecraft/world/entity/player/StackedItemContents.java index f95c3cbf..5ac44ef0 100644 --- a/net/minecraft/world/entity/player/StackedItemContents.java +++ b/net/minecraft/world/entity/player/StackedItemContents.java @@ -14,25 +14,25 @@ import org.jetbrains.annotations.Nullable; public class StackedItemContents { private final StackedContents> raw = new StackedContents<>(); - public void accountSimpleStack(ItemStack itemStack) { - if (Inventory.isUsableForCrafting(itemStack)) { - this.accountStack(itemStack); + public void accountSimpleStack(ItemStack stack) { + if (Inventory.isUsableForCrafting(stack)) { + this.accountStack(stack); } } - public void accountStack(ItemStack itemStack) { - this.accountStack(itemStack, itemStack.getMaxStackSize()); + public void accountStack(ItemStack stack) { + this.accountStack(stack, stack.getMaxStackSize()); } - public void accountStack(ItemStack itemStack, int i) { - if (!itemStack.isEmpty()) { - int j = Math.min(i, itemStack.getCount()); - this.raw.account(itemStack.getItemHolder(), j); + public void accountStack(ItemStack stack, int maxStackSize) { + if (!stack.isEmpty()) { + int i = Math.min(maxStackSize, stack.getCount()); + this.raw.account(stack.getItemHolder(), i); } } - public static StackedContents.IngredientInfo> convertIngredientContents(Stream> stream) { - List> list = stream.sorted(Comparator.comparingInt(holder -> BuiltInRegistries.ITEM.getId((Item)holder.value()))).toList(); + public static StackedContents.IngredientInfo> convertIngredientContents(Stream> items) { + List> list = items.sorted(Comparator.comparingInt(holder -> BuiltInRegistries.ITEM.getId((Item)holder.value()))).toList(); return new StackedContents.IngredientInfo<>(list); } @@ -40,25 +40,25 @@ public class StackedItemContents { return this.canCraft(recipe, 1, output); } - public boolean canCraft(Recipe recipe, int i, @Nullable StackedContents.Output> output) { + public boolean canCraft(Recipe recipe, int maxCount, @Nullable StackedContents.Output> output) { PlacementInfo placementInfo = recipe.placementInfo(); - return placementInfo.isImpossibleToPlace() ? false : this.canCraft(placementInfo.unpackedIngredients(), i, output); + return placementInfo.isImpossibleToPlace() ? false : this.canCraft(placementInfo.unpackedIngredients(), maxCount, output); } - public boolean canCraft(List>> list, @Nullable StackedContents.Output> output) { - return this.canCraft(list, 1, output); + public boolean canCraft(List>> ingredients, @Nullable StackedContents.Output> output) { + return this.canCraft(ingredients, 1, output); } - private boolean canCraft(List>> list, int i, @Nullable StackedContents.Output> output) { - return this.raw.tryPick(list, i, output); + private boolean canCraft(List>> ingredients, int maxCount, @Nullable StackedContents.Output> output) { + return this.raw.tryPick(ingredients, maxCount, output); } public int getBiggestCraftableStack(Recipe recipe, @Nullable StackedContents.Output> output) { return this.getBiggestCraftableStack(recipe, Integer.MAX_VALUE, output); } - public int getBiggestCraftableStack(Recipe recipe, int i, @Nullable StackedContents.Output> output) { - return this.raw.tryPickAll(recipe.placementInfo().unpackedIngredients(), i, output); + public int getBiggestCraftableStack(Recipe recipe, int maxCount, @Nullable StackedContents.Output> output) { + return this.raw.tryPickAll(recipe.placementInfo().unpackedIngredients(), maxCount, output); } public void clear() { diff --git a/net/minecraft/world/entity/projectile/AbstractArrow.java b/net/minecraft/world/entity/projectile/AbstractArrow.java index 395531bc..10eeca35 100644 --- a/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -245,11 +245,11 @@ public abstract class AbstractArrow extends Projectile { } } - private void stepMoveAndHit(BlockHitResult blockHitResult) { + private void stepMoveAndHit(BlockHitResult hitResult) { while (this.isAlive()) { Vec3 vec3 = this.position(); - EntityHitResult entityHitResult = this.findHitEntity(vec3, blockHitResult.getLocation()); - Vec3 vec32 = ((HitResult)Objects.requireNonNullElse(entityHitResult, blockHitResult)).getLocation(); + EntityHitResult entityHitResult = this.findHitEntity(vec3, hitResult.getLocation()); + Vec3 vec32 = ((HitResult)Objects.requireNonNullElse(entityHitResult, hitResult)).getLocation(); this.setPos(vec32); this.applyEffectsFromBlocks(vec3, vec32); if (this.portalProcess != null && this.portalProcess.isInsidePortalThisTick()) { @@ -257,8 +257,8 @@ public abstract class AbstractArrow extends Projectile { } if (entityHitResult == null) { - if (this.isAlive() && blockHitResult.getType() != Type.MISS) { - this.hitTargetOrDeflectSelf(blockHitResult); + if (this.isAlive() && hitResult.getType() != Type.MISS) { + this.hitTargetOrDeflectSelf(hitResult); this.hasImpulse = true; } break; @@ -283,12 +283,12 @@ public abstract class AbstractArrow extends Projectile { this.setDeltaMovement(vec3.scale(f)); } - private void addBubbleParticles(Vec3 vec3) { - Vec3 vec32 = this.getDeltaMovement(); + private void addBubbleParticles(Vec3 pos) { + Vec3 vec3 = this.getDeltaMovement(); for (int i = 0; i < 4; i++) { float f = 0.25F; - this.level().addParticle(ParticleTypes.BUBBLE, vec3.x - vec32.x * 0.25, vec3.y - vec32.y * 0.25, vec3.z - vec32.z * 0.25, vec32.x, vec32.y, vec32.z); + this.level().addParticle(ParticleTypes.BUBBLE, pos.x - vec3.x * 0.25, pos.y - vec3.y * 0.25, pos.z - vec3.z * 0.25, vec3.x, vec3.y, vec3.z); } } @@ -312,13 +312,13 @@ public abstract class AbstractArrow extends Projectile { return this.entityData.get(IN_GROUND); } - protected void setInGround(boolean bl) { - this.entityData.set(IN_GROUND, bl); + protected void setInGround(boolean inGround) { + this.entityData.set(IN_GROUND, inGround); } @Override - public void move(MoverType type, Vec3 pos) { - super.move(type, pos); + public void move(MoverType type, Vec3 movement) { + super.move(type, movement); if (type != MoverType.SELF && this.shouldFall()) { this.startFalling(); } @@ -529,57 +529,57 @@ public abstract class AbstractArrow extends Projectile { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putShort("life", (short)this.life); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putShort("life", (short)this.life); if (this.lastState != null) { - compound.put("inBlockState", NbtUtils.writeBlockState(this.lastState)); + tag.put("inBlockState", NbtUtils.writeBlockState(this.lastState)); } - compound.putByte("shake", (byte)this.shakeTime); - compound.putBoolean("inGround", this.isInGround()); - compound.putByte("pickup", (byte)this.pickup.ordinal()); - compound.putDouble("damage", this.baseDamage); - compound.putBoolean("crit", this.isCritArrow()); - compound.putByte("PierceLevel", this.getPierceLevel()); - compound.putString("SoundEvent", BuiltInRegistries.SOUND_EVENT.getKey(this.soundEvent).toString()); - compound.put("item", this.pickupItemStack.save(this.registryAccess())); + tag.putByte("shake", (byte)this.shakeTime); + tag.putBoolean("inGround", this.isInGround()); + tag.putByte("pickup", (byte)this.pickup.ordinal()); + tag.putDouble("damage", this.baseDamage); + tag.putBoolean("crit", this.isCritArrow()); + tag.putByte("PierceLevel", this.getPierceLevel()); + tag.putString("SoundEvent", BuiltInRegistries.SOUND_EVENT.getKey(this.soundEvent).toString()); + tag.put("item", this.pickupItemStack.save(this.registryAccess())); if (this.firedFromWeapon != null) { - compound.put("weapon", this.firedFromWeapon.save(this.registryAccess(), new CompoundTag())); + tag.put("weapon", this.firedFromWeapon.save(this.registryAccess(), new CompoundTag())); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.life = compound.getShort("life"); - if (compound.contains("inBlockState", 10)) { - this.lastState = NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), compound.getCompound("inBlockState")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.life = tag.getShort("life"); + if (tag.contains("inBlockState", 10)) { + this.lastState = NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), tag.getCompound("inBlockState")); } - this.shakeTime = compound.getByte("shake") & 255; - this.setInGround(compound.getBoolean("inGround")); - if (compound.contains("damage", 99)) { - this.baseDamage = compound.getDouble("damage"); + this.shakeTime = tag.getByte("shake") & 255; + this.setInGround(tag.getBoolean("inGround")); + if (tag.contains("damage", 99)) { + this.baseDamage = tag.getDouble("damage"); } - this.pickup = AbstractArrow.Pickup.byOrdinal(compound.getByte("pickup")); - this.setCritArrow(compound.getBoolean("crit")); - this.setPierceLevel(compound.getByte("PierceLevel")); - if (compound.contains("SoundEvent", 8)) { + this.pickup = AbstractArrow.Pickup.byOrdinal(tag.getByte("pickup")); + this.setCritArrow(tag.getBoolean("crit")); + this.setPierceLevel(tag.getByte("PierceLevel")); + if (tag.contains("SoundEvent", 8)) { this.soundEvent = (SoundEvent)BuiltInRegistries.SOUND_EVENT - .getOptional(ResourceLocation.parse(compound.getString("SoundEvent"))) + .getOptional(ResourceLocation.parse(tag.getString("SoundEvent"))) .orElse(this.getDefaultHitGroundSoundEvent()); } - if (compound.contains("item", 10)) { - this.setPickupItemStack((ItemStack)ItemStack.parse(this.registryAccess(), compound.getCompound("item")).orElse(this.getDefaultPickupItem())); + if (tag.contains("item", 10)) { + this.setPickupItemStack((ItemStack)ItemStack.parse(this.registryAccess(), tag.getCompound("item")).orElse(this.getDefaultPickupItem())); } else { this.setPickupItemStack(this.getDefaultPickupItem()); } - if (compound.contains("weapon", 10)) { - this.firedFromWeapon = (ItemStack)ItemStack.parse(this.registryAccess(), compound.getCompound("weapon")).orElse(null); + if (tag.contains("weapon", 10)) { + this.firedFromWeapon = (ItemStack)ItemStack.parse(this.registryAccess(), tag.getCompound("weapon")).orElse(null); } else { this.firedFromWeapon = null; } diff --git a/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java b/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java index 0b8eec03..d81b420a 100644 --- a/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java +++ b/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java @@ -124,7 +124,7 @@ public abstract class AbstractHurtingProjectile extends Projectile { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { return false; } @@ -154,16 +154,16 @@ public abstract class AbstractHurtingProjectile extends Projectile { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putDouble("acceleration_power", this.accelerationPower); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putDouble("acceleration_power", this.accelerationPower); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("acceleration_power", 6)) { - this.accelerationPower = compound.getDouble("acceleration_power"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("acceleration_power", 6)) { + this.accelerationPower = tag.getDouble("acceleration_power"); } } diff --git a/net/minecraft/world/entity/projectile/EvokerFangs.java b/net/minecraft/world/entity/projectile/EvokerFangs.java index d9cc67c7..be3e8b8d 100644 --- a/net/minecraft/world/entity/projectile/EvokerFangs.java +++ b/net/minecraft/world/entity/projectile/EvokerFangs.java @@ -62,18 +62,18 @@ public class EvokerFangs extends Entity implements TraceableEntity { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - this.warmupDelayTicks = compound.getInt("Warmup"); - if (compound.hasUUID("Owner")) { - this.ownerUUID = compound.getUUID("Owner"); + protected void readAdditionalSaveData(CompoundTag tag) { + this.warmupDelayTicks = tag.getInt("Warmup"); + if (tag.hasUUID("Owner")) { + this.ownerUUID = tag.getUUID("Owner"); } } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - compound.putInt("Warmup", this.warmupDelayTicks); + protected void addAdditionalSaveData(CompoundTag tag) { + tag.putInt("Warmup", this.warmupDelayTicks); if (this.ownerUUID != null) { - compound.putUUID("Owner", this.ownerUUID); + tag.putUUID("Owner", this.ownerUUID); } } @@ -155,7 +155,7 @@ public class EvokerFangs extends Entity implements TraceableEntity { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { return false; } } diff --git a/net/minecraft/world/entity/projectile/EyeOfEnder.java b/net/minecraft/world/entity/projectile/EyeOfEnder.java index 3d9780f3..1dbf2219 100644 --- a/net/minecraft/world/entity/projectile/EyeOfEnder.java +++ b/net/minecraft/world/entity/projectile/EyeOfEnder.java @@ -166,14 +166,14 @@ public class EyeOfEnder extends Entity implements ItemSupplier { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - compound.put("Item", this.getItem().save(this.registryAccess())); + public void addAdditionalSaveData(CompoundTag tag) { + tag.put("Item", this.getItem().save(this.registryAccess())); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - if (compound.contains("Item", 10)) { - this.setItem((ItemStack)ItemStack.parse(this.registryAccess(), compound.getCompound("Item")).orElse(this.getDefaultItem())); + public void readAdditionalSaveData(CompoundTag tag) { + if (tag.contains("Item", 10)) { + this.setItem((ItemStack)ItemStack.parse(this.registryAccess(), tag.getCompound("Item")).orElse(this.getDefaultItem())); } else { this.setItem(this.getDefaultItem()); } @@ -194,7 +194,7 @@ public class EyeOfEnder extends Entity implements ItemSupplier { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { return false; } } diff --git a/net/minecraft/world/entity/projectile/Fireball.java b/net/minecraft/world/entity/projectile/Fireball.java index 09a467c1..6f585df5 100644 --- a/net/minecraft/world/entity/projectile/Fireball.java +++ b/net/minecraft/world/entity/projectile/Fireball.java @@ -52,16 +52,16 @@ public abstract class Fireball extends AbstractHurtingProjectile implements Item } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.put("Item", this.getItem().save(this.registryAccess())); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.put("Item", this.getItem().save(this.registryAccess())); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("Item", 10)) { - this.setItem((ItemStack)ItemStack.parse(this.registryAccess(), compound.getCompound("Item")).orElse(this.getDefaultItem())); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("Item", 10)) { + this.setItem((ItemStack)ItemStack.parse(this.registryAccess(), tag.getCompound("Item")).orElse(this.getDefaultItem())); } else { this.setItem(this.getDefaultItem()); } diff --git a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java index 41acea4e..3e981ed0 100644 --- a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java +++ b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java @@ -182,10 +182,10 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { } } - private void explode(ServerLevel serverLevel) { - serverLevel.broadcastEntityEvent(this, (byte)17); + private void explode(ServerLevel level) { + level.broadcastEntityEvent(this, (byte)17); this.gameEvent(GameEvent.EXPLODE, this.getOwner()); - this.dealExplosionDamage(serverLevel); + this.dealExplosionDamage(level); this.discard(); } @@ -212,7 +212,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { return !this.getExplosions().isEmpty(); } - private void dealExplosionDamage(ServerLevel serverLevel) { + private void dealExplosionDamage(ServerLevel level) { float f = 0.0F; List list = this.getExplosions(); if (!list.isEmpty()) { @@ -221,7 +221,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { if (f > 0.0F) { if (this.attachedToEntity != null) { - this.attachedToEntity.hurtServer(serverLevel, this.damageSources().fireworks(this, this.getOwner()), 5.0F + list.size() * 2); + this.attachedToEntity.hurtServer(level, this.damageSources().fireworks(this, this.getOwner()), 5.0F + list.size() * 2); } double d = 5.0; @@ -242,7 +242,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { if (bl) { float g = f * (float)Math.sqrt((5.0 - this.distanceTo(livingEntity)) / 5.0); - livingEntity.hurtServer(serverLevel, this.damageSources().fireworks(this, this.getOwner()), g); + livingEntity.hurtServer(level, this.damageSources().fireworks(this, this.getOwner()), g); } } } @@ -268,31 +268,31 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Life", this.life); - compound.putInt("LifeTime", this.lifetime); - compound.put("FireworksItem", this.getItem().save(this.registryAccess())); - compound.putBoolean("ShotAtAngle", this.entityData.get(DATA_SHOT_AT_ANGLE)); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("Life", this.life); + tag.putInt("LifeTime", this.lifetime); + tag.put("FireworksItem", this.getItem().save(this.registryAccess())); + tag.putBoolean("ShotAtAngle", this.entityData.get(DATA_SHOT_AT_ANGLE)); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.life = compound.getInt("Life"); - this.lifetime = compound.getInt("LifeTime"); - if (compound.contains("FireworksItem", 10)) { + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.life = tag.getInt("Life"); + this.lifetime = tag.getInt("LifeTime"); + if (tag.contains("FireworksItem", 10)) { this.entityData .set( DATA_ID_FIREWORKS_ITEM, - (ItemStack)ItemStack.parse(this.registryAccess(), compound.getCompound("FireworksItem")).orElseGet(FireworkRocketEntity::getDefaultItem) + (ItemStack)ItemStack.parse(this.registryAccess(), tag.getCompound("FireworksItem")).orElseGet(FireworkRocketEntity::getDefaultItem) ); } else { this.entityData.set(DATA_ID_FIREWORKS_ITEM, getDefaultItem()); } - if (compound.contains("ShotAtAngle")) { - this.entityData.set(DATA_SHOT_AT_ANGLE, compound.getBoolean("ShotAtAngle")); + if (tag.contains("ShotAtAngle")) { + this.entityData.set(DATA_SHOT_AT_ANGLE, tag.getBoolean("ShotAtAngle")); } } diff --git a/net/minecraft/world/entity/projectile/FishingHook.java b/net/minecraft/world/entity/projectile/FishingHook.java index e001f962..dc87caa3 100644 --- a/net/minecraft/world/entity/projectile/FishingHook.java +++ b/net/minecraft/world/entity/projectile/FishingHook.java @@ -77,23 +77,23 @@ public class FishingHook extends Projectile { this(entityType, level, 0, 0); } - public FishingHook(Player player, Level level, int i, int j, ItemStack itemStack) { - this(EntityType.FISHING_BOBBER, level, i, j); + public FishingHook(Player player, Level level, int luck, int lureSpeed, ItemStack spawnedFrom) { + this(EntityType.FISHING_BOBBER, level, luck, lureSpeed); this.setOwner(player); float f = player.getXRot(); float g = player.getYRot(); float h = Mth.cos(-g * (float) (Math.PI / 180.0) - (float) Math.PI); - float k = Mth.sin(-g * (float) (Math.PI / 180.0) - (float) Math.PI); - float l = -Mth.cos(-f * (float) (Math.PI / 180.0)); - float m = Mth.sin(-f * (float) (Math.PI / 180.0)); - double d = player.getX() - k * 0.3; + float i = Mth.sin(-g * (float) (Math.PI / 180.0) - (float) Math.PI); + float j = -Mth.cos(-f * (float) (Math.PI / 180.0)); + float k = Mth.sin(-f * (float) (Math.PI / 180.0)); + double d = player.getX() - i * 0.3; double e = player.getEyeY(); - double n = player.getZ() - h * 0.3; - this.moveTo(d, e, n, g, f); - Vec3 vec3 = new Vec3(-k, Mth.clamp(-(m / l), -5.0F, 5.0F), -h); - double o = vec3.length(); + double l = player.getZ() - h * 0.3; + this.moveTo(d, e, l, g, f); + Vec3 vec3 = new Vec3(-i, Mth.clamp(-(k / j), -5.0F, 5.0F), -h); + double m = vec3.length(); vec3 = vec3.multiply( - 0.6 / o + this.random.triangle(0.5, 0.0103365), 0.6 / o + this.random.triangle(0.5, 0.0103365), 0.6 / o + this.random.triangle(0.5, 0.0103365) + 0.6 / m + this.random.triangle(0.5, 0.0103365), 0.6 / m + this.random.triangle(0.5, 0.0103365), 0.6 / m + this.random.triangle(0.5, 0.0103365) ); this.setDeltaMovement(vec3); this.setYRot((float)(Mth.atan2(vec3.x, vec3.z) * 180.0F / (float)Math.PI)); @@ -417,11 +417,11 @@ public class FishingHook extends Projectile { } @Override - public void addAdditionalSaveData(CompoundTag compound) { + public void addAdditionalSaveData(CompoundTag tag) { } @Override - public void readAdditionalSaveData(CompoundTag compound) { + public void readAdditionalSaveData(CompoundTag tag) { } public int retrieve(ItemStack stack) { diff --git a/net/minecraft/world/entity/projectile/LargeFireball.java b/net/minecraft/world/entity/projectile/LargeFireball.java index 7d91bc6e..0bd4353d 100644 --- a/net/minecraft/world/entity/projectile/LargeFireball.java +++ b/net/minecraft/world/entity/projectile/LargeFireball.java @@ -48,16 +48,16 @@ public class LargeFireball extends Fireball { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putByte("ExplosionPower", (byte)this.explosionPower); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putByte("ExplosionPower", (byte)this.explosionPower); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("ExplosionPower", 99)) { - this.explosionPower = compound.getByte("ExplosionPower"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("ExplosionPower", 99)) { + this.explosionPower = tag.getByte("ExplosionPower"); } } } diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java index 04bf4da5..382de20c 100644 --- a/net/minecraft/world/entity/projectile/Projectile.java +++ b/net/minecraft/world/entity/projectile/Projectile.java @@ -71,8 +71,8 @@ public abstract class Projectile extends Entity implements TraceableEntity { } @Nullable - protected Entity findOwner(UUID uUID) { - return this.level() instanceof ServerLevel serverLevel ? serverLevel.getEntity(uUID) : null; + protected Entity findOwner(UUID entityUuid) { + return this.level() instanceof ServerLevel serverLevel ? serverLevel.getEntity(entityUuid) : null; } public Entity getEffectSource() { @@ -80,16 +80,16 @@ public abstract class Projectile extends Entity implements TraceableEntity { } @Override - protected void addAdditionalSaveData(CompoundTag compound) { + protected void addAdditionalSaveData(CompoundTag tag) { if (this.ownerUUID != null) { - compound.putUUID("Owner", this.ownerUUID); + tag.putUUID("Owner", this.ownerUUID); } if (this.leftOwner) { - compound.putBoolean("LeftOwner", true); + tag.putBoolean("LeftOwner", true); } - compound.putBoolean("HasBeenShot", this.hasBeenShot); + tag.putBoolean("HasBeenShot", this.hasBeenShot); } protected boolean ownedBy(Entity entity) { @@ -97,19 +97,19 @@ public abstract class Projectile extends Entity implements TraceableEntity { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - if (compound.hasUUID("Owner")) { - this.setOwnerThroughUUID(compound.getUUID("Owner")); + protected void readAdditionalSaveData(CompoundTag tag) { + if (tag.hasUUID("Owner")) { + this.setOwnerThroughUUID(tag.getUUID("Owner")); } - this.leftOwner = compound.getBoolean("LeftOwner"); - this.hasBeenShot = compound.getBoolean("HasBeenShot"); + this.leftOwner = tag.getBoolean("LeftOwner"); + this.hasBeenShot = tag.getBoolean("HasBeenShot"); } - protected void setOwnerThroughUUID(UUID uUID) { - if (this.ownerUUID != uUID) { - this.ownerUUID = uUID; - this.cachedOwner = this.findOwner(uUID); + protected void setOwnerThroughUUID(UUID uuid) { + if (this.ownerUUID != uuid) { + this.ownerUUID = uuid; + this.cachedOwner = this.findOwner(uuid); } } @@ -177,53 +177,53 @@ public abstract class Projectile extends Entity implements TraceableEntity { } public static T spawnProjectileFromRotation( - Projectile.ProjectileFactory projectileFactory, ServerLevel serverLevel, ItemStack itemStack, LivingEntity livingEntity, float f, float g, float h + Projectile.ProjectileFactory factory, ServerLevel level, ItemStack spawnedFrom, LivingEntity owner, float z, float velocity, float innaccuracy ) { return spawnProjectile( - projectileFactory.create(serverLevel, livingEntity, itemStack), - serverLevel, - itemStack, - projectile -> projectile.shootFromRotation(livingEntity, livingEntity.getXRot(), livingEntity.getYRot(), f, g, h) + factory.create(level, owner, spawnedFrom), + level, + spawnedFrom, + projectile -> projectile.shootFromRotation(owner, owner.getXRot(), owner.getYRot(), z, velocity, innaccuracy) ); } public static T spawnProjectileUsingShoot( - Projectile.ProjectileFactory projectileFactory, - ServerLevel serverLevel, - ItemStack itemStack, - LivingEntity livingEntity, - double d, - double e, - double f, - float g, - float h + Projectile.ProjectileFactory factory, + ServerLevel level, + ItemStack spawnedFrom, + LivingEntity owner, + double x, + double y, + double z, + float velocity, + float inaccuracy ) { - return spawnProjectile(projectileFactory.create(serverLevel, livingEntity, itemStack), serverLevel, itemStack, projectile -> projectile.shoot(d, e, f, g, h)); + return spawnProjectile(factory.create(level, owner, spawnedFrom), level, spawnedFrom, projectile -> projectile.shoot(x, y, z, velocity, inaccuracy)); } public static T spawnProjectileUsingShoot( - T projectile, ServerLevel serverLevel, ItemStack itemStack, double d, double e, double f, float g, float h + T projectile, ServerLevel level, ItemStack spawnedFrom, double x, double y, double z, float velocity, float inaccuracy ) { - return spawnProjectile(projectile, serverLevel, itemStack, projectile2 -> projectile.shoot(d, e, f, g, h)); + return spawnProjectile(projectile, level, spawnedFrom, projectile2 -> projectile.shoot(x, y, z, velocity, inaccuracy)); } - public static T spawnProjectile(T projectile, ServerLevel serverLevel, ItemStack itemStack) { - return spawnProjectile(projectile, serverLevel, itemStack, projectilex -> {}); + public static T spawnProjectile(T projectile, ServerLevel level, ItemStack spawnedFrom) { + return spawnProjectile(projectile, level, spawnedFrom, projectilex -> {}); } - public static T spawnProjectile(T projectile, ServerLevel serverLevel, ItemStack itemStack, Consumer consumer) { - consumer.accept(projectile); - serverLevel.addFreshEntity(projectile); - projectile.applyOnProjectileSpawned(serverLevel, itemStack); + public static T spawnProjectile(T projectile, ServerLevel level, ItemStack stack, Consumer adapter) { + adapter.accept(projectile); + level.addFreshEntity(projectile); + projectile.applyOnProjectileSpawned(level, stack); return projectile; } - public void applyOnProjectileSpawned(ServerLevel serverLevel, ItemStack itemStack) { - EnchantmentHelper.onProjectileSpawned(serverLevel, itemStack, this, item -> {}); + public void applyOnProjectileSpawned(ServerLevel level, ItemStack spawnedFrom) { + EnchantmentHelper.onProjectileSpawned(level, spawnedFrom, this, item -> {}); if (this instanceof AbstractArrow abstractArrow) { - ItemStack itemStack2 = abstractArrow.getWeaponItem(); - if (itemStack2 != null && !itemStack2.isEmpty() && !itemStack.getItem().equals(itemStack2.getItem())) { - EnchantmentHelper.onProjectileSpawned(serverLevel, itemStack2, this, abstractArrow::onItemBreak); + ItemStack itemStack = abstractArrow.getWeaponItem(); + if (itemStack != null && !itemStack.isEmpty() && !spawnedFrom.getItem().equals(itemStack.getItem())) { + EnchantmentHelper.onProjectileSpawned(level, itemStack, this, abstractArrow::onItemBreak); } } } @@ -362,15 +362,13 @@ public abstract class Projectile extends Entity implements TraceableEntity { } @Override - public boolean mayInteract(ServerLevel serverLevel, BlockPos blockPos) { + public boolean mayInteract(ServerLevel level, BlockPos pos) { Entity entity = this.getOwner(); - return entity instanceof Player - ? entity.mayInteract(serverLevel, blockPos) - : entity == null || serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); + return entity instanceof Player ? entity.mayInteract(level, pos) : entity == null || level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); } - public boolean mayBreak(ServerLevel serverLevel) { - return this.getType().is(EntityTypeTags.IMPACT_PROJECTILES) && serverLevel.getGameRules().getBoolean(GameRules.RULE_PROJECTILESCANBREAKBLOCKS); + public boolean mayBreak(ServerLevel level) { + return this.getType().is(EntityTypeTags.IMPACT_PROJECTILES) && level.getGameRules().getBoolean(GameRules.RULE_PROJECTILESCANBREAKBLOCKS); } @Override @@ -395,7 +393,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (!this.isInvulnerableToBase(damageSource)) { this.markHurt(); } diff --git a/net/minecraft/world/entity/projectile/ShulkerBullet.java b/net/minecraft/world/entity/projectile/ShulkerBullet.java index 4fed5c4c..e4f4b56d 100644 --- a/net/minecraft/world/entity/projectile/ShulkerBullet.java +++ b/net/minecraft/world/entity/projectile/ShulkerBullet.java @@ -67,35 +67,35 @@ public class ShulkerBullet extends Projectile { } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); + protected void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); if (this.finalTarget != null) { - compound.putUUID("Target", this.finalTarget.getUUID()); + tag.putUUID("Target", this.finalTarget.getUUID()); } if (this.currentMoveDirection != null) { - compound.putInt("Dir", this.currentMoveDirection.get3DDataValue()); + tag.putInt("Dir", this.currentMoveDirection.get3DDataValue()); } - compound.putInt("Steps", this.flightSteps); - compound.putDouble("TXD", this.targetDeltaX); - compound.putDouble("TYD", this.targetDeltaY); - compound.putDouble("TZD", this.targetDeltaZ); + tag.putInt("Steps", this.flightSteps); + tag.putDouble("TXD", this.targetDeltaX); + tag.putDouble("TYD", this.targetDeltaY); + tag.putDouble("TZD", this.targetDeltaZ); } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.flightSteps = compound.getInt("Steps"); - this.targetDeltaX = compound.getDouble("TXD"); - this.targetDeltaY = compound.getDouble("TYD"); - this.targetDeltaZ = compound.getDouble("TZD"); - if (compound.contains("Dir", 99)) { - this.currentMoveDirection = Direction.from3DDataValue(compound.getInt("Dir")); + protected void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.flightSteps = tag.getInt("Steps"); + this.targetDeltaX = tag.getDouble("TXD"); + this.targetDeltaY = tag.getDouble("TYD"); + this.targetDeltaZ = tag.getDouble("TZD"); + if (tag.contains("Dir", 99)) { + this.currentMoveDirection = Direction.from3DDataValue(tag.getInt("Dir")); } - if (compound.hasUUID("Target")) { - this.targetId = compound.getUUID("Target"); + if (tag.hasUUID("Target")) { + this.targetId = tag.getUUID("Target"); } } @@ -330,9 +330,9 @@ public class ShulkerBullet extends Projectile { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { this.playSound(SoundEvents.SHULKER_BULLET_HURT, 1.0F, 1.0F); - serverLevel.sendParticles(ParticleTypes.CRIT, this.getX(), this.getY(), this.getZ(), 15, 0.2, 0.2, 0.2, 0.0); + level.sendParticles(ParticleTypes.CRIT, this.getX(), this.getY(), this.getZ(), 15, 0.2, 0.2, 0.2, 0.0); this.destroy(); return true; } diff --git a/net/minecraft/world/entity/projectile/Snowball.java b/net/minecraft/world/entity/projectile/Snowball.java index 8161b653..ae4dac55 100644 --- a/net/minecraft/world/entity/projectile/Snowball.java +++ b/net/minecraft/world/entity/projectile/Snowball.java @@ -19,12 +19,12 @@ public class Snowball extends ThrowableItemProjectile { super(entityType, level); } - public Snowball(Level level, LivingEntity livingEntity, ItemStack itemStack) { - super(EntityType.SNOWBALL, livingEntity, level, itemStack); + public Snowball(Level level, LivingEntity owner, ItemStack item) { + super(EntityType.SNOWBALL, owner, level, item); } - public Snowball(Level level, double d, double e, double f, ItemStack itemStack) { - super(EntityType.SNOWBALL, d, e, f, level, itemStack); + public Snowball(Level level, double x, double y, double z, ItemStack item) { + super(EntityType.SNOWBALL, x, y, z, level, item); } @Override diff --git a/net/minecraft/world/entity/projectile/SpectralArrow.java b/net/minecraft/world/entity/projectile/SpectralArrow.java index c5c7a9e5..d23d1ecb 100644 --- a/net/minecraft/world/entity/projectile/SpectralArrow.java +++ b/net/minecraft/world/entity/projectile/SpectralArrow.java @@ -42,17 +42,17 @@ public class SpectralArrow extends AbstractArrow { } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("Duration")) { - this.duration = compound.getInt("Duration"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("Duration")) { + this.duration = tag.getInt("Duration"); } } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Duration", this.duration); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("Duration", this.duration); } @Override diff --git a/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java b/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java index 9c38c9ab..bf160eef 100644 --- a/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java +++ b/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java @@ -20,14 +20,14 @@ public abstract class ThrowableItemProjectile extends ThrowableProjectile implem super(entityType, level); } - public ThrowableItemProjectile(EntityType entityType, double d, double e, double f, Level level, ItemStack itemStack) { - super(entityType, d, e, f, level); - this.setItem(itemStack); + public ThrowableItemProjectile(EntityType entityType, double x, double y, double z, Level level, ItemStack item) { + super(entityType, x, y, z, level); + this.setItem(item); } - public ThrowableItemProjectile(EntityType entityType, LivingEntity livingEntity, Level level, ItemStack itemStack) { - this(entityType, livingEntity.getX(), livingEntity.getEyeY() - 0.1F, livingEntity.getZ(), level, itemStack); - this.setOwner(livingEntity); + public ThrowableItemProjectile(EntityType entityType, LivingEntity owner, Level level, ItemStack item) { + this(entityType, owner.getX(), owner.getEyeY() - 0.1F, owner.getZ(), level, item); + this.setOwner(owner); } public void setItem(ItemStack stack) { @@ -47,16 +47,16 @@ public abstract class ThrowableItemProjectile extends ThrowableProjectile implem } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.put("Item", this.getItem().save(this.registryAccess())); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.put("Item", this.getItem().save(this.registryAccess())); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("Item", 10)) { - this.setItem((ItemStack)ItemStack.parse(this.registryAccess(), compound.getCompound("Item")).orElseGet(() -> new ItemStack(this.getDefaultItem()))); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("Item", 10)) { + this.setItem((ItemStack)ItemStack.parse(this.registryAccess(), tag.getCompound("Item")).orElseGet(() -> new ItemStack(this.getDefaultItem()))); } else { this.setItem(new ItemStack(this.getDefaultItem())); } diff --git a/net/minecraft/world/entity/projectile/ThrownEgg.java b/net/minecraft/world/entity/projectile/ThrownEgg.java index 59cc1a47..28907974 100644 --- a/net/minecraft/world/entity/projectile/ThrownEgg.java +++ b/net/minecraft/world/entity/projectile/ThrownEgg.java @@ -21,12 +21,12 @@ public class ThrownEgg extends ThrowableItemProjectile { super(entityType, level); } - public ThrownEgg(Level level, LivingEntity livingEntity, ItemStack itemStack) { - super(EntityType.EGG, livingEntity, level, itemStack); + public ThrownEgg(Level level, LivingEntity owner, ItemStack item) { + super(EntityType.EGG, owner, level, item); } - public ThrownEgg(Level level, double d, double e, double f, ItemStack itemStack) { - super(EntityType.EGG, d, e, f, level, itemStack); + public ThrownEgg(Level level, double x, double y, double z, ItemStack item) { + super(EntityType.EGG, x, y, z, level, item); } @Override diff --git a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java index 1a73efb7..0583f5f6 100644 --- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java +++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java @@ -34,8 +34,8 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { super(entityType, level); } - public ThrownEnderpearl(Level level, LivingEntity livingEntity, ItemStack itemStack) { - super(EntityType.ENDER_PEARL, livingEntity, level, itemStack); + public ThrownEnderpearl(Level level, LivingEntity owner, ItemStack item) { + super(EntityType.ENDER_PEARL, owner, level, item); } @Override @@ -44,9 +44,9 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { } @Override - protected void setOwnerThroughUUID(UUID uUID) { + protected void setOwnerThroughUUID(UUID uuid) { this.deregisterFromCurrentOwner(); - super.setOwnerThroughUUID(uUID); + super.setOwnerThroughUUID(uuid); this.registerToCurrentOwner(); } @@ -71,15 +71,15 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { @Nullable @Override - protected Entity findOwner(UUID uUID) { + protected Entity findOwner(UUID entityUuid) { if (this.level() instanceof ServerLevel serverLevel) { - Entity entity = super.findOwner(uUID); + Entity entity = super.findOwner(entityUuid); if (entity != null) { return entity; } else { for (ServerLevel serverLevel2 : serverLevel.getServer().getAllLevels()) { if (serverLevel2 != serverLevel) { - entity = serverLevel2.getEntity(uUID); + entity = serverLevel2.getEntity(entityUuid); if (entity != null) { return entity; } @@ -207,10 +207,10 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { } @Override - public boolean canTeleport(Level level, Level level2) { - return level.dimension() == Level.END && level2.dimension() == Level.OVERWORLD && this.getOwner() instanceof ServerPlayer serverPlayer - ? super.canTeleport(level, level2) && serverPlayer.seenCredits - : super.canTeleport(level, level2); + public boolean canTeleport(Level fromLevel, Level toLevel) { + return fromLevel.dimension() == Level.END && toLevel.dimension() == Level.OVERWORLD && this.getOwner() instanceof ServerPlayer serverPlayer + ? super.canTeleport(fromLevel, toLevel) && serverPlayer.seenCredits + : super.canTeleport(fromLevel, toLevel); } @Override @@ -222,11 +222,11 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { } @Override - public void onRemoval(Entity.RemovalReason removalReason) { - if (removalReason != Entity.RemovalReason.UNLOADED_WITH_PLAYER) { + public void onRemoval(Entity.RemovalReason reason) { + if (reason != Entity.RemovalReason.UNLOADED_WITH_PLAYER) { this.deregisterFromCurrentOwner(); } - super.onRemoval(removalReason); + super.onRemoval(reason); } } diff --git a/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java b/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java index 3513b5f6..234fcb1a 100644 --- a/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java +++ b/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java @@ -17,12 +17,12 @@ public class ThrownExperienceBottle extends ThrowableItemProjectile { super(entityType, level); } - public ThrownExperienceBottle(Level level, LivingEntity livingEntity, ItemStack itemStack) { - super(EntityType.EXPERIENCE_BOTTLE, livingEntity, level, itemStack); + public ThrownExperienceBottle(Level level, LivingEntity owner, ItemStack item) { + super(EntityType.EXPERIENCE_BOTTLE, owner, level, item); } - public ThrownExperienceBottle(Level level, double d, double e, double f, ItemStack itemStack) { - super(EntityType.EXPERIENCE_BOTTLE, d, e, f, level, itemStack); + public ThrownExperienceBottle(Level level, double x, double y, double z, ItemStack item) { + super(EntityType.EXPERIENCE_BOTTLE, x, y, z, level, item); } @Override diff --git a/net/minecraft/world/entity/projectile/ThrownPotion.java b/net/minecraft/world/entity/projectile/ThrownPotion.java index 4dd379d9..9e3de042 100644 --- a/net/minecraft/world/entity/projectile/ThrownPotion.java +++ b/net/minecraft/world/entity/projectile/ThrownPotion.java @@ -43,12 +43,12 @@ public class ThrownPotion extends ThrowableItemProjectile { super(entityType, level); } - public ThrownPotion(Level level, LivingEntity livingEntity, ItemStack itemStack) { - super(EntityType.POTION, livingEntity, level, itemStack); + public ThrownPotion(Level level, LivingEntity owner, ItemStack item) { + super(EntityType.POTION, owner, level, item); } - public ThrownPotion(Level level, double d, double e, double f, ItemStack itemStack) { - super(EntityType.POTION, d, e, f, level, itemStack); + public ThrownPotion(Level level, double x, double y, double z, ItemStack item) { + super(EntityType.POTION, x, y, z, level, item); } @Override @@ -103,14 +103,14 @@ public class ThrownPotion extends ThrowableItemProjectile { } } - private void applyWater(ServerLevel serverLevel) { + private void applyWater(ServerLevel level) { AABB aABB = this.getBoundingBox().inflate(4.0, 2.0, 4.0); for (LivingEntity livingEntity : this.level().getEntitiesOfClass(LivingEntity.class, aABB, WATER_SENSITIVE_OR_ON_FIRE)) { double d = this.distanceToSqr(livingEntity); if (d < 16.0) { if (livingEntity.isSensitiveToWater()) { - livingEntity.hurtServer(serverLevel, this.damageSources().indirectMagic(this, this.getOwner()), 1.0F); + livingEntity.hurtServer(level, this.damageSources().indirectMagic(this, this.getOwner()), 1.0F); } if (livingEntity.isOnFire() && livingEntity.isAlive()) { @@ -124,9 +124,9 @@ public class ThrownPotion extends ThrowableItemProjectile { } } - private void applySplash(ServerLevel serverLevel, Iterable iterable, @Nullable Entity entity) { + private void applySplash(ServerLevel level, Iterable effects, @Nullable Entity entity) { AABB aABB = this.getBoundingBox().inflate(4.0, 2.0, 4.0); - List list = serverLevel.getEntitiesOfClass(LivingEntity.class, aABB); + List list = level.getEntitiesOfClass(LivingEntity.class, aABB); if (!list.isEmpty()) { Entity entity2 = this.getEffectSource(); @@ -141,10 +141,10 @@ public class ThrownPotion extends ThrowableItemProjectile { e = 1.0 - Math.sqrt(d) / 4.0; } - for (MobEffectInstance mobEffectInstance : iterable) { + for (MobEffectInstance mobEffectInstance : effects) { Holder holder = mobEffectInstance.getEffect(); if (holder.value().isInstantenous()) { - holder.value().applyInstantenousEffect(serverLevel, this, this.getOwner(), livingEntity, mobEffectInstance.getAmplifier(), e); + holder.value().applyInstantenousEffect(level, this, this.getOwner(), livingEntity, mobEffectInstance.getAmplifier(), e); } else { int i = mobEffectInstance.mapDuration(ix -> (int)(e * ix + 0.5)); MobEffectInstance mobEffectInstance2 = new MobEffectInstance( diff --git a/net/minecraft/world/entity/projectile/ThrownTrident.java b/net/minecraft/world/entity/projectile/ThrownTrident.java index c0812ee1..54cb138a 100644 --- a/net/minecraft/world/entity/projectile/ThrownTrident.java +++ b/net/minecraft/world/entity/projectile/ThrownTrident.java @@ -179,16 +179,16 @@ public class ThrownTrident extends AbstractArrow { } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.dealtDamage = compound.getBoolean("DealtDamage"); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.dealtDamage = tag.getBoolean("DealtDamage"); this.entityData.set(ID_LOYALTY, this.getLoyaltyFromItem(this.getPickupItemStackOrigin())); } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("DealtDamage", this.dealtDamage); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("DealtDamage", this.dealtDamage); } private byte getLoyaltyFromItem(ItemStack stack) { diff --git a/net/minecraft/world/entity/projectile/WitherSkull.java b/net/minecraft/world/entity/projectile/WitherSkull.java index 88e6fbef..b1b03b19 100644 --- a/net/minecraft/world/entity/projectile/WitherSkull.java +++ b/net/minecraft/world/entity/projectile/WitherSkull.java @@ -122,14 +122,14 @@ public class WitherSkull extends AbstractHurtingProjectile { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("dangerous", this.isDangerous()); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("dangerous", this.isDangerous()); } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setDangerous(compound.getBoolean("dangerous")); + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.setDangerous(tag.getBoolean("dangerous")); } } diff --git a/net/minecraft/world/entity/raid/Raid.java b/net/minecraft/world/entity/raid/Raid.java index 54a7745d..9995032b 100644 --- a/net/minecraft/world/entity/raid/Raid.java +++ b/net/minecraft/world/entity/raid/Raid.java @@ -588,17 +588,17 @@ public class Raid { this.level.getRaids().setDirty(); } - public static ItemStack getOminousBannerInstance(HolderGetter holderGetter) { + public static ItemStack getOminousBannerInstance(HolderGetter patternRegistry) { ItemStack itemStack = new ItemStack(Items.WHITE_BANNER); BannerPatternLayers bannerPatternLayers = new Builder() - .addIfRegistered(holderGetter, BannerPatterns.RHOMBUS_MIDDLE, DyeColor.CYAN) - .addIfRegistered(holderGetter, BannerPatterns.STRIPE_BOTTOM, DyeColor.LIGHT_GRAY) - .addIfRegistered(holderGetter, BannerPatterns.STRIPE_CENTER, DyeColor.GRAY) - .addIfRegistered(holderGetter, BannerPatterns.BORDER, DyeColor.LIGHT_GRAY) - .addIfRegistered(holderGetter, BannerPatterns.STRIPE_MIDDLE, DyeColor.BLACK) - .addIfRegistered(holderGetter, BannerPatterns.HALF_HORIZONTAL, DyeColor.LIGHT_GRAY) - .addIfRegistered(holderGetter, BannerPatterns.CIRCLE_MIDDLE, DyeColor.LIGHT_GRAY) - .addIfRegistered(holderGetter, BannerPatterns.BORDER, DyeColor.BLACK) + .addIfRegistered(patternRegistry, BannerPatterns.RHOMBUS_MIDDLE, DyeColor.CYAN) + .addIfRegistered(patternRegistry, BannerPatterns.STRIPE_BOTTOM, DyeColor.LIGHT_GRAY) + .addIfRegistered(patternRegistry, BannerPatterns.STRIPE_CENTER, DyeColor.GRAY) + .addIfRegistered(patternRegistry, BannerPatterns.BORDER, DyeColor.LIGHT_GRAY) + .addIfRegistered(patternRegistry, BannerPatterns.STRIPE_MIDDLE, DyeColor.BLACK) + .addIfRegistered(patternRegistry, BannerPatterns.HALF_HORIZONTAL, DyeColor.LIGHT_GRAY) + .addIfRegistered(patternRegistry, BannerPatterns.CIRCLE_MIDDLE, DyeColor.LIGHT_GRAY) + .addIfRegistered(patternRegistry, BannerPatterns.BORDER, DyeColor.BLACK) .build(); itemStack.set(DataComponents.BANNER_PATTERNS, bannerPatternLayers); itemStack.set(DataComponents.HIDE_ADDITIONAL_TOOLTIP, Unit.INSTANCE); @@ -613,21 +613,21 @@ public class Raid { } @Nullable - private BlockPos findRandomSpawnPos(int i) { - int j = this.raidCooldownTicks / 20; - float f = 0.22F * j - 0.24F; + private BlockPos findRandomSpawnPos(int attempts) { + int i = this.raidCooldownTicks / 20; + float f = 0.22F * i - 0.24F; BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); float g = this.level.random.nextFloat() * (float) (Math.PI * 2); - for (int k = 0; k < i; k++) { - float h = g + (float) Math.PI * k / 8.0F; - int l = this.center.getX() + Mth.floor(Mth.cos(h) * 32.0F * f) + this.level.random.nextInt(3) * Mth.floor(f); - int m = this.center.getZ() + Mth.floor(Mth.sin(h) * 32.0F * f) + this.level.random.nextInt(3) * Mth.floor(f); - int n = this.level.getHeight(Heightmap.Types.WORLD_SURFACE, l, m); - if (Mth.abs(n - this.center.getY()) <= 96) { - mutableBlockPos.set(l, n, m); - if (!this.level.isVillage(mutableBlockPos) || j <= 7) { - int o = 10; + for (int j = 0; j < attempts; j++) { + float h = g + (float) Math.PI * j / 8.0F; + int k = this.center.getX() + Mth.floor(Mth.cos(h) * 32.0F * f) + this.level.random.nextInt(3) * Mth.floor(f); + int l = this.center.getZ() + Mth.floor(Mth.sin(h) * 32.0F * f) + this.level.random.nextInt(3) * Mth.floor(f); + int m = this.level.getHeight(Heightmap.Types.WORLD_SURFACE, k, l); + if (Mth.abs(m - this.center.getY()) <= 96) { + mutableBlockPos.set(k, m, l); + if (!this.level.isVillage(mutableBlockPos) || i <= 7) { + int n = 10; if (this.level.hasChunksAt(mutableBlockPos.getX() - 10, mutableBlockPos.getZ() - 10, mutableBlockPos.getX() + 10, mutableBlockPos.getZ() + 10) && this.level.isPositionEntityTicking(mutableBlockPos) && ( diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java index d6dd58c9..2c18d1b1 100644 --- a/net/minecraft/world/entity/raid/Raider.java +++ b/net/minecraft/world/entity/raid/Raider.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.SpawnGroupData; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.ai.goal.PathfindToRaidGoal; +import net.minecraft.world.entity.ai.goal.Goal.Flag; import net.minecraft.world.entity.ai.targeting.TargetingConditions; import net.minecraft.world.entity.ai.util.DefaultRandomPos; import net.minecraft.world.entity.ai.village.poi.PoiManager; @@ -178,23 +179,23 @@ public abstract class Raider extends PatrollingMonster { } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Wave", this.wave); - compound.putBoolean("CanJoinRaid", this.canJoinRaid); + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("Wave", this.wave); + tag.putBoolean("CanJoinRaid", this.canJoinRaid); if (this.raid != null) { - compound.putInt("RaidId", this.raid.getId()); + tag.putInt("RaidId", this.raid.getId()); } } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.wave = compound.getInt("Wave"); - this.canJoinRaid = compound.getBoolean("CanJoinRaid"); - if (compound.contains("RaidId", 3)) { + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.wave = tag.getInt("Wave"); + this.canJoinRaid = tag.getBoolean("CanJoinRaid"); + if (tag.contains("RaidId", 3)) { if (this.level() instanceof ServerLevel) { - this.raid = ((ServerLevel)this.level()).getRaids().get(compound.getInt("RaidId")); + this.raid = ((ServerLevel)this.level()).getRaids().get(tag.getInt("RaidId")); } if (this.raid != null) { @@ -207,8 +208,8 @@ public abstract class Raider extends PatrollingMonster { } @Override - protected void pickUpItem(ServerLevel serverLevel, ItemEntity itemEntity) { - ItemStack itemStack = itemEntity.getItem(); + protected void pickUpItem(ServerLevel level, ItemEntity entity) { + ItemStack itemStack = entity.getItem(); boolean bl = this.hasActiveRaid() && this.getCurrentRaid().getLeader(this.getWave()) != null; if (this.hasActiveRaid() && !bl @@ -217,17 +218,17 @@ public abstract class Raider extends PatrollingMonster { ItemStack itemStack2 = this.getItemBySlot(equipmentSlot); double d = this.getEquipmentDropChance(equipmentSlot); if (!itemStack2.isEmpty() && Math.max(this.random.nextFloat() - 0.1F, 0.0F) < d) { - this.spawnAtLocation(serverLevel, itemStack2); + this.spawnAtLocation(level, itemStack2); } - this.onItemPickup(itemEntity); + this.onItemPickup(entity); this.setItemSlot(equipmentSlot, itemStack); - this.take(itemEntity, itemStack.getCount()); - itemEntity.discard(); + this.take(entity, itemStack.getCount()); + entity.discard(); this.getCurrentRaid().setLeader(this.getWave(), this); this.setPatrolLeader(true); } else { - super.pickUpItem(serverLevel, itemEntity); + super.pickUpItem(level, entity); } } @@ -250,21 +251,21 @@ public abstract class Raider extends PatrollingMonster { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (this.hasActiveRaid()) { this.getCurrentRaid().updateBossbar(); } - return super.hurtServer(serverLevel, damageSource, f); + return super.hurtServer(level, damageSource, amount); } @Nullable @Override public SpawnGroupData finalizeSpawn( - ServerLevelAccessor serverLevelAccessor, DifficultyInstance difficultyInstance, EntitySpawnReason entitySpawnReason, @Nullable SpawnGroupData spawnGroupData + ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { - this.setCanJoinRaid(this.getType() != EntityType.WITCH || entitySpawnReason != EntitySpawnReason.NATURAL); - return super.finalizeSpawn(serverLevelAccessor, difficultyInstance, entitySpawnReason, spawnGroupData); + this.setCanJoinRaid(this.getType() != EntityType.WITCH || spawnReason != EntitySpawnReason.NATURAL); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } public abstract SoundEvent getCelebrateSound(); @@ -277,7 +278,7 @@ public abstract class Raider extends PatrollingMonster { public HoldGroundAttackGoal(final AbstractIllager mob, final float hostileRadiusSquare) { this.mob = mob; this.hostileRadiusSqr = hostileRadiusSquare * hostileRadiusSquare; - this.setFlags(EnumSet.of(Goal.Flag.MOVE, Goal.Flag.LOOK)); + this.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK)); } @Override @@ -349,7 +350,7 @@ public abstract class Raider extends PatrollingMonster { public ObtainRaidLeaderBannerGoal(final T mob) { this.mob = mob; - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override @@ -435,7 +436,7 @@ public abstract class Raider extends PatrollingMonster { RaiderCelebration(final Raider mob) { this.mob = mob; - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override @@ -482,7 +483,7 @@ public abstract class Raider extends PatrollingMonster { this.raider = raider; this.speedModifier = speedModifier; this.distanceToPoi = distanceToPoi; - this.setFlags(EnumSet.of(Goal.Flag.MOVE)); + this.setFlags(EnumSet.of(Flag.MOVE)); } @Override diff --git a/net/minecraft/world/entity/vehicle/AbstractBoat.java b/net/minecraft/world/entity/vehicle/AbstractBoat.java index 08f0a356..d13bcfbc 100644 --- a/net/minecraft/world/entity/vehicle/AbstractBoat.java +++ b/net/minecraft/world/entity/vehicle/AbstractBoat.java @@ -85,17 +85,17 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { private Leashable.LeashData leashData; private final Supplier dropItem; - public AbstractBoat(EntityType entityType, Level level, Supplier supplier) { + public AbstractBoat(EntityType entityType, Level level, Supplier dropItem) { super(entityType, level); - this.dropItem = supplier; + this.dropItem = dropItem; this.blocksBuilding = true; } - public void setInitialPos(double d, double e, double f) { - this.setPos(d, e, f); - this.xo = d; - this.yo = e; - this.zo = f; + public void setInitialPos(double x, double y, double z) { + this.setPos(x, y, z); + this.xo = x; + this.yo = y; + this.zo = z; } @Override @@ -116,8 +116,8 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { return canVehicleCollide(this, entity); } - public static boolean canVehicleCollide(Entity entity, Entity entity2) { - return (entity2.canBeCollidedWith() || entity2.isPushable()) && !entity.isPassengerOfSameVehicle(entity2); + public static boolean canVehicleCollide(Entity first, Entity second) { + return (second.canBeCollidedWith() || second.isPushable()) && !first.isPassengerOfSameVehicle(second); } @Override @@ -135,7 +135,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { return LivingEntity.resetForwardDirectionOfRelativePortalPosition(super.getRelativePortalPosition(axis, portal)); } - protected abstract double rideHeight(EntityDimensions entityDimensions); + protected abstract double rideHeight(EntityDimensions dimensions); @Override protected Vec3 getPassengerAttachmentPoint(Entity entity, EntityDimensions dimensions, float partialTick) { @@ -390,13 +390,13 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { } } - public void setPaddleState(boolean bl, boolean bl2) { - this.entityData.set(DATA_ID_PADDLE_LEFT, bl); - this.entityData.set(DATA_ID_PADDLE_RIGHT, bl2); + public void setPaddleState(boolean left, boolean right) { + this.entityData.set(DATA_ID_PADDLE_LEFT, left); + this.entityData.set(DATA_ID_PADDLE_RIGHT, right); } - public float getRowingTime(int i, float f) { - return this.getPaddleState(i) ? Mth.clampedLerp(this.paddlePositions[i] - (float) (Math.PI / 8), this.paddlePositions[i], f) : 0.0F; + public float getRowingTime(int side, float partialTick) { + return this.getPaddleState(side) ? Mth.clampedLerp(this.paddlePositions[side] - (float) (Math.PI / 8), this.paddlePositions[side], partialTick) : 0.0F; } @Nullable @@ -723,13 +723,13 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - this.writeLeashData(compound, this.leashData); + protected void addAdditionalSaveData(CompoundTag tag) { + this.writeLeashData(tag, this.leashData); } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - this.leashData = this.readLeashData(compound); + protected void readAdditionalSaveData(CompoundTag tag) { + this.leashData = this.readLeashData(tag); } @Override @@ -765,20 +765,20 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { } } - public boolean getPaddleState(int i) { - return this.entityData.get(i == 0 ? DATA_ID_PADDLE_LEFT : DATA_ID_PADDLE_RIGHT) && this.getControllingPassenger() != null; + public boolean getPaddleState(int side) { + return this.entityData.get(side == 0 ? DATA_ID_PADDLE_LEFT : DATA_ID_PADDLE_RIGHT) && this.getControllingPassenger() != null; } - private void setBubbleTime(int i) { - this.entityData.set(DATA_ID_BUBBLE_TIME, i); + private void setBubbleTime(int bubbleTime) { + this.entityData.set(DATA_ID_BUBBLE_TIME, bubbleTime); } private int getBubbleTime() { return this.entityData.get(DATA_ID_BUBBLE_TIME); } - public float getBubbleAngle(float f) { - return Mth.lerp(f, this.bubbleAngleO, this.bubbleAngle); + public float getBubbleAngle(float partialTick) { + return Mth.lerp(partialTick, this.bubbleAngleO, this.bubbleAngle); } @Override @@ -796,11 +796,11 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { return this.getFirstPassenger() instanceof LivingEntity livingEntity ? livingEntity : super.getControllingPassenger(); } - public void setInput(boolean bl, boolean bl2, boolean bl3, boolean bl4) { - this.inputLeft = bl; - this.inputRight = bl2; - this.inputUp = bl3; - this.inputDown = bl4; + public void setInput(boolean left, boolean right, boolean up, boolean down) { + this.inputLeft = left; + this.inputRight = right; + this.inputUp = up; + this.inputDown = down; } @Override diff --git a/net/minecraft/world/entity/vehicle/AbstractChestBoat.java b/net/minecraft/world/entity/vehicle/AbstractChestBoat.java index da0cca59..e85b03c9 100644 --- a/net/minecraft/world/entity/vehicle/AbstractChestBoat.java +++ b/net/minecraft/world/entity/vehicle/AbstractChestBoat.java @@ -33,8 +33,8 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto private ResourceKey lootTable; private long lootTableSeed; - public AbstractChestBoat(EntityType entityType, Level level, Supplier supplier) { - super(entityType, level, supplier); + public AbstractChestBoat(EntityType entityType, Level level, Supplier dropItem) { + super(entityType, level, dropItem); } @Override @@ -48,21 +48,21 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - this.addChestVehicleSaveData(compound, this.registryAccess()); + protected void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + this.addChestVehicleSaveData(tag, this.registryAccess()); } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.readChestVehicleSaveData(compound, this.registryAccess()); + protected void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.readChestVehicleSaveData(tag, this.registryAccess()); } @Override - public void destroy(ServerLevel serverLevel, DamageSource damageSource) { - this.destroy(serverLevel, this.getDropItem()); - this.chestVehicleDestroyed(damageSource, serverLevel, this); + public void destroy(ServerLevel level, DamageSource damageSource) { + this.destroy(level, this.getDropItem()); + this.chestVehicleDestroyed(damageSource, level, this); } @Override @@ -171,8 +171,8 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto } @Override - public void setContainerLootTable(@Nullable ResourceKey resourceKey) { - this.lootTable = resourceKey; + public void setContainerLootTable(@Nullable ResourceKey lootTable) { + this.lootTable = lootTable; } @Override @@ -181,8 +181,8 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto } @Override - public void setContainerLootTableSeed(long l) { - this.lootTableSeed = l; + public void setContainerLootTableSeed(long lootTableSeed) { + this.lootTableSeed = lootTableSeed; } @Override diff --git a/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/net/minecraft/world/entity/vehicle/AbstractMinecart.java index 3fb8c0fd..6c230d20 100644 --- a/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/net/minecraft/world/entity/vehicle/AbstractMinecart.java @@ -91,21 +91,21 @@ public abstract class AbstractMinecart extends VehicleEntity { this.setInitialPos(x, y, z); } - public void setInitialPos(double d, double e, double f) { - this.setPos(d, e, f); - this.xo = d; - this.yo = e; - this.zo = f; + public void setInitialPos(double x, double y, double z) { + this.setPos(x, y, z); + this.xo = x; + this.yo = y; + this.zo = z; } @Nullable public static T createMinecart( - Level level, double d, double e, double f, EntityType entityType, EntitySpawnReason entitySpawnReason, ItemStack itemStack, @Nullable Player player + Level level, double x, double y, double z, EntityType type, EntitySpawnReason spawnReason, ItemStack spawnedFrom, @Nullable Player player ) { - T abstractMinecart = (T)entityType.create(level, entitySpawnReason); + T abstractMinecart = (T)type.create(level, spawnReason); if (abstractMinecart != null) { - abstractMinecart.setInitialPos(d, e, f); - EntityType.createDefaultStackConfig(level, itemStack, player).accept(abstractMinecart); + abstractMinecart.setInitialPos(x, y, z); + EntityType.createDefaultStackConfig(level, spawnedFrom, player).accept(abstractMinecart); if (abstractMinecart.getBehavior() instanceof NewMinecartBehavior newMinecartBehavior) { BlockPos blockPos = abstractMinecart.getCurrentBlockPosOrRailBelow(); BlockState blockState = level.getBlockState(blockPos); @@ -279,8 +279,8 @@ public abstract class AbstractMinecart extends VehicleEntity { return new BlockPos(i, j, k); } - protected double getMaxSpeed(ServerLevel serverLevel) { - return this.behavior.getMaxSpeed(serverLevel); + protected double getMaxSpeed(ServerLevel level) { + return this.behavior.getMaxSpeed(level); } /** @@ -354,12 +354,12 @@ public abstract class AbstractMinecart extends VehicleEntity { this.behavior.lerpMotion(x, y, z); } - protected void moveAlongTrack(ServerLevel serverLevel) { - this.behavior.moveAlongTrack(serverLevel); + protected void moveAlongTrack(ServerLevel level) { + this.behavior.moveAlongTrack(level); } - protected void comeOffTrack(ServerLevel serverLevel) { - double d = this.getMaxSpeed(serverLevel); + protected void comeOffTrack(ServerLevel level) { + double d = this.getMaxSpeed(level); Vec3 vec3 = this.getDeltaMovement(); this.setDeltaMovement(Mth.clamp(vec3.x, -d, d), vec3.y, Mth.clamp(vec3.z, -d, d)); if (this.onGround()) { @@ -372,15 +372,15 @@ public abstract class AbstractMinecart extends VehicleEntity { } } - protected double makeStepAlongTrack(BlockPos blockPos, RailShape railShape, double d) { - return this.behavior.stepAlongTrack(blockPos, railShape, d); + protected double makeStepAlongTrack(BlockPos pos, RailShape railShape, double speed) { + return this.behavior.stepAlongTrack(pos, railShape, speed); } @Override - public void move(MoverType type, Vec3 pos) { + public void move(MoverType type, Vec3 movement) { if (useExperimentalMovement(this.level())) { - Vec3 vec3 = this.position().add(pos); - super.move(type, pos); + Vec3 vec3 = this.position().add(movement); + super.move(type, movement); boolean bl = this.behavior.pushAndPickupEntities(); if (bl) { super.move(type, vec3.subtract(this.position())); @@ -390,7 +390,7 @@ public abstract class AbstractMinecart extends VehicleEntity { this.onRails = false; } } else { - super.move(type, pos); + super.move(type, movement); this.applyEffectsFromBlocks(); } } @@ -409,36 +409,36 @@ public abstract class AbstractMinecart extends VehicleEntity { return this.onRails; } - public void setOnRails(boolean bl) { - this.onRails = bl; + public void setOnRails(boolean onRails) { + this.onRails = onRails; } public boolean isFlipped() { return this.flipped; } - public void setFlipped(boolean bl) { - this.flipped = bl; + public void setFlipped(boolean flipped) { + this.flipped = flipped; } - public Vec3 getRedstoneDirection(BlockPos blockPos) { - BlockState blockState = this.level().getBlockState(blockPos); + public Vec3 getRedstoneDirection(BlockPos pos) { + BlockState blockState = this.level().getBlockState(pos); if (blockState.is(Blocks.POWERED_RAIL) && (Boolean)blockState.getValue(PoweredRailBlock.POWERED)) { RailShape railShape = blockState.getValue(((BaseRailBlock)blockState.getBlock()).getShapeProperty()); if (railShape == RailShape.EAST_WEST) { - if (this.isRedstoneConductor(blockPos.west())) { + if (this.isRedstoneConductor(pos.west())) { return new Vec3(1.0, 0.0, 0.0); } - if (this.isRedstoneConductor(blockPos.east())) { + if (this.isRedstoneConductor(pos.east())) { return new Vec3(-1.0, 0.0, 0.0); } } else if (railShape == RailShape.NORTH_SOUTH) { - if (this.isRedstoneConductor(blockPos.north())) { + if (this.isRedstoneConductor(pos.north())) { return new Vec3(0.0, 0.0, 1.0); } - if (this.isRedstoneConductor(blockPos.south())) { + if (this.isRedstoneConductor(pos.south())) { return new Vec3(0.0, 0.0, -1.0); } } @@ -453,37 +453,37 @@ public abstract class AbstractMinecart extends VehicleEntity { return this.level().getBlockState(pos).isRedstoneConductor(this.level(), pos); } - protected Vec3 applyNaturalSlowdown(Vec3 vec3) { + protected Vec3 applyNaturalSlowdown(Vec3 speed) { double d = this.behavior.getSlowdownFactor(); - Vec3 vec32 = vec3.multiply(d, 0.0, d); + Vec3 vec3 = speed.multiply(d, 0.0, d); if (this.isInWater()) { - vec32 = vec32.scale(0.95F); + vec3 = vec3.scale(0.95F); } - return vec32; + return vec3; } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - if (compound.getBoolean("CustomDisplayTile")) { - this.setDisplayBlockState(NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), compound.getCompound("DisplayState"))); - this.setDisplayOffset(compound.getInt("DisplayOffset")); + protected void readAdditionalSaveData(CompoundTag tag) { + if (tag.getBoolean("CustomDisplayTile")) { + this.setDisplayBlockState(NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), tag.getCompound("DisplayState"))); + this.setDisplayOffset(tag.getInt("DisplayOffset")); } - this.flipped = compound.getBoolean("FlippedRotation"); - this.firstTick = compound.getBoolean("HasTicked"); + this.flipped = tag.getBoolean("FlippedRotation"); + this.firstTick = tag.getBoolean("HasTicked"); } @Override - protected void addAdditionalSaveData(CompoundTag compound) { + protected void addAdditionalSaveData(CompoundTag tag) { if (this.hasCustomDisplay()) { - compound.putBoolean("CustomDisplayTile", true); - compound.put("DisplayState", NbtUtils.writeBlockState(this.getDisplayBlockState())); - compound.putInt("DisplayOffset", this.getDisplayOffset()); + tag.putBoolean("CustomDisplayTile", true); + tag.put("DisplayState", NbtUtils.writeBlockState(this.getDisplayBlockState())); + tag.putInt("DisplayOffset", this.getDisplayOffset()); } - compound.putBoolean("FlippedRotation", this.flipped); - compound.putBoolean("HasTicked", this.firstTick); + tag.putBoolean("FlippedRotation", this.flipped); + tag.putBoolean("HasTicked", this.firstTick); } @Override @@ -521,38 +521,38 @@ public abstract class AbstractMinecart extends VehicleEntity { } } - private void pushOtherMinecart(AbstractMinecart abstractMinecart, double d, double e) { - double f; - double g; + private void pushOtherMinecart(AbstractMinecart otherMinecart, double deltaX, double deltaZ) { + double d; + double e; if (useExperimentalMovement(this.level())) { - f = this.getDeltaMovement().x; - g = this.getDeltaMovement().z; + d = this.getDeltaMovement().x; + e = this.getDeltaMovement().z; } else { - f = abstractMinecart.getX() - this.getX(); - g = abstractMinecart.getZ() - this.getZ(); + d = otherMinecart.getX() - this.getX(); + e = otherMinecart.getZ() - this.getZ(); } - Vec3 vec3 = new Vec3(f, 0.0, g).normalize(); + Vec3 vec3 = new Vec3(d, 0.0, e).normalize(); Vec3 vec32 = new Vec3(Mth.cos(this.getYRot() * (float) (Math.PI / 180.0)), 0.0, Mth.sin(this.getYRot() * (float) (Math.PI / 180.0))).normalize(); - double h = Math.abs(vec3.dot(vec32)); - if (!(h < 0.8F) || useExperimentalMovement(this.level())) { + double f = Math.abs(vec3.dot(vec32)); + if (!(f < 0.8F) || useExperimentalMovement(this.level())) { Vec3 vec33 = this.getDeltaMovement(); - Vec3 vec34 = abstractMinecart.getDeltaMovement(); - if (abstractMinecart.isFurnace() && !this.isFurnace()) { + Vec3 vec34 = otherMinecart.getDeltaMovement(); + if (otherMinecart.isFurnace() && !this.isFurnace()) { this.setDeltaMovement(vec33.multiply(0.2, 1.0, 0.2)); - this.push(vec34.x - d, 0.0, vec34.z - e); - abstractMinecart.setDeltaMovement(vec34.multiply(0.95, 1.0, 0.95)); - } else if (!abstractMinecart.isFurnace() && this.isFurnace()) { - abstractMinecart.setDeltaMovement(vec34.multiply(0.2, 1.0, 0.2)); - abstractMinecart.push(vec33.x + d, 0.0, vec33.z + e); + this.push(vec34.x - deltaX, 0.0, vec34.z - deltaZ); + otherMinecart.setDeltaMovement(vec34.multiply(0.95, 1.0, 0.95)); + } else if (!otherMinecart.isFurnace() && this.isFurnace()) { + otherMinecart.setDeltaMovement(vec34.multiply(0.2, 1.0, 0.2)); + otherMinecart.push(vec33.x + deltaX, 0.0, vec33.z + deltaZ); this.setDeltaMovement(vec33.multiply(0.95, 1.0, 0.95)); } else { - double i = (vec34.x + vec33.x) / 2.0; - double j = (vec34.z + vec33.z) / 2.0; + double g = (vec34.x + vec33.x) / 2.0; + double h = (vec34.z + vec33.z) / 2.0; this.setDeltaMovement(vec33.multiply(0.2, 1.0, 0.2)); - this.push(i - d, 0.0, j - e); - abstractMinecart.setDeltaMovement(vec34.multiply(0.2, 1.0, 0.2)); - abstractMinecart.push(i + d, 0.0, j + e); + this.push(g - deltaX, 0.0, h - deltaZ); + otherMinecart.setDeltaMovement(vec34.multiply(0.2, 1.0, 0.2)); + otherMinecart.push(g + deltaX, 0.0, h + deltaZ); } } } diff --git a/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java index a2750c2c..95488d26 100644 --- a/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java +++ b/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java @@ -31,9 +31,9 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme } @Override - public void destroy(ServerLevel serverLevel, DamageSource damageSource) { - super.destroy(serverLevel, damageSource); - this.chestVehicleDestroyed(damageSource, serverLevel, this); + public void destroy(ServerLevel level, DamageSource damageSource) { + super.destroy(level, damageSource); + this.chestVehicleDestroyed(damageSource, level, this); } @Override @@ -80,15 +80,15 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - this.addChestVehicleSaveData(compound, this.registryAccess()); + protected void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + this.addChestVehicleSaveData(tag, this.registryAccess()); } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.readChestVehicleSaveData(compound, this.registryAccess()); + protected void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.readChestVehicleSaveData(tag, this.registryAccess()); } @Override @@ -97,7 +97,7 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme } @Override - protected Vec3 applyNaturalSlowdown(Vec3 vec3) { + protected Vec3 applyNaturalSlowdown(Vec3 speed) { float f = 0.98F; if (this.lootTable == null) { int i = 15 - AbstractContainerMenu.getRedstoneSignalFromContainer(this); @@ -108,7 +108,7 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme f *= 0.95F; } - return vec3.multiply(f, 0.0, f); + return speed.multiply(f, 0.0, f); } @Override @@ -141,8 +141,8 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme } @Override - public void setContainerLootTable(@Nullable ResourceKey resourceKey) { - this.lootTable = resourceKey; + public void setContainerLootTable(@Nullable ResourceKey lootTable) { + this.lootTable = lootTable; } @Override @@ -151,8 +151,8 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme } @Override - public void setContainerLootTableSeed(long l) { - this.lootTableSeed = l; + public void setContainerLootTableSeed(long lootTableSeed) { + this.lootTableSeed = lootTableSeed; } @Override diff --git a/net/minecraft/world/entity/vehicle/Boat.java b/net/minecraft/world/entity/vehicle/Boat.java index ce1cbb46..366cd6a6 100644 --- a/net/minecraft/world/entity/vehicle/Boat.java +++ b/net/minecraft/world/entity/vehicle/Boat.java @@ -12,7 +12,7 @@ public class Boat extends AbstractBoat { } @Override - protected double rideHeight(EntityDimensions entityDimensions) { - return entityDimensions.height() / 3.0F; + protected double rideHeight(EntityDimensions dimensions) { + return dimensions.height() / 3.0F; } } diff --git a/net/minecraft/world/entity/vehicle/ChestBoat.java b/net/minecraft/world/entity/vehicle/ChestBoat.java index 344d79a2..ca5cf1d9 100644 --- a/net/minecraft/world/entity/vehicle/ChestBoat.java +++ b/net/minecraft/world/entity/vehicle/ChestBoat.java @@ -12,7 +12,7 @@ public class ChestBoat extends AbstractChestBoat { } @Override - protected double rideHeight(EntityDimensions entityDimensions) { - return entityDimensions.height() / 3.0F; + protected double rideHeight(EntityDimensions dimensions) { + return dimensions.height() / 3.0F; } } diff --git a/net/minecraft/world/entity/vehicle/ChestRaft.java b/net/minecraft/world/entity/vehicle/ChestRaft.java index d7f40eb8..bfcc3032 100644 --- a/net/minecraft/world/entity/vehicle/ChestRaft.java +++ b/net/minecraft/world/entity/vehicle/ChestRaft.java @@ -12,7 +12,7 @@ public class ChestRaft extends AbstractChestBoat { } @Override - protected double rideHeight(EntityDimensions entityDimensions) { - return entityDimensions.height() * 0.8888889F; + protected double rideHeight(EntityDimensions dimensions) { + return dimensions.height() * 0.8888889F; } } diff --git a/net/minecraft/world/entity/vehicle/ContainerEntity.java b/net/minecraft/world/entity/vehicle/ContainerEntity.java index 1b31b507..be6e9a06 100644 --- a/net/minecraft/world/entity/vehicle/ContainerEntity.java +++ b/net/minecraft/world/entity/vehicle/ContainerEntity.java @@ -40,11 +40,11 @@ public interface ContainerEntity extends Container, MenuProvider { @Nullable ResourceKey getContainerLootTable(); - void setContainerLootTable(@Nullable ResourceKey resourceKey); + void setContainerLootTable(@Nullable ResourceKey lootTable); long getContainerLootTableSeed(); - void setContainerLootTableSeed(long l); + void setContainerLootTableSeed(long lootTableSeed); NonNullList getItemStacks(); @@ -80,12 +80,12 @@ public interface ContainerEntity extends Container, MenuProvider { } } - default void chestVehicleDestroyed(DamageSource damageSource, ServerLevel serverLevel, Entity entity) { - if (serverLevel.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { - Containers.dropContents(serverLevel, entity, this); + default void chestVehicleDestroyed(DamageSource damageSource, ServerLevel level, Entity entity) { + if (level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { + Containers.dropContents(level, entity, this); Entity entity2 = damageSource.getDirectEntity(); if (entity2 != null && entity2.getType() == EntityType.PLAYER) { - PiglinAi.angerNearbyPiglins(serverLevel, (Player)entity2, true); + PiglinAi.angerNearbyPiglins(level, (Player)entity2, true); } } } diff --git a/net/minecraft/world/entity/vehicle/MinecartBehavior.java b/net/minecraft/world/entity/vehicle/MinecartBehavior.java index 4c30f82f..f7deb18d 100644 --- a/net/minecraft/world/entity/vehicle/MinecartBehavior.java +++ b/net/minecraft/world/entity/vehicle/MinecartBehavior.java @@ -10,17 +10,17 @@ import net.minecraft.world.phys.Vec3; public abstract class MinecartBehavior { protected final AbstractMinecart minecart; - protected MinecartBehavior(AbstractMinecart abstractMinecart) { - this.minecart = abstractMinecart; + protected MinecartBehavior(AbstractMinecart minecart) { + this.minecart = minecart; } public void cancelLerp() { } - public void lerpTo(double d, double e, double f, float g, float h, int i) { - this.setPos(d, e, f); - this.setYRot(g % 360.0F); - this.setXRot(h % 360.0F); + public void lerpTo(double x, double y, double z, float yRot, float xRot, int steps) { + this.setPos(x, y, z); + this.setYRot(yRot % 360.0F); + this.setXRot(xRot % 360.0F); } public double lerpTargetX() { @@ -43,8 +43,8 @@ public abstract class MinecartBehavior { return this.getYRot(); } - public void lerpMotion(double d, double e, double f) { - this.setDeltaMovement(d, e, f); + public void lerpMotion(double x, double y, double z) { + this.setDeltaMovement(x, y, z); } public abstract void tick(); @@ -53,9 +53,9 @@ public abstract class MinecartBehavior { return this.minecart.level(); } - public abstract void moveAlongTrack(ServerLevel serverLevel); + public abstract void moveAlongTrack(ServerLevel level); - public abstract double stepAlongTrack(BlockPos blockPos, RailShape railShape, double d); + public abstract double stepAlongTrack(BlockPos pos, RailShape railShape, double speed); public abstract boolean pushAndPickupEntities(); @@ -63,12 +63,12 @@ public abstract class MinecartBehavior { return this.minecart.getDeltaMovement(); } - public void setDeltaMovement(Vec3 vec3) { - this.minecart.setDeltaMovement(vec3); + public void setDeltaMovement(Vec3 deltaMovement) { + this.minecart.setDeltaMovement(deltaMovement); } - public void setDeltaMovement(double d, double e, double f) { - this.minecart.setDeltaMovement(d, e, f); + public void setDeltaMovement(double x, double y, double z) { + this.minecart.setDeltaMovement(x, y, z); } public Vec3 position() { @@ -87,39 +87,39 @@ public abstract class MinecartBehavior { return this.minecart.getZ(); } - public void setPos(Vec3 vec3) { - this.minecart.setPos(vec3); + public void setPos(Vec3 pos) { + this.minecart.setPos(pos); } - public void setPos(double d, double e, double f) { - this.minecart.setPos(d, e, f); + public void setPos(double x, double y, double z) { + this.minecart.setPos(x, y, z); } public float getXRot() { return this.minecart.getXRot(); } - public void setXRot(float f) { - this.minecart.setXRot(f); + public void setXRot(float xRot) { + this.minecart.setXRot(xRot); } public float getYRot() { return this.minecart.getYRot(); } - public void setYRot(float f) { - this.minecart.setYRot(f); + public void setYRot(float yRot) { + this.minecart.setYRot(yRot); } public Direction getMotionDirection() { return this.minecart.getDirection(); } - public Vec3 getKnownMovement(Vec3 vec3) { - return vec3; + public Vec3 getKnownMovement(Vec3 movement) { + return movement; } - public abstract double getMaxSpeed(ServerLevel serverLevel); + public abstract double getMaxSpeed(ServerLevel level); public abstract double getSlowdownFactor(); } diff --git a/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java b/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java index c51ce05a..f8995570 100644 --- a/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java +++ b/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java @@ -54,17 +54,17 @@ public class MinecartCommandBlock extends AbstractMinecart { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.commandBlock.load(compound, this.registryAccess()); + protected void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.commandBlock.load(tag, this.registryAccess()); this.getEntityData().set(DATA_ID_COMMAND_NAME, this.getCommandBlock().getCommand()); this.getEntityData().set(DATA_ID_LAST_OUTPUT, this.getCommandBlock().getLastOutput()); } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - this.commandBlock.save(compound, this.registryAccess()); + protected void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + this.commandBlock.save(tag, this.registryAccess()); } @Override diff --git a/net/minecraft/world/entity/vehicle/MinecartFurnace.java b/net/minecraft/world/entity/vehicle/MinecartFurnace.java index eb01e1c8..087c1e04 100644 --- a/net/minecraft/world/entity/vehicle/MinecartFurnace.java +++ b/net/minecraft/world/entity/vehicle/MinecartFurnace.java @@ -65,8 +65,8 @@ public class MinecartFurnace extends AbstractMinecart { } @Override - protected double getMaxSpeed(ServerLevel serverLevel) { - return this.isInWater() ? super.getMaxSpeed(serverLevel) * 0.75 : super.getMaxSpeed(serverLevel) * 0.5; + protected double getMaxSpeed(ServerLevel level) { + return this.isInWater() ? super.getMaxSpeed(level) * 0.75 : super.getMaxSpeed(level) * 0.5; } @Override @@ -80,26 +80,26 @@ public class MinecartFurnace extends AbstractMinecart { } @Override - protected Vec3 applyNaturalSlowdown(Vec3 vec3) { - Vec3 vec32; + protected Vec3 applyNaturalSlowdown(Vec3 speed) { + Vec3 vec3; if (this.push.lengthSqr() > 1.0E-7) { - this.push = this.calculateNewPushAlong(vec3); - vec32 = vec3.multiply(0.8, 0.0, 0.8).add(this.push); + this.push = this.calculateNewPushAlong(speed); + vec3 = speed.multiply(0.8, 0.0, 0.8).add(this.push); if (this.isInWater()) { - vec32 = vec32.scale(0.1); + vec3 = vec3.scale(0.1); } } else { - vec32 = vec3.multiply(0.98, 0.0, 0.98); + vec3 = speed.multiply(0.98, 0.0, 0.98); } - return super.applyNaturalSlowdown(vec32); + return super.applyNaturalSlowdown(vec3); } - private Vec3 calculateNewPushAlong(Vec3 vec3) { + private Vec3 calculateNewPushAlong(Vec3 speed) { double d = 1.0E-4; double e = 0.001; - return this.push.horizontalDistanceSqr() > 1.0E-4 && vec3.horizontalDistanceSqr() > 0.001 - ? this.push.projectedOn(vec3).normalize().scale(this.push.length()) + return this.push.horizontalDistanceSqr() > 1.0E-4 && speed.horizontalDistanceSqr() > 0.001 + ? this.push.projectedOn(speed).normalize().scale(this.push.length()) : this.push; } @@ -119,20 +119,20 @@ public class MinecartFurnace extends AbstractMinecart { } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putDouble("PushX", this.push.x); - compound.putDouble("PushZ", this.push.z); - compound.putShort("Fuel", (short)this.fuel); + protected void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putDouble("PushX", this.push.x); + tag.putDouble("PushZ", this.push.z); + tag.putShort("Fuel", (short)this.fuel); } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - double d = compound.getDouble("PushX"); - double e = compound.getDouble("PushZ"); + protected void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + double d = tag.getDouble("PushX"); + double e = tag.getDouble("PushZ"); this.push = new Vec3(d, 0.0, e); - this.fuel = compound.getShort("Fuel"); + this.fuel = tag.getShort("Fuel"); } protected boolean hasFuel() { diff --git a/net/minecraft/world/entity/vehicle/MinecartHopper.java b/net/minecraft/world/entity/vehicle/MinecartHopper.java index 6b6096cc..806cca0b 100644 --- a/net/minecraft/world/entity/vehicle/MinecartHopper.java +++ b/net/minecraft/world/entity/vehicle/MinecartHopper.java @@ -91,10 +91,10 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper } @Override - protected double makeStepAlongTrack(BlockPos blockPos, RailShape railShape, double d) { - double e = super.makeStepAlongTrack(blockPos, railShape, d); + protected double makeStepAlongTrack(BlockPos pos, RailShape railShape, double speed) { + double d = super.makeStepAlongTrack(pos, railShape, speed); this.tryConsumeItems(); - return e; + return d; } private void tryConsumeItems() { @@ -130,15 +130,15 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("Enabled", this.enabled); + protected void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("Enabled", this.enabled); } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.enabled = compound.contains("Enabled") ? compound.getBoolean("Enabled") : true; + protected void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.enabled = tag.contains("Enabled") ? tag.getBoolean("Enabled") : true; } @Override diff --git a/net/minecraft/world/entity/vehicle/MinecartSpawner.java b/net/minecraft/world/entity/vehicle/MinecartSpawner.java index 381c5d76..bb53c0e5 100644 --- a/net/minecraft/world/entity/vehicle/MinecartSpawner.java +++ b/net/minecraft/world/entity/vehicle/MinecartSpawner.java @@ -48,15 +48,15 @@ public class MinecartSpawner extends AbstractMinecart { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.spawner.load(this.level(), this.blockPosition(), compound); + protected void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.spawner.load(this.level(), this.blockPosition(), tag); } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - this.spawner.save(compound); + protected void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + this.spawner.save(tag); } @Override diff --git a/net/minecraft/world/entity/vehicle/MinecartTNT.java b/net/minecraft/world/entity/vehicle/MinecartTNT.java index c6d2cc04..7e04e4cd 100644 --- a/net/minecraft/world/entity/vehicle/MinecartTNT.java +++ b/net/minecraft/world/entity/vehicle/MinecartTNT.java @@ -58,20 +58,20 @@ public class MinecartTNT extends AbstractMinecart { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (damageSource.getDirectEntity() instanceof AbstractArrow abstractArrow && abstractArrow.isOnFire()) { DamageSource damageSource2 = this.damageSources().explosion(this, damageSource.getEntity()); this.explode(damageSource2, abstractArrow.getDeltaMovement().lengthSqr()); } - return super.hurtServer(serverLevel, damageSource, f); + return super.hurtServer(level, damageSource, amount); } @Override - public void destroy(ServerLevel serverLevel, DamageSource damageSource) { + public void destroy(ServerLevel level, DamageSource damageSource) { double d = this.getDeltaMovement().horizontalDistanceSqr(); if (!damageSourceIgnitesTnt(damageSource) && !(d >= 0.01F)) { - this.destroy(serverLevel, this.getDropItem()); + this.destroy(level, this.getDropItem()); } else { if (this.fuse < 0) { this.primeFuse(); @@ -185,23 +185,23 @@ public class MinecartTNT extends AbstractMinecart { } @Override - protected void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - if (compound.contains("TNTFuse", 99)) { - this.fuse = compound.getInt("TNTFuse"); + protected void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + if (tag.contains("TNTFuse", 99)) { + this.fuse = tag.getInt("TNTFuse"); } - if (compound.contains("explosion_power", 99)) { - this.explosionPowerBase = Mth.clamp(compound.getFloat("explosion_power"), 0.0F, 128.0F); + if (tag.contains("explosion_power", 99)) { + this.explosionPowerBase = Mth.clamp(tag.getFloat("explosion_power"), 0.0F, 128.0F); } } @Override - protected void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("TNTFuse", this.fuse); + protected void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("TNTFuse", this.fuse); if (this.explosionPowerBase != 4.0F) { - compound.putFloat("explosion_power", this.explosionPowerBase); + tag.putFloat("explosion_power", this.explosionPowerBase); } } diff --git a/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java b/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java index 80223bca..002b74aa 100644 --- a/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java +++ b/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java @@ -40,8 +40,8 @@ public class NewMinecartBehavior extends MinecartBehavior { public double currentLerpStepsTotalWeight = 0.0; public NewMinecartBehavior.MinecartStep oldLerp = NewMinecartBehavior.MinecartStep.ZERO; - public NewMinecartBehavior(AbstractMinecart abstractMinecart) { - super(abstractMinecart); + public NewMinecartBehavior(AbstractMinecart minecart) { + super(minecart); } @Override @@ -96,43 +96,43 @@ public class NewMinecartBehavior extends MinecartBehavior { return !this.currentLerpSteps.isEmpty(); } - public float getCartLerpXRot(float f) { - NewMinecartBehavior.StepPartialTicks stepPartialTicks = this.getCurrentLerpStep(f); + public float getCartLerpXRot(float partialTick) { + NewMinecartBehavior.StepPartialTicks stepPartialTicks = this.getCurrentLerpStep(partialTick); return Mth.rotLerp(stepPartialTicks.partialTicksInStep, stepPartialTicks.previousStep.xRot, stepPartialTicks.currentStep.xRot); } - public float getCartLerpYRot(float f) { - NewMinecartBehavior.StepPartialTicks stepPartialTicks = this.getCurrentLerpStep(f); + public float getCartLerpYRot(float partialTick) { + NewMinecartBehavior.StepPartialTicks stepPartialTicks = this.getCurrentLerpStep(partialTick); return Mth.rotLerp(stepPartialTicks.partialTicksInStep, stepPartialTicks.previousStep.yRot, stepPartialTicks.currentStep.yRot); } - public Vec3 getCartLerpPosition(float f) { - NewMinecartBehavior.StepPartialTicks stepPartialTicks = this.getCurrentLerpStep(f); + public Vec3 getCartLerpPosition(float partialTick) { + NewMinecartBehavior.StepPartialTicks stepPartialTicks = this.getCurrentLerpStep(partialTick); return Mth.lerp(stepPartialTicks.partialTicksInStep, stepPartialTicks.previousStep.position, stepPartialTicks.currentStep.position); } - public Vec3 getCartLerpMovements(float f) { - NewMinecartBehavior.StepPartialTicks stepPartialTicks = this.getCurrentLerpStep(f); + public Vec3 getCartLerpMovements(float partialTick) { + NewMinecartBehavior.StepPartialTicks stepPartialTicks = this.getCurrentLerpStep(partialTick); return Mth.lerp(stepPartialTicks.partialTicksInStep, stepPartialTicks.previousStep.movement, stepPartialTicks.currentStep.movement); } - private NewMinecartBehavior.StepPartialTicks getCurrentLerpStep(float f) { - if (f == this.cachedPartialTick && this.lerpDelay == this.cachedLerpDelay && this.cacheIndexAlpha != null) { + private NewMinecartBehavior.StepPartialTicks getCurrentLerpStep(float partialTick) { + if (partialTick == this.cachedPartialTick && this.lerpDelay == this.cachedLerpDelay && this.cacheIndexAlpha != null) { return this.cacheIndexAlpha; } else { - float g = (3 - this.lerpDelay + f) / 3.0F; - float h = 0.0F; - float i = 1.0F; + float f = (3 - this.lerpDelay + partialTick) / 3.0F; + float g = 0.0F; + float h = 1.0F; boolean bl = false; - int j; - for (j = 0; j < this.currentLerpSteps.size(); j++) { - float k = ((NewMinecartBehavior.MinecartStep)this.currentLerpSteps.get(j)).weight; - if (!(k <= 0.0F)) { - h += k; - if (h >= this.currentLerpStepsTotalWeight * g) { - float l = h - k; - i = (float)((g * this.currentLerpStepsTotalWeight - l) / k); + int i; + for (i = 0; i < this.currentLerpSteps.size(); i++) { + float j = ((NewMinecartBehavior.MinecartStep)this.currentLerpSteps.get(i)).weight; + if (!(j <= 0.0F)) { + g += j; + if (g >= this.currentLerpStepsTotalWeight * f) { + float k = g - j; + h = (float)((f * this.currentLerpStepsTotalWeight - k) / j); bl = true; break; } @@ -140,21 +140,21 @@ public class NewMinecartBehavior extends MinecartBehavior { } if (!bl) { - j = this.currentLerpSteps.size() - 1; + i = this.currentLerpSteps.size() - 1; } - NewMinecartBehavior.MinecartStep minecartStep = (NewMinecartBehavior.MinecartStep)this.currentLerpSteps.get(j); - NewMinecartBehavior.MinecartStep minecartStep2 = j > 0 ? (NewMinecartBehavior.MinecartStep)this.currentLerpSteps.get(j - 1) : this.oldLerp; - this.cacheIndexAlpha = new NewMinecartBehavior.StepPartialTicks(i, minecartStep, minecartStep2); + NewMinecartBehavior.MinecartStep minecartStep = (NewMinecartBehavior.MinecartStep)this.currentLerpSteps.get(i); + NewMinecartBehavior.MinecartStep minecartStep2 = i > 0 ? (NewMinecartBehavior.MinecartStep)this.currentLerpSteps.get(i - 1) : this.oldLerp; + this.cacheIndexAlpha = new NewMinecartBehavior.StepPartialTicks(h, minecartStep, minecartStep2); this.cachedLerpDelay = this.lerpDelay; - this.cachedPartialTick = f; + this.cachedPartialTick = partialTick; return this.cacheIndexAlpha; } } - public void adjustToRails(BlockPos blockPos, BlockState blockState, boolean bl) { - if (BaseRailBlock.isRail(blockState)) { - RailShape railShape = blockState.getValue(((BaseRailBlock)blockState.getBlock()).getShapeProperty()); + public void adjustToRails(BlockPos pos, BlockState state, boolean snapToStart) { + if (BaseRailBlock.isRail(state)) { + RailShape railShape = state.getValue(((BaseRailBlock)state.getBlock()).getShapeProperty()); Pair pair = AbstractMinecart.exits(railShape); Vec3 vec3 = new Vec3(pair.getFirst()).scale(0.5); Vec3 vec32 = new Vec3(pair.getSecond()).scale(0.5); @@ -170,27 +170,27 @@ public class NewMinecartBehavior extends MinecartBehavior { float f = 180.0F - (float)(Math.atan2(vec33.z, vec33.x) * 180.0 / Math.PI); f += this.minecart.isFlipped() ? 180.0F : 0.0F; Vec3 vec36 = this.position(); - boolean bl2 = vec3.x() != vec32.x() && vec3.z() != vec32.z(); + boolean bl = vec3.x() != vec32.x() && vec3.z() != vec32.z(); Vec3 vec310; - if (bl2) { + if (bl) { Vec3 vec37 = vec32.subtract(vec3); - Vec3 vec38 = vec36.subtract(blockPos.getBottomCenter()).subtract(vec3); + Vec3 vec38 = vec36.subtract(pos.getBottomCenter()).subtract(vec3); Vec3 vec39 = vec37.scale(vec37.dot(vec38) / vec37.dot(vec37)); - vec310 = blockPos.getBottomCenter().add(vec3).add(vec39); + vec310 = pos.getBottomCenter().add(vec3).add(vec39); f = 180.0F - (float)(Math.atan2(vec39.z, vec39.x) * 180.0 / Math.PI); f += this.minecart.isFlipped() ? 180.0F : 0.0F; } else { - boolean bl3 = vec3.subtract(vec32).x != 0.0; - boolean bl4 = vec3.subtract(vec32).z != 0.0; - vec310 = new Vec3(bl4 ? blockPos.getCenter().x : vec36.x, blockPos.getY(), bl3 ? blockPos.getCenter().z : vec36.z); + boolean bl2 = vec3.subtract(vec32).x != 0.0; + boolean bl3 = vec3.subtract(vec32).z != 0.0; + vec310 = new Vec3(bl3 ? pos.getCenter().x : vec36.x, pos.getY(), bl2 ? pos.getCenter().z : vec36.z); } Vec3 vec37 = vec310.subtract(vec36); this.setPos(vec36.add(vec37)); float g = 0.0F; - boolean bl5 = vec3.y() != vec32.y(); - if (bl5) { - Vec3 vec311 = blockPos.getBottomCenter().add(vec34); + boolean bl4 = vec3.y() != vec32.y(); + if (bl4) { + Vec3 vec311 = pos.getBottomCenter().add(vec34); double d = vec311.distanceTo(this.position()); this.setPos(this.position().add(0.0, d + 0.1, 0.0)); g = this.minecart.isFlipped() ? 45.0F : -45.0F; @@ -201,26 +201,27 @@ public class NewMinecartBehavior extends MinecartBehavior { this.setRotation(f, g); double e = vec36.distanceTo(this.position()); if (e > 0.0) { - this.lerpSteps.add(new NewMinecartBehavior.MinecartStep(this.position(), this.getDeltaMovement(), this.getYRot(), this.getXRot(), bl ? 0.0F : (float)e)); + this.lerpSteps + .add(new NewMinecartBehavior.MinecartStep(this.position(), this.getDeltaMovement(), this.getYRot(), this.getXRot(), snapToStart ? 0.0F : (float)e)); } } } - private void setRotation(float f, float g) { - double d = Math.abs(f - this.getYRot()); + private void setRotation(float yRot, float xRot) { + double d = Math.abs(yRot - this.getYRot()); if (d >= 175.0 && d <= 185.0) { this.minecart.setFlipped(!this.minecart.isFlipped()); - f -= 180.0F; - g *= -1.0F; + yRot -= 180.0F; + xRot *= -1.0F; } - g = Math.clamp(g, -45.0F, 45.0F); - this.setXRot(g % 360.0F); - this.setYRot(f % 360.0F); + xRot = Math.clamp(xRot, -45.0F, 45.0F); + this.setXRot(xRot % 360.0F); + this.setYRot(yRot % 360.0F); } @Override - public void moveAlongTrack(ServerLevel serverLevel) { + public void moveAlongTrack(ServerLevel level) { for (NewMinecartBehavior.TrackIteration trackIteration = new NewMinecartBehavior.TrackIteration(); trackIteration.shouldIterate() && this.minecart.isAlive(); trackIteration.firstIteration = false @@ -242,7 +243,7 @@ public class NewMinecartBehavior extends MinecartBehavior { } RailShape railShape = blockState.getValue(((BaseRailBlock)blockState.getBlock()).getShapeProperty()); - Vec3 vec32 = this.calculateTrackSpeed(serverLevel, vec3.horizontal(), trackIteration, blockPos, blockState, railShape); + Vec3 vec32 = this.calculateTrackSpeed(level, vec3.horizontal(), trackIteration, blockPos, blockState, railShape); if (trackIteration.firstIteration) { trackIteration.movementLeft = vec32.horizontalDistance(); } else { @@ -252,7 +253,7 @@ public class NewMinecartBehavior extends MinecartBehavior { this.setDeltaMovement(vec32); trackIteration.movementLeft = this.minecart.makeStepAlongTrack(blockPos, railShape, trackIteration.movementLeft); } else { - this.minecart.comeOffTrack(serverLevel); + this.minecart.comeOffTrack(level); trackIteration.movementLeft = 0.0; } @@ -275,9 +276,7 @@ public class NewMinecartBehavior extends MinecartBehavior { } this.lerpSteps - .add( - new NewMinecartBehavior.MinecartStep(vec33, this.getDeltaMovement(), this.getYRot(), this.getXRot(), (float)Math.min(d, this.getMaxSpeed(serverLevel))) - ); + .add(new NewMinecartBehavior.MinecartStep(vec33, this.getDeltaMovement(), this.getYRot(), this.getXRot(), (float)Math.min(d, this.getMaxSpeed(level)))); } else if (vec3.horizontalDistanceSqr() > 0.0) { this.lerpSteps.add(new NewMinecartBehavior.MinecartStep(vec33, this.getDeltaMovement(), this.getYRot(), this.getXRot(), 1.0F)); } @@ -290,107 +289,107 @@ public class NewMinecartBehavior extends MinecartBehavior { } private Vec3 calculateTrackSpeed( - ServerLevel serverLevel, Vec3 vec3, NewMinecartBehavior.TrackIteration trackIteration, BlockPos blockPos, BlockState blockState, RailShape railShape + ServerLevel level, Vec3 speed, NewMinecartBehavior.TrackIteration trackIteration, BlockPos pos, BlockState state, RailShape railShape ) { - Vec3 vec32 = vec3; + Vec3 vec3 = speed; if (!trackIteration.hasGainedSlopeSpeed) { - Vec3 vec33 = this.calculateSlopeSpeed(vec3, railShape); - if (vec33.horizontalDistanceSqr() != vec3.horizontalDistanceSqr()) { + Vec3 vec32 = this.calculateSlopeSpeed(speed, railShape); + if (vec32.horizontalDistanceSqr() != speed.horizontalDistanceSqr()) { trackIteration.hasGainedSlopeSpeed = true; - vec32 = vec33; + vec3 = vec32; } } if (trackIteration.firstIteration) { - Vec3 vec33 = this.calculatePlayerInputSpeed(vec32); - if (vec33.horizontalDistanceSqr() != vec32.horizontalDistanceSqr()) { + Vec3 vec32 = this.calculatePlayerInputSpeed(vec3); + if (vec32.horizontalDistanceSqr() != vec3.horizontalDistanceSqr()) { trackIteration.hasHalted = true; - vec32 = vec33; + vec3 = vec32; } } if (!trackIteration.hasHalted) { - Vec3 vec33 = this.calculateHaltTrackSpeed(vec32, blockState); - if (vec33.horizontalDistanceSqr() != vec32.horizontalDistanceSqr()) { + Vec3 vec32 = this.calculateHaltTrackSpeed(vec3, state); + if (vec32.horizontalDistanceSqr() != vec3.horizontalDistanceSqr()) { trackIteration.hasHalted = true; - vec32 = vec33; + vec3 = vec32; } } if (trackIteration.firstIteration) { - vec32 = this.minecart.applyNaturalSlowdown(vec32); - if (vec32.lengthSqr() > 0.0) { - double d = Math.min(vec32.length(), this.minecart.getMaxSpeed(serverLevel)); - vec32 = vec32.normalize().scale(d); + vec3 = this.minecart.applyNaturalSlowdown(vec3); + if (vec3.lengthSqr() > 0.0) { + double d = Math.min(vec3.length(), this.minecart.getMaxSpeed(level)); + vec3 = vec3.normalize().scale(d); } } if (!trackIteration.hasBoosted) { - Vec3 vec33 = this.calculateBoostTrackSpeed(vec32, blockPos, blockState); - if (vec33.horizontalDistanceSqr() != vec32.horizontalDistanceSqr()) { + Vec3 vec32 = this.calculateBoostTrackSpeed(vec3, pos, state); + if (vec32.horizontalDistanceSqr() != vec3.horizontalDistanceSqr()) { trackIteration.hasBoosted = true; - vec32 = vec33; + vec3 = vec32; } } - return vec32; + return vec3; } - private Vec3 calculateSlopeSpeed(Vec3 vec3, RailShape railShape) { - double d = Math.max(0.0078125, vec3.horizontalDistance() * 0.02); + private Vec3 calculateSlopeSpeed(Vec3 speed, RailShape railShape) { + double d = Math.max(0.0078125, speed.horizontalDistance() * 0.02); if (this.minecart.isInWater()) { d *= 0.2; } return switch (railShape) { - case ASCENDING_EAST -> vec3.add(-d, 0.0, 0.0); - case ASCENDING_WEST -> vec3.add(d, 0.0, 0.0); - case ASCENDING_NORTH -> vec3.add(0.0, 0.0, d); - case ASCENDING_SOUTH -> vec3.add(0.0, 0.0, -d); - default -> vec3; + case ASCENDING_EAST -> speed.add(-d, 0.0, 0.0); + case ASCENDING_WEST -> speed.add(d, 0.0, 0.0); + case ASCENDING_NORTH -> speed.add(0.0, 0.0, d); + case ASCENDING_SOUTH -> speed.add(0.0, 0.0, -d); + default -> speed; }; } - private Vec3 calculatePlayerInputSpeed(Vec3 vec3) { + private Vec3 calculatePlayerInputSpeed(Vec3 speed) { if (this.minecart.getFirstPassenger() instanceof ServerPlayer serverPlayer) { - Vec3 vec32 = serverPlayer.getLastClientMoveIntent(); - if (vec32.lengthSqr() > 0.0) { - Vec3 vec33 = vec32.normalize(); - double d = vec3.horizontalDistanceSqr(); - if (vec33.lengthSqr() > 0.0 && d < 0.01) { - return vec3.add(new Vec3(vec33.x, 0.0, vec33.z).normalize().scale(0.001)); + Vec3 vec3 = serverPlayer.getLastClientMoveIntent(); + if (vec3.lengthSqr() > 0.0) { + Vec3 vec32 = vec3.normalize(); + double d = speed.horizontalDistanceSqr(); + if (vec32.lengthSqr() > 0.0 && d < 0.01) { + return speed.add(new Vec3(vec32.x, 0.0, vec32.z).normalize().scale(0.001)); } } - return vec3; + return speed; } else { - return vec3; + return speed; } } - private Vec3 calculateHaltTrackSpeed(Vec3 vec3, BlockState blockState) { - if (blockState.is(Blocks.POWERED_RAIL) && !(Boolean)blockState.getValue(PoweredRailBlock.POWERED)) { - return vec3.length() < 0.03 ? Vec3.ZERO : vec3.scale(0.5); + private Vec3 calculateHaltTrackSpeed(Vec3 speed, BlockState state) { + if (state.is(Blocks.POWERED_RAIL) && !(Boolean)state.getValue(PoweredRailBlock.POWERED)) { + return speed.length() < 0.03 ? Vec3.ZERO : speed.scale(0.5); } else { - return vec3; + return speed; } } - private Vec3 calculateBoostTrackSpeed(Vec3 vec3, BlockPos blockPos, BlockState blockState) { - if (blockState.is(Blocks.POWERED_RAIL) && (Boolean)blockState.getValue(PoweredRailBlock.POWERED)) { - if (vec3.length() > 0.01) { - return vec3.normalize().scale(vec3.length() + 0.06); + private Vec3 calculateBoostTrackSpeed(Vec3 speed, BlockPos pos, BlockState state) { + if (state.is(Blocks.POWERED_RAIL) && (Boolean)state.getValue(PoweredRailBlock.POWERED)) { + if (speed.length() > 0.01) { + return speed.normalize().scale(speed.length() + 0.06); } else { - Vec3 vec32 = this.minecart.getRedstoneDirection(blockPos); - return vec32.lengthSqr() <= 0.0 ? vec3 : vec32.scale(vec3.length() + 0.2); + Vec3 vec3 = this.minecart.getRedstoneDirection(pos); + return vec3.lengthSqr() <= 0.0 ? speed : vec3.scale(speed.length() + 0.2); } } else { - return vec3; + return speed; } } @Override - public double stepAlongTrack(BlockPos blockPos, RailShape railShape, double d) { - if (d < 1.0E-5F) { + public double stepAlongTrack(BlockPos pos, RailShape railShape, double speed) { + if (speed < 1.0E-5F) { return 0.0; } else { Vec3 vec3 = this.position(); @@ -409,19 +408,19 @@ public class NewMinecartBehavior extends MinecartBehavior { vec34 = vec33; } - Vec3 vec35 = blockPos.getBottomCenter().add(vec34).add(0.0, 0.1, 0.0).add(vec34.normalize().scale(1.0E-5F)); + Vec3 vec35 = pos.getBottomCenter().add(vec34).add(0.0, 0.1, 0.0).add(vec34.normalize().scale(1.0E-5F)); if (bl && !this.isDecending(vec32, railShape)) { vec35 = vec35.add(0.0, 1.0, 0.0); } Vec3 vec36 = vec35.subtract(this.position()).normalize(); vec32 = vec36.scale(vec32.length() / vec36.horizontalDistance()); - Vec3 vec37 = vec3.add(vec32.normalize().scale(d * (bl ? Mth.SQRT_OF_TWO : 1.0F))); + Vec3 vec37 = vec3.add(vec32.normalize().scale(speed * (bl ? Mth.SQRT_OF_TWO : 1.0F))); if (vec3.distanceToSqr(vec35) <= vec3.distanceToSqr(vec37)) { - d = vec35.subtract(vec37).horizontalDistance(); + speed = vec35.subtract(vec37).horizontalDistance(); vec37 = vec35; } else { - d = 0.0; + speed = 0.0; } this.minecart.move(MoverType.SELF, vec37.subtract(vec3)); @@ -434,10 +433,10 @@ public class NewMinecartBehavior extends MinecartBehavior { } } - double e = vec35.horizontal().distanceTo(this.position().horizontal()); - double f = vec35.y + (this.isDecending(vec32, railShape) ? e : -e); - if (this.position().y < f) { - this.setPos(this.position().x, f, this.position().z); + double d = vec35.horizontal().distanceTo(this.position().horizontal()); + double e = vec35.y + (this.isDecending(vec32, railShape) ? d : -d); + if (this.position().y < e) { + this.setPos(this.position().x, e, this.position().z); } } @@ -446,17 +445,17 @@ public class NewMinecartBehavior extends MinecartBehavior { return 0.0; } else { this.setDeltaMovement(vec32); - return d; + return speed; } } } } - private boolean restAtVShape(RailShape railShape, RailShape railShape2) { + private boolean restAtVShape(RailShape shape1, RailShape shape2) { if (this.getDeltaMovement().lengthSqr() < 0.005 - && railShape2.isSlope() - && this.isDecending(this.getDeltaMovement(), railShape) - && !this.isDecending(this.getDeltaMovement(), railShape2)) { + && shape2.isSlope() + && this.isDecending(this.getDeltaMovement(), shape1) + && !this.isDecending(this.getDeltaMovement(), shape2)) { this.setDeltaMovement(Vec3.ZERO); return true; } else { @@ -465,16 +464,16 @@ public class NewMinecartBehavior extends MinecartBehavior { } @Override - public double getMaxSpeed(ServerLevel serverLevel) { - return serverLevel.getGameRules().getInt(GameRules.RULE_MINECART_MAX_SPEED) * (this.minecart.isInWater() ? 0.5 : 1.0) / 20.0; + public double getMaxSpeed(ServerLevel level) { + return level.getGameRules().getInt(GameRules.RULE_MINECART_MAX_SPEED) * (this.minecart.isInWater() ? 0.5 : 1.0) / 20.0; } - private boolean isDecending(Vec3 vec3, RailShape railShape) { + private boolean isDecending(Vec3 speed, RailShape railShape) { return switch (railShape) { - case ASCENDING_EAST -> vec3.x < 0.0; - case ASCENDING_WEST -> vec3.x > 0.0; - case ASCENDING_NORTH -> vec3.z > 0.0; - case ASCENDING_SOUTH -> vec3.z < 0.0; + case ASCENDING_EAST -> speed.x < 0.0; + case ASCENDING_WEST -> speed.x > 0.0; + case ASCENDING_NORTH -> speed.z > 0.0; + case ASCENDING_SOUTH -> speed.z < 0.0; default -> false; }; } @@ -495,9 +494,9 @@ public class NewMinecartBehavior extends MinecartBehavior { } } - public boolean pickupEntities(AABB aABB) { + public boolean pickupEntities(AABB box) { if (this.minecart.isRideable() && !this.minecart.isVehicle()) { - List list = this.level().getEntities(this.minecart, aABB, EntitySelector.pushableBy(this.minecart)); + List list = this.level().getEntities(this.minecart, box, EntitySelector.pushableBy(this.minecart)); if (!list.isEmpty()) { for (Entity entity : list) { if (!(entity instanceof Player) @@ -517,10 +516,10 @@ public class NewMinecartBehavior extends MinecartBehavior { return false; } - public boolean pushEntities(AABB aABB) { + public boolean pushEntities(AABB box) { boolean bl = false; if (this.minecart.isRideable()) { - List list = this.level().getEntities(this.minecart, aABB, EntitySelector.pushableBy(this.minecart)); + List list = this.level().getEntities(this.minecart, box, EntitySelector.pushableBy(this.minecart)); if (!list.isEmpty()) { for (Entity entity : list) { if (entity instanceof Player || entity instanceof IronGolem || entity instanceof AbstractMinecart || this.minecart.isVehicle() || entity.isPassenger()) { @@ -530,7 +529,7 @@ public class NewMinecartBehavior extends MinecartBehavior { } } } else { - for (Entity entity2 : this.level().getEntities(this.minecart, aABB)) { + for (Entity entity2 : this.level().getEntities(this.minecart, box)) { if (!this.minecart.hasPassenger(entity2) && entity2.isPushable() && entity2 instanceof AbstractMinecart) { entity2.push(this.minecart); bl = true; diff --git a/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java b/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java index 1b4917e0..86bd176a 100644 --- a/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java +++ b/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java @@ -36,8 +36,8 @@ public class OldMinecartBehavior extends MinecartBehavior { private double lerpXRot; private Vec3 targetDeltaMovement = Vec3.ZERO; - public OldMinecartBehavior(AbstractMinecart abstractMinecart) { - super(abstractMinecart); + public OldMinecartBehavior(AbstractMinecart minecart) { + super(minecart); } @Override @@ -46,13 +46,13 @@ public class OldMinecartBehavior extends MinecartBehavior { } @Override - public void lerpTo(double d, double e, double f, float g, float h, int i) { - this.lerpX = d; - this.lerpY = e; - this.lerpZ = f; - this.lerpYRot = g; - this.lerpXRot = h; - this.lerpSteps = i + 2; + public void lerpTo(double x, double y, double z, float yRot, float xRot, int steps) { + this.lerpX = x; + this.lerpY = y; + this.lerpZ = z; + this.lerpYRot = yRot; + this.lerpXRot = xRot; + this.lerpSteps = steps + 2; this.setDeltaMovement(this.targetDeltaMovement); } @@ -82,8 +82,8 @@ public class OldMinecartBehavior extends MinecartBehavior { } @Override - public void lerpMotion(double d, double e, double f) { - this.targetDeltaMovement = new Vec3(d, e, f); + public void lerpMotion(double x, double y, double z) { + this.targetDeltaMovement = new Vec3(x, y, z); this.setDeltaMovement(this.targetDeltaMovement); } @@ -137,7 +137,7 @@ public class OldMinecartBehavior extends MinecartBehavior { } @Override - public void moveAlongTrack(ServerLevel serverLevel) { + public void moveAlongTrack(ServerLevel level) { BlockPos blockPos = this.minecart.getCurrentBlockPosOrRailBelow(); BlockState blockState = this.level().getBlockState(blockPos); this.minecart.resetFallDistance(); @@ -241,7 +241,7 @@ public class OldMinecartBehavior extends MinecartBehavior { f = o + i * r; this.setPos(d, e, f); double s = this.minecart.isVehicle() ? 0.75 : 1.0; - double t = this.minecart.getMaxSpeed(serverLevel); + double t = this.minecart.getMaxSpeed(level); vec32 = this.getDeltaMovement(); this.minecart.move(MoverType.SELF, new Vec3(Mth.clamp(s * vec32.x, -t, t), 0.0, Mth.clamp(s * vec32.z, -t, t))); if (vec3i.getY() != 0 @@ -309,10 +309,10 @@ public class OldMinecartBehavior extends MinecartBehavior { } @Nullable - public Vec3 getPosOffs(double d, double e, double f, double g) { - int i = Mth.floor(d); - int j = Mth.floor(e); - int k = Mth.floor(f); + public Vec3 getPosOffs(double x, double y, double z, double scale) { + int i = Mth.floor(x); + int j = Mth.floor(y); + int k = Mth.floor(z); if (this.level().getBlockState(new BlockPos(i, j - 1, k)).is(BlockTags.RAILS)) { j--; } @@ -320,38 +320,38 @@ public class OldMinecartBehavior extends MinecartBehavior { BlockState blockState = this.level().getBlockState(new BlockPos(i, j, k)); if (BaseRailBlock.isRail(blockState)) { RailShape railShape = blockState.getValue(((BaseRailBlock)blockState.getBlock()).getShapeProperty()); - e = j; + y = j; if (railShape.isSlope()) { - e = j + 1; + y = j + 1; } Pair pair = AbstractMinecart.exits(railShape); Vec3i vec3i = pair.getFirst(); Vec3i vec3i2 = pair.getSecond(); - double h = vec3i2.getX() - vec3i.getX(); - double l = vec3i2.getZ() - vec3i.getZ(); - double m = Math.sqrt(h * h + l * l); - h /= m; - l /= m; - d += h * g; - f += l * g; - if (vec3i.getY() != 0 && Mth.floor(d) - i == vec3i.getX() && Mth.floor(f) - k == vec3i.getZ()) { - e += vec3i.getY(); - } else if (vec3i2.getY() != 0 && Mth.floor(d) - i == vec3i2.getX() && Mth.floor(f) - k == vec3i2.getZ()) { - e += vec3i2.getY(); + double d = vec3i2.getX() - vec3i.getX(); + double e = vec3i2.getZ() - vec3i.getZ(); + double f = Math.sqrt(d * d + e * e); + d /= f; + e /= f; + x += d * scale; + z += e * scale; + if (vec3i.getY() != 0 && Mth.floor(x) - i == vec3i.getX() && Mth.floor(z) - k == vec3i.getZ()) { + y += vec3i.getY(); + } else if (vec3i2.getY() != 0 && Mth.floor(x) - i == vec3i2.getX() && Mth.floor(z) - k == vec3i2.getZ()) { + y += vec3i2.getY(); } - return this.getPos(d, e, f); + return this.getPos(x, y, z); } else { return null; } } @Nullable - public Vec3 getPos(double d, double e, double f) { - int i = Mth.floor(d); - int j = Mth.floor(e); - int k = Mth.floor(f); + public Vec3 getPos(double x, double y, double z) { + int i = Mth.floor(x); + int j = Mth.floor(y); + int k = Mth.floor(z); if (this.level().getBlockState(new BlockPos(i, j - 1, k)).is(BlockTags.RAILS)) { j--; } @@ -362,43 +362,43 @@ public class OldMinecartBehavior extends MinecartBehavior { Pair pair = AbstractMinecart.exits(railShape); Vec3i vec3i = pair.getFirst(); Vec3i vec3i2 = pair.getSecond(); - double g = i + 0.5 + vec3i.getX() * 0.5; - double h = j + 0.0625 + vec3i.getY() * 0.5; - double l = k + 0.5 + vec3i.getZ() * 0.5; - double m = i + 0.5 + vec3i2.getX() * 0.5; - double n = j + 0.0625 + vec3i2.getY() * 0.5; - double o = k + 0.5 + vec3i2.getZ() * 0.5; - double p = m - g; - double q = (n - h) * 2.0; - double r = o - l; - double s; - if (p == 0.0) { - s = f - k; - } else if (r == 0.0) { - s = d - i; + double d = i + 0.5 + vec3i.getX() * 0.5; + double e = j + 0.0625 + vec3i.getY() * 0.5; + double f = k + 0.5 + vec3i.getZ() * 0.5; + double g = i + 0.5 + vec3i2.getX() * 0.5; + double h = j + 0.0625 + vec3i2.getY() * 0.5; + double l = k + 0.5 + vec3i2.getZ() * 0.5; + double m = g - d; + double n = (h - e) * 2.0; + double o = l - f; + double p; + if (m == 0.0) { + p = z - k; + } else if (o == 0.0) { + p = x - i; } else { - double t = d - g; - double u = f - l; - s = (t * p + u * r) * 2.0; + double q = x - d; + double r = z - f; + p = (q * m + r * o) * 2.0; } - d = g + p * s; - e = h + q * s; - f = l + r * s; - if (q < 0.0) { - e++; - } else if (q > 0.0) { - e += 0.5; + x = d + m * p; + y = e + n * p; + z = f + o * p; + if (n < 0.0) { + y++; + } else if (n > 0.0) { + y += 0.5; } - return new Vec3(d, e, f); + return new Vec3(x, y, z); } else { return null; } } @Override - public double stepAlongTrack(BlockPos blockPos, RailShape railShape, double d) { + public double stepAlongTrack(BlockPos pos, RailShape railShape, double speed) { return 0.0; } @@ -437,12 +437,12 @@ public class OldMinecartBehavior extends MinecartBehavior { } @Override - public Vec3 getKnownMovement(Vec3 vec3) { - return new Vec3(Mth.clamp(vec3.x, -0.4, 0.4), vec3.y, Mth.clamp(vec3.z, -0.4, 0.4)); + public Vec3 getKnownMovement(Vec3 movement) { + return new Vec3(Mth.clamp(movement.x, -0.4, 0.4), movement.y, Mth.clamp(movement.z, -0.4, 0.4)); } @Override - public double getMaxSpeed(ServerLevel serverLevel) { + public double getMaxSpeed(ServerLevel level) { return this.minecart.isInWater() ? 0.2 : 0.4; } diff --git a/net/minecraft/world/entity/vehicle/Raft.java b/net/minecraft/world/entity/vehicle/Raft.java index 9a53d7a9..28278f9a 100644 --- a/net/minecraft/world/entity/vehicle/Raft.java +++ b/net/minecraft/world/entity/vehicle/Raft.java @@ -12,7 +12,7 @@ public class Raft extends AbstractBoat { } @Override - protected double rideHeight(EntityDimensions entityDimensions) { - return entityDimensions.height() * 0.8888889F; + protected double rideHeight(EntityDimensions dimensions) { + return dimensions.height() * 0.8888889F; } } diff --git a/net/minecraft/world/entity/vehicle/VehicleEntity.java b/net/minecraft/world/entity/vehicle/VehicleEntity.java index 239eaffa..042939a3 100644 --- a/net/minecraft/world/entity/vehicle/VehicleEntity.java +++ b/net/minecraft/world/entity/vehicle/VehicleEntity.java @@ -33,7 +33,7 @@ public abstract class VehicleEntity extends Entity { } @Override - public boolean hurtServer(ServerLevel serverLevel, DamageSource damageSource, float f) { + public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (this.isRemoved()) { return true; } else if (this.isInvulnerableToBase(damageSource)) { @@ -42,7 +42,7 @@ public abstract class VehicleEntity extends Entity { this.setHurtDir(-this.getHurtDir()); this.setHurtTime(10); this.markHurt(); - this.setDamage(this.getDamage() + f * 10.0F); + this.setDamage(this.getDamage() + amount * 10.0F); this.gameEvent(GameEvent.ENTITY_DAMAGE, damageSource.getEntity()); boolean bl = damageSource.getEntity() instanceof Player player && player.getAbilities().instabuild; if ((bl || !(this.getDamage() > 40.0F)) && !this.shouldSourceDestroy(damageSource)) { @@ -50,7 +50,7 @@ public abstract class VehicleEntity extends Entity { this.discard(); } } else { - this.destroy(serverLevel, damageSource); + this.destroy(level, damageSource); } return true; @@ -66,12 +66,12 @@ public abstract class VehicleEntity extends Entity { return explosion.getIndirectSourceEntity() instanceof Mob && !explosion.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); } - public void destroy(ServerLevel serverLevel, Item item) { - this.kill(serverLevel); - if (serverLevel.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { - ItemStack itemStack = new ItemStack(item); + public void destroy(ServerLevel level, Item dropItem) { + this.kill(level); + if (level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { + ItemStack itemStack = new ItemStack(dropItem); itemStack.set(DataComponents.CUSTOM_NAME, this.getCustomName()); - this.spawnAtLocation(serverLevel, itemStack); + this.spawnAtLocation(level, itemStack); } } @@ -106,8 +106,8 @@ public abstract class VehicleEntity extends Entity { return this.entityData.get(DATA_ID_HURTDIR); } - protected void destroy(ServerLevel serverLevel, DamageSource damageSource) { - this.destroy(serverLevel, this.getDropItem()); + protected void destroy(ServerLevel level, DamageSource damageSource) { + this.destroy(level, this.getDropItem()); } @Override diff --git a/net/minecraft/world/food/FoodData.java b/net/minecraft/world/food/FoodData.java index 67164c52..7ef0681d 100644 --- a/net/minecraft/world/food/FoodData.java +++ b/net/minecraft/world/food/FoodData.java @@ -29,8 +29,8 @@ public class FoodData { this.add(foodProperties.nutrition(), foodProperties.saturation()); } - public void tick(ServerPlayer serverPlayer) { - ServerLevel serverLevel = serverPlayer.serverLevel(); + public void tick(ServerPlayer player) { + ServerLevel serverLevel = player.serverLevel(); Difficulty difficulty = serverLevel.getDifficulty(); if (this.exhaustionLevel > 4.0F) { this.exhaustionLevel -= 4.0F; @@ -42,26 +42,26 @@ public class FoodData { } boolean bl = serverLevel.getGameRules().getBoolean(GameRules.RULE_NATURAL_REGENERATION); - if (bl && this.saturationLevel > 0.0F && serverPlayer.isHurt() && this.foodLevel >= 20) { + if (bl && this.saturationLevel > 0.0F && player.isHurt() && this.foodLevel >= 20) { this.tickTimer++; if (this.tickTimer >= 10) { float f = Math.min(this.saturationLevel, 6.0F); - serverPlayer.heal(f / 6.0F); + player.heal(f / 6.0F); this.addExhaustion(f); this.tickTimer = 0; } - } else if (bl && this.foodLevel >= 18 && serverPlayer.isHurt()) { + } else if (bl && this.foodLevel >= 18 && player.isHurt()) { this.tickTimer++; if (this.tickTimer >= 80) { - serverPlayer.heal(1.0F); + player.heal(1.0F); this.addExhaustion(6.0F); this.tickTimer = 0; } } else if (this.foodLevel <= 0) { this.tickTimer++; if (this.tickTimer >= 80) { - if (serverPlayer.getHealth() > 10.0F || difficulty == Difficulty.HARD || serverPlayer.getHealth() > 1.0F && difficulty == Difficulty.NORMAL) { - serverPlayer.hurtServer(serverLevel, serverPlayer.damageSources().starve(), 1.0F); + if (player.getHealth() > 10.0F || difficulty == Difficulty.HARD || player.getHealth() > 1.0F && difficulty == Difficulty.NORMAL) { + player.hurtServer(serverLevel, player.damageSources().starve(), 1.0F); } this.tickTimer = 0; diff --git a/net/minecraft/world/food/FoodProperties.java b/net/minecraft/world/food/FoodProperties.java index 3ad87031..499cdf88 100644 --- a/net/minecraft/world/food/FoodProperties.java +++ b/net/minecraft/world/food/FoodProperties.java @@ -37,19 +37,10 @@ public record FoodProperties(int nutrition, float saturation, boolean canAlwaysE ); @Override - public void onConsume(Level level, LivingEntity livingEntity, ItemStack itemStack, Consumable consumable) { - RandomSource randomSource = livingEntity.getRandom(); - level.playSound( - null, - livingEntity.getX(), - livingEntity.getY(), - livingEntity.getZ(), - consumable.sound().value(), - SoundSource.NEUTRAL, - 1.0F, - randomSource.triangle(1.0F, 0.4F) - ); - if (livingEntity instanceof Player player) { + public void onConsume(Level level, LivingEntity entity, ItemStack stack, Consumable consumable) { + RandomSource randomSource = entity.getRandom(); + level.playSound(null, entity.getX(), entity.getY(), entity.getZ(), consumable.sound().value(), SoundSource.NEUTRAL, 1.0F, randomSource.triangle(1.0F, 0.4F)); + if (entity instanceof Player player) { player.getFoodData().eat(this); level.playSound( null, player.getX(), player.getY(), player.getZ(), SoundEvents.PLAYER_BURP, SoundSource.PLAYERS, 0.5F, Mth.randomBetween(randomSource, 0.9F, 1.0F) diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java index 37f79704..e030d049 100644 --- a/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -70,25 +70,25 @@ public abstract class AbstractContainerMenu { this.containerId = containerId; } - protected void addInventoryHotbarSlots(Container container, int i, int j) { - for (int k = 0; k < 9; k++) { - this.addSlot(new Slot(container, k, i + k * 18, j)); + protected void addInventoryHotbarSlots(Container container, int x, int y) { + for (int i = 0; i < 9; i++) { + this.addSlot(new Slot(container, i, x + i * 18, y)); } } - protected void addInventoryExtendedSlots(Container container, int i, int j) { - for (int k = 0; k < 3; k++) { - for (int l = 0; l < 9; l++) { - this.addSlot(new Slot(container, l + (k + 1) * 9, i + l * 18, j + k * 18)); + protected void addInventoryExtendedSlots(Container container, int x, int y) { + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 9; j++) { + this.addSlot(new Slot(container, j + (i + 1) * 9, x + j * 18, y + i * 18)); } } } - protected void addStandardInventorySlots(Container container, int i, int j) { - this.addInventoryExtendedSlots(container, i, j); - int k = 4; - int l = 58; - this.addInventoryHotbarSlots(container, i, j + 58); + protected void addStandardInventorySlots(Container container, int x, int y) { + this.addInventoryExtendedSlots(container, x, y); + int i = 4; + int j = 58; + this.addInventoryHotbarSlots(container, x, y + 58); } protected static boolean stillValid(ContainerLevelAccess access, Player player, Block targetBlock) { @@ -321,10 +321,10 @@ public abstract class AbstractContainerMenu { */ public abstract ItemStack quickMoveStack(Player player, int index); - public void setSelectedBundleItemIndex(int i, int j) { - if (i >= 0 && i < this.slots.size()) { - ItemStack itemStack = this.slots.get(i).getItem(); - BundleItem.toggleSelectedItem(itemStack, j); + public void setSelectedBundleItemIndex(int slotIndex, int bundleItemIndex) { + if (slotIndex >= 0 && slotIndex < this.slots.size()) { + ItemStack itemStack = this.slots.get(slotIndex).getItem(); + BundleItem.toggleSelectedItem(itemStack, bundleItemIndex); } } @@ -612,13 +612,13 @@ public abstract class AbstractContainerMenu { } } - private static void dropOrPlaceInInventory(Player player, ItemStack itemStack) { + private static void dropOrPlaceInInventory(Player player, ItemStack stack) { boolean bl = player.isRemoved() && player.getRemovalReason() != Entity.RemovalReason.CHANGED_DIMENSION; boolean bl2 = player instanceof ServerPlayer serverPlayer && serverPlayer.hasDisconnected(); if (bl || bl2) { - player.drop(itemStack, false); + player.drop(stack, false); } else if (player instanceof ServerPlayer) { - player.getInventory().placeItemBackInInventory(itemStack); + player.getInventory().placeItemBackInInventory(stack); } } diff --git a/net/minecraft/world/inventory/AbstractCraftingMenu.java b/net/minecraft/world/inventory/AbstractCraftingMenu.java index 6397719d..cf37f35a 100644 --- a/net/minecraft/world/inventory/AbstractCraftingMenu.java +++ b/net/minecraft/world/inventory/AbstractCraftingMenu.java @@ -15,28 +15,30 @@ public abstract class AbstractCraftingMenu extends RecipeBookMenu { protected final CraftingContainer craftSlots; protected final ResultContainer resultSlots = new ResultContainer(); - public AbstractCraftingMenu(MenuType menuType, int i, int j, int k) { - super(menuType, i); - this.width = j; - this.height = k; - this.craftSlots = new TransientCraftingContainer(this, j, k); + public AbstractCraftingMenu(MenuType menuType, int containerId, int width, int height) { + super(menuType, containerId); + this.width = width; + this.height = height; + this.craftSlots = new TransientCraftingContainer(this, width, height); } - protected Slot addResultSlot(Player player, int i, int j) { - return this.addSlot(new ResultSlot(player, this.craftSlots, this.resultSlots, 0, i, j)); + protected Slot addResultSlot(Player player, int x, int y) { + return this.addSlot(new ResultSlot(player, this.craftSlots, this.resultSlots, 0, x, y)); } - protected void addCraftingGridSlots(int i, int j) { - for (int k = 0; k < this.width; k++) { - for (int l = 0; l < this.height; l++) { - this.addSlot(new Slot(this.craftSlots, l + k * this.width, i + l * 18, j + k * 18)); + protected void addCraftingGridSlots(int x, int y) { + for (int i = 0; i < this.width; i++) { + for (int j = 0; j < this.height; j++) { + this.addSlot(new Slot(this.craftSlots, j + i * this.width, x + j * 18, y + i * 18)); } } } @Override - public RecipeBookMenu.PostPlaceAction handlePlacement(boolean bl, boolean bl2, RecipeHolder recipeHolder, ServerLevel serverLevel, Inventory inventory) { - RecipeHolder recipeHolder2 = (RecipeHolder)recipeHolder; + public RecipeBookMenu.PostPlaceAction handlePlacement( + boolean useMaxItems, boolean isCreative, RecipeHolder recipe, ServerLevel level, Inventory playerInventory + ) { + RecipeHolder recipeHolder = (RecipeHolder)recipe; this.beginPlacingRecipe(); RecipeBookMenu.PostPlaceAction var8; @@ -55,12 +57,12 @@ public abstract class AbstractCraftingMenu extends RecipeBookMenu { } @Override - public boolean recipeMatches(RecipeHolder recipeHolder) { - return recipeHolder.value().matches(AbstractCraftingMenu.this.craftSlots.asCraftInput(), AbstractCraftingMenu.this.owner().level()); + public boolean recipeMatches(RecipeHolder recipe) { + return recipe.value().matches(AbstractCraftingMenu.this.craftSlots.asCraftInput(), AbstractCraftingMenu.this.owner().level()); } - }, this.width, this.height, list, list, inventory, recipeHolder2, bl, bl2); + }, this.width, this.height, list, list, playerInventory, recipeHolder, useMaxItems, isCreative); } finally { - this.finishPlacingRecipe(serverLevel, (RecipeHolder)recipeHolder); + this.finishPlacingRecipe(level, (RecipeHolder)recipe); } return var8; @@ -69,7 +71,7 @@ public abstract class AbstractCraftingMenu extends RecipeBookMenu { protected void beginPlacingRecipe() { } - protected void finishPlacingRecipe(ServerLevel serverLevel, RecipeHolder recipeHolder) { + protected void finishPlacingRecipe(ServerLevel level, RecipeHolder recipe) { } public abstract Slot getResultSlot(); diff --git a/net/minecraft/world/inventory/AbstractFurnaceMenu.java b/net/minecraft/world/inventory/AbstractFurnaceMenu.java index e827625d..d183b27c 100644 --- a/net/minecraft/world/inventory/AbstractFurnaceMenu.java +++ b/net/minecraft/world/inventory/AbstractFurnaceMenu.java @@ -38,38 +38,38 @@ public abstract class AbstractFurnaceMenu extends RecipeBookMenu { protected AbstractFurnaceMenu( MenuType menuType, RecipeType recipeType, - ResourceKey resourceKey, + ResourceKey acceptedInputs, RecipeBookType recipeBookType, - int i, + int containerId, Inventory inventory ) { - this(menuType, recipeType, resourceKey, recipeBookType, i, inventory, new SimpleContainer(3), new SimpleContainerData(4)); + this(menuType, recipeType, acceptedInputs, recipeBookType, containerId, inventory, new SimpleContainer(3), new SimpleContainerData(4)); } protected AbstractFurnaceMenu( MenuType menuType, RecipeType recipeType, - ResourceKey resourceKey, + ResourceKey acceptedInputs, RecipeBookType recipeBookType, - int i, + int containerId, Inventory inventory, Container container, - ContainerData containerData + ContainerData data ) { - super(menuType, i); + super(menuType, containerId); this.recipeType = recipeType; this.recipeBookType = recipeBookType; checkContainerSize(container, 3); - checkContainerDataCount(containerData, 4); + checkContainerDataCount(data, 4); this.container = container; - this.data = containerData; + this.data = data; this.level = inventory.player.level(); - this.acceptedInputs = this.level.recipeAccess().propertySet(resourceKey); + this.acceptedInputs = this.level.recipeAccess().propertySet(acceptedInputs); this.addSlot(new Slot(container, 0, 56, 17)); this.addSlot(new FurnaceFuelSlot(this, container, 1, 56, 53)); this.addSlot(new FurnaceResultSlot(inventory.player, container, 2, 116, 35)); this.addStandardInventorySlots(inventory, 8, 84); - this.addDataSlots(containerData); + this.addDataSlots(data); } @Override @@ -170,7 +170,9 @@ public abstract class AbstractFurnaceMenu extends RecipeBookMenu { } @Override - public RecipeBookMenu.PostPlaceAction handlePlacement(boolean bl, boolean bl2, RecipeHolder recipeHolder, ServerLevel serverLevel, Inventory inventory) { + public RecipeBookMenu.PostPlaceAction handlePlacement( + boolean useMaxItems, boolean isCreative, RecipeHolder recipe, ServerLevel level, Inventory playerInventory + ) { final List list = List.of(this.getSlot(0), this.getSlot(2)); return ServerPlaceRecipe.placeRecipe(new ServerPlaceRecipe.CraftingMenuAccess() { @Override @@ -184,9 +186,9 @@ public abstract class AbstractFurnaceMenu extends RecipeBookMenu { } @Override - public boolean recipeMatches(RecipeHolder recipeHolder) { - return recipeHolder.value().matches(new SingleRecipeInput(AbstractFurnaceMenu.this.container.getItem(0)), serverLevel); + public boolean recipeMatches(RecipeHolder recipe) { + return recipe.value().matches(new SingleRecipeInput(AbstractFurnaceMenu.this.container.getItem(0)), level); } - }, 1, 1, List.of(this.getSlot(0)), list, inventory, (RecipeHolder)recipeHolder, bl, bl2); + }, 1, 1, List.of(this.getSlot(0)), list, playerInventory, (RecipeHolder)recipe, useMaxItems, isCreative); } } diff --git a/net/minecraft/world/inventory/AnvilMenu.java b/net/minecraft/world/inventory/AnvilMenu.java index 9c9f0bd4..153ca372 100644 --- a/net/minecraft/world/inventory/AnvilMenu.java +++ b/net/minecraft/world/inventory/AnvilMenu.java @@ -15,6 +15,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.EnchantmentHelper; import net.minecraft.world.item.enchantment.ItemEnchantments; +import net.minecraft.world.item.enchantment.ItemEnchantments.Mutable; import net.minecraft.world.level.block.AnvilBlock; import net.minecraft.world.level.block.state.BlockState; import org.jetbrains.annotations.Nullable; @@ -119,7 +120,7 @@ public class AnvilMenu extends ItemCombinerMenu { if (!itemStack.isEmpty() && EnchantmentHelper.canStoreEnchantments(itemStack)) { ItemStack itemStack2 = itemStack.copy(); ItemStack itemStack3 = this.inputSlots.getItem(1); - ItemEnchantments.Mutable mutable = new ItemEnchantments.Mutable(EnchantmentHelper.getEnchantmentsForCrafting(itemStack2)); + Mutable mutable = new Mutable(EnchantmentHelper.getEnchantmentsForCrafting(itemStack2)); l += (long)itemStack.getOrDefault(DataComponents.REPAIR_COST, 0).intValue() + itemStack3.getOrDefault(DataComponents.REPAIR_COST, 0).intValue(); this.repairItemCountCost = 0; if (!itemStack3.isEmpty()) { diff --git a/net/minecraft/world/inventory/ChestMenu.java b/net/minecraft/world/inventory/ChestMenu.java index 2ffce967..6cb233ec 100644 --- a/net/minecraft/world/inventory/ChestMenu.java +++ b/net/minecraft/world/inventory/ChestMenu.java @@ -58,10 +58,10 @@ public class ChestMenu extends AbstractContainerMenu { this.addStandardInventorySlots(playerInventory, 8, j); } - private void addChestGrid(Container container, int i, int j) { - for (int k = 0; k < this.containerRows; k++) { - for (int l = 0; l < 9; l++) { - this.addSlot(new Slot(container, l + k * 9, i + l * 18, j + k * 18)); + private void addChestGrid(Container container, int x, int y) { + for (int i = 0; i < this.containerRows; i++) { + for (int j = 0; j < 9; j++) { + this.addSlot(new Slot(container, j + i * 9, x + j * 18, y + i * 18)); } } } diff --git a/net/minecraft/world/inventory/CraftingContainer.java b/net/minecraft/world/inventory/CraftingContainer.java index b4d9c9d0..df4be68b 100644 --- a/net/minecraft/world/inventory/CraftingContainer.java +++ b/net/minecraft/world/inventory/CraftingContainer.java @@ -4,6 +4,7 @@ import java.util.List; import net.minecraft.world.Container; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingInput; +import net.minecraft.world.item.crafting.CraftingInput.Positioned; public interface CraftingContainer extends Container, StackedContentsCompatible { int getWidth(); @@ -16,7 +17,7 @@ public interface CraftingContainer extends Container, StackedContentsCompatible return this.asPositionedCraftInput().input(); } - default CraftingInput.Positioned asPositionedCraftInput() { + default Positioned asPositionedCraftInput() { return CraftingInput.ofPositioned(this.getWidth(), this.getHeight(), this.getItems()); } } diff --git a/net/minecraft/world/inventory/CraftingMenu.java b/net/minecraft/world/inventory/CraftingMenu.java index a82c0025..b55e3d86 100644 --- a/net/minecraft/world/inventory/CraftingMenu.java +++ b/net/minecraft/world/inventory/CraftingMenu.java @@ -45,34 +45,31 @@ public class CraftingMenu extends AbstractCraftingMenu { } protected static void slotChangedCraftingGrid( - AbstractContainerMenu abstractContainerMenu, - ServerLevel serverLevel, + AbstractContainerMenu menu, + ServerLevel level, Player player, - CraftingContainer craftingContainer, - ResultContainer resultContainer, - @Nullable RecipeHolder recipeHolder + CraftingContainer craftSlots, + ResultContainer resultSlots, + @Nullable RecipeHolder recipe ) { - CraftingInput craftingInput = craftingContainer.asCraftInput(); + CraftingInput craftingInput = craftSlots.asCraftInput(); ServerPlayer serverPlayer = (ServerPlayer)player; ItemStack itemStack = ItemStack.EMPTY; - Optional> optional = serverLevel.getServer() - .getRecipeManager() - .getRecipeFor(RecipeType.CRAFTING, craftingInput, serverLevel, recipeHolder); + Optional> optional = level.getServer().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, craftingInput, level, recipe); if (optional.isPresent()) { - RecipeHolder recipeHolder2 = (RecipeHolder)optional.get(); - CraftingRecipe craftingRecipe = recipeHolder2.value(); - if (resultContainer.setRecipeUsed(serverPlayer, recipeHolder2)) { - ItemStack itemStack2 = craftingRecipe.assemble(craftingInput, serverLevel.registryAccess()); - if (itemStack2.isItemEnabled(serverLevel.enabledFeatures())) { + RecipeHolder recipeHolder = (RecipeHolder)optional.get(); + CraftingRecipe craftingRecipe = recipeHolder.value(); + if (resultSlots.setRecipeUsed(serverPlayer, recipeHolder)) { + ItemStack itemStack2 = craftingRecipe.assemble(craftingInput, level.registryAccess()); + if (itemStack2.isItemEnabled(level.enabledFeatures())) { itemStack = itemStack2; } } } - resultContainer.setItem(0, itemStack); - abstractContainerMenu.setRemoteSlot(0, itemStack); - serverPlayer.connection - .send(new ClientboundContainerSetSlotPacket(abstractContainerMenu.containerId, abstractContainerMenu.incrementStateId(), 0, itemStack)); + resultSlots.setItem(0, itemStack); + menu.setRemoteSlot(0, itemStack); + serverPlayer.connection.send(new ClientboundContainerSetSlotPacket(menu.containerId, menu.incrementStateId(), 0, itemStack)); } @Override @@ -92,9 +89,9 @@ public class CraftingMenu extends AbstractCraftingMenu { } @Override - public void finishPlacingRecipe(ServerLevel serverLevel, RecipeHolder recipeHolder) { + public void finishPlacingRecipe(ServerLevel level, RecipeHolder recipe) { this.placingRecipe = false; - slotChangedCraftingGrid(this, serverLevel, this.player, this.craftSlots, this.resultSlots, recipeHolder); + slotChangedCraftingGrid(this, level, this.player, this.craftSlots, this.resultSlots, recipe); } @Override diff --git a/net/minecraft/world/inventory/DispenserMenu.java b/net/minecraft/world/inventory/DispenserMenu.java index 8f88d3e3..2ee6e277 100644 --- a/net/minecraft/world/inventory/DispenserMenu.java +++ b/net/minecraft/world/inventory/DispenserMenu.java @@ -27,11 +27,11 @@ public class DispenserMenu extends AbstractContainerMenu { this.addStandardInventorySlots(playerInventory, 8, 84); } - protected void add3x3GridSlots(Container container, int i, int j) { - for (int k = 0; k < 3; k++) { - for (int l = 0; l < 3; l++) { - int m = l + k * 3; - this.addSlot(new Slot(container, m, i + l * 18, j + k * 18)); + protected void add3x3GridSlots(Container container, int x, int y) { + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 3; j++) { + int k = j + i * 3; + this.addSlot(new Slot(container, k, x + j * 18, y + i * 18)); } } } diff --git a/net/minecraft/world/inventory/EnchantmentMenu.java b/net/minecraft/world/inventory/EnchantmentMenu.java index 5f2898c0..fad62b73 100644 --- a/net/minecraft/world/inventory/EnchantmentMenu.java +++ b/net/minecraft/world/inventory/EnchantmentMenu.java @@ -7,9 +7,9 @@ import net.minecraft.Util; import net.minecraft.advancements.CriteriaTriggers; import net.minecraft.core.BlockPos; import net.minecraft.core.Holder; -import net.minecraft.core.HolderSet; import net.minecraft.core.IdMap; import net.minecraft.core.RegistryAccess; +import net.minecraft.core.HolderSet.Named; import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; @@ -185,11 +185,11 @@ public class EnchantmentMenu extends AbstractContainerMenu { private List getEnchantmentList(RegistryAccess registryAccess, ItemStack stack, int slot, int cost) { this.random.setSeed(this.enchantmentSeed.get() + slot); - Optional> optional = registryAccess.lookupOrThrow(Registries.ENCHANTMENT).get(EnchantmentTags.IN_ENCHANTING_TABLE); + Optional> optional = registryAccess.lookupOrThrow(Registries.ENCHANTMENT).get(EnchantmentTags.IN_ENCHANTING_TABLE); if (optional.isEmpty()) { return List.of(); } else { - List list = EnchantmentHelper.selectEnchantment(this.random, stack, cost, ((HolderSet.Named)optional.get()).stream()); + List list = EnchantmentHelper.selectEnchantment(this.random, stack, cost, ((Named)optional.get()).stream()); if (stack.is(Items.BOOK) && list.size() > 1) { list.remove(this.random.nextInt(list.size())); } diff --git a/net/minecraft/world/inventory/ItemCombinerMenu.java b/net/minecraft/world/inventory/ItemCombinerMenu.java index 3782086a..607e6b7f 100644 --- a/net/minecraft/world/inventory/ItemCombinerMenu.java +++ b/net/minecraft/world/inventory/ItemCombinerMenu.java @@ -4,6 +4,7 @@ import net.minecraft.world.Container; import net.minecraft.world.SimpleContainer; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.ItemCombinerMenuSlotDefinition.SlotDefinition; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.state.BlockState; import org.jetbrains.annotations.Nullable; @@ -32,24 +33,20 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu { protected abstract boolean isValidBlock(BlockState state); public ItemCombinerMenu( - @Nullable MenuType menuType, - int i, - Inventory inventory, - ContainerLevelAccess containerLevelAccess, - ItemCombinerMenuSlotDefinition itemCombinerMenuSlotDefinition + @Nullable MenuType menuType, int containerId, Inventory inventory, ContainerLevelAccess access, ItemCombinerMenuSlotDefinition slotDefinition ) { - super(menuType, i); - this.access = containerLevelAccess; + super(menuType, containerId); + this.access = access; this.player = inventory.player; - this.inputSlots = this.createContainer(itemCombinerMenuSlotDefinition.getNumOfInputSlots()); - this.resultSlotIndex = itemCombinerMenuSlotDefinition.getResultSlotIndex(); - this.createInputSlots(itemCombinerMenuSlotDefinition); - this.createResultSlot(itemCombinerMenuSlotDefinition); + this.inputSlots = this.createContainer(slotDefinition.getNumOfInputSlots()); + this.resultSlotIndex = slotDefinition.getResultSlotIndex(); + this.createInputSlots(slotDefinition); + this.createResultSlot(slotDefinition); this.addStandardInventorySlots(inventory, 8, 84); } private void createInputSlots(ItemCombinerMenuSlotDefinition slotDefinition) { - for (final ItemCombinerMenuSlotDefinition.SlotDefinition slotDefinition2 : slotDefinition.getSlots()) { + for (final SlotDefinition slotDefinition2 : slotDefinition.getSlots()) { this.addSlot(new Slot(this.inputSlots, slotDefinition2.slotIndex(), slotDefinition2.x(), slotDefinition2.y()) { @Override public boolean mayPlace(ItemStack stack) { diff --git a/net/minecraft/world/inventory/RecipeBookMenu.java b/net/minecraft/world/inventory/RecipeBookMenu.java index 93719dbd..7f6ce5a6 100644 --- a/net/minecraft/world/inventory/RecipeBookMenu.java +++ b/net/minecraft/world/inventory/RecipeBookMenu.java @@ -11,7 +11,7 @@ public abstract class RecipeBookMenu extends AbstractContainerMenu { } public abstract RecipeBookMenu.PostPlaceAction handlePlacement( - boolean bl, boolean bl2, RecipeHolder recipeHolder, ServerLevel serverLevel, Inventory inventory + boolean useMaxItems, boolean isCreative, RecipeHolder recipe, ServerLevel level, Inventory playerInventory ); public abstract void fillCraftSlotsStackedContents(StackedItemContents stackedItemContents); diff --git a/net/minecraft/world/inventory/RecipeCraftingHolder.java b/net/minecraft/world/inventory/RecipeCraftingHolder.java index 957983e5..0abe5e1b 100644 --- a/net/minecraft/world/inventory/RecipeCraftingHolder.java +++ b/net/minecraft/world/inventory/RecipeCraftingHolder.java @@ -26,13 +26,13 @@ public interface RecipeCraftingHolder { } } - default boolean setRecipeUsed(ServerPlayer serverPlayer, RecipeHolder recipeHolder) { - if (!recipeHolder.value().isSpecial() - && serverPlayer.serverLevel().getGameRules().getBoolean(GameRules.RULE_LIMITED_CRAFTING) - && !serverPlayer.getRecipeBook().contains(recipeHolder.id())) { + default boolean setRecipeUsed(ServerPlayer player, RecipeHolder recipe) { + if (!recipe.value().isSpecial() + && player.serverLevel().getGameRules().getBoolean(GameRules.RULE_LIMITED_CRAFTING) + && !player.getRecipeBook().contains(recipe.id())) { return false; } else { - this.setRecipeUsed(recipeHolder); + this.setRecipeUsed(recipe); return true; } } diff --git a/net/minecraft/world/inventory/ResultSlot.java b/net/minecraft/world/inventory/ResultSlot.java index 95920ef6..59c6231f 100644 --- a/net/minecraft/world/inventory/ResultSlot.java +++ b/net/minecraft/world/inventory/ResultSlot.java @@ -8,6 +8,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingInput; import net.minecraft.world.item.crafting.CraftingRecipe; import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.item.crafting.CraftingInput.Positioned; import net.minecraft.world.level.Level; public class ResultSlot extends Slot { @@ -59,29 +60,29 @@ public class ResultSlot extends Slot { this.removeCount = 0; } - private static NonNullList copyAllInputItems(CraftingInput craftingInput) { - NonNullList nonNullList = NonNullList.withSize(craftingInput.size(), ItemStack.EMPTY); + private static NonNullList copyAllInputItems(CraftingInput input) { + NonNullList nonNullList = NonNullList.withSize(input.size(), ItemStack.EMPTY); for (int i = 0; i < nonNullList.size(); i++) { - nonNullList.set(i, craftingInput.getItem(i)); + nonNullList.set(i, input.getItem(i)); } return nonNullList; } - private NonNullList getRemainingItems(CraftingInput craftingInput, Level level) { + private NonNullList getRemainingItems(CraftingInput input, Level level) { return level instanceof ServerLevel serverLevel ? (NonNullList)serverLevel.recipeAccess() - .getRecipeFor(RecipeType.CRAFTING, craftingInput, serverLevel) - .map(recipeHolder -> ((CraftingRecipe)recipeHolder.value()).getRemainingItems(craftingInput)) - .orElseGet(() -> copyAllInputItems(craftingInput)) - : CraftingRecipe.defaultCraftingReminder(craftingInput); + .getRecipeFor(RecipeType.CRAFTING, input, serverLevel) + .map(recipeHolder -> ((CraftingRecipe)recipeHolder.value()).getRemainingItems(input)) + .orElseGet(() -> copyAllInputItems(input)) + : CraftingRecipe.defaultCraftingReminder(input); } @Override public void onTake(Player player, ItemStack stack) { this.checkTakeAchievements(stack); - CraftingInput.Positioned positioned = this.craftSlots.asPositionedCraftInput(); + Positioned positioned = this.craftSlots.asPositionedCraftInput(); CraftingInput craftingInput = positioned.input(); int i = positioned.left(); int j = positioned.top(); diff --git a/net/minecraft/world/inventory/SmithingMenu.java b/net/minecraft/world/inventory/SmithingMenu.java index aeb995c4..4a0c46e4 100644 --- a/net/minecraft/world/inventory/SmithingMenu.java +++ b/net/minecraft/world/inventory/SmithingMenu.java @@ -41,8 +41,8 @@ public class SmithingMenu extends ItemCombinerMenu { this(containerId, playerInventory, access, playerInventory.player.level()); } - private SmithingMenu(int i, Inventory inventory, ContainerLevelAccess containerLevelAccess, Level level) { - super(MenuType.SMITHING, i, inventory, containerLevelAccess, createInputSlotDefinitions(level.recipeAccess())); + private SmithingMenu(int containerId, Inventory playerInventory, ContainerLevelAccess access, Level level) { + super(MenuType.SMITHING, containerId, playerInventory, access, createInputSlotDefinitions(level.recipeAccess())); this.level = level; this.baseItemTest = level.recipeAccess().propertySet(RecipePropertySet.SMITHING_BASE); this.templateItemTest = level.recipeAccess().propertySet(RecipePropertySet.SMITHING_TEMPLATE); @@ -50,10 +50,10 @@ public class SmithingMenu extends ItemCombinerMenu { this.addDataSlot(this.hasRecipeError).set(0); } - private static ItemCombinerMenuSlotDefinition createInputSlotDefinitions(RecipeAccess recipeAccess) { - RecipePropertySet recipePropertySet = recipeAccess.propertySet(RecipePropertySet.SMITHING_BASE); - RecipePropertySet recipePropertySet2 = recipeAccess.propertySet(RecipePropertySet.SMITHING_TEMPLATE); - RecipePropertySet recipePropertySet3 = recipeAccess.propertySet(RecipePropertySet.SMITHING_ADDITION); + private static ItemCombinerMenuSlotDefinition createInputSlotDefinitions(RecipeAccess access) { + RecipePropertySet recipePropertySet = access.propertySet(RecipePropertySet.SMITHING_BASE); + RecipePropertySet recipePropertySet2 = access.propertySet(RecipePropertySet.SMITHING_TEMPLATE); + RecipePropertySet recipePropertySet3 = access.propertySet(RecipePropertySet.SMITHING_ADDITION); return ItemCombinerMenuSlotDefinition.create() .withSlot(0, 8, 48, recipePropertySet2::test) .withSlot(1, 26, 48, recipePropertySet::test) diff --git a/net/minecraft/world/inventory/StackedContentsCompatible.java b/net/minecraft/world/inventory/StackedContentsCompatible.java index afeb60d0..8105e68e 100644 --- a/net/minecraft/world/inventory/StackedContentsCompatible.java +++ b/net/minecraft/world/inventory/StackedContentsCompatible.java @@ -4,5 +4,5 @@ import net.minecraft.world.entity.player.StackedItemContents; @FunctionalInterface public interface StackedContentsCompatible { - void fillStackedContents(StackedItemContents stackedItemContents); + void fillStackedContents(StackedItemContents stackedContents); } diff --git a/net/minecraft/world/inventory/StonecutterMenu.java b/net/minecraft/world/inventory/StonecutterMenu.java index 9e8589f4..8c123e8b 100644 --- a/net/minecraft/world/inventory/StonecutterMenu.java +++ b/net/minecraft/world/inventory/StonecutterMenu.java @@ -147,22 +147,22 @@ public class StonecutterMenu extends AbstractContainerMenu { } } - private void setupRecipeList(ItemStack itemStack) { + private void setupRecipeList(ItemStack stack) { this.selectedRecipeIndex.set(-1); this.resultSlot.set(ItemStack.EMPTY); - if (!itemStack.isEmpty()) { - this.recipesForInput = this.level.recipeAccess().stonecutterRecipes().selectByInput(itemStack); + if (!stack.isEmpty()) { + this.recipesForInput = this.level.recipeAccess().stonecutterRecipes().selectByInput(stack); } else { this.recipesForInput = SelectableRecipe.SingleInputSet.empty(); } } - void setupResultSlot(int i) { + void setupResultSlot(int id) { Optional> optional; - if (!this.recipesForInput.isEmpty() && this.isValidRecipeIndex(i)) { + if (!this.recipesForInput.isEmpty() && this.isValidRecipeIndex(id)) { SelectableRecipe.SingleInputEntry singleInputEntry = (SelectableRecipe.SingleInputEntry)this.recipesForInput .entries() - .get(i); + .get(id); optional = singleInputEntry.recipe().recipe(); } else { optional = Optional.empty(); diff --git a/net/minecraft/world/item/AnimalArmorItem.java b/net/minecraft/world/item/AnimalArmorItem.java index 3be0a117..502e9bc4 100644 --- a/net/minecraft/world/item/AnimalArmorItem.java +++ b/net/minecraft/world/item/AnimalArmorItem.java @@ -10,13 +10,15 @@ import net.minecraft.world.item.equipment.ArmorMaterial; public class AnimalArmorItem extends Item { private final AnimalArmorItem.BodyType bodyType; - public AnimalArmorItem(ArmorMaterial armorMaterial, AnimalArmorItem.BodyType bodyType, Item.Properties properties) { - super(armorMaterial.animalProperties(properties, bodyType.allowedEntities)); + public AnimalArmorItem(ArmorMaterial material, AnimalArmorItem.BodyType bodyType, Item.Properties properties) { + super(material.animalProperties(properties, bodyType.allowedEntities)); this.bodyType = bodyType; } - public AnimalArmorItem(ArmorMaterial armorMaterial, AnimalArmorItem.BodyType bodyType, Holder holder, boolean bl, Item.Properties properties) { - super(armorMaterial.animalProperties(properties, holder, bl, bodyType.allowedEntities)); + public AnimalArmorItem( + ArmorMaterial material, AnimalArmorItem.BodyType bodyType, Holder equipSound, boolean damageOnHurt, Item.Properties properties + ) { + super(material.animalProperties(properties, equipSound, damageOnHurt, bodyType.allowedEntities)); this.bodyType = bodyType; } @@ -32,9 +34,9 @@ public class AnimalArmorItem extends Item { final SoundEvent breakingSound; final HolderSet> allowedEntities; - private BodyType(final SoundEvent soundEvent, final EntityType... entityTypes) { - this.breakingSound = soundEvent; - this.allowedEntities = HolderSet.direct(EntityType::builtInRegistryHolder, entityTypes); + private BodyType(final SoundEvent breakingSound, final EntityType... allowedEntities) { + this.breakingSound = breakingSound; + this.allowedEntities = HolderSet.direct(EntityType::builtInRegistryHolder, allowedEntities); } } } diff --git a/net/minecraft/world/item/ArmorItem.java b/net/minecraft/world/item/ArmorItem.java index 1fa798ee..19983832 100644 --- a/net/minecraft/world/item/ArmorItem.java +++ b/net/minecraft/world/item/ArmorItem.java @@ -4,7 +4,7 @@ import net.minecraft.world.item.equipment.ArmorMaterial; import net.minecraft.world.item.equipment.ArmorType; public class ArmorItem extends Item { - public ArmorItem(ArmorMaterial armorMaterial, ArmorType armorType, Item.Properties properties) { - super(armorMaterial.humanoidProperties(properties, armorType)); + public ArmorItem(ArmorMaterial material, ArmorType armorType, Item.Properties properties) { + super(material.humanoidProperties(properties, armorType)); } } diff --git a/net/minecraft/world/item/AxeItem.java b/net/minecraft/world/item/AxeItem.java index b30e2d1b..c32a36eb 100644 --- a/net/minecraft/world/item/AxeItem.java +++ b/net/minecraft/world/item/AxeItem.java @@ -53,8 +53,8 @@ public class AxeItem extends DiggerItem { .put(Blocks.BAMBOO_BLOCK, Blocks.STRIPPED_BAMBOO_BLOCK) .build(); - public AxeItem(ToolMaterial toolMaterial, float f, float g, Item.Properties properties) { - super(toolMaterial, BlockTags.MINEABLE_WITH_AXE, f, g, properties); + public AxeItem(ToolMaterial material, float attackDamage, float attackSpeed, Item.Properties properties) { + super(material, BlockTags.MINEABLE_WITH_AXE, attackDamage, attackSpeed, properties); } @Override diff --git a/net/minecraft/world/item/BoatItem.java b/net/minecraft/world/item/BoatItem.java index 575c4a0f..e8b1c3ce 100644 --- a/net/minecraft/world/item/BoatItem.java +++ b/net/minecraft/world/item/BoatItem.java @@ -29,8 +29,8 @@ public class BoatItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); HitResult hitResult = getPlayerPOVHitResult(level, player, Fluid.ANY); if (hitResult.getType() == Type.MISS) { return InteractionResult.PASS; @@ -75,13 +75,13 @@ public class BoatItem extends Item { } @Nullable - private AbstractBoat getBoat(Level level, HitResult hitResult, ItemStack itemStack, Player player) { + private AbstractBoat getBoat(Level level, HitResult hitResult, ItemStack stack, Player player) { AbstractBoat abstractBoat = this.entityType.create(level, EntitySpawnReason.SPAWN_ITEM_USE); if (abstractBoat != null) { Vec3 vec3 = hitResult.getLocation(); abstractBoat.setInitialPos(vec3.x, vec3.y, vec3.z); if (level instanceof ServerLevel serverLevel) { - EntityType.createDefaultStackConfig(serverLevel, itemStack, player).accept(abstractBoat); + EntityType.createDefaultStackConfig(serverLevel, stack, player).accept(abstractBoat); } } diff --git a/net/minecraft/world/item/BottleItem.java b/net/minecraft/world/item/BottleItem.java index 4e99dbb8..ae8b0cc0 100644 --- a/net/minecraft/world/item/BottleItem.java +++ b/net/minecraft/world/item/BottleItem.java @@ -27,13 +27,13 @@ public class BottleItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { + public InteractionResult use(Level level, Player player, InteractionHand hand) { List list = level.getEntitiesOfClass( AreaEffectCloud.class, player.getBoundingBox().inflate(2.0), areaEffectCloud -> areaEffectCloud != null && areaEffectCloud.isAlive() && areaEffectCloud.getOwner() instanceof EnderDragon ); - ItemStack itemStack = player.getItemInHand(interactionHand); + ItemStack itemStack = player.getItemInHand(hand); if (!list.isEmpty()) { AreaEffectCloud areaEffectCloud = (AreaEffectCloud)list.get(0); areaEffectCloud.setRadius(areaEffectCloud.getRadius() - 0.5F); diff --git a/net/minecraft/world/item/BowItem.java b/net/minecraft/world/item/BowItem.java index 9d5230e4..41046e8c 100644 --- a/net/minecraft/world/item/BowItem.java +++ b/net/minecraft/world/item/BowItem.java @@ -23,22 +23,22 @@ public class BowItem extends ProjectileWeaponItem { } @Override - public boolean releaseUsing(ItemStack itemStack, Level level, LivingEntity livingEntity, int i) { - if (!(livingEntity instanceof Player player)) { + public boolean releaseUsing(ItemStack stack, Level level, LivingEntity entity, int timeLeft) { + if (!(entity instanceof Player player)) { return false; } else { - ItemStack itemStack2 = player.getProjectile(itemStack); - if (itemStack2.isEmpty()) { + ItemStack itemStack = player.getProjectile(stack); + if (itemStack.isEmpty()) { return false; } else { - int j = this.getUseDuration(itemStack, livingEntity) - i; - float f = getPowerForTime(j); + int i = this.getUseDuration(stack, entity) - timeLeft; + float f = getPowerForTime(i); if (f < 0.1) { return false; } else { - List list = draw(itemStack, itemStack2, player); + List list = draw(stack, itemStack, player); if (level instanceof ServerLevel serverLevel && !list.isEmpty()) { - this.shoot(serverLevel, player, player.getUsedItemHand(), itemStack, list, f * 3.0F, 1.0F, f == 1.0F, null); + this.shoot(serverLevel, player, player.getUsedItemHand(), stack, list, f * 3.0F, 1.0F, f == 1.0F, null); } level.playSound( @@ -84,18 +84,18 @@ public class BowItem extends ProjectileWeaponItem { } @Override - public ItemUseAnimation getUseAnimation(ItemStack itemStack) { + public ItemUseAnimation getUseAnimation(ItemStack stack) { return ItemUseAnimation.BOW; } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); boolean bl = !player.getProjectile(itemStack).isEmpty(); if (!player.hasInfiniteMaterials() && !bl) { return InteractionResult.FAIL; } else { - player.startUsingItem(interactionHand); + player.startUsingItem(hand); return InteractionResult.CONSUME; } } diff --git a/net/minecraft/world/item/BrushItem.java b/net/minecraft/world/item/BrushItem.java index d17675bb..1261479a 100644 --- a/net/minecraft/world/item/BrushItem.java +++ b/net/minecraft/world/item/BrushItem.java @@ -46,7 +46,7 @@ public class BrushItem extends Item { } @Override - public ItemUseAnimation getUseAnimation(ItemStack itemStack) { + public ItemUseAnimation getUseAnimation(ItemStack stack) { return ItemUseAnimation.BRUSH; } diff --git a/net/minecraft/world/item/BucketItem.java b/net/minecraft/world/item/BucketItem.java index 6ec2f333..a1dc9326 100644 --- a/net/minecraft/world/item/BucketItem.java +++ b/net/minecraft/world/item/BucketItem.java @@ -36,8 +36,8 @@ public class BucketItem extends Item implements DispensibleContainerItem { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); BlockHitResult blockHitResult = getPlayerPOVHitResult( level, player, this.content == Fluids.EMPTY ? net.minecraft.world.level.ClipContext.Fluid.SOURCE_ONLY : net.minecraft.world.level.ClipContext.Fluid.NONE ); diff --git a/net/minecraft/world/item/BundleItem.java b/net/minecraft/world/item/BundleItem.java index eb4118e1..1c727f10 100644 --- a/net/minecraft/world/item/BundleItem.java +++ b/net/minecraft/world/item/BundleItem.java @@ -39,10 +39,10 @@ public class BundleItem extends Item { private final ResourceLocation openFrontModel; private final ResourceLocation openBackModel; - public BundleItem(ResourceLocation resourceLocation, ResourceLocation resourceLocation2, Item.Properties properties) { + public BundleItem(ResourceLocation openFrontModel, ResourceLocation openBackModel, Item.Properties properties) { super(properties); - this.openFrontModel = resourceLocation; - this.openBackModel = resourceLocation2; + this.openFrontModel = openFrontModel; + this.openBackModel = openBackModel; } public static float getFullnessDisplay(ItemStack stack) { @@ -138,17 +138,17 @@ public class BundleItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { + public InteractionResult use(Level level, Player player, InteractionHand hand) { if (level.isClientSide) { return InteractionResult.CONSUME; } else { - player.startUsingItem(interactionHand); + player.startUsingItem(hand); return InteractionResult.SUCCESS_SERVER; } } - private void dropContent(Level level, Player player, ItemStack itemStack) { - if (this.dropContent(itemStack, player)) { + private void dropContent(Level level, Player player, ItemStack stack) { + if (this.dropContent(stack, player)) { playDropContentsSound(level, player); player.awardStat(Stats.ITEM_USED.get(this)); } @@ -172,39 +172,39 @@ public class BundleItem extends Item { return bundleContents.weight().compareTo(Fraction.ONE) >= 0 ? FULL_BAR_COLOR : BAR_COLOR; } - public static void toggleSelectedItem(ItemStack itemStack, int i) { - BundleContents bundleContents = itemStack.get(DataComponents.BUNDLE_CONTENTS); + public static void toggleSelectedItem(ItemStack bundle, int selectedItem) { + BundleContents bundleContents = bundle.get(DataComponents.BUNDLE_CONTENTS); if (bundleContents != null) { BundleContents.Mutable mutable = new BundleContents.Mutable(bundleContents); - mutable.toggleSelectedItem(i); - itemStack.set(DataComponents.BUNDLE_CONTENTS, mutable.toImmutable()); + mutable.toggleSelectedItem(selectedItem); + bundle.set(DataComponents.BUNDLE_CONTENTS, mutable.toImmutable()); } } - public static boolean hasSelectedItem(ItemStack itemStack) { - BundleContents bundleContents = itemStack.getOrDefault(DataComponents.BUNDLE_CONTENTS, BundleContents.EMPTY); + public static boolean hasSelectedItem(ItemStack bundle) { + BundleContents bundleContents = bundle.getOrDefault(DataComponents.BUNDLE_CONTENTS, BundleContents.EMPTY); return bundleContents.getSelectedItem() != -1; } - public static int getSelectedItem(ItemStack itemStack) { - BundleContents bundleContents = itemStack.getOrDefault(DataComponents.BUNDLE_CONTENTS, BundleContents.EMPTY); + public static int getSelectedItem(ItemStack bundle) { + BundleContents bundleContents = bundle.getOrDefault(DataComponents.BUNDLE_CONTENTS, BundleContents.EMPTY); return bundleContents.getSelectedItem(); } - public static ItemStack getSelectedItemStack(ItemStack itemStack) { - BundleContents bundleContents = itemStack.getOrDefault(DataComponents.BUNDLE_CONTENTS, BundleContents.EMPTY); + public static ItemStack getSelectedItemStack(ItemStack bundle) { + BundleContents bundleContents = bundle.getOrDefault(DataComponents.BUNDLE_CONTENTS, BundleContents.EMPTY); return bundleContents.getItemUnsafe(bundleContents.getSelectedItem()); } - public static int getNumberOfItemsToShow(ItemStack itemStack) { - BundleContents bundleContents = itemStack.getOrDefault(DataComponents.BUNDLE_CONTENTS, BundleContents.EMPTY); + public static int getNumberOfItemsToShow(ItemStack bundle) { + BundleContents bundleContents = bundle.getOrDefault(DataComponents.BUNDLE_CONTENTS, BundleContents.EMPTY); return bundleContents.getNumberOfItemsToShow(); } - private boolean dropContent(ItemStack itemStack, Player player) { - BundleContents bundleContents = itemStack.get(DataComponents.BUNDLE_CONTENTS); + private boolean dropContent(ItemStack stack, Player player) { + BundleContents bundleContents = stack.get(DataComponents.BUNDLE_CONTENTS); if (bundleContents != null && !bundleContents.isEmpty()) { - Optional optional = removeOneItemFromBundle(itemStack, player, bundleContents); + Optional optional = removeOneItemFromBundle(stack, player, bundleContents); if (optional.isPresent()) { player.drop((ItemStack)optional.get(), true); return true; @@ -216,13 +216,13 @@ public class BundleItem extends Item { } } - private static Optional removeOneItemFromBundle(ItemStack itemStack, Player player, BundleContents bundleContents) { + private static Optional removeOneItemFromBundle(ItemStack stack, Player player, BundleContents bundleContents) { BundleContents.Mutable mutable = new BundleContents.Mutable(bundleContents); - ItemStack itemStack2 = mutable.removeOne(); - if (itemStack2 != null) { + ItemStack itemStack = mutable.removeOne(); + if (itemStack != null) { playRemoveOneSound(player); - itemStack.set(DataComponents.BUNDLE_CONTENTS, mutable.toImmutable()); - return Optional.of(itemStack2); + stack.set(DataComponents.BUNDLE_CONTENTS, mutable.toImmutable()); + return Optional.of(itemStack); } else { return Optional.empty(); } @@ -284,8 +284,8 @@ public class BundleItem extends Item { .toList(); } - public static Item getByColor(DyeColor dyeColor) { - return switch (dyeColor) { + public static Item getByColor(DyeColor color) { + return switch (color) { case WHITE -> Items.WHITE_BUNDLE; case ORANGE -> Items.ORANGE_BUNDLE; case MAGENTA -> Items.MAGENTA_BUNDLE; diff --git a/net/minecraft/world/item/CrossbowItem.java b/net/minecraft/world/item/CrossbowItem.java index 4e3d9c0b..16f72560 100644 --- a/net/minecraft/world/item/CrossbowItem.java +++ b/net/minecraft/world/item/CrossbowItem.java @@ -71,16 +71,16 @@ public class CrossbowItem extends ProjectileWeaponItem { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); ChargedProjectiles chargedProjectiles = itemStack.get(DataComponents.CHARGED_PROJECTILES); if (chargedProjectiles != null && !chargedProjectiles.isEmpty()) { - this.performShooting(level, player, interactionHand, itemStack, getShootingPower(chargedProjectiles), 1.0F, null); + this.performShooting(level, player, hand, itemStack, getShootingPower(chargedProjectiles), 1.0F, null); return InteractionResult.CONSUME; } else if (!player.getProjectile(itemStack).isEmpty()) { this.startSoundPlayed = false; this.midLoadSoundPlayed = false; - player.startUsingItem(interactionHand); + player.startUsingItem(hand); return InteractionResult.CONSUME; } else { return InteractionResult.FAIL; @@ -92,20 +92,20 @@ public class CrossbowItem extends ProjectileWeaponItem { } @Override - public boolean releaseUsing(ItemStack itemStack, Level level, LivingEntity livingEntity, int i) { - int j = this.getUseDuration(itemStack, livingEntity) - i; - float f = getPowerForTime(j, itemStack, livingEntity); - if (f >= 1.0F && !isCharged(itemStack) && tryLoadProjectiles(livingEntity, itemStack)) { - CrossbowItem.ChargingSounds chargingSounds = this.getChargingSounds(itemStack); + public boolean releaseUsing(ItemStack stack, Level level, LivingEntity entity, int timeLeft) { + int i = this.getUseDuration(stack, entity) - timeLeft; + float f = getPowerForTime(i, stack, entity); + if (f >= 1.0F && !isCharged(stack) && tryLoadProjectiles(entity, stack)) { + CrossbowItem.ChargingSounds chargingSounds = this.getChargingSounds(stack); chargingSounds.end() .ifPresent( holder -> level.playSound( null, - livingEntity.getX(), - livingEntity.getY(), - livingEntity.getZ(), + entity.getX(), + entity.getY(), + entity.getZ(), (SoundEvent)holder.value(), - livingEntity.getSoundSource(), + entity.getSoundSource(), 1.0F, 1.0F / (level.getRandom().nextFloat() * 0.5F + 1.0F) + 0.2F ) @@ -252,7 +252,7 @@ public class CrossbowItem extends ProjectileWeaponItem { } @Override - public ItemUseAnimation getUseAnimation(ItemStack itemStack) { + public ItemUseAnimation getUseAnimation(ItemStack stack) { return ItemUseAnimation.CROSSBOW; } diff --git a/net/minecraft/world/item/DiggerItem.java b/net/minecraft/world/item/DiggerItem.java index 3f805419..e873088b 100644 --- a/net/minecraft/world/item/DiggerItem.java +++ b/net/minecraft/world/item/DiggerItem.java @@ -6,8 +6,8 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.level.block.Block; public class DiggerItem extends Item { - protected DiggerItem(ToolMaterial toolMaterial, TagKey tagKey, float f, float g, Item.Properties properties) { - super(toolMaterial.applyToolProperties(properties, tagKey, f, g)); + protected DiggerItem(ToolMaterial material, TagKey mineableBlocks, float attackDamage, float attackSpeed, Item.Properties properties) { + super(material.applyToolProperties(properties, mineableBlocks, attackDamage, attackSpeed)); } @Override diff --git a/net/minecraft/world/item/EggItem.java b/net/minecraft/world/item/EggItem.java index c9bca140..c3c4e33d 100644 --- a/net/minecraft/world/item/EggItem.java +++ b/net/minecraft/world/item/EggItem.java @@ -19,8 +19,8 @@ public class EggItem extends Item implements ProjectileItem { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); level.playSound( null, player.getX(), player.getY(), player.getZ(), SoundEvents.EGG_THROW, SoundSource.PLAYERS, 0.5F, 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F) ); diff --git a/net/minecraft/world/item/EmptyMapItem.java b/net/minecraft/world/item/EmptyMapItem.java index 49a8b0b4..6786b638 100644 --- a/net/minecraft/world/item/EmptyMapItem.java +++ b/net/minecraft/world/item/EmptyMapItem.java @@ -13,8 +13,8 @@ public class EmptyMapItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); if (level.isClientSide) { return InteractionResult.SUCCESS; } else { diff --git a/net/minecraft/world/item/EnderEyeItem.java b/net/minecraft/world/item/EnderEyeItem.java index 5c0b869c..e3b3601c 100644 --- a/net/minecraft/world/item/EnderEyeItem.java +++ b/net/minecraft/world/item/EnderEyeItem.java @@ -71,13 +71,13 @@ public class EnderEyeItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); BlockHitResult blockHitResult = getPlayerPOVHitResult(level, player, Fluid.NONE); if (blockHitResult.getType() == Type.BLOCK && level.getBlockState(blockHitResult.getBlockPos()).is(Blocks.END_PORTAL_FRAME)) { return InteractionResult.PASS; } else { - player.startUsingItem(interactionHand); + player.startUsingItem(hand); if (level instanceof ServerLevel serverLevel) { BlockPos blockPos = serverLevel.findNearestMapStructure(StructureTags.EYE_OF_ENDER_LOCATED, player.blockPosition(), 100, false); if (blockPos == null) { diff --git a/net/minecraft/world/item/EnderpearlItem.java b/net/minecraft/world/item/EnderpearlItem.java index 8108f124..33102798 100644 --- a/net/minecraft/world/item/EnderpearlItem.java +++ b/net/minecraft/world/item/EnderpearlItem.java @@ -17,8 +17,8 @@ public class EnderpearlItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); level.playSound( null, player.getX(), diff --git a/net/minecraft/world/item/ExperienceBottleItem.java b/net/minecraft/world/item/ExperienceBottleItem.java index 0553ff0c..3a225780 100644 --- a/net/minecraft/world/item/ExperienceBottleItem.java +++ b/net/minecraft/world/item/ExperienceBottleItem.java @@ -20,8 +20,8 @@ public class ExperienceBottleItem extends Item implements ProjectileItem { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); level.playSound( null, player.getX(), diff --git a/net/minecraft/world/item/FireworkRocketItem.java b/net/minecraft/world/item/FireworkRocketItem.java index f1329dd2..18b0b78e 100644 --- a/net/minecraft/world/item/FireworkRocketItem.java +++ b/net/minecraft/world/item/FireworkRocketItem.java @@ -48,9 +48,9 @@ public class FireworkRocketItem extends Item implements ProjectileItem { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { + public InteractionResult use(Level level, Player player, InteractionHand hand) { if (player.isFallFlying()) { - ItemStack itemStack = player.getItemInHand(interactionHand); + ItemStack itemStack = player.getItemInHand(hand); if (level instanceof ServerLevel serverLevel) { Projectile.spawnProjectile(new FireworkRocketEntity(level, itemStack, player), serverLevel, itemStack); itemStack.consume(1, player); diff --git a/net/minecraft/world/item/FishingRodItem.java b/net/minecraft/world/item/FishingRodItem.java index 983f1b9c..f4be78f2 100644 --- a/net/minecraft/world/item/FishingRodItem.java +++ b/net/minecraft/world/item/FishingRodItem.java @@ -20,12 +20,12 @@ public class FishingRodItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); if (player.fishing != null) { if (!level.isClientSide) { int i = player.fishing.retrieve(itemStack); - itemStack.hurtAndBreak(i, player, LivingEntity.getSlotForHand(interactionHand)); + itemStack.hurtAndBreak(i, player, LivingEntity.getSlotForHand(hand)); } level.playSound( diff --git a/net/minecraft/world/item/FoodOnAStickItem.java b/net/minecraft/world/item/FoodOnAStickItem.java index 2cc6802b..e775130c 100644 --- a/net/minecraft/world/item/FoodOnAStickItem.java +++ b/net/minecraft/world/item/FoodOnAStickItem.java @@ -15,21 +15,21 @@ public class FoodOnAStickItem extends Item { private final EntityType canInteractWith; private final int consumeItemDamage; - public FoodOnAStickItem(EntityType entityType, int i, Item.Properties properties) { + public FoodOnAStickItem(EntityType canInteractWith, int consumeItemDamage, Item.Properties properties) { super(properties); - this.canInteractWith = entityType; - this.consumeItemDamage = i; + this.canInteractWith = canInteractWith; + this.consumeItemDamage = consumeItemDamage; } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); if (level.isClientSide) { return InteractionResult.PASS; } else { Entity entity = player.getControlledVehicle(); if (player.isPassenger() && entity instanceof ItemSteerable itemSteerable && entity.getType() == this.canInteractWith && itemSteerable.boost()) { - EquipmentSlot equipmentSlot = LivingEntity.getSlotForHand(interactionHand); + EquipmentSlot equipmentSlot = LivingEntity.getSlotForHand(hand); ItemStack itemStack2 = itemStack.hurtAndConvertOnBreak(this.consumeItemDamage, Items.FISHING_ROD, player, equipmentSlot); return InteractionResult.SUCCESS_SERVER.heldItemTransformedTo(itemStack2); } else { diff --git a/net/minecraft/world/item/HoeItem.java b/net/minecraft/world/item/HoeItem.java index f94265d4..c52398f2 100644 --- a/net/minecraft/world/item/HoeItem.java +++ b/net/minecraft/world/item/HoeItem.java @@ -39,8 +39,8 @@ public class HoeItem extends DiggerItem { ) ); - public HoeItem(ToolMaterial toolMaterial, float f, float g, Item.Properties properties) { - super(toolMaterial, BlockTags.MINEABLE_WITH_HOE, f, g, properties); + public HoeItem(ToolMaterial material, float attackDamage, float attackSpeed, Item.Properties properties) { + super(material, BlockTags.MINEABLE_WITH_HOE, attackDamage, attackSpeed, properties); } @Override diff --git a/net/minecraft/world/item/InstrumentItem.java b/net/minecraft/world/item/InstrumentItem.java index cfd40a01..9e497e71 100644 --- a/net/minecraft/world/item/InstrumentItem.java +++ b/net/minecraft/world/item/InstrumentItem.java @@ -6,7 +6,7 @@ import java.util.Optional; import net.minecraft.ChatFormatting; import net.minecraft.core.Holder; import net.minecraft.core.HolderLookup; -import net.minecraft.core.HolderSet; +import net.minecraft.core.HolderSet.Named; import net.minecraft.core.component.DataComponents; import net.minecraft.core.registries.Registries; import net.minecraft.network.chat.Component; @@ -29,9 +29,9 @@ import net.minecraft.world.level.gameevent.GameEvent.Context; public class InstrumentItem extends Item { private final TagKey instruments; - public InstrumentItem(TagKey tagKey, Item.Properties properties) { + public InstrumentItem(TagKey instruments, Item.Properties properties) { super(properties); - this.instruments = tagKey; + this.instruments = instruments; } @Override @@ -55,12 +55,12 @@ public class InstrumentItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); Optional> optional = this.getInstrument(itemStack, player.registryAccess()); if (optional.isPresent()) { Instrument instrument = (Instrument)((Holder)optional.get()).value(); - player.startUsingItem(interactionHand); + player.startUsingItem(hand); play(level, player, instrument); player.getCooldowns().addCooldown(itemStack, Mth.floor(instrument.useDuration() * 20.0F)); player.awardStat(Stats.ITEM_USED.get(this)); @@ -76,14 +76,14 @@ public class InstrumentItem extends Item { return (Integer)optional.map(holder -> Mth.floor(((Instrument)holder.value()).useDuration() * 20.0F)).orElse(0); } - private Optional> getInstrument(ItemStack itemStack, HolderLookup.Provider provider) { - Holder holder = itemStack.get(DataComponents.INSTRUMENT); + private Optional> getInstrument(ItemStack stack, HolderLookup.Provider registries) { + Holder holder = stack.get(DataComponents.INSTRUMENT); if (holder != null) { return Optional.of(holder); } else { - Optional> optional = provider.lookupOrThrow(Registries.INSTRUMENT).get(this.instruments); + Optional> optional = registries.lookupOrThrow(Registries.INSTRUMENT).get(this.instruments); if (optional.isPresent()) { - Iterator> iterator = ((HolderSet.Named)optional.get()).iterator(); + Iterator> iterator = ((Named)optional.get()).iterator(); if (iterator.hasNext()) { return Optional.of((Holder)iterator.next()); } @@ -94,7 +94,7 @@ public class InstrumentItem extends Item { } @Override - public ItemUseAnimation getUseAnimation(ItemStack itemStack) { + public ItemUseAnimation getUseAnimation(ItemStack stack) { return ItemUseAnimation.TOOT_HORN; } diff --git a/net/minecraft/world/item/Instruments.java b/net/minecraft/world/item/Instruments.java index a047b171..817aac4f 100644 --- a/net/minecraft/world/item/Instruments.java +++ b/net/minecraft/world/item/Instruments.java @@ -27,19 +27,19 @@ public interface Instruments { return ResourceKey.create(Registries.INSTRUMENT, ResourceLocation.withDefaultNamespace(name)); } - static void bootstrap(BootstrapContext bootstrapContext) { - register(bootstrapContext, PONDER_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(0), 7.0F, 256.0F); - register(bootstrapContext, SING_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(1), 7.0F, 256.0F); - register(bootstrapContext, SEEK_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(2), 7.0F, 256.0F); - register(bootstrapContext, FEEL_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(3), 7.0F, 256.0F); - register(bootstrapContext, ADMIRE_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(4), 7.0F, 256.0F); - register(bootstrapContext, CALL_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(5), 7.0F, 256.0F); - register(bootstrapContext, YEARN_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(6), 7.0F, 256.0F); - register(bootstrapContext, DREAM_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(7), 7.0F, 256.0F); + static void bootstrap(BootstrapContext context) { + register(context, PONDER_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(0), 7.0F, 256.0F); + register(context, SING_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(1), 7.0F, 256.0F); + register(context, SEEK_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(2), 7.0F, 256.0F); + register(context, FEEL_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(3), 7.0F, 256.0F); + register(context, ADMIRE_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(4), 7.0F, 256.0F); + register(context, CALL_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(5), 7.0F, 256.0F); + register(context, YEARN_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(6), 7.0F, 256.0F); + register(context, DREAM_GOAT_HORN, (Holder)SoundEvents.GOAT_HORN_SOUND_VARIANTS.get(7), 7.0F, 256.0F); } - static void register(BootstrapContext bootstrapContext, ResourceKey resourceKey, Holder holder, float f, float g) { - MutableComponent mutableComponent = Component.translatable(Util.makeDescriptionId("instrument", resourceKey.location())); - bootstrapContext.register(resourceKey, new Instrument(holder, f, g, mutableComponent)); + static void register(BootstrapContext context, ResourceKey key, Holder soundEvent, float useDuration, float range) { + MutableComponent mutableComponent = Component.translatable(Util.makeDescriptionId("instrument", key.location())); + context.register(key, new Instrument(soundEvent, useDuration, range, mutableComponent)); } } diff --git a/net/minecraft/world/item/Item.java b/net/minecraft/world/item/Item.java index 7a3301ab..ba05b3d8 100644 --- a/net/minecraft/world/item/Item.java +++ b/net/minecraft/world/item/Item.java @@ -16,6 +16,7 @@ import net.minecraft.core.Holder; import net.minecraft.core.HolderGetter; import net.minecraft.core.HolderLookup; import net.minecraft.core.HolderSet; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.component.DataComponentMap; import net.minecraft.core.component.DataComponentType; import net.minecraft.core.component.DataComponents; @@ -86,7 +87,7 @@ public class Item implements FeatureElement, ItemLike { public static final int DEFAULT_MAX_STACK_SIZE = 64; public static final int ABSOLUTE_MAX_STACK_SIZE = 99; public static final int MAX_BAR_WIDTH = 13; - private final Holder.Reference builtInRegistryHolder = BuiltInRegistries.ITEM.createIntrusiveHolder(this); + private final Reference builtInRegistryHolder = BuiltInRegistries.ITEM.createIntrusiveHolder(this); private final DataComponentMap components; @Nullable private final Item craftingRemainingItem; @@ -120,7 +121,7 @@ public class Item implements FeatureElement, ItemLike { } @Deprecated - public Holder.Reference builtInRegistryHolder() { + public Reference builtInRegistryHolder() { return this.builtInRegistryHolder; } @@ -165,11 +166,11 @@ public class Item implements FeatureElement, ItemLike { return tool != null ? tool.getMiningSpeed(state) : 1.0F; } - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); Consumable consumable = itemStack.get(DataComponents.CONSUMABLE); if (consumable != null) { - return consumable.startConsuming(player, itemStack, interactionHand); + return consumable.startConsuming(player, itemStack, hand); } else { Equippable equippable = itemStack.get(DataComponents.EQUIPPABLE); return (InteractionResult)(equippable != null && equippable.swappable() ? equippable.swapWithEquipmentSlot(itemStack, player) : InteractionResult.PASS); @@ -211,7 +212,7 @@ public class Item implements FeatureElement, ItemLike { } @Nullable - public DamageSource getDamageSource(LivingEntity livingEntity) { + public DamageSource getDamageSource(LivingEntity entity) { return null; } @@ -277,8 +278,8 @@ public class Item implements FeatureElement, ItemLike { public void onCraftedPostProcess(ItemStack stack, Level level) { } - public ItemUseAnimation getUseAnimation(ItemStack itemStack) { - Consumable consumable = itemStack.get(DataComponents.CONSUMABLE); + public ItemUseAnimation getUseAnimation(ItemStack stack) { + Consumable consumable = stack.get(DataComponents.CONSUMABLE); return consumable != null ? consumable.animation() : ItemUseAnimation.NONE; } @@ -287,7 +288,7 @@ public class Item implements FeatureElement, ItemLike { return consumable != null ? consumable.consumeTicks() : 0; } - public boolean releaseUsing(ItemStack itemStack, Level level, LivingEntity livingEntity, int i) { + public boolean releaseUsing(ItemStack stack, Level level, LivingEntity entity, int timeLeft) { return false; } @@ -369,16 +370,16 @@ public class Item implements FeatureElement, ItemLike { return this.food(food, Consumables.DEFAULT_FOOD); } - public Item.Properties food(FoodProperties foodProperties, Consumable consumable) { - return this.component(DataComponents.FOOD, foodProperties).component(DataComponents.CONSUMABLE, consumable); + public Item.Properties food(FoodProperties food, Consumable consumable) { + return this.component(DataComponents.FOOD, food).component(DataComponents.CONSUMABLE, consumable); } - public Item.Properties usingConvertsTo(Item item) { - return this.component(DataComponents.USE_REMAINDER, new UseRemainder(new ItemStack(item))); + public Item.Properties usingConvertsTo(Item usingConvertsTo) { + return this.component(DataComponents.USE_REMAINDER, new UseRemainder(new ItemStack(usingConvertsTo))); } - public Item.Properties useCooldown(float f) { - return this.component(DataComponents.USE_COOLDOWN, new UseCooldown(f)); + public Item.Properties useCooldown(float useCooldown) { + return this.component(DataComponents.USE_COOLDOWN, new UseCooldown(useCooldown)); } public Item.Properties stacksTo(int maxStackSize) { @@ -409,25 +410,25 @@ public class Item implements FeatureElement, ItemLike { return this.component(DataComponents.JUKEBOX_PLAYABLE, new JukeboxPlayable(new EitherHolder<>(song), true)); } - public Item.Properties enchantable(int i) { - return this.component(DataComponents.ENCHANTABLE, new Enchantable(i)); + public Item.Properties enchantable(int enchantmentValue) { + return this.component(DataComponents.ENCHANTABLE, new Enchantable(enchantmentValue)); } - public Item.Properties repairable(Item item) { - return this.component(DataComponents.REPAIRABLE, new Repairable(HolderSet.direct(item.builtInRegistryHolder()))); + public Item.Properties repairable(Item repairItem) { + return this.component(DataComponents.REPAIRABLE, new Repairable(HolderSet.direct(repairItem.builtInRegistryHolder()))); } - public Item.Properties repairable(TagKey tagKey) { + public Item.Properties repairable(TagKey repairItems) { HolderGetter holderGetter = BuiltInRegistries.acquireBootstrapRegistrationLookup(BuiltInRegistries.ITEM); - return this.component(DataComponents.REPAIRABLE, new Repairable(holderGetter.getOrThrow(tagKey))); + return this.component(DataComponents.REPAIRABLE, new Repairable(holderGetter.getOrThrow(repairItems))); } - public Item.Properties equippable(EquipmentSlot equipmentSlot) { - return this.component(DataComponents.EQUIPPABLE, Equippable.builder(equipmentSlot).build()); + public Item.Properties equippable(EquipmentSlot slot) { + return this.component(DataComponents.EQUIPPABLE, Equippable.builder(slot).build()); } - public Item.Properties equippableUnswappable(EquipmentSlot equipmentSlot) { - return this.component(DataComponents.EQUIPPABLE, Equippable.builder(equipmentSlot).setSwappable(false).build()); + public Item.Properties equippableUnswappable(EquipmentSlot slot) { + return this.component(DataComponents.EQUIPPABLE, Equippable.builder(slot).setSwappable(false).build()); } public Item.Properties requiredFeatures(FeatureFlag... requiredFeatures) { @@ -435,13 +436,13 @@ public class Item implements FeatureElement, ItemLike { return this; } - public Item.Properties setId(ResourceKey resourceKey) { - this.id = resourceKey; + public Item.Properties setId(ResourceKey id) { + this.id = id; return this; } - public Item.Properties overrideDescription(String string) { - this.descriptionId = DependantName.fixed(string); + public Item.Properties overrideDescription(String description) { + this.descriptionId = DependantName.fixed(description); return this; } @@ -459,8 +460,8 @@ public class Item implements FeatureElement, ItemLike { return this.descriptionId.get((ResourceKey)Objects.requireNonNull(this.id, "Item id not set")); } - public Item.Properties overrideModel(ResourceLocation resourceLocation) { - this.model = DependantName.fixed(resourceLocation); + public Item.Properties overrideModel(ResourceLocation model) { + this.model = DependantName.fixed(model); return this; } @@ -477,8 +478,8 @@ public class Item implements FeatureElement, ItemLike { return this.component(DataComponents.ATTRIBUTE_MODIFIERS, attributes); } - DataComponentMap buildAndValidateComponents(Component component, ResourceLocation resourceLocation) { - DataComponentMap dataComponentMap = this.components.set(DataComponents.ITEM_NAME, component).set(DataComponents.ITEM_MODEL, resourceLocation).build(); + DataComponentMap buildAndValidateComponents(Component itemName, ResourceLocation itemModel) { + DataComponentMap dataComponentMap = this.components.set(DataComponents.ITEM_NAME, itemName).set(DataComponents.ITEM_MODEL, itemModel).build(); if (dataComponentMap.has(DataComponents.DAMAGE) && dataComponentMap.getOrDefault(DataComponents.MAX_STACK_SIZE, 1) > 1) { throw new IllegalStateException("Item cannot have both durability and be stackable"); } else { diff --git a/net/minecraft/world/item/ItemCooldowns.java b/net/minecraft/world/item/ItemCooldowns.java index f37b25ac..ed0b495a 100644 --- a/net/minecraft/world/item/ItemCooldowns.java +++ b/net/minecraft/world/item/ItemCooldowns.java @@ -14,17 +14,17 @@ public class ItemCooldowns { private final Map cooldowns = Maps.newHashMap(); private int tickCount; - public boolean isOnCooldown(ItemStack itemStack) { - return this.getCooldownPercent(itemStack, 0.0F) > 0.0F; + public boolean isOnCooldown(ItemStack stack) { + return this.getCooldownPercent(stack, 0.0F) > 0.0F; } - public float getCooldownPercent(ItemStack itemStack, float f) { - ResourceLocation resourceLocation = this.getCooldownGroup(itemStack); + public float getCooldownPercent(ItemStack stack, float partialTick) { + ResourceLocation resourceLocation = this.getCooldownGroup(stack); ItemCooldowns.CooldownInstance cooldownInstance = (ItemCooldowns.CooldownInstance)this.cooldowns.get(resourceLocation); if (cooldownInstance != null) { - float g = cooldownInstance.endTime - cooldownInstance.startTime; - float h = cooldownInstance.endTime - (this.tickCount + f); - return Mth.clamp(h / g, 0.0F, 1.0F); + float f = cooldownInstance.endTime - cooldownInstance.startTime; + float g = cooldownInstance.endTime - (this.tickCount + partialTick); + return Mth.clamp(g / f, 0.0F, 1.0F); } else { return 0.0F; } @@ -45,30 +45,30 @@ public class ItemCooldowns { } } - public ResourceLocation getCooldownGroup(ItemStack itemStack) { - UseCooldown useCooldown = itemStack.get(DataComponents.USE_COOLDOWN); - ResourceLocation resourceLocation = BuiltInRegistries.ITEM.getKey(itemStack.getItem()); + public ResourceLocation getCooldownGroup(ItemStack stack) { + UseCooldown useCooldown = stack.get(DataComponents.USE_COOLDOWN); + ResourceLocation resourceLocation = BuiltInRegistries.ITEM.getKey(stack.getItem()); return useCooldown == null ? resourceLocation : (ResourceLocation)useCooldown.cooldownGroup().orElse(resourceLocation); } - public void addCooldown(ItemStack itemStack, int i) { - this.addCooldown(this.getCooldownGroup(itemStack), i); + public void addCooldown(ItemStack stack, int cooldown) { + this.addCooldown(this.getCooldownGroup(stack), cooldown); } - public void addCooldown(ResourceLocation resourceLocation, int i) { - this.cooldowns.put(resourceLocation, new ItemCooldowns.CooldownInstance(this.tickCount, this.tickCount + i)); - this.onCooldownStarted(resourceLocation, i); + public void addCooldown(ResourceLocation group, int cooldown) { + this.cooldowns.put(group, new ItemCooldowns.CooldownInstance(this.tickCount, this.tickCount + cooldown)); + this.onCooldownStarted(group, cooldown); } - public void removeCooldown(ResourceLocation resourceLocation) { - this.cooldowns.remove(resourceLocation); - this.onCooldownEnded(resourceLocation); + public void removeCooldown(ResourceLocation group) { + this.cooldowns.remove(group); + this.onCooldownEnded(group); } - protected void onCooldownStarted(ResourceLocation resourceLocation, int i) { + protected void onCooldownStarted(ResourceLocation group, int cooldown) { } - protected void onCooldownEnded(ResourceLocation resourceLocation) { + protected void onCooldownEnded(ResourceLocation group) { } record CooldownInstance(int startTime, int endTime) { diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java index a6d6ee50..c32c55da 100644 --- a/net/minecraft/world/item/ItemStack.java +++ b/net/minecraft/world/item/ItemStack.java @@ -372,10 +372,10 @@ public final class ItemStack implements DataComponentHolder { return this.getItem().getDestroySpeed(this, state); } - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { + public InteractionResult use(Level level, Player player, InteractionHand hand) { ItemStack itemStack = this.copy(); boolean bl = this.getUseDuration(player) <= 0; - InteractionResult interactionResult = this.getItem().use(level, player, interactionHand); + InteractionResult interactionResult = this.getItem().use(level, player, hand); return (InteractionResult)(bl && interactionResult instanceof InteractionResult.Success success ? success.heldItemTransformedTo( success.heldItemTransformedTo() == null @@ -394,20 +394,20 @@ public final class ItemStack implements DataComponentHolder { return itemStack2.applyAfterUseComponentSideEffects(livingEntity, itemStack); } - private ItemStack applyAfterUseComponentSideEffects(LivingEntity livingEntity, ItemStack itemStack) { - UseRemainder useRemainder = itemStack.get(DataComponents.USE_REMAINDER); - UseCooldown useCooldown = itemStack.get(DataComponents.USE_COOLDOWN); - int i = itemStack.getCount(); - ItemStack itemStack2 = this; + private ItemStack applyAfterUseComponentSideEffects(LivingEntity entity, ItemStack stack) { + UseRemainder useRemainder = stack.get(DataComponents.USE_REMAINDER); + UseCooldown useCooldown = stack.get(DataComponents.USE_COOLDOWN); + int i = stack.getCount(); + ItemStack itemStack = this; if (useRemainder != null) { - itemStack2 = useRemainder.convertIntoRemainder(this, i, livingEntity.hasInfiniteMaterials(), livingEntity::handleExtraItemsCreatedOnUse); + itemStack = useRemainder.convertIntoRemainder(this, i, entity.hasInfiniteMaterials(), entity::handleExtraItemsCreatedOnUse); } if (useCooldown != null) { - useCooldown.apply(itemStack, livingEntity); + useCooldown.apply(stack, entity); } - return itemStack2; + return itemStack; } public Tag save(HolderLookup.Provider levelRegistryAccess, Tag outputTag) { @@ -488,38 +488,38 @@ public final class ItemStack implements DataComponentHolder { } } - private int processDurabilityChange(int i, ServerLevel serverLevel, @Nullable ServerPlayer serverPlayer) { + private int processDurabilityChange(int damage, ServerLevel level, @Nullable ServerPlayer player) { if (!this.isDamageableItem()) { return 0; - } else if (serverPlayer != null && serverPlayer.hasInfiniteMaterials()) { + } else if (player != null && player.hasInfiniteMaterials()) { return 0; } else { - return i > 0 ? EnchantmentHelper.processDurabilityChange(serverLevel, this, i) : i; + return damage > 0 ? EnchantmentHelper.processDurabilityChange(level, this, damage) : damage; } } - private void applyDamage(int i, @Nullable ServerPlayer serverPlayer, Consumer consumer) { - if (serverPlayer != null) { - CriteriaTriggers.ITEM_DURABILITY_CHANGED.trigger(serverPlayer, this, i); + private void applyDamage(int damage, @Nullable ServerPlayer player, Consumer onBreak) { + if (player != null) { + CriteriaTriggers.ITEM_DURABILITY_CHANGED.trigger(player, this, damage); } - this.setDamageValue(i); + this.setDamageValue(damage); if (this.isBroken()) { Item item = this.getItem(); this.shrink(1); - consumer.accept(item); + onBreak.accept(item); } } - public void hurtWithoutBreaking(int i, Player player) { + public void hurtWithoutBreaking(int damage, Player player) { if (player instanceof ServerPlayer serverPlayer) { - int j = this.processDurabilityChange(i, serverPlayer.serverLevel(), serverPlayer); - if (j == 0) { + int i = this.processDurabilityChange(damage, serverPlayer.serverLevel(), serverPlayer); + if (i == 0) { return; } - int k = Math.min(this.getDamageValue() + j, this.getMaxDamage() - 1); - this.applyDamage(k, serverPlayer, item -> {}); + int j = Math.min(this.getDamageValue() + i, this.getMaxDamage() - 1); + this.applyDamage(j, serverPlayer, item -> {}); } } @@ -563,10 +563,10 @@ public final class ItemStack implements DataComponentHolder { return this.getItem().overrideOtherStackedOnMe(this, stack, slot, action, player, access); } - public boolean hurtEnemy(LivingEntity livingEntity, LivingEntity livingEntity2) { + public boolean hurtEnemy(LivingEntity enemy, LivingEntity attacker) { Item item = this.getItem(); - if (item.hurtEnemy(this, livingEntity, livingEntity2)) { - if (livingEntity2 instanceof Player player) { + if (item.hurtEnemy(this, enemy, attacker)) { + if (attacker instanceof Player player) { player.awardStat(Stats.ITEM_USED.get(item)); } @@ -576,8 +576,8 @@ public final class ItemStack implements DataComponentHolder { } } - public void postHurtEnemy(LivingEntity livingEntity, LivingEntity livingEntity2) { - this.getItem().postHurtEnemy(this, livingEntity, livingEntity2); + public void postHurtEnemy(LivingEntity enemy, LivingEntity attacker) { + this.getItem().postHurtEnemy(this, enemy, attacker); } /** @@ -1126,13 +1126,13 @@ public final class ItemStack implements DataComponentHolder { /** * Called as the stack is being used by an entity. */ - public void onUseTick(Level level, LivingEntity livingEntity, int count) { + public void onUseTick(Level level, LivingEntity livingEntity, int remainingUseDuration) { Consumable consumable = this.get(DataComponents.CONSUMABLE); - if (consumable != null && consumable.shouldEmitParticlesAndSounds(count)) { + if (consumable != null && consumable.shouldEmitParticlesAndSounds(remainingUseDuration)) { consumable.emitParticlesAndSounds(livingEntity.getRandom(), livingEntity, this, 5); } - this.getItem().onUseTick(level, livingEntity, this, count); + this.getItem().onUseTick(level, livingEntity, this, remainingUseDuration); } public void onDestroyed(ItemEntity itemEntity) { @@ -1148,8 +1148,8 @@ public final class ItemStack implements DataComponentHolder { return damageResistant == null || !damageResistant.isResistantTo(damageSource); } - public boolean isValidRepairItem(ItemStack itemStack) { + public boolean isValidRepairItem(ItemStack item) { Repairable repairable = this.get(DataComponents.REPAIRABLE); - return repairable != null && repairable.isValidRepairItem(itemStack); + return repairable != null && repairable.isValidRepairItem(item); } } diff --git a/net/minecraft/world/item/ItemUseAnimation.java b/net/minecraft/world/item/ItemUseAnimation.java index bf9184de..d5b88fa6 100644 --- a/net/minecraft/world/item/ItemUseAnimation.java +++ b/net/minecraft/world/item/ItemUseAnimation.java @@ -27,9 +27,9 @@ public enum ItemUseAnimation implements StringRepresentable { private final int id; private final String name; - private ItemUseAnimation(final int j, final String string2) { - this.id = j; - this.name = string2; + private ItemUseAnimation(final int id, final String name) { + this.id = id; + this.name = name; } public int getId() { diff --git a/net/minecraft/world/item/ItemUtils.java b/net/minecraft/world/item/ItemUtils.java index d493f1b8..c2d8c9a6 100644 --- a/net/minecraft/world/item/ItemUtils.java +++ b/net/minecraft/world/item/ItemUtils.java @@ -7,8 +7,8 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; public class ItemUtils { - public static InteractionResult startUsingInstantly(Level level, Player player, InteractionHand interactionHand) { - player.startUsingItem(interactionHand); + public static InteractionResult startUsingInstantly(Level level, Player player, InteractionHand hand) { + player.startUsingItem(hand); return InteractionResult.CONSUME; } diff --git a/net/minecraft/world/item/Items.java b/net/minecraft/world/item/Items.java index 158baa17..8014d820 100644 --- a/net/minecraft/world/item/Items.java +++ b/net/minecraft/world/item/Items.java @@ -2316,12 +2316,12 @@ public class Items { return properties -> new BlockItem(block, properties.useItemDescriptionPrefix()); } - private static ResourceKey vanillaItemId(String string) { - return ResourceKey.create(Registries.ITEM, ResourceLocation.withDefaultNamespace(string)); + private static ResourceKey vanillaItemId(String name) { + return ResourceKey.create(Registries.ITEM, ResourceLocation.withDefaultNamespace(name)); } - private static ResourceKey blockIdToItemId(ResourceKey resourceKey) { - return ResourceKey.create(Registries.ITEM, resourceKey.location()); + private static ResourceKey blockIdToItemId(ResourceKey blockId) { + return ResourceKey.create(Registries.ITEM, blockId.location()); } public static Item registerBlock(Block block) { @@ -2348,42 +2348,42 @@ public class Items { return item; } - public static Item registerBlock(Block block, BiFunction biFunction) { - return registerBlock(block, biFunction, new Item.Properties()); + public static Item registerBlock(Block block, BiFunction factory) { + return registerBlock(block, factory, new Item.Properties()); } - public static Item registerBlock(Block block, BiFunction biFunction, Item.Properties properties) { + public static Item registerBlock(Block block, BiFunction factory, Item.Properties properties) { return registerItem( - blockIdToItemId(block.builtInRegistryHolder().key()), propertiesx -> (Item)biFunction.apply(block, propertiesx), properties.useBlockDescriptionPrefix() + blockIdToItemId(block.builtInRegistryHolder().key()), propertiesx -> (Item)factory.apply(block, propertiesx), properties.useBlockDescriptionPrefix() ); } - public static Item registerItem(String string, Function function) { - return registerItem(vanillaItemId(string), function, new Item.Properties()); + public static Item registerItem(String name, Function factory) { + return registerItem(vanillaItemId(name), factory, new Item.Properties()); } - public static Item registerItem(String string, Function function, Item.Properties properties) { - return registerItem(vanillaItemId(string), function, properties); + public static Item registerItem(String name, Function factory, Item.Properties properties) { + return registerItem(vanillaItemId(name), factory, properties); } - public static Item registerItem(String string, Item.Properties properties) { - return registerItem(vanillaItemId(string), Item::new, properties); + public static Item registerItem(String name, Item.Properties properties) { + return registerItem(vanillaItemId(name), Item::new, properties); } - public static Item registerItem(String string) { - return registerItem(vanillaItemId(string), Item::new, new Item.Properties()); + public static Item registerItem(String name) { + return registerItem(vanillaItemId(name), Item::new, new Item.Properties()); } - public static Item registerItem(ResourceKey resourceKey, Function function) { - return registerItem(resourceKey, function, new Item.Properties()); + public static Item registerItem(ResourceKey key, Function factory) { + return registerItem(key, factory, new Item.Properties()); } - public static Item registerItem(ResourceKey resourceKey, Function function, Item.Properties properties) { - Item item = (Item)function.apply(properties.setId(resourceKey)); + public static Item registerItem(ResourceKey key, Function factory, Item.Properties properties) { + Item item = (Item)factory.apply(properties.setId(key)); if (item instanceof BlockItem blockItem) { blockItem.registerBlocks(Item.BY_BLOCK, item); } - return Registry.register(BuiltInRegistries.ITEM, resourceKey, item); + return Registry.register(BuiltInRegistries.ITEM, key, item); } } diff --git a/net/minecraft/world/item/JukeboxPlayable.java b/net/minecraft/world/item/JukeboxPlayable.java index 5adee898..b9c53b20 100644 --- a/net/minecraft/world/item/JukeboxPlayable.java +++ b/net/minecraft/world/item/JukeboxPlayable.java @@ -59,18 +59,18 @@ public record JukeboxPlayable(EitherHolder song, boolean showInTool return new JukeboxPlayable(this.song, showInTooltip); } - public static InteractionResult tryInsertIntoJukebox(Level level, BlockPos blockPos, ItemStack itemStack, Player player) { - JukeboxPlayable jukeboxPlayable = itemStack.get(DataComponents.JUKEBOX_PLAYABLE); + public static InteractionResult tryInsertIntoJukebox(Level level, BlockPos pos, ItemStack stack, Player player) { + JukeboxPlayable jukeboxPlayable = stack.get(DataComponents.JUKEBOX_PLAYABLE); if (jukeboxPlayable == null) { return InteractionResult.TRY_WITH_EMPTY_HAND; } else { - BlockState blockState = level.getBlockState(blockPos); + BlockState blockState = level.getBlockState(pos); if (blockState.is(Blocks.JUKEBOX) && !(Boolean)blockState.getValue(JukeboxBlock.HAS_RECORD)) { if (!level.isClientSide) { - ItemStack itemStack2 = itemStack.consumeAndReturn(1, player); - if (level.getBlockEntity(blockPos) instanceof JukeboxBlockEntity jukeboxBlockEntity) { - jukeboxBlockEntity.setTheItem(itemStack2); - level.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, Context.of(player, blockState)); + ItemStack itemStack = stack.consumeAndReturn(1, player); + if (level.getBlockEntity(pos) instanceof JukeboxBlockEntity jukeboxBlockEntity) { + jukeboxBlockEntity.setTheItem(itemStack); + level.gameEvent(GameEvent.BLOCK_CHANGE, pos, Context.of(player, blockState)); } player.awardStat(Stats.PLAY_RECORD); diff --git a/net/minecraft/world/item/KnowledgeBookItem.java b/net/minecraft/world/item/KnowledgeBookItem.java index cd0b7768..200c67ad 100644 --- a/net/minecraft/world/item/KnowledgeBookItem.java +++ b/net/minecraft/world/item/KnowledgeBookItem.java @@ -24,8 +24,8 @@ public class KnowledgeBookItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); List>> list = itemStack.getOrDefault(DataComponents.RECIPES, List.of()); itemStack.consume(1, player); if (list.isEmpty()) { diff --git a/net/minecraft/world/item/LingeringPotionItem.java b/net/minecraft/world/item/LingeringPotionItem.java index 80b30e98..c1adbf2f 100644 --- a/net/minecraft/world/item/LingeringPotionItem.java +++ b/net/minecraft/world/item/LingeringPotionItem.java @@ -23,7 +23,7 @@ public class LingeringPotionItem extends ThrowablePotionItem { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { + public InteractionResult use(Level level, Player player, InteractionHand hand) { level.playSound( null, player.getX(), @@ -34,6 +34,6 @@ public class LingeringPotionItem extends ThrowablePotionItem { 0.5F, 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F) ); - return super.use(level, player, interactionHand); + return super.use(level, player, hand); } } diff --git a/net/minecraft/world/item/MaceItem.java b/net/minecraft/world/item/MaceItem.java index e7977a1c..0cfcc0b9 100644 --- a/net/minecraft/world/item/MaceItem.java +++ b/net/minecraft/world/item/MaceItem.java @@ -83,12 +83,10 @@ public class MaceItem extends Item { return true; } - private Vec3 calculateImpactPosition(ServerPlayer serverPlayer) { - return serverPlayer.isIgnoringFallDamageFromCurrentImpulse() - && serverPlayer.currentImpulseImpactPos != null - && serverPlayer.currentImpulseImpactPos.y <= serverPlayer.position().y - ? serverPlayer.currentImpulseImpactPos - : serverPlayer.position(); + private Vec3 calculateImpactPosition(ServerPlayer player) { + return player.isIgnoringFallDamageFromCurrentImpulse() && player.currentImpulseImpactPos != null && player.currentImpulseImpactPos.y <= player.position().y + ? player.currentImpulseImpactPos + : player.position(); } @Override @@ -126,11 +124,11 @@ public class MaceItem extends Item { } } - private static void knockback(Level level, Entity entity, Entity entity2) { - level.levelEvent(2013, entity2.getOnPos(), 750); - level.getEntitiesOfClass(LivingEntity.class, entity2.getBoundingBox().inflate(3.5), knockbackPredicate(entity, entity2)).forEach(livingEntity -> { - Vec3 vec3 = livingEntity.position().subtract(entity2.position()); - double d = getKnockbackPower(entity, livingEntity, vec3); + private static void knockback(Level level, Entity attacker, Entity target) { + level.levelEvent(2013, target.getOnPos(), 750); + level.getEntitiesOfClass(LivingEntity.class, target.getBoundingBox().inflate(3.5), knockbackPredicate(attacker, target)).forEach(livingEntity -> { + Vec3 vec3 = livingEntity.position().subtract(target.position()); + double d = getKnockbackPower(attacker, livingEntity, vec3); Vec3 vec32 = vec3.normalize().scale(d); if (d > 0.0) { livingEntity.push(vec32.x, 0.7F, vec32.z); @@ -141,20 +139,20 @@ public class MaceItem extends Item { }); } - private static Predicate knockbackPredicate(Entity entity, Entity entity2) { + private static Predicate knockbackPredicate(Entity attacker, Entity target) { return livingEntity -> { boolean bl = !livingEntity.isSpectator(); - boolean bl2 = livingEntity != entity && livingEntity != entity2; - boolean bl3 = !entity.isAlliedTo(livingEntity); - boolean bl4 = !(livingEntity instanceof TamableAnimal tamableAnimal && tamableAnimal.isTame() && entity.getUUID().equals(tamableAnimal.getOwnerUUID())); + boolean bl2 = livingEntity != attacker && livingEntity != target; + boolean bl3 = !attacker.isAlliedTo(livingEntity); + boolean bl4 = !(livingEntity instanceof TamableAnimal tamableAnimal && tamableAnimal.isTame() && attacker.getUUID().equals(tamableAnimal.getOwnerUUID())); boolean bl5 = !(livingEntity instanceof ArmorStand armorStand && armorStand.isMarker()); - boolean bl6 = entity2.distanceToSqr(livingEntity) <= Math.pow(3.5, 2.0); + boolean bl6 = target.distanceToSqr(livingEntity) <= Math.pow(3.5, 2.0); return bl && bl2 && bl3 && bl4 && bl5 && bl6; }; } - private static double getKnockbackPower(Entity entity, LivingEntity livingEntity, Vec3 vec3) { - return (3.5 - vec3.length()) * 0.7F * (entity.fallDistance > 5.0F ? 2 : 1) * (1.0 - livingEntity.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE)); + private static double getKnockbackPower(Entity attacker, LivingEntity entity, Vec3 offset) { + return (3.5 - offset.length()) * 0.7F * (attacker.fallDistance > 5.0F ? 2 : 1) * (1.0 - entity.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE)); } public static boolean canSmashAttack(LivingEntity entity) { @@ -163,7 +161,7 @@ public class MaceItem extends Item { @Nullable @Override - public DamageSource getDamageSource(LivingEntity livingEntity) { - return canSmashAttack(livingEntity) ? livingEntity.damageSources().mace(livingEntity) : super.getDamageSource(livingEntity); + public DamageSource getDamageSource(LivingEntity entity) { + return canSmashAttack(entity) ? entity.damageSources().mace(entity) : super.getDamageSource(entity); } } diff --git a/net/minecraft/world/item/MapItem.java b/net/minecraft/world/item/MapItem.java index b2d3354d..97c6a457 100644 --- a/net/minecraft/world/item/MapItem.java +++ b/net/minecraft/world/item/MapItem.java @@ -30,6 +30,7 @@ import net.minecraft.world.level.chunk.LevelChunk; import net.minecraft.world.level.levelgen.Heightmap; import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.MapColor.Brightness; import net.minecraft.world.level.saveddata.maps.MapId; import net.minecraft.world.level.saveddata.maps.MapItemSavedData; import org.jetbrains.annotations.Nullable; @@ -151,24 +152,24 @@ public class MapItem extends Item { t /= i * i; MapColor mapColor = Iterables.getFirst(Multisets.copyHighestCountFirst(multiset), MapColor.NONE); - MapColor.Brightness brightness; + Brightness brightness; if (mapColor == MapColor.WATER) { double f = t * 0.1 + (o + p & 1) * 0.2; if (f < 0.5) { - brightness = MapColor.Brightness.HIGH; + brightness = Brightness.HIGH; } else if (f > 0.9) { - brightness = MapColor.Brightness.LOW; + brightness = Brightness.LOW; } else { - brightness = MapColor.Brightness.NORMAL; + brightness = Brightness.NORMAL; } } else { double f = (e - d) * 4.0 / (i + 4) + ((o + p & 1) - 0.5) * 0.4; if (f > 0.6) { - brightness = MapColor.Brightness.HIGH; + brightness = Brightness.HIGH; } else if (f < -0.6) { - brightness = MapColor.Brightness.LOW; + brightness = Brightness.LOW; } else { - brightness = MapColor.Brightness.NORMAL; + brightness = Brightness.NORMAL; } } @@ -224,7 +225,7 @@ public class MapItem extends Item { } } - MapColor.Brightness brightness = MapColor.Brightness.LOWEST; + Brightness brightness = Brightness.LOWEST; MapColor mapColor = MapColor.NONE; if (isBiomeWatery(bls, n, o)) { mapColor = MapColor.COLOR_ORANGE; @@ -232,30 +233,30 @@ public class MapItem extends Item { switch ((n + (int)(Mth.sin(o + 0.0F) * 7.0F)) / 8 % 5) { case 0: case 4: - brightness = MapColor.Brightness.LOW; + brightness = Brightness.LOW; break; case 1: case 3: - brightness = MapColor.Brightness.NORMAL; + brightness = Brightness.NORMAL; break; case 2: - brightness = MapColor.Brightness.HIGH; + brightness = Brightness.HIGH; } } else if (p > 7) { mapColor = MapColor.NONE; } else if (p > 5) { - brightness = MapColor.Brightness.NORMAL; + brightness = Brightness.NORMAL; } else if (p > 3) { - brightness = MapColor.Brightness.LOW; + brightness = Brightness.LOW; } else if (p > 1) { - brightness = MapColor.Brightness.LOW; + brightness = Brightness.LOW; } } else if (p > 0) { mapColor = MapColor.COLOR_BROWN; if (p > 3) { - brightness = MapColor.Brightness.NORMAL; + brightness = Brightness.NORMAL; } else { - brightness = MapColor.Brightness.LOWEST; + brightness = Brightness.LOWEST; } } diff --git a/net/minecraft/world/item/MinecartItem.java b/net/minecraft/world/item/MinecartItem.java index 017f4968..1afa5fc9 100644 --- a/net/minecraft/world/item/MinecartItem.java +++ b/net/minecraft/world/item/MinecartItem.java @@ -20,9 +20,9 @@ import net.minecraft.world.phys.Vec3; public class MinecartItem extends Item { private final EntityType type; - public MinecartItem(EntityType entityType, Item.Properties properties) { + public MinecartItem(EntityType type, Item.Properties properties) { super(properties); - this.type = entityType; + this.type = type; } @Override diff --git a/net/minecraft/world/item/PickaxeItem.java b/net/minecraft/world/item/PickaxeItem.java index 5995f2f6..b235f3a4 100644 --- a/net/minecraft/world/item/PickaxeItem.java +++ b/net/minecraft/world/item/PickaxeItem.java @@ -3,7 +3,7 @@ package net.minecraft.world.item; import net.minecraft.tags.BlockTags; public class PickaxeItem extends DiggerItem { - public PickaxeItem(ToolMaterial toolMaterial, float f, float g, Item.Properties properties) { - super(toolMaterial, BlockTags.MINEABLE_WITH_PICKAXE, f, g, properties); + public PickaxeItem(ToolMaterial material, float attackDamage, float attackSpeed, Item.Properties properties) { + super(material, BlockTags.MINEABLE_WITH_PICKAXE, attackDamage, attackSpeed, properties); } } diff --git a/net/minecraft/world/item/PlaceOnWaterBlockItem.java b/net/minecraft/world/item/PlaceOnWaterBlockItem.java index 55c1543b..ba6a916f 100644 --- a/net/minecraft/world/item/PlaceOnWaterBlockItem.java +++ b/net/minecraft/world/item/PlaceOnWaterBlockItem.java @@ -20,9 +20,9 @@ public class PlaceOnWaterBlockItem extends BlockItem { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { + public InteractionResult use(Level level, Player player, InteractionHand hand) { BlockHitResult blockHitResult = getPlayerPOVHitResult(level, player, Fluid.SOURCE_ONLY); BlockHitResult blockHitResult2 = blockHitResult.withPosition(blockHitResult.getBlockPos().above()); - return super.useOn(new UseOnContext(player, interactionHand, blockHitResult2)); + return super.useOn(new UseOnContext(player, hand, blockHitResult2)); } } diff --git a/net/minecraft/world/item/ServerItemCooldowns.java b/net/minecraft/world/item/ServerItemCooldowns.java index 01e28fd6..b239242a 100644 --- a/net/minecraft/world/item/ServerItemCooldowns.java +++ b/net/minecraft/world/item/ServerItemCooldowns.java @@ -12,14 +12,14 @@ public class ServerItemCooldowns extends ItemCooldowns { } @Override - protected void onCooldownStarted(ResourceLocation resourceLocation, int i) { - super.onCooldownStarted(resourceLocation, i); - this.player.connection.send(new ClientboundCooldownPacket(resourceLocation, i)); + protected void onCooldownStarted(ResourceLocation group, int cooldown) { + super.onCooldownStarted(group, cooldown); + this.player.connection.send(new ClientboundCooldownPacket(group, cooldown)); } @Override - protected void onCooldownEnded(ResourceLocation resourceLocation) { - super.onCooldownEnded(resourceLocation); - this.player.connection.send(new ClientboundCooldownPacket(resourceLocation, 0)); + protected void onCooldownEnded(ResourceLocation group) { + super.onCooldownEnded(group); + this.player.connection.send(new ClientboundCooldownPacket(group, 0)); } } diff --git a/net/minecraft/world/item/ShieldItem.java b/net/minecraft/world/item/ShieldItem.java index 9b2536f6..979094ad 100644 --- a/net/minecraft/world/item/ShieldItem.java +++ b/net/minecraft/world/item/ShieldItem.java @@ -29,7 +29,7 @@ public class ShieldItem extends Item { } @Override - public ItemUseAnimation getUseAnimation(ItemStack itemStack) { + public ItemUseAnimation getUseAnimation(ItemStack stack) { return ItemUseAnimation.BLOCK; } @@ -39,8 +39,8 @@ public class ShieldItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - player.startUsingItem(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + player.startUsingItem(hand); return InteractionResult.CONSUME; } } diff --git a/net/minecraft/world/item/ShovelItem.java b/net/minecraft/world/item/ShovelItem.java index d4e26813..a3c6678b 100644 --- a/net/minecraft/world/item/ShovelItem.java +++ b/net/minecraft/world/item/ShovelItem.java @@ -35,8 +35,8 @@ public class ShovelItem extends DiggerItem { .build() ); - public ShovelItem(ToolMaterial toolMaterial, float f, float g, Item.Properties properties) { - super(toolMaterial, BlockTags.MINEABLE_WITH_SHOVEL, f, g, properties); + public ShovelItem(ToolMaterial material, float attackDamage, float attackSpeed, Item.Properties properties) { + super(material, BlockTags.MINEABLE_WITH_SHOVEL, attackDamage, attackSpeed, properties); } @Override diff --git a/net/minecraft/world/item/SignItem.java b/net/minecraft/world/item/SignItem.java index 56f7721d..c1f96840 100644 --- a/net/minecraft/world/item/SignItem.java +++ b/net/minecraft/world/item/SignItem.java @@ -11,8 +11,8 @@ import net.minecraft.world.level.block.state.BlockState; import org.jetbrains.annotations.Nullable; public class SignItem extends StandingAndWallBlockItem { - public SignItem(Block block, Block block2, Item.Properties properties) { - super(block, block2, Direction.DOWN, properties); + public SignItem(Block standingBlock, Block wallBlock, Item.Properties properties) { + super(standingBlock, wallBlock, Direction.DOWN, properties); } public SignItem(Item.Properties properties, Block standingBlock, Block wallBlock, Direction attachmentDirection) { diff --git a/net/minecraft/world/item/SmithingTemplateItem.java b/net/minecraft/world/item/SmithingTemplateItem.java index 1a48c2f0..9e12b779 100644 --- a/net/minecraft/world/item/SmithingTemplateItem.java +++ b/net/minecraft/world/item/SmithingTemplateItem.java @@ -74,21 +74,21 @@ public class SmithingTemplateItem extends Item { private final List additionalSlotEmptyIcons; public SmithingTemplateItem( - Component component, - Component component2, - Component component3, - Component component4, - List list, - List list2, + Component appliesTo, + Component ingredients, + Component baseSlotDescription, + Component additionsSlotDescription, + List baseSlotEmptyIcons, + List additionalSlotEmptyIcons, Item.Properties properties ) { super(properties); - this.appliesTo = component; - this.ingredients = component2; - this.baseSlotDescription = component3; - this.additionsSlotDescription = component4; - this.baseSlotEmptyIcons = list; - this.additionalSlotEmptyIcons = list2; + this.appliesTo = appliesTo; + this.ingredients = ingredients; + this.baseSlotDescription = baseSlotDescription; + this.additionsSlotDescription = additionsSlotDescription; + this.baseSlotEmptyIcons = baseSlotEmptyIcons; + this.additionalSlotEmptyIcons = additionalSlotEmptyIcons; } public static SmithingTemplateItem createArmorTrimTemplate(Item.Properties properties) { diff --git a/net/minecraft/world/item/SnowballItem.java b/net/minecraft/world/item/SnowballItem.java index e8e4704b..12a015a4 100644 --- a/net/minecraft/world/item/SnowballItem.java +++ b/net/minecraft/world/item/SnowballItem.java @@ -19,8 +19,8 @@ public class SnowballItem extends Item implements ProjectileItem { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); level.playSound( null, player.getX(), diff --git a/net/minecraft/world/item/SpawnEggItem.java b/net/minecraft/world/item/SpawnEggItem.java index d6440dbb..3613f5ea 100644 --- a/net/minecraft/world/item/SpawnEggItem.java +++ b/net/minecraft/world/item/SpawnEggItem.java @@ -95,8 +95,8 @@ public class SpawnEggItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); BlockHitResult blockHitResult = getPlayerPOVHitResult(level, player, Fluid.SOURCE_ONLY); if (blockHitResult.getType() != Type.BLOCK) { return InteractionResult.PASS; diff --git a/net/minecraft/world/item/SplashPotionItem.java b/net/minecraft/world/item/SplashPotionItem.java index b79ed084..efd5c64d 100644 --- a/net/minecraft/world/item/SplashPotionItem.java +++ b/net/minecraft/world/item/SplashPotionItem.java @@ -13,7 +13,7 @@ public class SplashPotionItem extends ThrowablePotionItem { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { + public InteractionResult use(Level level, Player player, InteractionHand hand) { level.playSound( null, player.getX(), @@ -24,6 +24,6 @@ public class SplashPotionItem extends ThrowablePotionItem { 0.5F, 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F) ); - return super.use(level, player, interactionHand); + return super.use(level, player, hand); } } diff --git a/net/minecraft/world/item/SpyglassItem.java b/net/minecraft/world/item/SpyglassItem.java index 169772fc..3f960d7b 100644 --- a/net/minecraft/world/item/SpyglassItem.java +++ b/net/minecraft/world/item/SpyglassItem.java @@ -22,15 +22,15 @@ public class SpyglassItem extends Item { } @Override - public ItemUseAnimation getUseAnimation(ItemStack itemStack) { + public ItemUseAnimation getUseAnimation(ItemStack stack) { return ItemUseAnimation.SPYGLASS; } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { + public InteractionResult use(Level level, Player player, InteractionHand hand) { player.playSound(SoundEvents.SPYGLASS_USE, 1.0F, 1.0F); player.awardStat(Stats.ITEM_USED.get(this)); - return ItemUtils.startUsingInstantly(level, player, interactionHand); + return ItemUtils.startUsingInstantly(level, player, hand); } @Override @@ -40,8 +40,8 @@ public class SpyglassItem extends Item { } @Override - public boolean releaseUsing(ItemStack itemStack, Level level, LivingEntity livingEntity, int i) { - this.stopUsing(livingEntity); + public boolean releaseUsing(ItemStack stack, Level level, LivingEntity entity, int timeLeft) { + this.stopUsing(entity); return true; } diff --git a/net/minecraft/world/item/StandingAndWallBlockItem.java b/net/minecraft/world/item/StandingAndWallBlockItem.java index f5375913..7240d4bf 100644 --- a/net/minecraft/world/item/StandingAndWallBlockItem.java +++ b/net/minecraft/world/item/StandingAndWallBlockItem.java @@ -14,10 +14,10 @@ public class StandingAndWallBlockItem extends BlockItem { protected final Block wallBlock; private final Direction attachmentDirection; - public StandingAndWallBlockItem(Block block, Block block2, Direction direction, Item.Properties properties) { + public StandingAndWallBlockItem(Block block, Block wallBlock, Direction attachmentDirection, Item.Properties properties) { super(block, properties); - this.wallBlock = block2; - this.attachmentDirection = direction; + this.wallBlock = wallBlock; + this.attachmentDirection = attachmentDirection; } protected boolean canPlace(LevelReader level, BlockState state, BlockPos pos) { diff --git a/net/minecraft/world/item/SwordItem.java b/net/minecraft/world/item/SwordItem.java index 952dda50..aafc9438 100644 --- a/net/minecraft/world/item/SwordItem.java +++ b/net/minecraft/world/item/SwordItem.java @@ -8,8 +8,8 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; public class SwordItem extends Item { - public SwordItem(ToolMaterial toolMaterial, float f, float g, Item.Properties properties) { - super(toolMaterial.applySwordProperties(properties, f, g)); + public SwordItem(ToolMaterial material, float attackDamage, float attackSpeed, Item.Properties properties) { + super(material.applySwordProperties(properties, attackDamage, attackSpeed)); } @Override diff --git a/net/minecraft/world/item/ThrowablePotionItem.java b/net/minecraft/world/item/ThrowablePotionItem.java index afad4975..a0804918 100644 --- a/net/minecraft/world/item/ThrowablePotionItem.java +++ b/net/minecraft/world/item/ThrowablePotionItem.java @@ -18,8 +18,8 @@ public class ThrowablePotionItem extends PotionItem implements ProjectileItem { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); if (level instanceof ServerLevel serverLevel) { Projectile.spawnProjectileFromRotation(ThrownPotion::new, serverLevel, itemStack, player, -20.0F, 0.5F, 1.0F); } diff --git a/net/minecraft/world/item/ToolMaterial.java b/net/minecraft/world/item/ToolMaterial.java index 12a6dd92..ee964add 100644 --- a/net/minecraft/world/item/ToolMaterial.java +++ b/net/minecraft/world/item/ToolMaterial.java @@ -30,32 +30,37 @@ public record ToolMaterial( return properties.durability(this.durability).repairable(this.repairItems).enchantable(this.enchantmentValue); } - public Item.Properties applyToolProperties(Item.Properties properties, TagKey tagKey, float f, float g) { + public Item.Properties applyToolProperties(Item.Properties properties, TagKey mineableBlocks, float attackDamage, float attackSpeed) { HolderGetter holderGetter = BuiltInRegistries.acquireBootstrapRegistrationLookup(BuiltInRegistries.BLOCK); return this.applyCommonProperties(properties) .component( DataComponents.TOOL, new Tool( - List.of(Tool.Rule.deniesDrops(holderGetter.getOrThrow(this.incorrectBlocksForDrops)), Tool.Rule.minesAndDrops(holderGetter.getOrThrow(tagKey), this.speed)), + List.of( + Tool.Rule.deniesDrops(holderGetter.getOrThrow(this.incorrectBlocksForDrops)), + Tool.Rule.minesAndDrops(holderGetter.getOrThrow(mineableBlocks), this.speed) + ), 1.0F, 1 ) ) - .attributes(this.createToolAttributes(f, g)); + .attributes(this.createToolAttributes(attackDamage, attackSpeed)); } - private ItemAttributeModifiers createToolAttributes(float f, float g) { + private ItemAttributeModifiers createToolAttributes(float attackDamage, float attackSpeed) { return ItemAttributeModifiers.builder() .add( Attributes.ATTACK_DAMAGE, - new AttributeModifier(Item.BASE_ATTACK_DAMAGE_ID, f + this.attackDamageBonus, AttributeModifier.Operation.ADD_VALUE), + new AttributeModifier(Item.BASE_ATTACK_DAMAGE_ID, attackDamage + this.attackDamageBonus, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND ) - .add(Attributes.ATTACK_SPEED, new AttributeModifier(Item.BASE_ATTACK_SPEED_ID, g, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) + .add( + Attributes.ATTACK_SPEED, new AttributeModifier(Item.BASE_ATTACK_SPEED_ID, attackSpeed, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND + ) .build(); } - public Item.Properties applySwordProperties(Item.Properties properties, float f, float g) { + public Item.Properties applySwordProperties(Item.Properties properties, float attackDamage, float attackSpeed) { HolderGetter holderGetter = BuiltInRegistries.acquireBootstrapRegistrationLookup(BuiltInRegistries.BLOCK); return this.applyCommonProperties(properties) .component( @@ -69,17 +74,19 @@ public record ToolMaterial( 2 ) ) - .attributes(this.createSwordAttributes(f, g)); + .attributes(this.createSwordAttributes(attackDamage, attackSpeed)); } - private ItemAttributeModifiers createSwordAttributes(float f, float g) { + private ItemAttributeModifiers createSwordAttributes(float attackDamage, float attackSpeed) { return ItemAttributeModifiers.builder() .add( Attributes.ATTACK_DAMAGE, - new AttributeModifier(Item.BASE_ATTACK_DAMAGE_ID, f + this.attackDamageBonus, AttributeModifier.Operation.ADD_VALUE), + new AttributeModifier(Item.BASE_ATTACK_DAMAGE_ID, attackDamage + this.attackDamageBonus, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND ) - .add(Attributes.ATTACK_SPEED, new AttributeModifier(Item.BASE_ATTACK_SPEED_ID, g, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) + .add( + Attributes.ATTACK_SPEED, new AttributeModifier(Item.BASE_ATTACK_SPEED_ID, attackSpeed, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND + ) .build(); } } diff --git a/net/minecraft/world/item/TridentItem.java b/net/minecraft/world/item/TridentItem.java index 89ec7f7c..41551680 100644 --- a/net/minecraft/world/item/TridentItem.java +++ b/net/minecraft/world/item/TridentItem.java @@ -57,7 +57,7 @@ public class TridentItem extends Item implements ProjectileItem { } @Override - public ItemUseAnimation getUseAnimation(ItemStack itemStack) { + public ItemUseAnimation getUseAnimation(ItemStack stack) { return ItemUseAnimation.SPEAR; } @@ -67,28 +67,28 @@ public class TridentItem extends Item implements ProjectileItem { } @Override - public boolean releaseUsing(ItemStack itemStack, Level level, LivingEntity livingEntity, int i) { - if (livingEntity instanceof Player player) { - int j = this.getUseDuration(itemStack, livingEntity) - i; - if (j < 10) { + public boolean releaseUsing(ItemStack stack, Level level, LivingEntity entity, int timeLeft) { + if (entity instanceof Player player) { + int i = this.getUseDuration(stack, entity) - timeLeft; + if (i < 10) { return false; } else { - float f = EnchantmentHelper.getTridentSpinAttackStrength(itemStack, player); + float f = EnchantmentHelper.getTridentSpinAttackStrength(stack, player); if (f > 0.0F && !player.isInWaterOrRain()) { return false; - } else if (itemStack.nextDamageWillBreak()) { + } else if (stack.nextDamageWillBreak()) { return false; } else { - Holder holder = (Holder)EnchantmentHelper.pickHighestLevel(itemStack, EnchantmentEffectComponents.TRIDENT_SOUND) + Holder holder = (Holder)EnchantmentHelper.pickHighestLevel(stack, EnchantmentEffectComponents.TRIDENT_SOUND) .orElse(SoundEvents.TRIDENT_THROW); if (level instanceof ServerLevel serverLevel) { - itemStack.hurtWithoutBreaking(1, player); + stack.hurtWithoutBreaking(1, player); if (f == 0.0F) { - ThrownTrident thrownTrident = Projectile.spawnProjectileFromRotation(ThrownTrident::new, serverLevel, itemStack, player, 0.0F, 2.5F, 1.0F); + ThrownTrident thrownTrident = Projectile.spawnProjectileFromRotation(ThrownTrident::new, serverLevel, stack, player, 0.0F, 2.5F, 1.0F); if (player.hasInfiniteMaterials()) { thrownTrident.pickup = AbstractArrow.Pickup.CREATIVE_ONLY; } else { - player.getInventory().removeItem(itemStack); + player.getInventory().removeItem(stack); } level.playSound(null, thrownTrident, holder.value(), SoundSource.PLAYERS, 1.0F, 1.0F); @@ -100,17 +100,17 @@ public class TridentItem extends Item implements ProjectileItem { if (f > 0.0F) { float g = player.getYRot(); float h = player.getXRot(); - float k = -Mth.sin(g * (float) (Math.PI / 180.0)) * Mth.cos(h * (float) (Math.PI / 180.0)); - float l = -Mth.sin(h * (float) (Math.PI / 180.0)); - float m = Mth.cos(g * (float) (Math.PI / 180.0)) * Mth.cos(h * (float) (Math.PI / 180.0)); - float n = Mth.sqrt(k * k + l * l + m * m); - k *= f / n; - l *= f / n; - m *= f / n; - player.push(k, l, m); - player.startAutoSpinAttack(20, 8.0F, itemStack); + float j = -Mth.sin(g * (float) (Math.PI / 180.0)) * Mth.cos(h * (float) (Math.PI / 180.0)); + float k = -Mth.sin(h * (float) (Math.PI / 180.0)); + float l = Mth.cos(g * (float) (Math.PI / 180.0)) * Mth.cos(h * (float) (Math.PI / 180.0)); + float m = Mth.sqrt(j * j + k * k + l * l); + j *= f / m; + k *= f / m; + l *= f / m; + player.push(j, k, l); + player.startAutoSpinAttack(20, 8.0F, stack); if (player.onGround()) { - float o = 1.1999999F; + float n = 1.1999999F; player.move(MoverType.SELF, new Vec3(0.0, 1.1999999F, 0.0)); } @@ -127,14 +127,14 @@ public class TridentItem extends Item implements ProjectileItem { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); if (itemStack.nextDamageWillBreak()) { return InteractionResult.FAIL; } else if (EnchantmentHelper.getTridentSpinAttackStrength(itemStack, player) > 0.0F && !player.isInWaterOrRain()) { return InteractionResult.FAIL; } else { - player.startUsingItem(interactionHand); + player.startUsingItem(hand); return InteractionResult.CONSUME; } } diff --git a/net/minecraft/world/item/WindChargeItem.java b/net/minecraft/world/item/WindChargeItem.java index ce5e3f74..87d51fb9 100644 --- a/net/minecraft/world/item/WindChargeItem.java +++ b/net/minecraft/world/item/WindChargeItem.java @@ -23,8 +23,8 @@ public class WindChargeItem extends Item implements ProjectileItem { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); if (level instanceof ServerLevel serverLevel) { Projectile.spawnProjectileFromRotation( (serverLevelx, livingEntity, itemStackx) -> new WindCharge(player, level, player.position().x(), player.getEyePosition().y(), player.position().z()), diff --git a/net/minecraft/world/item/WritableBookItem.java b/net/minecraft/world/item/WritableBookItem.java index 975a8b9f..0246bff5 100644 --- a/net/minecraft/world/item/WritableBookItem.java +++ b/net/minecraft/world/item/WritableBookItem.java @@ -12,9 +12,9 @@ public class WritableBookItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); - player.openItemGui(itemStack, interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); + player.openItemGui(itemStack, hand); player.awardStat(Stats.ITEM_USED.get(this)); return InteractionResult.SUCCESS; } diff --git a/net/minecraft/world/item/WrittenBookItem.java b/net/minecraft/world/item/WrittenBookItem.java index 7aedc9a4..ec3987dd 100644 --- a/net/minecraft/world/item/WrittenBookItem.java +++ b/net/minecraft/world/item/WrittenBookItem.java @@ -32,9 +32,9 @@ public class WrittenBookItem extends Item { } @Override - public InteractionResult use(Level level, Player player, InteractionHand interactionHand) { - ItemStack itemStack = player.getItemInHand(interactionHand); - player.openItemGui(itemStack, interactionHand); + public InteractionResult use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); + player.openItemGui(itemStack, hand); player.awardStat(Stats.ITEM_USED.get(this)); return InteractionResult.SUCCESS; } diff --git a/net/minecraft/world/item/alchemy/PotionContents.java b/net/minecraft/world/item/alchemy/PotionContents.java index 81e336cd..eada1346 100644 --- a/net/minecraft/world/item/alchemy/PotionContents.java +++ b/net/minecraft/world/item/alchemy/PotionContents.java @@ -118,9 +118,9 @@ public record PotionContents(Optional> potion, Optional return getColorOptional(effects).orElse(-13083194); } - public Component getName(String string) { - String string2 = (String)this.customName.or(() -> this.potion.map(holder -> ((Potion)holder.value()).name())).orElse("empty"); - return Component.translatable(string + string2); + public Component getName(String name) { + String string = (String)this.customName.or(() -> this.potion.map(holder -> ((Potion)holder.value()).name())).orElse("empty"); + return Component.translatable(name + string); } public static OptionalInt getColorOptional(Iterable effects) { @@ -155,14 +155,14 @@ public record PotionContents(Optional> potion, Optional addPotionTooltip(this.getAllEffects(), tooltipAdder, durationFactor, ticksPerSecond); } - public void applyToLivingEntity(LivingEntity livingEntity) { - if (livingEntity.level() instanceof ServerLevel serverLevel) { - Player player2 = livingEntity instanceof Player player ? player : null; + public void applyToLivingEntity(LivingEntity entity) { + if (entity.level() instanceof ServerLevel serverLevel) { + Player player2 = entity instanceof Player player ? player : null; this.forEachEffect(mobEffectInstance -> { if (mobEffectInstance.getEffect().value().isInstantenous()) { - mobEffectInstance.getEffect().value().applyInstantenousEffect(serverLevel, player2, player2, livingEntity, mobEffectInstance.getAmplifier(), 1.0); + mobEffectInstance.getEffect().value().applyInstantenousEffect(serverLevel, player2, player2, entity, mobEffectInstance.getAmplifier(), 1.0); } else { - livingEntity.addEffect(mobEffectInstance); + entity.addEffect(mobEffectInstance); } }); } @@ -236,7 +236,7 @@ public record PotionContents(Optional> potion, Optional } @Override - public void onConsume(Level level, LivingEntity livingEntity, ItemStack itemStack, Consumable consumable) { - this.applyToLivingEntity(livingEntity); + public void onConsume(Level level, LivingEntity entity, ItemStack stack, Consumable consumable) { + this.applyToLivingEntity(entity); } } diff --git a/net/minecraft/world/item/component/BundleContents.java b/net/minecraft/world/item/component/BundleContents.java index 5605a704..91bac569 100644 --- a/net/minecraft/world/item/component/BundleContents.java +++ b/net/minecraft/world/item/component/BundleContents.java @@ -33,16 +33,16 @@ public final class BundleContents implements TooltipComponent { final Fraction weight; final int selectedItem; - BundleContents(List list, Fraction fraction, int i) { - this.items = list; - this.weight = fraction; - this.selectedItem = i; + BundleContents(List items, Fraction weight, int selectedItem) { + this.items = items; + this.weight = weight; + this.selectedItem = selectedItem; } - private static DataResult checkAndCreate(List list) { + private static DataResult checkAndCreate(List items) { try { - Fraction fraction = computeContentWeight(list); - return DataResult.success(new BundleContents(list, fraction, -1)); + Fraction fraction = computeContentWeight(items); + return DataResult.success(new BundleContents(items, fraction, -1)); } catch (ArithmeticException var2) { return DataResult.error(() -> "Excessive total bundle weight"); } @@ -72,8 +72,8 @@ public final class BundleContents implements TooltipComponent { } } - public static boolean canItemBeInBundle(ItemStack itemStack) { - return !itemStack.isEmpty() && itemStack.getItem().canFitInsideContainerItems(); + public static boolean canItemBeInBundle(ItemStack stack) { + return !stack.isEmpty() && stack.getItem().canFitInsideContainerItems(); } public int getNumberOfItemsToShow() { @@ -205,8 +205,8 @@ public final class BundleContents implements TooltipComponent { return BundleContents.canItemBeInBundle(itemStack) ? this.tryInsert(slot.safeTake(itemStack.getCount(), i, player)) : 0; } - public void toggleSelectedItem(int i) { - this.selectedItem = this.selectedItem != i && i < this.items.size() ? i : -1; + public void toggleSelectedItem(int selectedItem) { + this.selectedItem = this.selectedItem != selectedItem && selectedItem < this.items.size() ? selectedItem : -1; } @Nullable diff --git a/net/minecraft/world/item/component/Consumable.java b/net/minecraft/world/item/component/Consumable.java index b17e9607..8048d788 100644 --- a/net/minecraft/world/item/component/Consumable.java +++ b/net/minecraft/world/item/component/Consumable.java @@ -59,70 +59,70 @@ public record Consumable( Consumable::new ); - public InteractionResult startConsuming(LivingEntity livingEntity, ItemStack itemStack, InteractionHand interactionHand) { - if (!this.canConsume(livingEntity, itemStack)) { + public InteractionResult startConsuming(LivingEntity entity, ItemStack stack, InteractionHand hand) { + if (!this.canConsume(entity, stack)) { return InteractionResult.FAIL; } else { boolean bl = this.consumeTicks() > 0; if (bl) { - livingEntity.startUsingItem(interactionHand); + entity.startUsingItem(hand); return InteractionResult.CONSUME; } else { - ItemStack itemStack2 = this.onConsume(livingEntity.level(), livingEntity, itemStack); - return InteractionResult.CONSUME.heldItemTransformedTo(itemStack2); + ItemStack itemStack = this.onConsume(entity.level(), entity, stack); + return InteractionResult.CONSUME.heldItemTransformedTo(itemStack); } } } - public ItemStack onConsume(Level level, LivingEntity livingEntity, ItemStack itemStack) { - RandomSource randomSource = livingEntity.getRandom(); - this.emitParticlesAndSounds(randomSource, livingEntity, itemStack, 16); - if (livingEntity instanceof ServerPlayer serverPlayer) { - serverPlayer.awardStat(Stats.ITEM_USED.get(itemStack.getItem())); - CriteriaTriggers.CONSUME_ITEM.trigger(serverPlayer, itemStack); + public ItemStack onConsume(Level level, LivingEntity entity, ItemStack stack) { + RandomSource randomSource = entity.getRandom(); + this.emitParticlesAndSounds(randomSource, entity, stack, 16); + if (entity instanceof ServerPlayer serverPlayer) { + serverPlayer.awardStat(Stats.ITEM_USED.get(stack.getItem())); + CriteriaTriggers.CONSUME_ITEM.trigger(serverPlayer, stack); } - itemStack.getAllOfType(ConsumableListener.class).forEach(consumableListener -> consumableListener.onConsume(level, livingEntity, itemStack, this)); + stack.getAllOfType(ConsumableListener.class).forEach(consumableListener -> consumableListener.onConsume(level, entity, stack, this)); if (!level.isClientSide) { - this.onConsumeEffects.forEach(consumeEffect -> consumeEffect.apply(level, itemStack, livingEntity)); + this.onConsumeEffects.forEach(consumeEffect -> consumeEffect.apply(level, stack, entity)); } - livingEntity.gameEvent(this.animation == ItemUseAnimation.DRINK ? GameEvent.DRINK : GameEvent.EAT); - itemStack.consume(1, livingEntity); - return itemStack; + entity.gameEvent(this.animation == ItemUseAnimation.DRINK ? GameEvent.DRINK : GameEvent.EAT); + stack.consume(1, entity); + return stack; } - public boolean canConsume(LivingEntity livingEntity, ItemStack itemStack) { - FoodProperties foodProperties = itemStack.get(DataComponents.FOOD); - return foodProperties != null && livingEntity instanceof Player player ? player.canEat(foodProperties.canAlwaysEat()) : true; + public boolean canConsume(LivingEntity entity, ItemStack stack) { + FoodProperties foodProperties = stack.get(DataComponents.FOOD); + return foodProperties != null && entity instanceof Player player ? player.canEat(foodProperties.canAlwaysEat()) : true; } public int consumeTicks() { return (int)(this.consumeSeconds * 20.0F); } - public void emitParticlesAndSounds(RandomSource randomSource, LivingEntity livingEntity, ItemStack itemStack, int i) { - float f = randomSource.nextBoolean() ? 0.5F : 1.0F; - float g = randomSource.triangle(1.0F, 0.2F); + public void emitParticlesAndSounds(RandomSource random, LivingEntity entity, ItemStack stack, int amount) { + float f = random.nextBoolean() ? 0.5F : 1.0F; + float g = random.triangle(1.0F, 0.2F); float h = 0.5F; - float j = Mth.randomBetween(randomSource, 0.9F, 1.0F); - float k = this.animation == ItemUseAnimation.DRINK ? 0.5F : f; - float l = this.animation == ItemUseAnimation.DRINK ? j : g; + float i = Mth.randomBetween(random, 0.9F, 1.0F); + float j = this.animation == ItemUseAnimation.DRINK ? 0.5F : f; + float k = this.animation == ItemUseAnimation.DRINK ? i : g; if (this.hasConsumeParticles) { - livingEntity.spawnItemParticles(itemStack, i); + entity.spawnItemParticles(stack, amount); } - SoundEvent soundEvent = livingEntity instanceof Consumable.OverrideConsumeSound overrideConsumeSound - ? overrideConsumeSound.getConsumeSound(itemStack) + SoundEvent soundEvent = entity instanceof Consumable.OverrideConsumeSound overrideConsumeSound + ? overrideConsumeSound.getConsumeSound(stack) : this.sound.value(); - livingEntity.playSound(soundEvent, k, l); + entity.playSound(soundEvent, j, k); } - public boolean shouldEmitParticlesAndSounds(int i) { - int j = this.consumeTicks() - i; - int k = (int)(this.consumeTicks() * 0.21875F); - boolean bl = j > k; - return bl && i % 4 == 0; + public boolean shouldEmitParticlesAndSounds(int remainingUseDuration) { + int i = this.consumeTicks() - remainingUseDuration; + int j = (int)(this.consumeTicks() * 0.21875F); + boolean bl = i > j; + return bl && remainingUseDuration % 4 == 0; } public static Consumable.Builder builder() { @@ -139,32 +139,32 @@ public record Consumable( Builder() { } - public Consumable.Builder consumeSeconds(float f) { - this.consumeSeconds = f; + public Consumable.Builder consumeSeconds(float consumeSounds) { + this.consumeSeconds = consumeSounds; return this; } - public Consumable.Builder animation(ItemUseAnimation itemUseAnimation) { - this.animation = itemUseAnimation; + public Consumable.Builder animation(ItemUseAnimation animation) { + this.animation = animation; return this; } - public Consumable.Builder sound(Holder holder) { - this.sound = holder; + public Consumable.Builder sound(Holder sound) { + this.sound = sound; return this; } - public Consumable.Builder soundAfterConsume(Holder holder) { - return this.onConsume(new PlaySoundConsumeEffect(holder)); + public Consumable.Builder soundAfterConsume(Holder consumptionSound) { + return this.onConsume(new PlaySoundConsumeEffect(consumptionSound)); } - public Consumable.Builder hasConsumeParticles(boolean bl) { - this.hasConsumeParticles = bl; + public Consumable.Builder hasConsumeParticles(boolean hasConsumeParticles) { + this.hasConsumeParticles = hasConsumeParticles; return this; } - public Consumable.Builder onConsume(ConsumeEffect consumeEffect) { - this.onConsumeEffects.add(consumeEffect); + public Consumable.Builder onConsume(ConsumeEffect effect) { + this.onConsumeEffects.add(effect); return this; } @@ -174,6 +174,6 @@ public record Consumable( } public interface OverrideConsumeSound { - SoundEvent getConsumeSound(ItemStack itemStack); + SoundEvent getConsumeSound(ItemStack stack); } } diff --git a/net/minecraft/world/item/component/ConsumableListener.java b/net/minecraft/world/item/component/ConsumableListener.java index 16f5914a..99b1285c 100644 --- a/net/minecraft/world/item/component/ConsumableListener.java +++ b/net/minecraft/world/item/component/ConsumableListener.java @@ -5,5 +5,5 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; public interface ConsumableListener { - void onConsume(Level level, LivingEntity livingEntity, ItemStack itemStack, Consumable consumable); + void onConsume(Level level, LivingEntity entity, ItemStack stack, Consumable consumable); } diff --git a/net/minecraft/world/item/component/DeathProtection.java b/net/minecraft/world/item/component/DeathProtection.java index 9bf6d260..7f623593 100644 --- a/net/minecraft/world/item/component/DeathProtection.java +++ b/net/minecraft/world/item/component/DeathProtection.java @@ -35,9 +35,9 @@ public record DeathProtection(List deathEffects) { ) ); - public void applyEffects(ItemStack itemStack, LivingEntity livingEntity) { + public void applyEffects(ItemStack stack, LivingEntity entity) { for (ConsumeEffect consumeEffect : this.deathEffects) { - consumeEffect.apply(livingEntity.level(), itemStack, livingEntity); + consumeEffect.apply(entity.level(), stack, entity); } } } diff --git a/net/minecraft/world/item/component/OminousBottleAmplifier.java b/net/minecraft/world/item/component/OminousBottleAmplifier.java index bc1dc99b..aa2e1441 100644 --- a/net/minecraft/world/item/component/OminousBottleAmplifier.java +++ b/net/minecraft/world/item/component/OminousBottleAmplifier.java @@ -27,8 +27,8 @@ public record OminousBottleAmplifier(int value) implements ConsumableListener, T ); @Override - public void onConsume(Level level, LivingEntity livingEntity, ItemStack itemStack, Consumable consumable) { - livingEntity.addEffect(new MobEffectInstance(MobEffects.BAD_OMEN, 120000, this.value, false, false, true)); + public void onConsume(Level level, LivingEntity entity, ItemStack stack, Consumable consumable) { + entity.addEffect(new MobEffectInstance(MobEffects.BAD_OMEN, 120000, this.value, false, false, true)); } @Override diff --git a/net/minecraft/world/item/component/SuspiciousStewEffects.java b/net/minecraft/world/item/component/SuspiciousStewEffects.java index 6a89a5f4..2c5a96f7 100644 --- a/net/minecraft/world/item/component/SuspiciousStewEffects.java +++ b/net/minecraft/world/item/component/SuspiciousStewEffects.java @@ -35,9 +35,9 @@ public record SuspiciousStewEffects(List effects) i } @Override - public void onConsume(Level level, LivingEntity livingEntity, ItemStack itemStack, Consumable consumable) { + public void onConsume(Level level, LivingEntity entity, ItemStack stack, Consumable consumable) { for (SuspiciousStewEffects.Entry entry : this.effects) { - livingEntity.addEffect(entry.createEffectInstance()); + entity.addEffect(entry.createEffectInstance()); } } diff --git a/net/minecraft/world/item/component/Tool.java b/net/minecraft/world/item/component/Tool.java index 9a8be8fd..a7781fb5 100644 --- a/net/minecraft/world/item/component/Tool.java +++ b/net/minecraft/world/item/component/Tool.java @@ -72,16 +72,16 @@ public record Tool(List rules, float defaultMiningSpeed, int damagePe Tool.Rule::new ); - public static Tool.Rule minesAndDrops(HolderSet holderSet, float f) { - return new Tool.Rule(holderSet, Optional.of(f), Optional.of(true)); + public static Tool.Rule minesAndDrops(HolderSet blocks, float speed) { + return new Tool.Rule(blocks, Optional.of(speed), Optional.of(true)); } - public static Tool.Rule deniesDrops(HolderSet holderSet) { - return new Tool.Rule(holderSet, Optional.empty(), Optional.of(false)); + public static Tool.Rule deniesDrops(HolderSet blocks) { + return new Tool.Rule(blocks, Optional.empty(), Optional.of(false)); } - public static Tool.Rule overrideSpeed(HolderSet holderSet, float f) { - return new Tool.Rule(holderSet, Optional.of(f), Optional.empty()); + public static Tool.Rule overrideSpeed(HolderSet blocks, float speed) { + return new Tool.Rule(blocks, Optional.of(speed), Optional.empty()); } } } diff --git a/net/minecraft/world/item/component/UseCooldown.java b/net/minecraft/world/item/component/UseCooldown.java index 44a45419..64d1e301 100644 --- a/net/minecraft/world/item/component/UseCooldown.java +++ b/net/minecraft/world/item/component/UseCooldown.java @@ -24,17 +24,17 @@ public record UseCooldown(float seconds, Optional cooldownGrou ByteBufCodecs.FLOAT, UseCooldown::seconds, ResourceLocation.STREAM_CODEC.apply(ByteBufCodecs::optional), UseCooldown::cooldownGroup, UseCooldown::new ); - public UseCooldown(float f) { - this(f, Optional.empty()); + public UseCooldown(float seconds) { + this(seconds, Optional.empty()); } public int ticks() { return (int)(this.seconds * 20.0F); } - public void apply(ItemStack itemStack, LivingEntity livingEntity) { - if (livingEntity instanceof Player player) { - player.getCooldowns().addCooldown(itemStack, this.ticks()); + public void apply(ItemStack stack, LivingEntity entity) { + if (entity instanceof Player player) { + player.getCooldowns().addCooldown(stack, this.ticks()); } } } diff --git a/net/minecraft/world/item/component/UseRemainder.java b/net/minecraft/world/item/component/UseRemainder.java index cea75fdc..f43ce1a3 100644 --- a/net/minecraft/world/item/component/UseRemainder.java +++ b/net/minecraft/world/item/component/UseRemainder.java @@ -11,18 +11,18 @@ public record UseRemainder(ItemStack convertInto) { ItemStack.STREAM_CODEC, UseRemainder::convertInto, UseRemainder::new ); - public ItemStack convertIntoRemainder(ItemStack itemStack, int i, boolean bl, UseRemainder.OnExtraCreatedRemainder onExtraCreatedRemainder) { - if (bl) { - return itemStack; - } else if (itemStack.getCount() >= i) { - return itemStack; + public ItemStack convertIntoRemainder(ItemStack stack, int count, boolean hasInfiniteMaterials, UseRemainder.OnExtraCreatedRemainder onExtraCreated) { + if (hasInfiniteMaterials) { + return stack; + } else if (stack.getCount() >= count) { + return stack; } else { - ItemStack itemStack2 = this.convertInto.copy(); - if (itemStack.isEmpty()) { - return itemStack2; - } else { - onExtraCreatedRemainder.apply(itemStack2); + ItemStack itemStack = this.convertInto.copy(); + if (stack.isEmpty()) { return itemStack; + } else { + onExtraCreated.apply(itemStack); + return stack; } } } diff --git a/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.java b/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.java index 4fde662b..53e7404f 100644 --- a/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.java +++ b/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.java @@ -28,16 +28,16 @@ public record ApplyStatusEffectsConsumeEffect(List effects, f ApplyStatusEffectsConsumeEffect::new ); - public ApplyStatusEffectsConsumeEffect(MobEffectInstance mobEffectInstance, float f) { - this(List.of(mobEffectInstance), f); + public ApplyStatusEffectsConsumeEffect(MobEffectInstance effect, float probability) { + this(List.of(effect), probability); } - public ApplyStatusEffectsConsumeEffect(List list) { - this(list, 1.0F); + public ApplyStatusEffectsConsumeEffect(List effects) { + this(effects, 1.0F); } - public ApplyStatusEffectsConsumeEffect(MobEffectInstance mobEffectInstance) { - this(mobEffectInstance, 1.0F); + public ApplyStatusEffectsConsumeEffect(MobEffectInstance effect) { + this(effect, 1.0F); } @Override @@ -46,14 +46,14 @@ public record ApplyStatusEffectsConsumeEffect(List effects, f } @Override - public boolean apply(Level level, ItemStack itemStack, LivingEntity livingEntity) { - if (livingEntity.getRandom().nextFloat() >= this.probability) { + public boolean apply(Level level, ItemStack stack, LivingEntity entity) { + if (entity.getRandom().nextFloat() >= this.probability) { return false; } else { boolean bl = false; for (MobEffectInstance mobEffectInstance : this.effects) { - if (livingEntity.addEffect(new MobEffectInstance(mobEffectInstance))) { + if (entity.addEffect(new MobEffectInstance(mobEffectInstance))) { bl = true; } } diff --git a/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java b/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java index bd421ad8..e1fe9500 100644 --- a/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java +++ b/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java @@ -18,7 +18,7 @@ public record ClearAllStatusEffectsConsumeEffect() implements ConsumeEffect { } @Override - public boolean apply(Level level, ItemStack itemStack, LivingEntity livingEntity) { - return livingEntity.removeAllEffects(); + public boolean apply(Level level, ItemStack stack, LivingEntity entity) { + return entity.removeAllEffects(); } } diff --git a/net/minecraft/world/item/consume_effects/ConsumeEffect.java b/net/minecraft/world/item/consume_effects/ConsumeEffect.java index 77d1970e..24826ebf 100644 --- a/net/minecraft/world/item/consume_effects/ConsumeEffect.java +++ b/net/minecraft/world/item/consume_effects/ConsumeEffect.java @@ -19,7 +19,7 @@ public interface ConsumeEffect { ConsumeEffect.Type getType(); - boolean apply(Level level, ItemStack itemStack, LivingEntity livingEntity); + boolean apply(Level level, ItemStack stack, LivingEntity entity); public record Type(MapCodec codec, StreamCodec streamCodec) { public static final ConsumeEffect.Type APPLY_EFFECTS = register( @@ -38,10 +38,8 @@ public interface ConsumeEffect { "play_sound", PlaySoundConsumeEffect.CODEC, PlaySoundConsumeEffect.STREAM_CODEC ); - private static ConsumeEffect.Type register( - String string, MapCodec mapCodec, StreamCodec streamCodec - ) { - return Registry.register(BuiltInRegistries.CONSUME_EFFECT_TYPE, string, new ConsumeEffect.Type<>(mapCodec, streamCodec)); + private static ConsumeEffect.Type register(String name, MapCodec codec, StreamCodec streamCodec) { + return Registry.register(BuiltInRegistries.CONSUME_EFFECT_TYPE, name, new ConsumeEffect.Type<>(codec, streamCodec)); } } } diff --git a/net/minecraft/world/item/consume_effects/PlaySoundConsumeEffect.java b/net/minecraft/world/item/consume_effects/PlaySoundConsumeEffect.java index dd1bdc4d..f205799a 100644 --- a/net/minecraft/world/item/consume_effects/PlaySoundConsumeEffect.java +++ b/net/minecraft/world/item/consume_effects/PlaySoundConsumeEffect.java @@ -24,8 +24,8 @@ public record PlaySoundConsumeEffect(Holder sound) implements Consum } @Override - public boolean apply(Level level, ItemStack itemStack, LivingEntity livingEntity) { - level.playSound(null, livingEntity.blockPosition(), this.sound.value(), livingEntity.getSoundSource(), 1.0F, 1.0F); + public boolean apply(Level level, ItemStack stack, LivingEntity entity) { + level.playSound(null, entity.blockPosition(), this.sound.value(), entity.getSoundSource(), 1.0F, 1.0F); return true; } } diff --git a/net/minecraft/world/item/consume_effects/RemoveStatusEffectsConsumeEffect.java b/net/minecraft/world/item/consume_effects/RemoveStatusEffectsConsumeEffect.java index c7fe9c9a..fabc531a 100644 --- a/net/minecraft/world/item/consume_effects/RemoveStatusEffectsConsumeEffect.java +++ b/net/minecraft/world/item/consume_effects/RemoveStatusEffectsConsumeEffect.java @@ -23,8 +23,8 @@ public record RemoveStatusEffectsConsumeEffect(HolderSet effects) imp ByteBufCodecs.holderSet(Registries.MOB_EFFECT), RemoveStatusEffectsConsumeEffect::effects, RemoveStatusEffectsConsumeEffect::new ); - public RemoveStatusEffectsConsumeEffect(Holder holder) { - this(HolderSet.direct(holder)); + public RemoveStatusEffectsConsumeEffect(Holder effects) { + this(HolderSet.direct(effects)); } @Override @@ -33,11 +33,11 @@ public record RemoveStatusEffectsConsumeEffect(HolderSet effects) imp } @Override - public boolean apply(Level level, ItemStack itemStack, LivingEntity livingEntity) { + public boolean apply(Level level, ItemStack stack, LivingEntity entity) { boolean bl = false; for (Holder holder : this.effects) { - if (livingEntity.removeEffect(holder)) { + if (entity.removeEffect(holder)) { bl = true; } } diff --git a/net/minecraft/world/item/consume_effects/TeleportRandomlyConsumeEffect.java b/net/minecraft/world/item/consume_effects/TeleportRandomlyConsumeEffect.java index ba5acfbb..166ee1f2 100644 --- a/net/minecraft/world/item/consume_effects/TeleportRandomlyConsumeEffect.java +++ b/net/minecraft/world/item/consume_effects/TeleportRandomlyConsumeEffect.java @@ -40,27 +40,27 @@ public record TeleportRandomlyConsumeEffect(float diameter) implements ConsumeEf } @Override - public boolean apply(Level level, ItemStack itemStack, LivingEntity livingEntity) { + public boolean apply(Level level, ItemStack stack, LivingEntity entity) { boolean bl = false; for (int i = 0; i < 16; i++) { - double d = livingEntity.getX() + (livingEntity.getRandom().nextDouble() - 0.5) * this.diameter; + double d = entity.getX() + (entity.getRandom().nextDouble() - 0.5) * this.diameter; double e = Mth.clamp( - livingEntity.getY() + (livingEntity.getRandom().nextDouble() - 0.5) * this.diameter, + entity.getY() + (entity.getRandom().nextDouble() - 0.5) * this.diameter, (double)level.getMinY(), (double)(level.getMinY() + ((ServerLevel)level).getLogicalHeight() - 1) ); - double f = livingEntity.getZ() + (livingEntity.getRandom().nextDouble() - 0.5) * this.diameter; - if (livingEntity.isPassenger()) { - livingEntity.stopRiding(); + double f = entity.getZ() + (entity.getRandom().nextDouble() - 0.5) * this.diameter; + if (entity.isPassenger()) { + entity.stopRiding(); } - Vec3 vec3 = livingEntity.position(); - if (livingEntity.randomTeleport(d, e, f, true)) { - level.gameEvent(GameEvent.TELEPORT, vec3, Context.of(livingEntity)); + Vec3 vec3 = entity.position(); + if (entity.randomTeleport(d, e, f, true)) { + level.gameEvent(GameEvent.TELEPORT, vec3, Context.of(entity)); SoundSource soundSource; SoundEvent soundEvent; - if (livingEntity instanceof Fox) { + if (entity instanceof Fox) { soundEvent = SoundEvents.FOX_TELEPORT; soundSource = SoundSource.NEUTRAL; } else { @@ -68,14 +68,14 @@ public record TeleportRandomlyConsumeEffect(float diameter) implements ConsumeEf soundSource = SoundSource.PLAYERS; } - level.playSound(null, livingEntity.getX(), livingEntity.getY(), livingEntity.getZ(), soundEvent, soundSource); - livingEntity.resetFallDistance(); + level.playSound(null, entity.getX(), entity.getY(), entity.getZ(), soundEvent, soundSource); + entity.resetFallDistance(); bl = true; break; } } - if (bl && livingEntity instanceof Player player) { + if (bl && entity instanceof Player player) { player.resetCurrentImpulseContext(); } diff --git a/net/minecraft/world/item/crafting/AbstractCookingRecipe.java b/net/minecraft/world/item/crafting/AbstractCookingRecipe.java index 12eb9818..daf9115a 100644 --- a/net/minecraft/world/item/crafting/AbstractCookingRecipe.java +++ b/net/minecraft/world/item/crafting/AbstractCookingRecipe.java @@ -18,11 +18,11 @@ public abstract class AbstractCookingRecipe extends SingleItemRecipe { private final float experience; private final int cookingTime; - public AbstractCookingRecipe(String string, CookingBookCategory cookingBookCategory, Ingredient ingredient, ItemStack itemStack, float f, int i) { - super(string, ingredient, itemStack); - this.category = cookingBookCategory; - this.experience = f; - this.cookingTime = i; + public AbstractCookingRecipe(String group, CookingBookCategory category, Ingredient input, ItemStack result, float experience, int cookingTime) { + super(group, input, result); + this.category = category; + this.experience = experience; + this.cookingTime = cookingTime; } @Override @@ -68,7 +68,7 @@ public abstract class AbstractCookingRecipe extends SingleItemRecipe { private final MapCodec codec; private final StreamCodec streamCodec; - public Serializer(AbstractCookingRecipe.Factory factory, int i) { + public Serializer(AbstractCookingRecipe.Factory factory, int defaultCookingTime) { this.codec = RecordCodecBuilder.mapCodec( instance -> instance.group( Codec.STRING.optionalFieldOf("group", "").forGetter(SingleItemRecipe::group), @@ -76,7 +76,7 @@ public abstract class AbstractCookingRecipe extends SingleItemRecipe { Ingredient.CODEC.fieldOf("ingredient").forGetter(SingleItemRecipe::input), ItemStack.STRICT_SINGLE_ITEM_CODEC.fieldOf("result").forGetter(SingleItemRecipe::result), Codec.FLOAT.fieldOf("experience").orElse(0.0F).forGetter(AbstractCookingRecipe::experience), - Codec.INT.fieldOf("cookingtime").orElse(i).forGetter(AbstractCookingRecipe::cookingTime) + Codec.INT.fieldOf("cookingtime").orElse(defaultCookingTime).forGetter(AbstractCookingRecipe::cookingTime) ) .apply(instance, factory::create) ); diff --git a/net/minecraft/world/item/crafting/ArmorDyeRecipe.java b/net/minecraft/world/item/crafting/ArmorDyeRecipe.java index c0c3b07f..6acf94b6 100644 --- a/net/minecraft/world/item/crafting/ArmorDyeRecipe.java +++ b/net/minecraft/world/item/crafting/ArmorDyeRecipe.java @@ -10,19 +10,19 @@ import net.minecraft.world.item.component.DyedItemColor; import net.minecraft.world.level.Level; public class ArmorDyeRecipe extends CustomRecipe { - public ArmorDyeRecipe(CraftingBookCategory category) { - super(category); + public ArmorDyeRecipe(CraftingBookCategory craftingBookCategory) { + super(craftingBookCategory); } - public boolean matches(CraftingInput input, Level level) { - if (input.ingredientCount() < 2) { + public boolean matches(CraftingInput craftingInput, Level level) { + if (craftingInput.ingredientCount() < 2) { return false; } else { boolean bl = false; boolean bl2 = false; - for (int i = 0; i < input.size(); i++) { - ItemStack itemStack = input.getItem(i); + for (int i = 0; i < craftingInput.size(); i++) { + ItemStack itemStack = craftingInput.getItem(i); if (!itemStack.isEmpty()) { if (itemStack.is(ItemTags.DYEABLE)) { if (bl) { @@ -44,12 +44,12 @@ public class ArmorDyeRecipe extends CustomRecipe { } } - public ItemStack assemble(CraftingInput input, HolderLookup.Provider registries) { + public ItemStack assemble(CraftingInput craftingInput, HolderLookup.Provider provider) { List list = new ArrayList(); ItemStack itemStack = ItemStack.EMPTY; - for (int i = 0; i < input.size(); i++) { - ItemStack itemStack2 = input.getItem(i); + for (int i = 0; i < craftingInput.size(); i++) { + ItemStack itemStack2 = craftingInput.getItem(i); if (!itemStack2.isEmpty()) { if (itemStack2.is(ItemTags.DYEABLE)) { if (!itemStack.isEmpty()) { diff --git a/net/minecraft/world/item/crafting/BannerDuplicateRecipe.java b/net/minecraft/world/item/crafting/BannerDuplicateRecipe.java index e71401f9..4f532df9 100644 --- a/net/minecraft/world/item/crafting/BannerDuplicateRecipe.java +++ b/net/minecraft/world/item/crafting/BannerDuplicateRecipe.java @@ -10,20 +10,20 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BannerPatternLayers; public class BannerDuplicateRecipe extends CustomRecipe { - public BannerDuplicateRecipe(CraftingBookCategory category) { - super(category); + public BannerDuplicateRecipe(CraftingBookCategory craftingBookCategory) { + super(craftingBookCategory); } - public boolean matches(CraftingInput input, Level level) { - if (input.ingredientCount() != 2) { + public boolean matches(CraftingInput craftingInput, Level level) { + if (craftingInput.ingredientCount() != 2) { return false; } else { DyeColor dyeColor = null; boolean bl = false; boolean bl2 = false; - for (int i = 0; i < input.size(); i++) { - ItemStack itemStack = input.getItem(i); + for (int i = 0; i < craftingInput.size(); i++) { + ItemStack itemStack = craftingInput.getItem(i); if (!itemStack.isEmpty()) { if (!(itemStack.getItem() instanceof BannerItem bannerItem)) { return false; @@ -60,9 +60,9 @@ public class BannerDuplicateRecipe extends CustomRecipe { } } - public ItemStack assemble(CraftingInput input, HolderLookup.Provider registries) { - for (int i = 0; i < input.size(); i++) { - ItemStack itemStack = input.getItem(i); + public ItemStack assemble(CraftingInput craftingInput, HolderLookup.Provider provider) { + for (int i = 0; i < craftingInput.size(); i++) { + ItemStack itemStack = craftingInput.getItem(i); if (!itemStack.isEmpty()) { int j = itemStack.getOrDefault(DataComponents.BANNER_PATTERNS, BannerPatternLayers.EMPTY).layers().size(); if (j > 0 && j <= 6) { @@ -75,11 +75,11 @@ public class BannerDuplicateRecipe extends CustomRecipe { } @Override - public NonNullList getRemainingItems(CraftingInput craftingInput) { - NonNullList nonNullList = NonNullList.withSize(craftingInput.size(), ItemStack.EMPTY); + public NonNullList getRemainingItems(CraftingInput input) { + NonNullList nonNullList = NonNullList.withSize(input.size(), ItemStack.EMPTY); for (int i = 0; i < nonNullList.size(); i++) { - ItemStack itemStack = craftingInput.getItem(i); + ItemStack itemStack = input.getItem(i); if (!itemStack.isEmpty()) { ItemStack itemStack2 = itemStack.getItem().getCraftingRemainder(); if (!itemStack2.isEmpty()) { diff --git a/net/minecraft/world/item/crafting/BookCloningRecipe.java b/net/minecraft/world/item/crafting/BookCloningRecipe.java index e15abeb2..d20d20ae 100644 --- a/net/minecraft/world/item/crafting/BookCloningRecipe.java +++ b/net/minecraft/world/item/crafting/BookCloningRecipe.java @@ -10,19 +10,19 @@ import net.minecraft.world.item.component.WrittenBookContent; import net.minecraft.world.level.Level; public class BookCloningRecipe extends CustomRecipe { - public BookCloningRecipe(CraftingBookCategory category) { - super(category); + public BookCloningRecipe(CraftingBookCategory craftingBookCategory) { + super(craftingBookCategory); } - public boolean matches(CraftingInput input, Level level) { - if (input.ingredientCount() < 2) { + public boolean matches(CraftingInput craftingInput, Level level) { + if (craftingInput.ingredientCount() < 2) { return false; } else { boolean bl = false; boolean bl2 = false; - for (int i = 0; i < input.size(); i++) { - ItemStack itemStack = input.getItem(i); + for (int i = 0; i < craftingInput.size(); i++) { + ItemStack itemStack = craftingInput.getItem(i); if (!itemStack.isEmpty()) { if (itemStack.is(Items.WRITTEN_BOOK)) { if (bl2) { @@ -44,12 +44,12 @@ public class BookCloningRecipe extends CustomRecipe { } } - public ItemStack assemble(CraftingInput input, HolderLookup.Provider registries) { + public ItemStack assemble(CraftingInput craftingInput, HolderLookup.Provider provider) { int i = 0; ItemStack itemStack = ItemStack.EMPTY; - for (int j = 0; j < input.size(); j++) { - ItemStack itemStack2 = input.getItem(j); + for (int j = 0; j < craftingInput.size(); j++) { + ItemStack itemStack2 = craftingInput.getItem(j); if (!itemStack2.isEmpty()) { if (itemStack2.is(Items.WRITTEN_BOOK)) { if (!itemStack.isEmpty()) { @@ -83,11 +83,11 @@ public class BookCloningRecipe extends CustomRecipe { } @Override - public NonNullList getRemainingItems(CraftingInput craftingInput) { - NonNullList nonNullList = NonNullList.withSize(craftingInput.size(), ItemStack.EMPTY); + public NonNullList getRemainingItems(CraftingInput input) { + NonNullList nonNullList = NonNullList.withSize(input.size(), ItemStack.EMPTY); for (int i = 0; i < nonNullList.size(); i++) { - ItemStack itemStack = craftingInput.getItem(i); + ItemStack itemStack = input.getItem(i); ItemStack itemStack2 = itemStack.getItem().getCraftingRemainder(); if (!itemStack2.isEmpty()) { nonNullList.set(i, itemStack2); diff --git a/net/minecraft/world/item/crafting/CookingBookCategory.java b/net/minecraft/world/item/crafting/CookingBookCategory.java index a6e05611..98736bc4 100644 --- a/net/minecraft/world/item/crafting/CookingBookCategory.java +++ b/net/minecraft/world/item/crafting/CookingBookCategory.java @@ -22,9 +22,9 @@ public enum CookingBookCategory implements StringRepresentable { private final int id; private final String name; - private CookingBookCategory(final int j, final String string2) { - this.id = j; - this.name = string2; + private CookingBookCategory(final int id, final String name) { + this.id = id; + this.name = name; } @Override diff --git a/net/minecraft/world/item/crafting/CraftingRecipe.java b/net/minecraft/world/item/crafting/CraftingRecipe.java index 7a0e2a47..2126b16f 100644 --- a/net/minecraft/world/item/crafting/CraftingRecipe.java +++ b/net/minecraft/world/item/crafting/CraftingRecipe.java @@ -15,15 +15,15 @@ public interface CraftingRecipe extends Recipe { CraftingBookCategory category(); - default NonNullList getRemainingItems(CraftingInput craftingInput) { - return defaultCraftingReminder(craftingInput); + default NonNullList getRemainingItems(CraftingInput input) { + return defaultCraftingReminder(input); } - static NonNullList defaultCraftingReminder(CraftingInput craftingInput) { - NonNullList nonNullList = NonNullList.withSize(craftingInput.size(), ItemStack.EMPTY); + static NonNullList defaultCraftingReminder(CraftingInput input) { + NonNullList nonNullList = NonNullList.withSize(input.size(), ItemStack.EMPTY); for (int i = 0; i < nonNullList.size(); i++) { - Item item = craftingInput.getItem(i).getItem(); + Item item = input.getItem(i).getItem(); nonNullList.set(i, item.getCraftingRemainder()); } diff --git a/net/minecraft/world/item/crafting/DecoratedPotRecipe.java b/net/minecraft/world/item/crafting/DecoratedPotRecipe.java index 67371a83..22e26de1 100644 --- a/net/minecraft/world/item/crafting/DecoratedPotRecipe.java +++ b/net/minecraft/world/item/crafting/DecoratedPotRecipe.java @@ -8,39 +8,37 @@ import net.minecraft.world.level.block.entity.DecoratedPotBlockEntity; import net.minecraft.world.level.block.entity.PotDecorations; public class DecoratedPotRecipe extends CustomRecipe { - public DecoratedPotRecipe(CraftingBookCategory craftingBookCategory) { - super(craftingBookCategory); + public DecoratedPotRecipe(CraftingBookCategory category) { + super(category); } - private static ItemStack back(CraftingInput craftingInput) { - return craftingInput.getItem(1, 0); + private static ItemStack back(CraftingInput input) { + return input.getItem(1, 0); } - private static ItemStack left(CraftingInput craftingInput) { - return craftingInput.getItem(0, 1); + private static ItemStack left(CraftingInput input) { + return input.getItem(0, 1); } - private static ItemStack right(CraftingInput craftingInput) { - return craftingInput.getItem(2, 1); + private static ItemStack right(CraftingInput input) { + return input.getItem(2, 1); } - private static ItemStack front(CraftingInput craftingInput) { - return craftingInput.getItem(1, 2); + private static ItemStack front(CraftingInput input) { + return input.getItem(1, 2); } - public boolean matches(CraftingInput craftingInput, Level level) { - return craftingInput.width() == 3 && craftingInput.height() == 3 && craftingInput.ingredientCount() == 4 - ? back(craftingInput).is(ItemTags.DECORATED_POT_INGREDIENTS) - && left(craftingInput).is(ItemTags.DECORATED_POT_INGREDIENTS) - && right(craftingInput).is(ItemTags.DECORATED_POT_INGREDIENTS) - && front(craftingInput).is(ItemTags.DECORATED_POT_INGREDIENTS) + public boolean matches(CraftingInput input, Level level) { + return input.width() == 3 && input.height() == 3 && input.ingredientCount() == 4 + ? back(input).is(ItemTags.DECORATED_POT_INGREDIENTS) + && left(input).is(ItemTags.DECORATED_POT_INGREDIENTS) + && right(input).is(ItemTags.DECORATED_POT_INGREDIENTS) + && front(input).is(ItemTags.DECORATED_POT_INGREDIENTS) : false; } - public ItemStack assemble(CraftingInput craftingInput, HolderLookup.Provider provider) { - PotDecorations potDecorations = new PotDecorations( - back(craftingInput).getItem(), left(craftingInput).getItem(), right(craftingInput).getItem(), front(craftingInput).getItem() - ); + public ItemStack assemble(CraftingInput input, HolderLookup.Provider registries) { + PotDecorations potDecorations = new PotDecorations(back(input).getItem(), left(input).getItem(), right(input).getItem(), front(input).getItem()); return DecoratedPotBlockEntity.createDecoratedPotItem(potDecorations); } diff --git a/net/minecraft/world/item/crafting/FireworkRocketRecipe.java b/net/minecraft/world/item/crafting/FireworkRocketRecipe.java index 77d48e64..376fbfa8 100644 --- a/net/minecraft/world/item/crafting/FireworkRocketRecipe.java +++ b/net/minecraft/world/item/crafting/FireworkRocketRecipe.java @@ -15,19 +15,19 @@ public class FireworkRocketRecipe extends CustomRecipe { private static final Ingredient GUNPOWDER_INGREDIENT = Ingredient.of(Items.GUNPOWDER); private static final Ingredient STAR_INGREDIENT = Ingredient.of(Items.FIREWORK_STAR); - public FireworkRocketRecipe(CraftingBookCategory category) { - super(category); + public FireworkRocketRecipe(CraftingBookCategory craftingBookCategory) { + super(craftingBookCategory); } - public boolean matches(CraftingInput input, Level level) { - if (input.ingredientCount() < 2) { + public boolean matches(CraftingInput craftingInput, Level level) { + if (craftingInput.ingredientCount() < 2) { return false; } else { boolean bl = false; int i = 0; - for (int j = 0; j < input.size(); j++) { - ItemStack itemStack = input.getItem(j); + for (int j = 0; j < craftingInput.size(); j++) { + ItemStack itemStack = craftingInput.getItem(j); if (!itemStack.isEmpty()) { if (PAPER_INGREDIENT.test(itemStack)) { if (bl) { @@ -49,12 +49,12 @@ public class FireworkRocketRecipe extends CustomRecipe { } } - public ItemStack assemble(CraftingInput input, HolderLookup.Provider registries) { + public ItemStack assemble(CraftingInput craftingInput, HolderLookup.Provider provider) { List list = new ArrayList(); int i = 0; - for (int j = 0; j < input.size(); j++) { - ItemStack itemStack = input.getItem(j); + for (int j = 0; j < craftingInput.size(); j++) { + ItemStack itemStack = craftingInput.getItem(j); if (!itemStack.isEmpty()) { if (GUNPOWDER_INGREDIENT.test(itemStack)) { i++; diff --git a/net/minecraft/world/item/crafting/FireworkStarFadeRecipe.java b/net/minecraft/world/item/crafting/FireworkStarFadeRecipe.java index 0bdffdb5..470c73d3 100644 --- a/net/minecraft/world/item/crafting/FireworkStarFadeRecipe.java +++ b/net/minecraft/world/item/crafting/FireworkStarFadeRecipe.java @@ -13,19 +13,19 @@ import net.minecraft.world.level.Level; public class FireworkStarFadeRecipe extends CustomRecipe { private static final Ingredient STAR_INGREDIENT = Ingredient.of(Items.FIREWORK_STAR); - public FireworkStarFadeRecipe(CraftingBookCategory category) { - super(category); + public FireworkStarFadeRecipe(CraftingBookCategory craftingBookCategory) { + super(craftingBookCategory); } - public boolean matches(CraftingInput input, Level level) { - if (input.ingredientCount() < 2) { + public boolean matches(CraftingInput craftingInput, Level level) { + if (craftingInput.ingredientCount() < 2) { return false; } else { boolean bl = false; boolean bl2 = false; - for (int i = 0; i < input.size(); i++) { - ItemStack itemStack = input.getItem(i); + for (int i = 0; i < craftingInput.size(); i++) { + ItemStack itemStack = craftingInput.getItem(i); if (!itemStack.isEmpty()) { if (itemStack.getItem() instanceof DyeItem) { bl = true; @@ -47,12 +47,12 @@ public class FireworkStarFadeRecipe extends CustomRecipe { } } - public ItemStack assemble(CraftingInput input, HolderLookup.Provider registries) { + public ItemStack assemble(CraftingInput craftingInput, HolderLookup.Provider provider) { IntList intList = new IntArrayList(); ItemStack itemStack = null; - for (int i = 0; i < input.size(); i++) { - ItemStack itemStack2 = input.getItem(i); + for (int i = 0; i < craftingInput.size(); i++) { + ItemStack itemStack2 = craftingInput.getItem(i); if (itemStack2.getItem() instanceof DyeItem dyeItem) { intList.add(dyeItem.getDyeColor().getFireworkColor()); } else if (STAR_INGREDIENT.test(itemStack2)) { diff --git a/net/minecraft/world/item/crafting/FireworkStarRecipe.java b/net/minecraft/world/item/crafting/FireworkStarRecipe.java index bb04cb81..cea0fb4d 100644 --- a/net/minecraft/world/item/crafting/FireworkStarRecipe.java +++ b/net/minecraft/world/item/crafting/FireworkStarRecipe.java @@ -39,12 +39,12 @@ public class FireworkStarRecipe extends CustomRecipe { private static final Ingredient TWINKLE_INGREDIENT = Ingredient.of(Items.GLOWSTONE_DUST); private static final Ingredient GUNPOWDER_INGREDIENT = Ingredient.of(Items.GUNPOWDER); - public FireworkStarRecipe(CraftingBookCategory category) { - super(category); + public FireworkStarRecipe(CraftingBookCategory craftingBookCategory) { + super(craftingBookCategory); } - public boolean matches(CraftingInput input, Level level) { - if (input.ingredientCount() < 2) { + public boolean matches(CraftingInput craftingInput, Level level) { + if (craftingInput.ingredientCount() < 2) { return false; } else { boolean bl = false; @@ -53,8 +53,8 @@ public class FireworkStarRecipe extends CustomRecipe { boolean bl4 = false; boolean bl5 = false; - for (int i = 0; i < input.size(); i++) { - ItemStack itemStack = input.getItem(i); + for (int i = 0; i < craftingInput.size(); i++) { + ItemStack itemStack = craftingInput.getItem(i); if (!itemStack.isEmpty()) { if (SHAPE_BY_ITEM.containsKey(itemStack.getItem())) { if (bl3) { @@ -94,14 +94,14 @@ public class FireworkStarRecipe extends CustomRecipe { } } - public ItemStack assemble(CraftingInput input, HolderLookup.Provider registries) { + public ItemStack assemble(CraftingInput craftingInput, HolderLookup.Provider provider) { FireworkExplosion.Shape shape = FireworkExplosion.Shape.SMALL_BALL; boolean bl = false; boolean bl2 = false; IntList intList = new IntArrayList(); - for (int i = 0; i < input.size(); i++) { - ItemStack itemStack = input.getItem(i); + for (int i = 0; i < craftingInput.size(); i++) { + ItemStack itemStack = craftingInput.getItem(i); if (!itemStack.isEmpty()) { FireworkExplosion.Shape shape2 = (FireworkExplosion.Shape)SHAPE_BY_ITEM.get(itemStack.getItem()); if (shape2 != null) { diff --git a/net/minecraft/world/item/crafting/Ingredient.java b/net/minecraft/world/item/crafting/Ingredient.java index caadb6fd..cd2939e7 100644 --- a/net/minecraft/world/item/crafting/Ingredient.java +++ b/net/minecraft/world/item/crafting/Ingredient.java @@ -37,19 +37,19 @@ public final class Ingredient implements Predicate { @Nullable private List> items; - private Ingredient(HolderSet holderSet) { - holderSet.unwrap().ifRight(list -> { + private Ingredient(HolderSet values) { + values.unwrap().ifRight(list -> { if (list.isEmpty()) { throw new UnsupportedOperationException("Ingredients can't be empty"); } else if (list.contains(Items.AIR.builtInRegistryHolder())) { throw new UnsupportedOperationException("Ingredient can't contain air"); } }); - this.values = holderSet; + this.values = values; } - public static boolean testOptionalIngredient(Optional optional, ItemStack itemStack) { - return (Boolean)optional.map(ingredient -> ingredient.test(itemStack)).orElseGet(itemStack::isEmpty); + public static boolean testOptionalIngredient(Optional ingredient, ItemStack stack) { + return (Boolean)ingredient.map(ingredientx -> ingredientx.test(stack)).orElseGet(stack::isEmpty); } public List> items() { @@ -76,20 +76,20 @@ public final class Ingredient implements Predicate { return object instanceof Ingredient ingredient ? Objects.equals(this.values, ingredient.values) : false; } - public static Ingredient of(ItemLike itemLike) { - return new Ingredient(HolderSet.direct(itemLike.asItem().builtInRegistryHolder())); + public static Ingredient of(ItemLike item) { + return new Ingredient(HolderSet.direct(item.asItem().builtInRegistryHolder())); } public static Ingredient of(ItemLike... items) { return of(Arrays.stream(items)); } - public static Ingredient of(Stream stacks) { - return new Ingredient(HolderSet.direct(stacks.map(itemLike -> itemLike.asItem().builtInRegistryHolder()).toList())); + public static Ingredient of(Stream items) { + return new Ingredient(HolderSet.direct(items.map(itemLike -> itemLike.asItem().builtInRegistryHolder()).toList())); } - public static Ingredient of(HolderSet holderSet) { - return new Ingredient(holderSet); + public static Ingredient of(HolderSet items) { + return new Ingredient(items); } public SlotDisplay display() { @@ -98,13 +98,13 @@ public final class Ingredient implements Predicate { .map(SlotDisplay.TagSlotDisplay::new, list -> new SlotDisplay.Composite(list.stream().map(Ingredient::displayForSingleItem).toList())); } - public static SlotDisplay optionalIngredientToDisplay(Optional optional) { - return (SlotDisplay)optional.map(Ingredient::display).orElse(SlotDisplay.Empty.INSTANCE); + public static SlotDisplay optionalIngredientToDisplay(Optional ingredient) { + return (SlotDisplay)ingredient.map(Ingredient::display).orElse(SlotDisplay.Empty.INSTANCE); } - private static SlotDisplay displayForSingleItem(Holder holder) { - SlotDisplay slotDisplay = new SlotDisplay.ItemSlotDisplay(holder); - ItemStack itemStack = holder.value().getCraftingRemainder(); + private static SlotDisplay displayForSingleItem(Holder item) { + SlotDisplay slotDisplay = new SlotDisplay.ItemSlotDisplay(item); + ItemStack itemStack = item.value().getCraftingRemainder(); if (!itemStack.isEmpty()) { SlotDisplay slotDisplay2 = new SlotDisplay.ItemStackSlotDisplay(itemStack); return new SlotDisplay.WithRemainder(slotDisplay, slotDisplay2); diff --git a/net/minecraft/world/item/crafting/MapCloningRecipe.java b/net/minecraft/world/item/crafting/MapCloningRecipe.java index b99ad54b..e3986172 100644 --- a/net/minecraft/world/item/crafting/MapCloningRecipe.java +++ b/net/minecraft/world/item/crafting/MapCloningRecipe.java @@ -7,19 +7,19 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; public class MapCloningRecipe extends CustomRecipe { - public MapCloningRecipe(CraftingBookCategory category) { - super(category); + public MapCloningRecipe(CraftingBookCategory craftingBookCategory) { + super(craftingBookCategory); } - public boolean matches(CraftingInput input, Level level) { - if (input.ingredientCount() < 2) { + public boolean matches(CraftingInput craftingInput, Level level) { + if (craftingInput.ingredientCount() < 2) { return false; } else { boolean bl = false; boolean bl2 = false; - for (int i = 0; i < input.size(); i++) { - ItemStack itemStack = input.getItem(i); + for (int i = 0; i < craftingInput.size(); i++) { + ItemStack itemStack = craftingInput.getItem(i); if (!itemStack.isEmpty()) { if (itemStack.has(DataComponents.MAP_ID)) { if (bl2) { @@ -41,12 +41,12 @@ public class MapCloningRecipe extends CustomRecipe { } } - public ItemStack assemble(CraftingInput input, HolderLookup.Provider registries) { + public ItemStack assemble(CraftingInput craftingInput, HolderLookup.Provider provider) { int i = 0; ItemStack itemStack = ItemStack.EMPTY; - for (int j = 0; j < input.size(); j++) { - ItemStack itemStack2 = input.getItem(j); + for (int j = 0; j < craftingInput.size(); j++) { + ItemStack itemStack2 = craftingInput.getItem(j); if (!itemStack2.isEmpty()) { if (itemStack2.has(DataComponents.MAP_ID)) { if (!itemStack.isEmpty()) { diff --git a/net/minecraft/world/item/crafting/PlacementInfo.java b/net/minecraft/world/item/crafting/PlacementInfo.java index 0ae5e17d..a1d3bdce 100644 --- a/net/minecraft/world/item/crafting/PlacementInfo.java +++ b/net/minecraft/world/item/crafting/PlacementInfo.java @@ -14,10 +14,12 @@ public class PlacementInfo { private final List>> unpackedIngredients; private final List> slotInfo; - private PlacementInfo(List list, List>> list2, List> list3) { - this.ingredients = list; - this.unpackedIngredients = list2; - this.slotInfo = list3; + private PlacementInfo( + List ingredients, List>> unpackedIngredients, List> slotInfo + ) { + this.ingredients = ingredients; + this.unpackedIngredients = unpackedIngredients; + this.slotInfo = slotInfo; } public static StackedContents.IngredientInfo> ingredientToContents(Ingredient ingredient) { @@ -34,47 +36,47 @@ public class PlacementInfo { } } - public static PlacementInfo createFromOptionals(List> list) { - int i = list.size(); - List list2 = new ArrayList(i); - List>> list3 = new ArrayList(i); - List> list4 = new ArrayList(i); + public static PlacementInfo createFromOptionals(List> optionals) { + int i = optionals.size(); + List list = new ArrayList(i); + List>> list2 = new ArrayList(i); + List> list3 = new ArrayList(i); int j = 0; - for (Optional optional : list) { + for (Optional optional : optionals) { if (optional.isPresent()) { Ingredient ingredient = (Ingredient)optional.get(); if (ingredient.items().isEmpty()) { return NOT_PLACEABLE; } - list2.add(ingredient); - list3.add(ingredientToContents(ingredient)); - list4.add(Optional.of(new PlacementInfo.SlotInfo(j++))); + list.add(ingredient); + list2.add(ingredientToContents(ingredient)); + list3.add(Optional.of(new PlacementInfo.SlotInfo(j++))); } else { - list4.add(Optional.empty()); + list3.add(Optional.empty()); } } - return new PlacementInfo(list2, list3, list4); + return new PlacementInfo(list, list2, list3); } - public static PlacementInfo create(List list) { - int i = list.size(); - List>> list2 = new ArrayList(i); - List> list3 = new ArrayList(i); + public static PlacementInfo create(List ingredients) { + int i = ingredients.size(); + List>> list = new ArrayList(i); + List> list2 = new ArrayList(i); for (int j = 0; j < i; j++) { - Ingredient ingredient = (Ingredient)list.get(j); + Ingredient ingredient = (Ingredient)ingredients.get(j); if (ingredient.items().isEmpty()) { return NOT_PLACEABLE; } - list2.add(ingredientToContents(ingredient)); - list3.add(Optional.of(new PlacementInfo.SlotInfo(j))); + list.add(ingredientToContents(ingredient)); + list2.add(Optional.of(new PlacementInfo.SlotInfo(j))); } - return new PlacementInfo(list, list2, list3); + return new PlacementInfo(ingredients, list, list2); } public List> slotInfo() { diff --git a/net/minecraft/world/item/crafting/RecipeAccess.java b/net/minecraft/world/item/crafting/RecipeAccess.java index 6ad48366..348d6f16 100644 --- a/net/minecraft/world/item/crafting/RecipeAccess.java +++ b/net/minecraft/world/item/crafting/RecipeAccess.java @@ -3,7 +3,7 @@ package net.minecraft.world.item.crafting; import net.minecraft.resources.ResourceKey; public interface RecipeAccess { - RecipePropertySet propertySet(ResourceKey resourceKey); + RecipePropertySet propertySet(ResourceKey propertySet); SelectableRecipe.SingleInputSet stonecutterRecipes(); } diff --git a/net/minecraft/world/item/crafting/RecipeBookCategories.java b/net/minecraft/world/item/crafting/RecipeBookCategories.java index 2954b7b1..6d4476a9 100644 --- a/net/minecraft/world/item/crafting/RecipeBookCategories.java +++ b/net/minecraft/world/item/crafting/RecipeBookCategories.java @@ -18,8 +18,8 @@ public class RecipeBookCategories { public static final RecipeBookCategory SMITHING = register("smithing"); public static final RecipeBookCategory CAMPFIRE = register("campfire"); - private static RecipeBookCategory register(String string) { - return Registry.register(BuiltInRegistries.RECIPE_BOOK_CATEGORY, string, new RecipeBookCategory()); + private static RecipeBookCategory register(String name) { + return Registry.register(BuiltInRegistries.RECIPE_BOOK_CATEGORY, name, new RecipeBookCategory()); } public static RecipeBookCategory bootstrap(Registry registry) { diff --git a/net/minecraft/world/item/crafting/RecipeCache.java b/net/minecraft/world/item/crafting/RecipeCache.java index 24ba5e20..b743fbdf 100644 --- a/net/minecraft/world/item/crafting/RecipeCache.java +++ b/net/minecraft/world/item/crafting/RecipeCache.java @@ -16,11 +16,11 @@ public class RecipeCache { this.entries = new RecipeCache.Entry[size]; } - public Optional> get(ServerLevel serverLevel, CraftingInput craftingInput) { + public Optional> get(ServerLevel level, CraftingInput craftingInput) { if (craftingInput.isEmpty()) { return Optional.empty(); } else { - this.validateRecipeManager(serverLevel); + this.validateRecipeManager(level); for (int i = 0; i < this.entries.length; i++) { RecipeCache.Entry entry = this.entries[i]; @@ -30,20 +30,20 @@ public class RecipeCache { } } - return this.compute(craftingInput, serverLevel); + return this.compute(craftingInput, level); } } - private void validateRecipeManager(ServerLevel serverLevel) { - RecipeManager recipeManager = serverLevel.recipeAccess(); + private void validateRecipeManager(ServerLevel level) { + RecipeManager recipeManager = level.recipeAccess(); if (recipeManager != this.cachedRecipeManager.get()) { this.cachedRecipeManager = new WeakReference(recipeManager); Arrays.fill(this.entries, null); } } - private Optional> compute(CraftingInput craftingInput, ServerLevel serverLevel) { - Optional> optional = serverLevel.recipeAccess().getRecipeFor(RecipeType.CRAFTING, craftingInput, serverLevel); + private Optional> compute(CraftingInput craftingInput, ServerLevel level) { + Optional> optional = level.recipeAccess().getRecipeFor(RecipeType.CRAFTING, craftingInput, level); this.insert(craftingInput, (RecipeHolder)optional.orElse(null)); return optional; } diff --git a/net/minecraft/world/item/crafting/RecipeManager.java b/net/minecraft/world/item/crafting/RecipeManager.java index f959be6e..b6ca60f0 100644 --- a/net/minecraft/world/item/crafting/RecipeManager.java +++ b/net/minecraft/world/item/crafting/RecipeManager.java @@ -65,7 +65,10 @@ public class RecipeManager extends SimplePreparableReloadListener imp this.registries = registries; } - protected RecipeMap prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) { + /** + * Performs any reloading that can be done off-thread, such as file IO + */ + protected RecipeMap prepare(ResourceManager resourceManager, ProfilerFiller profiler) { SortedMap> sortedMap = new TreeMap(); SimpleJsonResourceReloadListener.scanDirectory( resourceManager, Registries.elementsDirPath(Registries.RECIPE), this.registries.createSerializationContext(JsonOps.INSTANCE), Recipe.CODEC, sortedMap @@ -79,12 +82,12 @@ public class RecipeManager extends SimplePreparableReloadListener imp return RecipeMap.create(list); } - protected void apply(RecipeMap recipeMap, ResourceManager resourceManager, ProfilerFiller profilerFiller) { - this.recipes = recipeMap; - LOGGER.info("Loaded {} recipes", recipeMap.values().size()); + protected void apply(RecipeMap object, ResourceManager resourceManager, ProfilerFiller profiler) { + this.recipes = object; + LOGGER.info("Loaded {} recipes", object.values().size()); } - public void finalizeRecipeLoading(FeatureFlagSet featureFlagSet) { + public void finalizeRecipeLoading(FeatureFlagSet enabledFeatures) { List> list = new ArrayList(); List list2 = RECIPE_PROPERTY_SETS.entrySet() .stream() @@ -100,8 +103,8 @@ public class RecipeManager extends SimplePreparableReloadListener imp } else { list2.forEach(ingredientCollector -> ingredientCollector.accept(recipe)); if (recipe instanceof StonecutterRecipe stonecutterRecipe - && isIngredientEnabled(featureFlagSet, stonecutterRecipe.input()) - && stonecutterRecipe.resultDisplay().isEnabled(featureFlagSet)) { + && isIngredientEnabled(enabledFeatures, stonecutterRecipe.input()) + && stonecutterRecipe.resultDisplay().isEnabled(enabledFeatures)) { list.add( new SelectableRecipe.SingleInputEntry(stonecutterRecipe.input(), new SelectableRecipe(stonecutterRecipe.resultDisplay(), Optional.of(recipeHolder))) ); @@ -111,29 +114,29 @@ public class RecipeManager extends SimplePreparableReloadListener imp ); this.propertySets = (Map, RecipePropertySet>)list2.stream() .collect( - Collectors.toUnmodifiableMap(ingredientCollector -> ingredientCollector.key, ingredientCollector -> ingredientCollector.asPropertySet(featureFlagSet)) + Collectors.toUnmodifiableMap(ingredientCollector -> ingredientCollector.key, ingredientCollector -> ingredientCollector.asPropertySet(enabledFeatures)) ); this.stonecutterRecipes = new SelectableRecipe.SingleInputSet<>(list); - this.allDisplays = unpackRecipeInfo(this.recipes.values(), featureFlagSet); + this.allDisplays = unpackRecipeInfo(this.recipes.values(), enabledFeatures); this.recipeToDisplay = (Map>, List>)this.allDisplays .stream() .collect(Collectors.groupingBy(serverDisplayInfo -> serverDisplayInfo.parent.id(), IdentityHashMap::new, Collectors.toList())); } - static List filterDisabled(FeatureFlagSet featureFlagSet, List list) { - list.removeIf(ingredient -> !isIngredientEnabled(featureFlagSet, ingredient)); - return list; + static List filterDisabled(FeatureFlagSet enabledFeatures, List ingredients) { + ingredients.removeIf(ingredient -> !isIngredientEnabled(enabledFeatures, ingredient)); + return ingredients; } - private static boolean isIngredientEnabled(FeatureFlagSet featureFlagSet, Ingredient ingredient) { - return ingredient.items().stream().allMatch(holder -> ((Item)holder.value()).isEnabled(featureFlagSet)); + private static boolean isIngredientEnabled(FeatureFlagSet enabledFeatures, Ingredient ingredient) { + return ingredient.items().stream().allMatch(holder -> ((Item)holder.value()).isEnabled(enabledFeatures)); } public > Optional> getRecipeFor( - RecipeType recipeType, I recipeInput, Level level, @Nullable ResourceKey> resourceKey + RecipeType recipeType, I input, Level level, @Nullable ResourceKey> recipe ) { - RecipeHolder recipeHolder = resourceKey != null ? this.byKeyTyped(recipeType, resourceKey) : null; - return this.getRecipeFor(recipeType, recipeInput, level, recipeHolder); + RecipeHolder recipeHolder = recipe != null ? this.byKeyTyped(recipeType, recipe) : null; + return this.getRecipeFor(recipeType, input, level, recipeHolder); } public > Optional> getRecipeFor( @@ -146,14 +149,14 @@ public class RecipeManager extends SimplePreparableReloadListener imp return this.recipes.getRecipesFor(recipeType, input, level).findFirst(); } - public Optional> byKey(ResourceKey> resourceKey) { - return Optional.ofNullable(this.recipes.byKey(resourceKey)); + public Optional> byKey(ResourceKey> key) { + return Optional.ofNullable(this.recipes.byKey(key)); } @Nullable - private > RecipeHolder byKeyTyped(RecipeType recipeType, ResourceKey> resourceKey) { - RecipeHolder recipeHolder = this.recipes.byKey(resourceKey); - return (RecipeHolder)(recipeHolder != null && recipeHolder.value().getType().equals(recipeType) ? recipeHolder : null); + private > RecipeHolder byKeyTyped(RecipeType type, ResourceKey> key) { + RecipeHolder recipeHolder = this.recipes.byKey(key); + return (RecipeHolder)(recipeHolder != null && recipeHolder.value().getType().equals(type) ? recipeHolder : null); } public Map, RecipePropertySet> getSynchronizedItemProperties() { @@ -165,8 +168,8 @@ public class RecipeManager extends SimplePreparableReloadListener imp } @Override - public RecipePropertySet propertySet(ResourceKey resourceKey) { - return (RecipePropertySet)this.propertySets.getOrDefault(resourceKey, RecipePropertySet.EMPTY); + public RecipePropertySet propertySet(ResourceKey propertySet) { + return (RecipePropertySet)this.propertySets.getOrDefault(propertySet, RecipePropertySet.EMPTY); } @Override @@ -179,21 +182,21 @@ public class RecipeManager extends SimplePreparableReloadListener imp } @Nullable - public RecipeManager.ServerDisplayInfo getRecipeFromDisplay(RecipeDisplayId recipeDisplayId) { - return (RecipeManager.ServerDisplayInfo)this.allDisplays.get(recipeDisplayId.index()); + public RecipeManager.ServerDisplayInfo getRecipeFromDisplay(RecipeDisplayId display) { + return (RecipeManager.ServerDisplayInfo)this.allDisplays.get(display.index()); } - public void listDisplaysForRecipe(ResourceKey> resourceKey, Consumer consumer) { - List list = (List)this.recipeToDisplay.get(resourceKey); + public void listDisplaysForRecipe(ResourceKey> recipe, Consumer output) { + List list = (List)this.recipeToDisplay.get(recipe); if (list != null) { - list.forEach(serverDisplayInfo -> consumer.accept(serverDisplayInfo.display)); + list.forEach(serverDisplayInfo -> output.accept(serverDisplayInfo.display)); } } @VisibleForTesting - protected static RecipeHolder fromJson(ResourceKey> resourceKey, JsonObject jsonObject, HolderLookup.Provider provider) { - Recipe recipe = Recipe.CODEC.parse(provider.createSerializationContext(JsonOps.INSTANCE), jsonObject).getOrThrow(JsonParseException::new); - return new RecipeHolder<>(resourceKey, recipe); + protected static RecipeHolder fromJson(ResourceKey> recipe, JsonObject json, HolderLookup.Provider registries) { + Recipe recipe2 = Recipe.CODEC.parse(registries.createSerializationContext(JsonOps.INSTANCE), json).getOrThrow(JsonParseException::new); + return new RecipeHolder<>(recipe, recipe2); } public static > RecipeManager.CachedCheck createCheck(RecipeType recipeType) { @@ -202,9 +205,9 @@ public class RecipeManager extends SimplePreparableReloadListener imp private ResourceKey> lastRecipe; @Override - public Optional> getRecipeFor(I recipeInput, ServerLevel serverLevel) { - RecipeManager recipeManager = serverLevel.recipeAccess(); - Optional> optional = recipeManager.getRecipeFor(recipeType, recipeInput, serverLevel, this.lastRecipe); + public Optional> getRecipeFor(I input, ServerLevel level) { + RecipeManager recipeManager = level.recipeAccess(); + Optional> optional = recipeManager.getRecipeFor(recipeType, input, level, this.lastRecipe); if (optional.isPresent()) { RecipeHolder recipeHolder = (RecipeHolder)optional.get(); this.lastRecipe = recipeHolder.id(); @@ -216,11 +219,11 @@ public class RecipeManager extends SimplePreparableReloadListener imp }; } - private static List unpackRecipeInfo(Iterable> iterable, FeatureFlagSet featureFlagSet) { + private static List unpackRecipeInfo(Iterable> recipes, FeatureFlagSet enabledFeatures) { List list = new ArrayList(); Object2IntMap object2IntMap = new Object2IntOpenHashMap<>(); - for (RecipeHolder recipeHolder : iterable) { + for (RecipeHolder recipeHolder : recipes) { Recipe recipe = recipeHolder.value(); OptionalInt optionalInt; if (recipe.group().isEmpty()) { @@ -237,7 +240,7 @@ public class RecipeManager extends SimplePreparableReloadListener imp } for (RecipeDisplay recipeDisplay : recipe.display()) { - if (recipeDisplay.isEnabled(featureFlagSet)) { + if (recipeDisplay.isEnabled(enabledFeatures)) { int i = list.size(); RecipeDisplayId recipeDisplayId = new RecipeDisplayId(i); RecipeDisplayEntry recipeDisplayEntry = new RecipeDisplayEntry(recipeDisplayId, recipeDisplay, optionalInt, recipe.recipeBookCategory(), optional); @@ -256,7 +259,7 @@ public class RecipeManager extends SimplePreparableReloadListener imp } public interface CachedCheck> { - Optional> getRecipeFor(I recipeInput, ServerLevel serverLevel); + Optional> getRecipeFor(I input, ServerLevel level); } public static class IngredientCollector implements Consumer> { @@ -264,17 +267,17 @@ public class RecipeManager extends SimplePreparableReloadListener imp private final RecipeManager.IngredientExtractor extractor; private final List ingredients = new ArrayList(); - protected IngredientCollector(ResourceKey resourceKey, RecipeManager.IngredientExtractor ingredientExtractor) { - this.key = resourceKey; - this.extractor = ingredientExtractor; + protected IngredientCollector(ResourceKey key, RecipeManager.IngredientExtractor extractor) { + this.key = key; + this.extractor = extractor; } public void accept(Recipe recipe) { this.extractor.apply(recipe).ifPresent(this.ingredients::add); } - public RecipePropertySet asPropertySet(FeatureFlagSet featureFlagSet) { - return RecipePropertySet.create(RecipeManager.filterDisabled(featureFlagSet, this.ingredients)); + public RecipePropertySet asPropertySet(FeatureFlagSet enabledFeatures) { + return RecipePropertySet.create(RecipeManager.filterDisabled(enabledFeatures, this.ingredients)); } } diff --git a/net/minecraft/world/item/crafting/RecipeMap.java b/net/minecraft/world/item/crafting/RecipeMap.java index d5925d61..070f2f92 100644 --- a/net/minecraft/world/item/crafting/RecipeMap.java +++ b/net/minecraft/world/item/crafting/RecipeMap.java @@ -16,16 +16,16 @@ public class RecipeMap { private final Multimap, RecipeHolder> byType; private final Map>, RecipeHolder> byKey; - private RecipeMap(Multimap, RecipeHolder> multimap, Map>, RecipeHolder> map) { - this.byType = multimap; - this.byKey = map; + private RecipeMap(Multimap, RecipeHolder> byType, Map>, RecipeHolder> byKey) { + this.byType = byType; + this.byKey = byKey; } - public static RecipeMap create(Iterable> iterable) { + public static RecipeMap create(Iterable> recipes) { Builder, RecipeHolder> builder = ImmutableMultimap.builder(); com.google.common.collect.ImmutableMap.Builder>, RecipeHolder> builder2 = ImmutableMap.builder(); - for (RecipeHolder recipeHolder : iterable) { + for (RecipeHolder recipeHolder : recipes) { builder.put(recipeHolder.value().getType(), recipeHolder); builder2.put(recipeHolder.id(), recipeHolder); } @@ -33,8 +33,8 @@ public class RecipeMap { return new RecipeMap(builder.build(), builder2.build()); } - public > Collection> byType(RecipeType recipeType) { - return (Collection>)this.byType.get(recipeType); + public > Collection> byType(RecipeType type) { + return (Collection>)this.byType.get(type); } public Collection> values() { @@ -42,11 +42,11 @@ public class RecipeMap { } @Nullable - public RecipeHolder byKey(ResourceKey> resourceKey) { - return (RecipeHolder)this.byKey.get(resourceKey); + public RecipeHolder byKey(ResourceKey> key) { + return (RecipeHolder)this.byKey.get(key); } - public > Stream> getRecipesFor(RecipeType recipeType, I recipeInput, Level level) { - return recipeInput.isEmpty() ? Stream.empty() : this.byType(recipeType).stream().filter(recipeHolder -> recipeHolder.value().matches(recipeInput, level)); + public > Stream> getRecipesFor(RecipeType type, I input, Level level) { + return input.isEmpty() ? Stream.empty() : this.byType(type).stream().filter(recipeHolder -> recipeHolder.value().matches(input, level)); } } diff --git a/net/minecraft/world/item/crafting/RecipePropertySet.java b/net/minecraft/world/item/crafting/RecipePropertySet.java index 12cfb556..c7f7cc18 100644 --- a/net/minecraft/world/item/crafting/RecipePropertySet.java +++ b/net/minecraft/world/item/crafting/RecipePropertySet.java @@ -32,20 +32,20 @@ public class RecipePropertySet { public static final RecipePropertySet EMPTY = new RecipePropertySet(Set.of()); private final Set> items; - private RecipePropertySet(Set> set) { - this.items = set; + private RecipePropertySet(Set> items) { + this.items = items; } - private static ResourceKey registerVanilla(String string) { - return ResourceKey.create(TYPE_KEY, ResourceLocation.withDefaultNamespace(string)); + private static ResourceKey registerVanilla(String name) { + return ResourceKey.create(TYPE_KEY, ResourceLocation.withDefaultNamespace(name)); } - public boolean test(ItemStack itemStack) { - return this.items.contains(itemStack.getItemHolder()); + public boolean test(ItemStack stack) { + return this.items.contains(stack.getItemHolder()); } - static RecipePropertySet create(Collection collection) { - Set> set = (Set>)collection.stream().flatMap(ingredient -> ingredient.items().stream()).collect(Collectors.toUnmodifiableSet()); + static RecipePropertySet create(Collection ingredients) { + Set> set = (Set>)ingredients.stream().flatMap(ingredient -> ingredient.items().stream()).collect(Collectors.toUnmodifiableSet()); return new RecipePropertySet(set); } } diff --git a/net/minecraft/world/item/crafting/RepairItemRecipe.java b/net/minecraft/world/item/crafting/RepairItemRecipe.java index 53858d10..882daf5c 100644 --- a/net/minecraft/world/item/crafting/RepairItemRecipe.java +++ b/net/minecraft/world/item/crafting/RepairItemRecipe.java @@ -17,14 +17,14 @@ public class RepairItemRecipe extends CustomRecipe { } @Nullable - private static Pair getItemsToCombine(CraftingInput craftingInput) { - if (craftingInput.ingredientCount() != 2) { + private static Pair getItemsToCombine(CraftingInput input) { + if (input.ingredientCount() != 2) { return null; } else { ItemStack itemStack = null; - for (int i = 0; i < craftingInput.size(); i++) { - ItemStack itemStack2 = craftingInput.getItem(i); + for (int i = 0; i < input.size(); i++) { + ItemStack itemStack2 = input.getItem(i); if (!itemStack2.isEmpty()) { if (itemStack != null) { return canCombine(itemStack, itemStack2) ? Pair.of(itemStack, itemStack2) : null; diff --git a/net/minecraft/world/item/crafting/SelectableRecipe.java b/net/minecraft/world/item/crafting/SelectableRecipe.java index 653cb019..26975227 100644 --- a/net/minecraft/world/item/crafting/SelectableRecipe.java +++ b/net/minecraft/world/item/crafting/SelectableRecipe.java @@ -39,12 +39,12 @@ public record SelectableRecipe>(SlotDisplay optionDisplay, O ); } - public boolean acceptsInput(ItemStack itemStack) { - return this.entries.stream().anyMatch(singleInputEntry -> singleInputEntry.input.test(itemStack)); + public boolean acceptsInput(ItemStack stack) { + return this.entries.stream().anyMatch(singleInputEntry -> singleInputEntry.input.test(stack)); } - public SelectableRecipe.SingleInputSet selectByInput(ItemStack itemStack) { - return new SelectableRecipe.SingleInputSet<>(this.entries.stream().filter(singleInputEntry -> singleInputEntry.input.test(itemStack)).toList()); + public SelectableRecipe.SingleInputSet selectByInput(ItemStack stack) { + return new SelectableRecipe.SingleInputSet<>(this.entries.stream().filter(singleInputEntry -> singleInputEntry.input.test(stack)).toList()); } public boolean isEmpty() { diff --git a/net/minecraft/world/item/crafting/ShapedRecipePattern.java b/net/minecraft/world/item/crafting/ShapedRecipePattern.java index 399dcf89..f19ce972 100644 --- a/net/minecraft/world/item/crafting/ShapedRecipePattern.java +++ b/net/minecraft/world/item/crafting/ShapedRecipePattern.java @@ -45,17 +45,17 @@ public final class ShapedRecipePattern { private final int ingredientCount; private final boolean symmetrical; - public ShapedRecipePattern(int i, int j, List> list, Optional optional) { - this.width = i; - this.height = j; - this.ingredients = list; - this.data = optional; - this.ingredientCount = (int)list.stream().flatMap(Optional::stream).count(); - this.symmetrical = Util.isSymmetrical(i, j, list); + public ShapedRecipePattern(int width, int height, List> ingredients, Optional data) { + this.width = width; + this.height = height; + this.ingredients = ingredients; + this.data = data; + this.ingredientCount = (int)ingredients.stream().flatMap(Optional::stream).count(); + this.symmetrical = Util.isSymmetrical(width, height, ingredients); } - private static ShapedRecipePattern createFromNetwork(Integer integer, Integer integer2, List> list) { - return new ShapedRecipePattern(integer, integer2, list, Optional.empty()); + private static ShapedRecipePattern createFromNetwork(Integer width, Integer height, List> ingredients) { + return new ShapedRecipePattern(width, height, ingredients, Optional.empty()); } public static ShapedRecipePattern of(Map key, String... pattern) { @@ -135,20 +135,20 @@ public final class ShapedRecipePattern { } } - private static int firstNonEmpty(String string) { + private static int firstNonEmpty(String row) { int i = 0; - while (i < string.length() && string.charAt(i) == ' ') { + while (i < row.length() && row.charAt(i) == ' ') { i++; } return i; } - private static int lastNonEmpty(String string) { - int i = string.length() - 1; + private static int lastNonEmpty(String row) { + int i = row.length() - 1; - while (i >= 0 && string.charAt(i) == ' ') { + while (i >= 0 && row.charAt(i) == ' ') { i--; } diff --git a/net/minecraft/world/item/crafting/ShapelessRecipe.java b/net/minecraft/world/item/crafting/ShapelessRecipe.java index d2f71f2b..a286c949 100644 --- a/net/minecraft/world/item/crafting/ShapelessRecipe.java +++ b/net/minecraft/world/item/crafting/ShapelessRecipe.java @@ -24,11 +24,11 @@ public class ShapelessRecipe implements CraftingRecipe { @Nullable private PlacementInfo placementInfo; - public ShapelessRecipe(String string, CraftingBookCategory craftingBookCategory, ItemStack itemStack, List list) { - this.group = string; - this.category = craftingBookCategory; - this.result = itemStack; - this.ingredients = list; + public ShapelessRecipe(String group, CraftingBookCategory category, ItemStack result, List ingredients) { + this.group = group; + this.category = category; + this.result = result; + this.ingredients = ingredients; } @Override diff --git a/net/minecraft/world/item/crafting/ShieldDecorationRecipe.java b/net/minecraft/world/item/crafting/ShieldDecorationRecipe.java index 9c1ec643..d09e064e 100644 --- a/net/minecraft/world/item/crafting/ShieldDecorationRecipe.java +++ b/net/minecraft/world/item/crafting/ShieldDecorationRecipe.java @@ -9,19 +9,19 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BannerPatternLayers; public class ShieldDecorationRecipe extends CustomRecipe { - public ShieldDecorationRecipe(CraftingBookCategory category) { - super(category); + public ShieldDecorationRecipe(CraftingBookCategory craftingBookCategory) { + super(craftingBookCategory); } - public boolean matches(CraftingInput input, Level level) { - if (input.ingredientCount() != 2) { + public boolean matches(CraftingInput craftingInput, Level level) { + if (craftingInput.ingredientCount() != 2) { return false; } else { boolean bl = false; boolean bl2 = false; - for (int i = 0; i < input.size(); i++) { - ItemStack itemStack = input.getItem(i); + for (int i = 0; i < craftingInput.size(); i++) { + ItemStack itemStack = craftingInput.getItem(i); if (!itemStack.isEmpty()) { if (itemStack.getItem() instanceof BannerItem) { if (bl2) { @@ -52,12 +52,12 @@ public class ShieldDecorationRecipe extends CustomRecipe { } } - public ItemStack assemble(CraftingInput input, HolderLookup.Provider registries) { + public ItemStack assemble(CraftingInput craftingInput, HolderLookup.Provider provider) { ItemStack itemStack = ItemStack.EMPTY; ItemStack itemStack2 = ItemStack.EMPTY; - for (int i = 0; i < input.size(); i++) { - ItemStack itemStack3 = input.getItem(i); + for (int i = 0; i < craftingInput.size(); i++) { + ItemStack itemStack3 = craftingInput.getItem(i); if (!itemStack3.isEmpty()) { if (itemStack3.getItem() instanceof BannerItem) { itemStack = itemStack3; diff --git a/net/minecraft/world/item/crafting/SingleItemRecipe.java b/net/minecraft/world/item/crafting/SingleItemRecipe.java index 72502a57..83b165f6 100644 --- a/net/minecraft/world/item/crafting/SingleItemRecipe.java +++ b/net/minecraft/world/item/crafting/SingleItemRecipe.java @@ -18,10 +18,10 @@ public abstract class SingleItemRecipe implements Recipe { @Nullable private PlacementInfo placementInfo; - public SingleItemRecipe(String string, Ingredient ingredient, ItemStack itemStack) { - this.group = string; - this.input = ingredient; - this.result = itemStack; + public SingleItemRecipe(String group, Ingredient input, ItemStack result) { + this.group = group; + this.input = input; + this.result = result; } @Override @@ -30,8 +30,8 @@ public abstract class SingleItemRecipe implements Recipe { @Override public abstract RecipeType getType(); - public boolean matches(SingleRecipeInput singleRecipeInput, Level level) { - return this.input.test(singleRecipeInput.item()); + public boolean matches(SingleRecipeInput input, Level level) { + return this.input.test(input.item()); } @Override diff --git a/net/minecraft/world/item/crafting/SmithingTransformRecipe.java b/net/minecraft/world/item/crafting/SmithingTransformRecipe.java index 53edc4d8..5d27ec32 100644 --- a/net/minecraft/world/item/crafting/SmithingTransformRecipe.java +++ b/net/minecraft/world/item/crafting/SmithingTransformRecipe.java @@ -22,11 +22,11 @@ public class SmithingTransformRecipe implements SmithingRecipe { @Nullable private PlacementInfo placementInfo; - public SmithingTransformRecipe(Optional optional, Optional optional2, Optional optional3, ItemStack itemStack) { - this.template = optional; - this.base = optional2; - this.addition = optional3; - this.result = itemStack; + public SmithingTransformRecipe(Optional template, Optional base, Optional addition, ItemStack result) { + this.template = template; + this.base = base; + this.addition = addition; + this.result = result; } public ItemStack assemble(SmithingRecipeInput input, HolderLookup.Provider registries) { diff --git a/net/minecraft/world/item/crafting/SmithingTrimRecipe.java b/net/minecraft/world/item/crafting/SmithingTrimRecipe.java index 85cf6ff6..eaa9e68d 100644 --- a/net/minecraft/world/item/crafting/SmithingTrimRecipe.java +++ b/net/minecraft/world/item/crafting/SmithingTrimRecipe.java @@ -6,6 +6,7 @@ import java.util.List; import java.util.Optional; import net.minecraft.core.Holder; import net.minecraft.core.HolderLookup; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.component.DataComponents; import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.codec.StreamCodec; @@ -28,27 +29,27 @@ public class SmithingTrimRecipe implements SmithingRecipe { @Nullable private PlacementInfo placementInfo; - public SmithingTrimRecipe(Optional optional, Optional optional2, Optional optional3) { - this.template = optional; - this.base = optional2; - this.addition = optional3; + public SmithingTrimRecipe(Optional template, Optional base, Optional addition) { + this.template = template; + this.base = base; + this.addition = addition; } public ItemStack assemble(SmithingRecipeInput input, HolderLookup.Provider registries) { return applyTrim(registries, input.base(), input.addition(), input.template()); } - public static ItemStack applyTrim(HolderLookup.Provider provider, ItemStack itemStack, ItemStack itemStack2, ItemStack itemStack3) { - Optional> optional = TrimMaterials.getFromIngredient(provider, itemStack2); - Optional> optional2 = TrimPatterns.getFromTemplate(provider, itemStack3); + public static ItemStack applyTrim(HolderLookup.Provider registries, ItemStack base, ItemStack addition, ItemStack template) { + Optional> optional = TrimMaterials.getFromIngredient(registries, addition); + Optional> optional2 = TrimPatterns.getFromTemplate(registries, template); if (optional.isPresent() && optional2.isPresent()) { - ArmorTrim armorTrim = itemStack.get(DataComponents.TRIM); + ArmorTrim armorTrim = base.get(DataComponents.TRIM); if (armorTrim != null && armorTrim.hasPatternAndMaterial((Holder)optional2.get(), (Holder)optional.get())) { return ItemStack.EMPTY; } else { - ItemStack itemStack4 = itemStack.copyWithCount(1); - itemStack4.set(DataComponents.TRIM, new ArmorTrim((Holder)optional.get(), (Holder)optional2.get())); - return itemStack4; + ItemStack itemStack = base.copyWithCount(1); + itemStack.set(DataComponents.TRIM, new ArmorTrim((Holder)optional.get(), (Holder)optional2.get())); + return itemStack; } } else { return ItemStack.EMPTY; diff --git a/net/minecraft/world/item/crafting/TippedArrowRecipe.java b/net/minecraft/world/item/crafting/TippedArrowRecipe.java index 0edeb5d4..4be318a1 100644 --- a/net/minecraft/world/item/crafting/TippedArrowRecipe.java +++ b/net/minecraft/world/item/crafting/TippedArrowRecipe.java @@ -7,15 +7,15 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; public class TippedArrowRecipe extends CustomRecipe { - public TippedArrowRecipe(CraftingBookCategory category) { - super(category); + public TippedArrowRecipe(CraftingBookCategory craftingBookCategory) { + super(craftingBookCategory); } - public boolean matches(CraftingInput input, Level level) { - if (input.width() == 3 && input.height() == 3 && input.ingredientCount() == 9) { - for (int i = 0; i < input.height(); i++) { - for (int j = 0; j < input.width(); j++) { - ItemStack itemStack = input.getItem(j, i); + public boolean matches(CraftingInput craftingInput, Level level) { + if (craftingInput.width() == 3 && craftingInput.height() == 3 && craftingInput.ingredientCount() == 9) { + for (int i = 0; i < craftingInput.height(); i++) { + for (int j = 0; j < craftingInput.width(); j++) { + ItemStack itemStack = craftingInput.getItem(j, i); if (itemStack.isEmpty()) { return false; } @@ -36,8 +36,8 @@ public class TippedArrowRecipe extends CustomRecipe { } } - public ItemStack assemble(CraftingInput input, HolderLookup.Provider registries) { - ItemStack itemStack = input.getItem(1, 1); + public ItemStack assemble(CraftingInput craftingInput, HolderLookup.Provider provider) { + ItemStack itemStack = craftingInput.getItem(1, 1); if (!itemStack.is(Items.LINGERING_POTION)) { return ItemStack.EMPTY; } else { diff --git a/net/minecraft/world/item/crafting/TransmuteRecipe.java b/net/minecraft/world/item/crafting/TransmuteRecipe.java index a7b01d5e..5d90433b 100644 --- a/net/minecraft/world/item/crafting/TransmuteRecipe.java +++ b/net/minecraft/world/item/crafting/TransmuteRecipe.java @@ -28,23 +28,23 @@ public class TransmuteRecipe implements CraftingRecipe { @Nullable private PlacementInfo placementInfo; - public TransmuteRecipe(String string, CraftingBookCategory craftingBookCategory, Ingredient ingredient, Ingredient ingredient2, Holder holder) { - this.group = string; - this.category = craftingBookCategory; - this.input = ingredient; - this.material = ingredient2; - this.result = holder; + public TransmuteRecipe(String group, CraftingBookCategory category, Ingredient input, Ingredient material, Holder result) { + this.group = group; + this.category = category; + this.input = input; + this.material = material; + this.result = result; } - public boolean matches(CraftingInput craftingInput, Level level) { - if (craftingInput.ingredientCount() != 2) { + public boolean matches(CraftingInput input, Level level) { + if (input.ingredientCount() != 2) { return false; } else { boolean bl = false; boolean bl2 = false; - for (int i = 0; i < craftingInput.size(); i++) { - ItemStack itemStack = craftingInput.getItem(i); + for (int i = 0; i < input.size(); i++) { + ItemStack itemStack = input.getItem(i); if (!itemStack.isEmpty()) { if (!bl && this.input.test(itemStack) && itemStack.getItem() != this.result.value()) { bl = true; @@ -62,11 +62,11 @@ public class TransmuteRecipe implements CraftingRecipe { } } - public ItemStack assemble(CraftingInput craftingInput, HolderLookup.Provider provider) { + public ItemStack assemble(CraftingInput input, HolderLookup.Provider registries) { ItemStack itemStack = ItemStack.EMPTY; - for (int i = 0; i < craftingInput.size(); i++) { - ItemStack itemStack2 = craftingInput.getItem(i); + for (int i = 0; i < input.size(); i++) { + ItemStack itemStack2 = input.getItem(i); if (!itemStack2.isEmpty() && this.input.test(itemStack2) && itemStack2.getItem() != this.result.value()) { itemStack = itemStack2; } diff --git a/net/minecraft/world/item/crafting/display/DisplayContentsFactory.java b/net/minecraft/world/item/crafting/display/DisplayContentsFactory.java index 99339910..f2e4156a 100644 --- a/net/minecraft/world/item/crafting/display/DisplayContentsFactory.java +++ b/net/minecraft/world/item/crafting/display/DisplayContentsFactory.java @@ -7,18 +7,18 @@ import net.minecraft.world.item.ItemStack; public interface DisplayContentsFactory { public interface ForRemainders extends DisplayContentsFactory { - T addRemainder(T object, List list); + T addRemainder(T remainder, List remainderItems); } public interface ForStacks extends DisplayContentsFactory { - default T forStack(Holder holder) { - return this.forStack(new ItemStack(holder)); + default T forStack(Holder item) { + return this.forStack(new ItemStack(item)); } default T forStack(Item item) { return this.forStack(new ItemStack(item)); } - T forStack(ItemStack itemStack); + T forStack(ItemStack stack); } } diff --git a/net/minecraft/world/item/crafting/display/FurnaceRecipeDisplay.java b/net/minecraft/world/item/crafting/display/FurnaceRecipeDisplay.java index ccee9fae..6cfac143 100644 --- a/net/minecraft/world/item/crafting/display/FurnaceRecipeDisplay.java +++ b/net/minecraft/world/item/crafting/display/FurnaceRecipeDisplay.java @@ -44,7 +44,7 @@ public record FurnaceRecipeDisplay(SlotDisplay ingredient, SlotDisplay fuel, Slo } @Override - public boolean isEnabled(FeatureFlagSet featureFlagSet) { - return this.ingredient.isEnabled(featureFlagSet) && this.fuel().isEnabled(featureFlagSet) && RecipeDisplay.super.isEnabled(featureFlagSet); + public boolean isEnabled(FeatureFlagSet enabledFeatures) { + return this.ingredient.isEnabled(enabledFeatures) && this.fuel().isEnabled(enabledFeatures) && RecipeDisplay.super.isEnabled(enabledFeatures); } } diff --git a/net/minecraft/world/item/crafting/display/RecipeDisplay.java b/net/minecraft/world/item/crafting/display/RecipeDisplay.java index 59c63d22..a949b55f 100644 --- a/net/minecraft/world/item/crafting/display/RecipeDisplay.java +++ b/net/minecraft/world/item/crafting/display/RecipeDisplay.java @@ -20,8 +20,8 @@ public interface RecipeDisplay { RecipeDisplay.Type type(); - default boolean isEnabled(FeatureFlagSet featureFlagSet) { - return this.result().isEnabled(featureFlagSet) && this.craftingStation().isEnabled(featureFlagSet); + default boolean isEnabled(FeatureFlagSet enabledFeatures) { + return this.result().isEnabled(enabledFeatures) && this.craftingStation().isEnabled(enabledFeatures); } public record Type(MapCodec codec, StreamCodec streamCodec) { diff --git a/net/minecraft/world/item/crafting/display/RecipeDisplayEntry.java b/net/minecraft/world/item/crafting/display/RecipeDisplayEntry.java index 6370e859..aea656ad 100644 --- a/net/minecraft/world/item/crafting/display/RecipeDisplayEntry.java +++ b/net/minecraft/world/item/crafting/display/RecipeDisplayEntry.java @@ -34,8 +34,8 @@ public record RecipeDisplayEntry( RecipeDisplayEntry::new ); - public List resultItems(ContextMap contextMap) { - return this.display.result().resolveForStacks(contextMap); + public List resultItems(ContextMap context) { + return this.display.result().resolveForStacks(context); } public boolean canCraft(StackedItemContents stackedItemContents) { diff --git a/net/minecraft/world/item/crafting/display/ShapedCraftingRecipeDisplay.java b/net/minecraft/world/item/crafting/display/ShapedCraftingRecipeDisplay.java index 0e0f4a40..4dd93a49 100644 --- a/net/minecraft/world/item/crafting/display/ShapedCraftingRecipeDisplay.java +++ b/net/minecraft/world/item/crafting/display/ShapedCraftingRecipeDisplay.java @@ -54,7 +54,7 @@ public record ShapedCraftingRecipeDisplay(int width, int height, List slotDisplay.isEnabled(featureFlagSet)) && RecipeDisplay.super.isEnabled(featureFlagSet); + public boolean isEnabled(FeatureFlagSet enabledFeatures) { + return this.ingredients.stream().allMatch(slotDisplay -> slotDisplay.isEnabled(enabledFeatures)) && RecipeDisplay.super.isEnabled(enabledFeatures); } } diff --git a/net/minecraft/world/item/crafting/display/ShapelessCraftingRecipeDisplay.java b/net/minecraft/world/item/crafting/display/ShapelessCraftingRecipeDisplay.java index 7a0f0e89..e9418b5e 100644 --- a/net/minecraft/world/item/crafting/display/ShapelessCraftingRecipeDisplay.java +++ b/net/minecraft/world/item/crafting/display/ShapelessCraftingRecipeDisplay.java @@ -34,7 +34,7 @@ public record ShapelessCraftingRecipeDisplay(List ingredients, Slot } @Override - public boolean isEnabled(FeatureFlagSet featureFlagSet) { - return this.ingredients.stream().allMatch(slotDisplay -> slotDisplay.isEnabled(featureFlagSet)) && RecipeDisplay.super.isEnabled(featureFlagSet); + public boolean isEnabled(FeatureFlagSet enabledFeatures) { + return this.ingredients.stream().allMatch(slotDisplay -> slotDisplay.isEnabled(enabledFeatures)) && RecipeDisplay.super.isEnabled(enabledFeatures); } } diff --git a/net/minecraft/world/item/crafting/display/SlotDisplay.java b/net/minecraft/world/item/crafting/display/SlotDisplay.java index d8fa7269..84421556 100644 --- a/net/minecraft/world/item/crafting/display/SlotDisplay.java +++ b/net/minecraft/world/item/crafting/display/SlotDisplay.java @@ -27,20 +27,20 @@ public interface SlotDisplay { StreamCodec STREAM_CODEC = ByteBufCodecs.registry(Registries.SLOT_DISPLAY) .dispatch(SlotDisplay::type, SlotDisplay.Type::streamCodec); - Stream resolve(ContextMap contextMap, DisplayContentsFactory displayContentsFactory); + Stream resolve(ContextMap context, DisplayContentsFactory output); SlotDisplay.Type type(); - default boolean isEnabled(FeatureFlagSet featureFlagSet) { + default boolean isEnabled(FeatureFlagSet enabledFeatures) { return true; } - default List resolveForStacks(ContextMap contextMap) { - return this.resolve(contextMap, SlotDisplay.ItemStackContentsFactory.INSTANCE).toList(); + default List resolveForStacks(ContextMap context) { + return this.resolve(context, SlotDisplay.ItemStackContentsFactory.INSTANCE).toList(); } - default ItemStack resolveForFirstStack(ContextMap contextMap) { - return (ItemStack)this.resolve(contextMap, SlotDisplay.ItemStackContentsFactory.INSTANCE).findFirst().orElse(ItemStack.EMPTY); + default ItemStack resolveForFirstStack(ContextMap context) { + return (ItemStack)this.resolve(context, SlotDisplay.ItemStackContentsFactory.INSTANCE).findFirst().orElse(ItemStack.EMPTY); } public static class AnyFuel implements SlotDisplay { @@ -62,9 +62,9 @@ public interface SlotDisplay { } @Override - public Stream resolve(ContextMap contextMap, DisplayContentsFactory displayContentsFactory) { - if (displayContentsFactory instanceof DisplayContentsFactory.ForStacks forStacks) { - FuelValues fuelValues = contextMap.getOptional(SlotDisplayContext.FUEL_VALUES); + public Stream resolve(ContextMap context, DisplayContentsFactory output) { + if (output instanceof DisplayContentsFactory.ForStacks forStacks) { + FuelValues fuelValues = context.getOptional(SlotDisplayContext.FUEL_VALUES); if (fuelValues != null) { return fuelValues.fuelItems().stream().map(forStacks::forStack); } @@ -90,13 +90,13 @@ public interface SlotDisplay { } @Override - public Stream resolve(ContextMap contextMap, DisplayContentsFactory displayContentsFactory) { - return this.contents.stream().flatMap(slotDisplay -> slotDisplay.resolve(contextMap, displayContentsFactory)); + public Stream resolve(ContextMap context, DisplayContentsFactory output) { + return this.contents.stream().flatMap(slotDisplay -> slotDisplay.resolve(context, output)); } @Override - public boolean isEnabled(FeatureFlagSet featureFlagSet) { - return this.contents.stream().allMatch(slotDisplay -> slotDisplay.isEnabled(featureFlagSet)); + public boolean isEnabled(FeatureFlagSet enabledFeatures) { + return this.contents.stream().allMatch(slotDisplay -> slotDisplay.isEnabled(enabledFeatures)); } } @@ -119,7 +119,7 @@ public interface SlotDisplay { } @Override - public Stream resolve(ContextMap contextMap, DisplayContentsFactory displayContentsFactory) { + public Stream resolve(ContextMap context, DisplayContentsFactory output) { return Stream.empty(); } } @@ -143,13 +143,13 @@ public interface SlotDisplay { } @Override - public Stream resolve(ContextMap contextMap, DisplayContentsFactory displayContentsFactory) { - return displayContentsFactory instanceof DisplayContentsFactory.ForStacks forStacks ? Stream.of(forStacks.forStack(this.item)) : Stream.empty(); + public Stream resolve(ContextMap context, DisplayContentsFactory output) { + return output instanceof DisplayContentsFactory.ForStacks forStacks ? Stream.of(forStacks.forStack(this.item)) : Stream.empty(); } @Override - public boolean isEnabled(FeatureFlagSet featureFlagSet) { - return this.item.value().isEnabled(featureFlagSet); + public boolean isEnabled(FeatureFlagSet enabledFeatures) { + return this.item.value().isEnabled(enabledFeatures); } } @@ -177,8 +177,8 @@ public interface SlotDisplay { } @Override - public Stream resolve(ContextMap contextMap, DisplayContentsFactory displayContentsFactory) { - return displayContentsFactory instanceof DisplayContentsFactory.ForStacks forStacks ? Stream.of(forStacks.forStack(this.stack)) : Stream.empty(); + public Stream resolve(ContextMap context, DisplayContentsFactory output) { + return output instanceof DisplayContentsFactory.ForStacks forStacks ? Stream.of(forStacks.forStack(this.stack)) : Stream.empty(); } public boolean equals(Object object) { @@ -187,8 +187,8 @@ public interface SlotDisplay { } @Override - public boolean isEnabled(FeatureFlagSet featureFlagSet) { - return this.stack.getItem().isEnabled(featureFlagSet); + public boolean isEnabled(FeatureFlagSet enabledFeatures) { + return this.stack.getItem().isEnabled(enabledFeatures); } } @@ -218,22 +218,22 @@ public interface SlotDisplay { } @Override - public Stream resolve(ContextMap contextMap, DisplayContentsFactory displayContentsFactory) { - if (displayContentsFactory instanceof DisplayContentsFactory.ForStacks forStacks) { - HolderLookup.Provider provider = contextMap.getOptional(SlotDisplayContext.REGISTRIES); + public Stream resolve(ContextMap context, DisplayContentsFactory output) { + if (output instanceof DisplayContentsFactory.ForStacks forStacks) { + HolderLookup.Provider provider = context.getOptional(SlotDisplayContext.REGISTRIES); if (provider != null) { RandomSource randomSource = RandomSource.create(System.identityHashCode(this)); - List list = this.base.resolveForStacks(contextMap); + List list = this.base.resolveForStacks(context); if (list.isEmpty()) { return Stream.empty(); } - List list2 = this.material.resolveForStacks(contextMap); + List list2 = this.material.resolveForStacks(context); if (list2.isEmpty()) { return Stream.empty(); } - List list3 = this.pattern.resolveForStacks(contextMap); + List list3 = this.pattern.resolveForStacks(context); if (list3.isEmpty()) { return Stream.empty(); } @@ -267,9 +267,9 @@ public interface SlotDisplay { } @Override - public Stream resolve(ContextMap contextMap, DisplayContentsFactory displayContentsFactory) { - if (displayContentsFactory instanceof DisplayContentsFactory.ForStacks forStacks) { - HolderLookup.Provider provider = contextMap.getOptional(SlotDisplayContext.REGISTRIES); + public Stream resolve(ContextMap context, DisplayContentsFactory output) { + if (output instanceof DisplayContentsFactory.ForStacks forStacks) { + HolderLookup.Provider provider = context.getOptional(SlotDisplayContext.REGISTRIES); if (provider != null) { return provider.lookupOrThrow(Registries.ITEM).get(this.tag).map(named -> named.stream().map(forStacks::forStack)).stream().flatMap(stream -> stream); } @@ -301,18 +301,18 @@ public interface SlotDisplay { } @Override - public Stream resolve(ContextMap contextMap, DisplayContentsFactory displayContentsFactory) { - if (displayContentsFactory instanceof DisplayContentsFactory.ForRemainders forRemainders) { - List list = this.remainder.resolve(contextMap, displayContentsFactory).toList(); - return this.input.resolve(contextMap, displayContentsFactory).map(object -> forRemainders.addRemainder((T)object, list)); + public Stream resolve(ContextMap context, DisplayContentsFactory output) { + if (output instanceof DisplayContentsFactory.ForRemainders forRemainders) { + List list = this.remainder.resolve(context, output).toList(); + return this.input.resolve(context, output).map(object -> forRemainders.addRemainder((T)object, list)); } else { - return this.input.resolve(contextMap, displayContentsFactory); + return this.input.resolve(context, output); } } @Override - public boolean isEnabled(FeatureFlagSet featureFlagSet) { - return this.input.isEnabled(featureFlagSet) && this.remainder.isEnabled(featureFlagSet); + public boolean isEnabled(FeatureFlagSet enabledFeatures) { + return this.input.isEnabled(enabledFeatures) && this.remainder.isEnabled(enabledFeatures); } } } diff --git a/net/minecraft/world/item/enchantment/EnchantmentHelper.java b/net/minecraft/world/item/enchantment/EnchantmentHelper.java index 02472f2e..a4b3445e 100644 --- a/net/minecraft/world/item/enchantment/EnchantmentHelper.java +++ b/net/minecraft/world/item/enchantment/EnchantmentHelper.java @@ -36,6 +36,7 @@ import net.minecraft.world.entity.projectile.Projectile; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.minecraft.world.item.enchantment.ItemEnchantments.Mutable; import net.minecraft.world.item.enchantment.effects.EnchantmentValueEffect; import net.minecraft.world.item.enchantment.providers.EnchantmentProvider; import net.minecraft.world.level.block.state.BlockState; @@ -52,13 +53,13 @@ public class EnchantmentHelper { return itemEnchantments.getLevel(enchantment); } - public static ItemEnchantments updateEnchantments(ItemStack stack, Consumer updater) { + public static ItemEnchantments updateEnchantments(ItemStack stack, Consumer updater) { DataComponentType dataComponentType = getComponentType(stack); ItemEnchantments itemEnchantments = stack.get(dataComponentType); if (itemEnchantments == null) { return ItemEnchantments.EMPTY; } else { - ItemEnchantments.Mutable mutable = new ItemEnchantments.Mutable(itemEnchantments); + Mutable mutable = new Mutable(itemEnchantments); updater.accept(mutable); ItemEnchantments itemEnchantments2 = mutable.toImmutable(); stack.set(dataComponentType, itemEnchantments2); @@ -117,9 +118,9 @@ public class EnchantmentHelper { } } - public static ItemStack createBook(EnchantmentInstance enchantmentInstance) { + public static ItemStack createBook(EnchantmentInstance enchantmant) { ItemStack itemStack = new ItemStack(Items.ENCHANTED_BOOK); - itemStack.enchant(enchantmentInstance.enchantment, enchantmentInstance.level); + itemStack.enchant(enchantmant.enchantment, enchantmant.level); return itemStack; } @@ -208,28 +209,25 @@ public class EnchantmentHelper { } public static void doPostAttackEffectsWithItemSourceOnBreak( - ServerLevel serverLevel, Entity entity, DamageSource damageSource, @Nullable ItemStack itemStack, @Nullable Consumer consumer + ServerLevel level, Entity entity, DamageSource damageSource, @Nullable ItemStack itemSource, @Nullable Consumer onBreak ) { if (entity instanceof LivingEntity livingEntity) { runIterationOnEquipment( - livingEntity, - (holder, i, enchantedItemInUse) -> holder.value().doPostAttack(serverLevel, i, enchantedItemInUse, EnchantmentTarget.VICTIM, entity, damageSource) + livingEntity, (holder, i, enchantedItemInUse) -> holder.value().doPostAttack(level, i, enchantedItemInUse, EnchantmentTarget.VICTIM, entity, damageSource) ); } - if (itemStack != null) { + if (itemSource != null) { if (damageSource.getEntity() instanceof LivingEntity livingEntity) { runIterationOnItem( - itemStack, + itemSource, EquipmentSlot.MAINHAND, livingEntity, - (holder, i, enchantedItemInUse) -> holder.value().doPostAttack(serverLevel, i, enchantedItemInUse, EnchantmentTarget.ATTACKER, entity, damageSource) - ); - } else if (consumer != null) { - EnchantedItemInUse enchantedItemInUse = new EnchantedItemInUse(itemStack, null, null, consumer); - runIterationOnItem( - itemStack, (holder, i) -> holder.value().doPostAttack(serverLevel, i, enchantedItemInUse, EnchantmentTarget.ATTACKER, entity, damageSource) + (holder, i, enchantedItemInUse) -> holder.value().doPostAttack(level, i, enchantedItemInUse, EnchantmentTarget.ATTACKER, entity, damageSource) ); + } else if (onBreak != null) { + EnchantedItemInUse enchantedItemInUse = new EnchantedItemInUse(itemSource, null, null, onBreak); + runIterationOnItem(itemSource, (holder, i) -> holder.value().doPostAttack(level, i, enchantedItemInUse, EnchantmentTarget.ATTACKER, entity, damageSource)); } } } @@ -286,10 +284,10 @@ public class EnchantmentHelper { return Math.max(0, mutableFloat.intValue()); } - public static void onProjectileSpawned(ServerLevel serverLevel, ItemStack itemStack, Projectile projectile, Consumer consumer) { + public static void onProjectileSpawned(ServerLevel level, ItemStack firedFiredFromWeapon, Projectile projectile, Consumer onBreak) { LivingEntity livingEntity2 = projectile.getOwner() instanceof LivingEntity livingEntity ? livingEntity : null; - EnchantedItemInUse enchantedItemInUse = new EnchantedItemInUse(itemStack, null, livingEntity2, consumer); - runIterationOnItem(itemStack, (holder, i) -> holder.value().onProjectileSpawned(serverLevel, i, enchantedItemInUse, projectile)); + EnchantedItemInUse enchantedItemInUse = new EnchantedItemInUse(firedFiredFromWeapon, null, livingEntity2, onBreak); + runIterationOnItem(firedFiredFromWeapon, (holder, i) -> holder.value().onProjectileSpawned(level, i, enchantedItemInUse, projectile)); } public static void onHitBlock( diff --git a/net/minecraft/world/item/enchantment/Repairable.java b/net/minecraft/world/item/enchantment/Repairable.java index 46bfec7f..2e496f1c 100644 --- a/net/minecraft/world/item/enchantment/Repairable.java +++ b/net/minecraft/world/item/enchantment/Repairable.java @@ -19,7 +19,7 @@ public record Repairable(HolderSet items) { ByteBufCodecs.holderSet(Registries.ITEM), Repairable::items, Repairable::new ); - public boolean isValidRepairItem(ItemStack itemStack) { - return itemStack.is(this.items); + public boolean isValidRepairItem(ItemStack stack) { + return stack.is(this.items); } } diff --git a/net/minecraft/world/item/equipment/ArmorMaterial.java b/net/minecraft/world/item/equipment/ArmorMaterial.java index af42908f..124abdf4 100644 --- a/net/minecraft/world/item/equipment/ArmorMaterial.java +++ b/net/minecraft/world/item/equipment/ArmorMaterial.java @@ -34,25 +34,32 @@ public record ArmorMaterial( .repairable(this.repairIngredient); } - public Item.Properties animalProperties(Item.Properties properties, HolderSet> holderSet) { + public Item.Properties animalProperties(Item.Properties properties, HolderSet> allowedEntities) { return properties.durability(ArmorType.BODY.getDurability(this.durability)) .attributes(this.createAttributes(ArmorType.BODY)) .repairable(this.repairIngredient) .component( DataComponents.EQUIPPABLE, - Equippable.builder(EquipmentSlot.BODY).setEquipSound(this.equipSound).setModel(this.modelId).setAllowedEntities(holderSet).build() + Equippable.builder(EquipmentSlot.BODY).setEquipSound(this.equipSound).setModel(this.modelId).setAllowedEntities(allowedEntities).build() ); } - public Item.Properties animalProperties(Item.Properties properties, Holder holder, boolean bl, HolderSet> holderSet) { - if (bl) { + public Item.Properties animalProperties( + Item.Properties properties, Holder equipSound, boolean damageOnHurt, HolderSet> allowedEntities + ) { + if (damageOnHurt) { properties = properties.durability(ArmorType.BODY.getDurability(this.durability)).repairable(this.repairIngredient); } return properties.attributes(this.createAttributes(ArmorType.BODY)) .component( DataComponents.EQUIPPABLE, - Equippable.builder(EquipmentSlot.BODY).setEquipSound(holder).setModel(this.modelId).setAllowedEntities(holderSet).setDamageOnHurt(bl).build() + Equippable.builder(EquipmentSlot.BODY) + .setEquipSound(equipSound) + .setModel(this.modelId) + .setAllowedEntities(allowedEntities) + .setDamageOnHurt(damageOnHurt) + .build() ); } diff --git a/net/minecraft/world/item/equipment/ArmorType.java b/net/minecraft/world/item/equipment/ArmorType.java index 81c6c980..4a637b7c 100644 --- a/net/minecraft/world/item/equipment/ArmorType.java +++ b/net/minecraft/world/item/equipment/ArmorType.java @@ -16,14 +16,14 @@ public enum ArmorType implements StringRepresentable { private final String name; private final int unitDurability; - private ArmorType(final EquipmentSlot equipmentSlot, final int j, final String string2) { - this.slot = equipmentSlot; - this.name = string2; - this.unitDurability = j; + private ArmorType(final EquipmentSlot slot, final int unitDurability, final String name) { + this.slot = slot; + this.name = name; + this.unitDurability = unitDurability; } - public int getDurability(int i) { - return this.unitDurability * i; + public int getDurability(int durabilityMultiplier) { + return this.unitDurability * durabilityMultiplier; } public EquipmentSlot getSlot() { diff --git a/net/minecraft/world/item/equipment/EquipmentModel.java b/net/minecraft/world/item/equipment/EquipmentModel.java index c4576629..be3a486e 100644 --- a/net/minecraft/world/item/equipment/EquipmentModel.java +++ b/net/minecraft/world/item/equipment/EquipmentModel.java @@ -39,18 +39,18 @@ public record EquipmentModel(Map CODEC = StringRepresentable.fromEnum(EquipmentModel.LayerType::values); private final String id; - private LayerType(final String string2) { - this.id = string2; + private LayerType(final String id) { + this.id = id; } @Override diff --git a/net/minecraft/world/item/equipment/EquipmentModels.java b/net/minecraft/world/item/equipment/EquipmentModels.java index 3a47a681..7a337594 100644 --- a/net/minecraft/world/item/equipment/EquipmentModels.java +++ b/net/minecraft/world/item/equipment/EquipmentModels.java @@ -23,8 +23,8 @@ public interface EquipmentModels { ); ResourceLocation TRADER_LLAMA = ResourceLocation.withDefaultNamespace("trader_llama"); - static void bootstrap(BiConsumer biConsumer) { - biConsumer.accept( + static void bootstrap(BiConsumer output) { + output.accept( LEATHER, EquipmentModel.builder() .addHumanoidLayers(ResourceLocation.withDefaultNamespace("leather"), true) @@ -32,20 +32,20 @@ public interface EquipmentModels { .addLayers(EquipmentModel.LayerType.HORSE_BODY, EquipmentModel.Layer.leatherDyeable(ResourceLocation.withDefaultNamespace("leather"), true)) .build() ); - biConsumer.accept(CHAINMAIL, onlyHumanoid("chainmail")); - biConsumer.accept(IRON, humanoidAndHorse("iron")); - biConsumer.accept(GOLD, humanoidAndHorse("gold")); - biConsumer.accept(DIAMOND, humanoidAndHorse("diamond")); - biConsumer.accept(TURTLE_SCUTE, EquipmentModel.builder().addMainHumanoidLayer(ResourceLocation.withDefaultNamespace("turtle_scute"), false).build()); - biConsumer.accept(NETHERITE, onlyHumanoid("netherite")); - biConsumer.accept( + output.accept(CHAINMAIL, onlyHumanoid("chainmail")); + output.accept(IRON, humanoidAndHorse("iron")); + output.accept(GOLD, humanoidAndHorse("gold")); + output.accept(DIAMOND, humanoidAndHorse("diamond")); + output.accept(TURTLE_SCUTE, EquipmentModel.builder().addMainHumanoidLayer(ResourceLocation.withDefaultNamespace("turtle_scute"), false).build()); + output.accept(NETHERITE, onlyHumanoid("netherite")); + output.accept( ARMADILLO_SCUTE, EquipmentModel.builder() .addLayers(EquipmentModel.LayerType.WOLF_BODY, EquipmentModel.Layer.onlyIfDyed(ResourceLocation.withDefaultNamespace("armadillo_scute"), false)) .addLayers(EquipmentModel.LayerType.WOLF_BODY, EquipmentModel.Layer.onlyIfDyed(ResourceLocation.withDefaultNamespace("armadillo_scute_overlay"), true)) .build() ); - biConsumer.accept( + output.accept( ELYTRA, EquipmentModel.builder() .addLayers(EquipmentModel.LayerType.WINGS, new EquipmentModel.Layer(ResourceLocation.withDefaultNamespace("elytra"), Optional.empty(), true)) @@ -55,7 +55,7 @@ public interface EquipmentModels { for (Entry entry : CARPETS.entrySet()) { DyeColor dyeColor = (DyeColor)entry.getKey(); ResourceLocation resourceLocation = (ResourceLocation)entry.getValue(); - biConsumer.accept( + output.accept( resourceLocation, EquipmentModel.builder() .addLayers(EquipmentModel.LayerType.LLAMA_BODY, new EquipmentModel.Layer(ResourceLocation.withDefaultNamespace(dyeColor.getSerializedName()))) @@ -63,7 +63,7 @@ public interface EquipmentModels { ); } - biConsumer.accept( + output.accept( TRADER_LLAMA, EquipmentModel.builder() .addLayers(EquipmentModel.LayerType.LLAMA_BODY, new EquipmentModel.Layer(ResourceLocation.withDefaultNamespace("trader_llama"))) @@ -71,14 +71,14 @@ public interface EquipmentModels { ); } - private static EquipmentModel onlyHumanoid(String string) { - return EquipmentModel.builder().addHumanoidLayers(ResourceLocation.withDefaultNamespace(string)).build(); + private static EquipmentModel onlyHumanoid(String name) { + return EquipmentModel.builder().addHumanoidLayers(ResourceLocation.withDefaultNamespace(name)).build(); } - private static EquipmentModel humanoidAndHorse(String string) { + private static EquipmentModel humanoidAndHorse(String name) { return EquipmentModel.builder() - .addHumanoidLayers(ResourceLocation.withDefaultNamespace(string)) - .addLayers(EquipmentModel.LayerType.HORSE_BODY, EquipmentModel.Layer.leatherDyeable(ResourceLocation.withDefaultNamespace(string), false)) + .addHumanoidLayers(ResourceLocation.withDefaultNamespace(name)) + .addLayers(EquipmentModel.LayerType.HORSE_BODY, EquipmentModel.Layer.leatherDyeable(ResourceLocation.withDefaultNamespace(name), false)) .build(); } } diff --git a/net/minecraft/world/item/equipment/Equippable.java b/net/minecraft/world/item/equipment/Equippable.java index 059cdf64..66ed655d 100644 --- a/net/minecraft/world/item/equipment/Equippable.java +++ b/net/minecraft/world/item/equipment/Equippable.java @@ -66,43 +66,43 @@ public record Equippable( Equippable::new ); - public static Equippable llamaSwag(DyeColor dyeColor) { + public static Equippable llamaSwag(DyeColor color) { return builder(EquipmentSlot.BODY) .setEquipSound(SoundEvents.LLAMA_SWAG) - .setModel((ResourceLocation)EquipmentModels.CARPETS.get(dyeColor)) + .setModel((ResourceLocation)EquipmentModels.CARPETS.get(color)) .setAllowedEntities(EntityType.LLAMA, EntityType.TRADER_LLAMA) .build(); } - public static Equippable.Builder builder(EquipmentSlot equipmentSlot) { - return new Equippable.Builder(equipmentSlot); + public static Equippable.Builder builder(EquipmentSlot slot) { + return new Equippable.Builder(slot); } - public InteractionResult swapWithEquipmentSlot(ItemStack itemStack, Player player) { + public InteractionResult swapWithEquipmentSlot(ItemStack stack, Player player) { if (!player.canUseSlot(this.slot)) { return InteractionResult.PASS; } else { - ItemStack itemStack2 = player.getItemBySlot(this.slot); - if ((!EnchantmentHelper.has(itemStack2, EnchantmentEffectComponents.PREVENT_ARMOR_CHANGE) || player.isCreative()) - && !ItemStack.isSameItemSameComponents(itemStack, itemStack2)) { + ItemStack itemStack = player.getItemBySlot(this.slot); + if ((!EnchantmentHelper.has(itemStack, EnchantmentEffectComponents.PREVENT_ARMOR_CHANGE) || player.isCreative()) + && !ItemStack.isSameItemSameComponents(stack, itemStack)) { if (!player.level().isClientSide()) { - player.awardStat(Stats.ITEM_USED.get(itemStack.getItem())); + player.awardStat(Stats.ITEM_USED.get(stack.getItem())); } - if (itemStack.getCount() <= 1) { - ItemStack itemStack3 = itemStack2.isEmpty() ? itemStack : itemStack2.copyAndClear(); - ItemStack itemStack4 = player.isCreative() ? itemStack.copy() : itemStack.copyAndClear(); - player.setItemSlot(this.slot, itemStack4); - return InteractionResult.SUCCESS.heldItemTransformedTo(itemStack3); + if (stack.getCount() <= 1) { + ItemStack itemStack2 = itemStack.isEmpty() ? stack : itemStack.copyAndClear(); + ItemStack itemStack3 = player.isCreative() ? stack.copy() : stack.copyAndClear(); + player.setItemSlot(this.slot, itemStack3); + return InteractionResult.SUCCESS.heldItemTransformedTo(itemStack2); } else { - ItemStack itemStack3 = itemStack2.copyAndClear(); - ItemStack itemStack4 = itemStack.consumeAndReturn(1, player); - player.setItemSlot(this.slot, itemStack4); - if (!player.getInventory().add(itemStack3)) { - player.drop(itemStack3, false); + ItemStack itemStack2 = itemStack.copyAndClear(); + ItemStack itemStack3 = stack.consumeAndReturn(1, player); + player.setItemSlot(this.slot, itemStack3); + if (!player.getInventory().add(itemStack2)) { + player.drop(itemStack2, false); } - return InteractionResult.SUCCESS.heldItemTransformedTo(itemStack); + return InteractionResult.SUCCESS.heldItemTransformedTo(stack); } } else { return InteractionResult.FAIL; @@ -124,46 +124,46 @@ public record Equippable( private boolean swappable = true; private boolean damageOnHurt = true; - Builder(EquipmentSlot equipmentSlot) { - this.slot = equipmentSlot; + Builder(EquipmentSlot slot) { + this.slot = slot; } - public Equippable.Builder setEquipSound(Holder holder) { - this.equipSound = holder; + public Equippable.Builder setEquipSound(Holder equipSound) { + this.equipSound = equipSound; return this; } - public Equippable.Builder setModel(ResourceLocation resourceLocation) { - this.model = Optional.of(resourceLocation); + public Equippable.Builder setModel(ResourceLocation model) { + this.model = Optional.of(model); return this; } - public Equippable.Builder setCameraOverlay(ResourceLocation resourceLocation) { - this.cameraOverlay = Optional.of(resourceLocation); + public Equippable.Builder setCameraOverlay(ResourceLocation cameraOverlay) { + this.cameraOverlay = Optional.of(cameraOverlay); return this; } - public Equippable.Builder setAllowedEntities(EntityType... entityTypes) { - return this.setAllowedEntities(HolderSet.direct(EntityType::builtInRegistryHolder, entityTypes)); + public Equippable.Builder setAllowedEntities(EntityType... allowedEntities) { + return this.setAllowedEntities(HolderSet.direct(EntityType::builtInRegistryHolder, allowedEntities)); } - public Equippable.Builder setAllowedEntities(HolderSet> holderSet) { - this.allowedEntities = Optional.of(holderSet); + public Equippable.Builder setAllowedEntities(HolderSet> allowedEntities) { + this.allowedEntities = Optional.of(allowedEntities); return this; } - public Equippable.Builder setDispensable(boolean bl) { - this.dispensable = bl; + public Equippable.Builder setDispensable(boolean dispensable) { + this.dispensable = dispensable; return this; } - public Equippable.Builder setSwappable(boolean bl) { - this.swappable = bl; + public Equippable.Builder setSwappable(boolean swappable) { + this.swappable = swappable; return this; } - public Equippable.Builder setDamageOnHurt(boolean bl) { - this.damageOnHurt = bl; + public Equippable.Builder setDamageOnHurt(boolean damageOnHurt) { + this.damageOnHurt = damageOnHurt; return this; } diff --git a/net/minecraft/world/item/equipment/trim/ArmorTrim.java b/net/minecraft/world/item/equipment/trim/ArmorTrim.java index f6a0094a..702a7638 100644 --- a/net/minecraft/world/item/equipment/trim/ArmorTrim.java +++ b/net/minecraft/world/item/equipment/trim/ArmorTrim.java @@ -41,23 +41,23 @@ public record ArmorTrim(Holder material, Holder patte ) .withStyle(ChatFormatting.GRAY); - public ArmorTrim(Holder holder, Holder holder2) { - this(holder, holder2, true); + public ArmorTrim(Holder material, Holder pattern) { + this(material, pattern, true); } - private static String getColorPaletteSuffix(Holder holder, ResourceLocation resourceLocation) { - String string = (String)holder.value().overrideArmorMaterials().get(resourceLocation); - return string != null ? string : holder.value().assetName(); + private static String getColorPaletteSuffix(Holder material, ResourceLocation equipmentModelId) { + String string = (String)material.value().overrideArmorMaterials().get(equipmentModelId); + return string != null ? string : material.value().assetName(); } - public boolean hasPatternAndMaterial(Holder holder, Holder holder2) { - return holder.equals(this.pattern) && holder2.equals(this.material); + public boolean hasPatternAndMaterial(Holder pattern, Holder material) { + return pattern.equals(this.pattern) && material.equals(this.material); } - public ResourceLocation getTexture(EquipmentModel.LayerType layerType, ResourceLocation resourceLocation) { - ResourceLocation resourceLocation2 = this.pattern.value().assetId(); - String string = getColorPaletteSuffix(this.material, resourceLocation); - return resourceLocation2.withPath((UnaryOperator)(string2 -> "trims/entity/" + layerType.getSerializedName() + "/" + string2 + "_" + string)); + public ResourceLocation getTexture(EquipmentModel.LayerType layerType, ResourceLocation equipmentModelId) { + ResourceLocation resourceLocation = this.pattern.value().assetId(); + String string = getColorPaletteSuffix(this.material, equipmentModelId); + return resourceLocation.withPath((UnaryOperator)(string2 -> "trims/entity/" + layerType.getSerializedName() + "/" + string2 + "_" + string)); } @Override @@ -69,7 +69,7 @@ public record ArmorTrim(Holder material, Holder patte } } - public ArmorTrim withTooltip(boolean bl) { - return new ArmorTrim(this.material, this.pattern, bl); + public ArmorTrim withTooltip(boolean showInTooltip) { + return new ArmorTrim(this.material, this.pattern, showInTooltip); } } diff --git a/net/minecraft/world/item/equipment/trim/TrimMaterial.java b/net/minecraft/world/item/equipment/trim/TrimMaterial.java index 0ae5b35d..eae18075 100644 --- a/net/minecraft/world/item/equipment/trim/TrimMaterial.java +++ b/net/minecraft/world/item/equipment/trim/TrimMaterial.java @@ -50,7 +50,9 @@ public record TrimMaterial( Registries.TRIM_MATERIAL, DIRECT_STREAM_CODEC ); - public static TrimMaterial create(String string, Item item, float f, Component component, Map map) { - return new TrimMaterial(string, BuiltInRegistries.ITEM.wrapAsHolder(item), f, map, component); + public static TrimMaterial create( + String assetName, Item ingredient, float itemModelIndex, Component description, Map overrideArmorMaterials + ) { + return new TrimMaterial(assetName, BuiltInRegistries.ITEM.wrapAsHolder(ingredient), itemModelIndex, overrideArmorMaterials, description); } } diff --git a/net/minecraft/world/item/equipment/trim/TrimMaterials.java b/net/minecraft/world/item/equipment/trim/TrimMaterials.java index fde38fda..3a498508 100644 --- a/net/minecraft/world/item/equipment/trim/TrimMaterials.java +++ b/net/minecraft/world/item/equipment/trim/TrimMaterials.java @@ -3,8 +3,8 @@ package net.minecraft.world.item.equipment.trim; import java.util.Map; import java.util.Optional; import net.minecraft.Util; -import net.minecraft.core.Holder; import net.minecraft.core.HolderLookup; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstrapContext; import net.minecraft.network.chat.Component; @@ -28,40 +28,49 @@ public class TrimMaterials { public static final ResourceKey LAPIS = registryKey("lapis"); public static final ResourceKey AMETHYST = registryKey("amethyst"); - public static void bootstrap(BootstrapContext bootstrapContext) { - register(bootstrapContext, QUARTZ, Items.QUARTZ, Style.EMPTY.withColor(14931140), 0.1F); - register(bootstrapContext, IRON, Items.IRON_INGOT, Style.EMPTY.withColor(15527148), 0.2F, Map.of(EquipmentModels.IRON, "iron_darker")); - register(bootstrapContext, NETHERITE, Items.NETHERITE_INGOT, Style.EMPTY.withColor(6445145), 0.3F, Map.of(EquipmentModels.NETHERITE, "netherite_darker")); - register(bootstrapContext, REDSTONE, Items.REDSTONE, Style.EMPTY.withColor(9901575), 0.4F); - register(bootstrapContext, COPPER, Items.COPPER_INGOT, Style.EMPTY.withColor(11823181), 0.5F); - register(bootstrapContext, GOLD, Items.GOLD_INGOT, Style.EMPTY.withColor(14594349), 0.6F, Map.of(EquipmentModels.GOLD, "gold_darker")); - register(bootstrapContext, EMERALD, Items.EMERALD, Style.EMPTY.withColor(1155126), 0.7F); - register(bootstrapContext, DIAMOND, Items.DIAMOND, Style.EMPTY.withColor(7269586), 0.8F, Map.of(EquipmentModels.DIAMOND, "diamond_darker")); - register(bootstrapContext, LAPIS, Items.LAPIS_LAZULI, Style.EMPTY.withColor(4288151), 0.9F); - register(bootstrapContext, AMETHYST, Items.AMETHYST_SHARD, Style.EMPTY.withColor(10116294), 1.0F); + public static void bootstrap(BootstrapContext context) { + register(context, QUARTZ, Items.QUARTZ, Style.EMPTY.withColor(14931140), 0.1F); + register(context, IRON, Items.IRON_INGOT, Style.EMPTY.withColor(15527148), 0.2F, Map.of(EquipmentModels.IRON, "iron_darker")); + register(context, NETHERITE, Items.NETHERITE_INGOT, Style.EMPTY.withColor(6445145), 0.3F, Map.of(EquipmentModels.NETHERITE, "netherite_darker")); + register(context, REDSTONE, Items.REDSTONE, Style.EMPTY.withColor(9901575), 0.4F); + register(context, COPPER, Items.COPPER_INGOT, Style.EMPTY.withColor(11823181), 0.5F); + register(context, GOLD, Items.GOLD_INGOT, Style.EMPTY.withColor(14594349), 0.6F, Map.of(EquipmentModels.GOLD, "gold_darker")); + register(context, EMERALD, Items.EMERALD, Style.EMPTY.withColor(1155126), 0.7F); + register(context, DIAMOND, Items.DIAMOND, Style.EMPTY.withColor(7269586), 0.8F, Map.of(EquipmentModels.DIAMOND, "diamond_darker")); + register(context, LAPIS, Items.LAPIS_LAZULI, Style.EMPTY.withColor(4288151), 0.9F); + register(context, AMETHYST, Items.AMETHYST_SHARD, Style.EMPTY.withColor(10116294), 1.0F); } - public static Optional> getFromIngredient(HolderLookup.Provider provider, ItemStack itemStack) { - return provider.lookupOrThrow(Registries.TRIM_MATERIAL) + public static Optional> getFromIngredient(HolderLookup.Provider registries, ItemStack ingredient) { + return registries.lookupOrThrow(Registries.TRIM_MATERIAL) .listElements() - .filter(reference -> itemStack.is(((TrimMaterial)reference.value()).ingredient())) + .filter(reference -> ingredient.is(((TrimMaterial)reference.value()).ingredient())) .findFirst(); } - private static void register(BootstrapContext bootstrapContext, ResourceKey resourceKey, Item item, Style style, float f) { - register(bootstrapContext, resourceKey, item, style, f, Map.of()); + private static void register(BootstrapContext context, ResourceKey key, Item ingredient, Style style, float itemModelIndex) { + register(context, key, ingredient, style, itemModelIndex, Map.of()); } private static void register( - BootstrapContext bootstrapContext, ResourceKey resourceKey, Item item, Style style, float f, Map map + BootstrapContext context, + ResourceKey key, + Item ingredient, + Style style, + float itemModelIndex, + Map overrideArmorMaterials ) { TrimMaterial trimMaterial = TrimMaterial.create( - resourceKey.location().getPath(), item, f, Component.translatable(Util.makeDescriptionId("trim_material", resourceKey.location())).withStyle(style), map + key.location().getPath(), + ingredient, + itemModelIndex, + Component.translatable(Util.makeDescriptionId("trim_material", key.location())).withStyle(style), + overrideArmorMaterials ); - bootstrapContext.register(resourceKey, trimMaterial); + context.register(key, trimMaterial); } - private static ResourceKey registryKey(String string) { - return ResourceKey.create(Registries.TRIM_MATERIAL, ResourceLocation.withDefaultNamespace(string)); + private static ResourceKey registryKey(String name) { + return ResourceKey.create(Registries.TRIM_MATERIAL, ResourceLocation.withDefaultNamespace(name)); } } diff --git a/net/minecraft/world/item/equipment/trim/TrimPattern.java b/net/minecraft/world/item/equipment/trim/TrimPattern.java index ccb30930..42abbf1e 100644 --- a/net/minecraft/world/item/equipment/trim/TrimPattern.java +++ b/net/minecraft/world/item/equipment/trim/TrimPattern.java @@ -37,7 +37,7 @@ public record TrimPattern(ResourceLocation assetId, Holder templateItem, C public static final Codec> CODEC = RegistryFileCodec.create(Registries.TRIM_PATTERN, DIRECT_CODEC); public static final StreamCodec> STREAM_CODEC = ByteBufCodecs.holder(Registries.TRIM_PATTERN, DIRECT_STREAM_CODEC); - public Component copyWithStyle(Holder holder) { - return this.description.copy().withStyle(holder.value().description().getStyle()); + public Component copyWithStyle(Holder material) { + return this.description.copy().withStyle(material.value().description().getStyle()); } } diff --git a/net/minecraft/world/item/equipment/trim/TrimPatterns.java b/net/minecraft/world/item/equipment/trim/TrimPatterns.java index 8ed2b3ff..010e7db6 100644 --- a/net/minecraft/world/item/equipment/trim/TrimPatterns.java +++ b/net/minecraft/world/item/equipment/trim/TrimPatterns.java @@ -2,8 +2,8 @@ package net.minecraft.world.item.equipment.trim; import java.util.Optional; import net.minecraft.Util; -import net.minecraft.core.Holder; import net.minecraft.core.HolderLookup; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstrapContext; @@ -34,45 +34,42 @@ public class TrimPatterns { public static final ResourceKey FLOW = registryKey("flow"); public static final ResourceKey BOLT = registryKey("bolt"); - public static void bootstrap(BootstrapContext bootstrapContext) { - register(bootstrapContext, Items.SENTRY_ARMOR_TRIM_SMITHING_TEMPLATE, SENTRY); - register(bootstrapContext, Items.DUNE_ARMOR_TRIM_SMITHING_TEMPLATE, DUNE); - register(bootstrapContext, Items.COAST_ARMOR_TRIM_SMITHING_TEMPLATE, COAST); - register(bootstrapContext, Items.WILD_ARMOR_TRIM_SMITHING_TEMPLATE, WILD); - register(bootstrapContext, Items.WARD_ARMOR_TRIM_SMITHING_TEMPLATE, WARD); - register(bootstrapContext, Items.EYE_ARMOR_TRIM_SMITHING_TEMPLATE, EYE); - register(bootstrapContext, Items.VEX_ARMOR_TRIM_SMITHING_TEMPLATE, VEX); - register(bootstrapContext, Items.TIDE_ARMOR_TRIM_SMITHING_TEMPLATE, TIDE); - register(bootstrapContext, Items.SNOUT_ARMOR_TRIM_SMITHING_TEMPLATE, SNOUT); - register(bootstrapContext, Items.RIB_ARMOR_TRIM_SMITHING_TEMPLATE, RIB); - register(bootstrapContext, Items.SPIRE_ARMOR_TRIM_SMITHING_TEMPLATE, SPIRE); - register(bootstrapContext, Items.WAYFINDER_ARMOR_TRIM_SMITHING_TEMPLATE, WAYFINDER); - register(bootstrapContext, Items.SHAPER_ARMOR_TRIM_SMITHING_TEMPLATE, SHAPER); - register(bootstrapContext, Items.SILENCE_ARMOR_TRIM_SMITHING_TEMPLATE, SILENCE); - register(bootstrapContext, Items.RAISER_ARMOR_TRIM_SMITHING_TEMPLATE, RAISER); - register(bootstrapContext, Items.HOST_ARMOR_TRIM_SMITHING_TEMPLATE, HOST); - register(bootstrapContext, Items.FLOW_ARMOR_TRIM_SMITHING_TEMPLATE, FLOW); - register(bootstrapContext, Items.BOLT_ARMOR_TRIM_SMITHING_TEMPLATE, BOLT); + public static void bootstrap(BootstrapContext context) { + register(context, Items.SENTRY_ARMOR_TRIM_SMITHING_TEMPLATE, SENTRY); + register(context, Items.DUNE_ARMOR_TRIM_SMITHING_TEMPLATE, DUNE); + register(context, Items.COAST_ARMOR_TRIM_SMITHING_TEMPLATE, COAST); + register(context, Items.WILD_ARMOR_TRIM_SMITHING_TEMPLATE, WILD); + register(context, Items.WARD_ARMOR_TRIM_SMITHING_TEMPLATE, WARD); + register(context, Items.EYE_ARMOR_TRIM_SMITHING_TEMPLATE, EYE); + register(context, Items.VEX_ARMOR_TRIM_SMITHING_TEMPLATE, VEX); + register(context, Items.TIDE_ARMOR_TRIM_SMITHING_TEMPLATE, TIDE); + register(context, Items.SNOUT_ARMOR_TRIM_SMITHING_TEMPLATE, SNOUT); + register(context, Items.RIB_ARMOR_TRIM_SMITHING_TEMPLATE, RIB); + register(context, Items.SPIRE_ARMOR_TRIM_SMITHING_TEMPLATE, SPIRE); + register(context, Items.WAYFINDER_ARMOR_TRIM_SMITHING_TEMPLATE, WAYFINDER); + register(context, Items.SHAPER_ARMOR_TRIM_SMITHING_TEMPLATE, SHAPER); + register(context, Items.SILENCE_ARMOR_TRIM_SMITHING_TEMPLATE, SILENCE); + register(context, Items.RAISER_ARMOR_TRIM_SMITHING_TEMPLATE, RAISER); + register(context, Items.HOST_ARMOR_TRIM_SMITHING_TEMPLATE, HOST); + register(context, Items.FLOW_ARMOR_TRIM_SMITHING_TEMPLATE, FLOW); + register(context, Items.BOLT_ARMOR_TRIM_SMITHING_TEMPLATE, BOLT); } - public static Optional> getFromTemplate(HolderLookup.Provider provider, ItemStack itemStack) { - return provider.lookupOrThrow(Registries.TRIM_PATTERN) + public static Optional> getFromTemplate(HolderLookup.Provider registries, ItemStack stack) { + return registries.lookupOrThrow(Registries.TRIM_PATTERN) .listElements() - .filter(reference -> itemStack.is(((TrimPattern)reference.value()).templateItem())) + .filter(reference -> stack.is(((TrimPattern)reference.value()).templateItem())) .findFirst(); } - public static void register(BootstrapContext bootstrapContext, Item item, ResourceKey resourceKey) { + public static void register(BootstrapContext context, Item item, ResourceKey key) { TrimPattern trimPattern = new TrimPattern( - resourceKey.location(), - BuiltInRegistries.ITEM.wrapAsHolder(item), - Component.translatable(Util.makeDescriptionId("trim_pattern", resourceKey.location())), - false + key.location(), BuiltInRegistries.ITEM.wrapAsHolder(item), Component.translatable(Util.makeDescriptionId("trim_pattern", key.location())), false ); - bootstrapContext.register(resourceKey, trimPattern); + context.register(key, trimPattern); } - private static ResourceKey registryKey(String string) { - return ResourceKey.create(Registries.TRIM_PATTERN, ResourceLocation.withDefaultNamespace(string)); + private static ResourceKey registryKey(String name) { + return ResourceKey.create(Registries.TRIM_PATTERN, ResourceLocation.withDefaultNamespace(name)); } } diff --git a/net/minecraft/world/level/BlockCollisions.java b/net/minecraft/world/level/BlockCollisions.java index 75803fc9..1e65c796 100644 --- a/net/minecraft/world/level/BlockCollisions.java +++ b/net/minecraft/world/level/BlockCollisions.java @@ -40,21 +40,25 @@ public class BlockCollisions extends AbstractIterator { } public BlockCollisions( - CollisionGetter collisionGetter, CollisionContext collisionContext, AABB aABB, boolean bl, BiFunction biFunction + CollisionGetter collisionGetter, + CollisionContext context, + AABB box, + boolean onlySuffocatingBlocks, + BiFunction resultProvider ) { - this.context = collisionContext; + this.context = context; this.pos = new BlockPos.MutableBlockPos(); - this.entityShape = Shapes.create(aABB); + this.entityShape = Shapes.create(box); this.collisionGetter = collisionGetter; - this.box = aABB; - this.onlySuffocatingBlocks = bl; - this.resultProvider = biFunction; - int i = Mth.floor(aABB.minX - 1.0E-7) - 1; - int j = Mth.floor(aABB.maxX + 1.0E-7) + 1; - int k = Mth.floor(aABB.minY - 1.0E-7) - 1; - int l = Mth.floor(aABB.maxY + 1.0E-7) + 1; - int m = Mth.floor(aABB.minZ - 1.0E-7) - 1; - int n = Mth.floor(aABB.maxZ + 1.0E-7) + 1; + this.box = box; + this.onlySuffocatingBlocks = onlySuffocatingBlocks; + this.resultProvider = resultProvider; + int i = Mth.floor(box.minX - 1.0E-7) - 1; + int j = Mth.floor(box.maxX + 1.0E-7) + 1; + int k = Mth.floor(box.minY - 1.0E-7) - 1; + int l = Mth.floor(box.maxY + 1.0E-7) + 1; + int m = Mth.floor(box.minZ - 1.0E-7) - 1; + int n = Mth.floor(box.maxZ + 1.0E-7) + 1; this.cursor = new Cursor3D(i, k, m, j, l, n); } diff --git a/net/minecraft/world/level/BlockGetter.java b/net/minecraft/world/level/BlockGetter.java index c7d45880..ed4bacab 100644 --- a/net/minecraft/world/level/BlockGetter.java +++ b/net/minecraft/world/level/BlockGetter.java @@ -177,17 +177,17 @@ public interface BlockGetter extends LevelHeightAccessor { } } - static Iterable boxTraverseBlocks(Vec3 vec3, Vec3 vec32, AABB aABB) { - Vec3 vec33 = vec32.subtract(vec3); - Iterable iterable = BlockPos.betweenClosed(aABB); - if (vec33.lengthSqr() < Mth.square(0.99999F)) { + static Iterable boxTraverseBlocks(Vec3 oldPosition, Vec3 position, AABB boundingBox) { + Vec3 vec3 = position.subtract(oldPosition); + Iterable iterable = BlockPos.betweenClosed(boundingBox); + if (vec3.lengthSqr() < Mth.square(0.99999F)) { return iterable; } else { Set set = new ObjectLinkedOpenHashSet<>(); - Vec3 vec34 = vec33.normalize().scale(1.0E-7); - Vec3 vec35 = aABB.getMinPosition().add(vec34); - Vec3 vec36 = aABB.getMinPosition().subtract(vec33).subtract(vec34); - addCollisionsAlongTravel(set, vec36, vec35, aABB); + Vec3 vec32 = vec3.normalize().scale(1.0E-7); + Vec3 vec33 = boundingBox.getMinPosition().add(vec32); + Vec3 vec34 = boundingBox.getMinPosition().subtract(vec3).subtract(vec32); + addCollisionsAlongTravel(set, vec34, vec33, boundingBox); for (BlockPos blockPos : iterable) { set.add(blockPos.immutable()); @@ -197,20 +197,20 @@ public interface BlockGetter extends LevelHeightAccessor { } } - private static void addCollisionsAlongTravel(Set set, Vec3 vec3, Vec3 vec32, AABB aABB) { - Vec3 vec33 = vec32.subtract(vec3); - int i = Mth.floor(vec3.x); - int j = Mth.floor(vec3.y); - int k = Mth.floor(vec3.z); - int l = Mth.sign(vec33.x); - int m = Mth.sign(vec33.y); - int n = Mth.sign(vec33.z); - double d = l == 0 ? Double.MAX_VALUE : l / vec33.x; - double e = m == 0 ? Double.MAX_VALUE : m / vec33.y; - double f = n == 0 ? Double.MAX_VALUE : n / vec33.z; - double g = d * (l > 0 ? 1.0 - Mth.frac(vec3.x) : Mth.frac(vec3.x)); - double h = e * (m > 0 ? 1.0 - Mth.frac(vec3.y) : Mth.frac(vec3.y)); - double o = f * (n > 0 ? 1.0 - Mth.frac(vec3.z) : Mth.frac(vec3.z)); + private static void addCollisionsAlongTravel(Set output, Vec3 start, Vec3 end, AABB boundingBox) { + Vec3 vec3 = end.subtract(start); + int i = Mth.floor(start.x); + int j = Mth.floor(start.y); + int k = Mth.floor(start.z); + int l = Mth.sign(vec3.x); + int m = Mth.sign(vec3.y); + int n = Mth.sign(vec3.z); + double d = l == 0 ? Double.MAX_VALUE : l / vec3.x; + double e = m == 0 ? Double.MAX_VALUE : m / vec3.y; + double f = n == 0 ? Double.MAX_VALUE : n / vec3.z; + double g = d * (l > 0 ? 1.0 - Mth.frac(start.x) : Mth.frac(start.x)); + double h = e * (m > 0 ? 1.0 - Mth.frac(start.y) : Mth.frac(start.y)); + double o = f * (n > 0 ? 1.0 - Mth.frac(start.z) : Mth.frac(start.z)); int p = 0; while (g <= 1.0 || h <= 1.0 || o <= 1.0) { @@ -234,20 +234,20 @@ public interface BlockGetter extends LevelHeightAccessor { break; } - Optional optional = AABB.clip(i, j, k, i + 1, j + 1, k + 1, vec3, vec32); + Optional optional = AABB.clip(i, j, k, i + 1, j + 1, k + 1, start, end); if (!optional.isEmpty()) { - Vec3 vec34 = (Vec3)optional.get(); - double q = Mth.clamp(vec34.x, i + 1.0E-5F, i + 1.0 - 1.0E-5F); - double r = Mth.clamp(vec34.y, j + 1.0E-5F, j + 1.0 - 1.0E-5F); - double s = Mth.clamp(vec34.z, k + 1.0E-5F, k + 1.0 - 1.0E-5F); - int t = Mth.floor(q + aABB.getXsize()); - int u = Mth.floor(r + aABB.getYsize()); - int v = Mth.floor(s + aABB.getZsize()); + Vec3 vec32 = (Vec3)optional.get(); + double q = Mth.clamp(vec32.x, i + 1.0E-5F, i + 1.0 - 1.0E-5F); + double r = Mth.clamp(vec32.y, j + 1.0E-5F, j + 1.0 - 1.0E-5F); + double s = Mth.clamp(vec32.z, k + 1.0E-5F, k + 1.0 - 1.0E-5F); + int t = Mth.floor(q + boundingBox.getXsize()); + int u = Mth.floor(r + boundingBox.getYsize()); + int v = Mth.floor(s + boundingBox.getZsize()); for (int w = i; w <= t; w++) { for (int x = j; x <= u; x++) { for (int y = k; y <= v; y++) { - set.add(new BlockPos(w, x, y)); + output.add(new BlockPos(w, x, y)); } } } diff --git a/net/minecraft/world/level/CollisionGetter.java b/net/minecraft/world/level/CollisionGetter.java index 88d26124..49355a38 100644 --- a/net/minecraft/world/level/CollisionGetter.java +++ b/net/minecraft/world/level/CollisionGetter.java @@ -49,20 +49,20 @@ public interface CollisionGetter extends BlockGetter { return this.noCollision(entity, collisionBox, false); } - default boolean noCollision(@Nullable Entity entity, AABB aABB, boolean bl) { - for (VoxelShape voxelShape : bl ? this.getBlockAndLiquidCollisions(entity, aABB) : this.getBlockCollisions(entity, aABB)) { + default boolean noCollision(@Nullable Entity entity, AABB collisionBox, boolean checkLiquid) { + for (VoxelShape voxelShape : checkLiquid ? this.getBlockAndLiquidCollisions(entity, collisionBox) : this.getBlockCollisions(entity, collisionBox)) { if (!voxelShape.isEmpty()) { return false; } } - if (!this.getEntityCollisions(entity, aABB).isEmpty()) { + if (!this.getEntityCollisions(entity, collisionBox).isEmpty()) { return false; } else if (entity == null) { return true; } else { - VoxelShape voxelShape2 = this.borderCollision(entity, aABB); - return voxelShape2 == null || !Shapes.joinIsNotEmpty(voxelShape2, Shapes.create(aABB), BooleanOp.AND); + VoxelShape voxelShape2 = this.borderCollision(entity, collisionBox); + return voxelShape2 == null || !Shapes.joinIsNotEmpty(voxelShape2, Shapes.create(collisionBox), BooleanOp.AND); } } @@ -88,8 +88,8 @@ public interface CollisionGetter extends BlockGetter { return () -> new BlockCollisions(this, entity, collisionBox, false, (mutableBlockPos, voxelShape) -> voxelShape); } - default Iterable getBlockAndLiquidCollisions(@Nullable Entity entity, AABB aABB) { - return () -> new BlockCollisions(this, CollisionContext.of(entity, true), aABB, false, (mutableBlockPos, voxelShape) -> voxelShape); + default Iterable getBlockAndLiquidCollisions(@Nullable Entity entity, AABB collisionBox) { + return () -> new BlockCollisions(this, CollisionContext.of(entity, true), collisionBox, false, (mutableBlockPos, voxelShape) -> voxelShape); } @Nullable diff --git a/net/minecraft/world/level/EntityGetter.java b/net/minecraft/world/level/EntityGetter.java index a67b6b54..11892d3c 100644 --- a/net/minecraft/world/level/EntityGetter.java +++ b/net/minecraft/world/level/EntityGetter.java @@ -23,8 +23,8 @@ public interface EntityGetter { List getEntities(EntityTypeTest entityTypeTest, AABB bounds, Predicate predicate); - default List getEntitiesOfClass(Class clazz, AABB area, Predicate filter) { - return this.getEntities(EntityTypeTest.forClass(clazz), area, filter); + default List getEntitiesOfClass(Class entityClass, AABB area, Predicate filter) { + return this.getEntities(EntityTypeTest.forClass(entityClass), area, filter); } List players(); diff --git a/net/minecraft/world/level/Explosion.java b/net/minecraft/world/level/Explosion.java index 6fb957bd..0e772188 100644 --- a/net/minecraft/world/level/Explosion.java +++ b/net/minecraft/world/level/Explosion.java @@ -15,8 +15,8 @@ public interface Explosion { } @Nullable - static LivingEntity getIndirectSourceEntity(@Nullable Entity entity) { - return switch (entity) { + static LivingEntity getIndirectSourceEntity(@Nullable Entity source) { + return switch (source) { case PrimedTnt primedTnt -> primedTnt.getOwner(); case LivingEntity livingEntity -> livingEntity; case Projectile projectile when projectile.getOwner() instanceof LivingEntity livingEntity2 -> livingEntity2; @@ -53,8 +53,8 @@ public interface Explosion { private final boolean shouldAffectBlocklikeEntities; - private BlockInteraction(final boolean bl) { - this.shouldAffectBlocklikeEntities = bl; + private BlockInteraction(final boolean shouldAffectBlocklikeEntities) { + this.shouldAffectBlocklikeEntities = shouldAffectBlocklikeEntities; } public boolean shouldAffectBlocklikeEntities() { diff --git a/net/minecraft/world/level/ExplosionDamageCalculator.java b/net/minecraft/world/level/ExplosionDamageCalculator.java index 3218d1d8..9b337375 100644 --- a/net/minecraft/world/level/ExplosionDamageCalculator.java +++ b/net/minecraft/world/level/ExplosionDamageCalculator.java @@ -24,11 +24,11 @@ public class ExplosionDamageCalculator { return 1.0F; } - public float getEntityDamageAmount(Explosion explosion, Entity entity, float f) { - float g = explosion.radius() * 2.0F; + public float getEntityDamageAmount(Explosion explosion, Entity entity, float seenPercent) { + float f = explosion.radius() * 2.0F; Vec3 vec3 = explosion.center(); - double d = Math.sqrt(entity.distanceToSqr(vec3)) / g; - double e = (1.0 - d) * f; - return (float)((e * e + e) / 2.0 * 7.0 * g + 1.0); + double d = Math.sqrt(entity.distanceToSqr(vec3)) / f; + double e = (1.0 - d) * seenPercent; + return (float)((e * e + e) / 2.0 * 7.0 * f + 1.0); } } diff --git a/net/minecraft/world/level/GameRules.java b/net/minecraft/world/level/GameRules.java index 74d428c2..dcce98d4 100644 --- a/net/minecraft/world/level/GameRules.java +++ b/net/minecraft/world/level/GameRules.java @@ -224,26 +224,26 @@ public class GameRules { } } - public GameRules(FeatureFlagSet featureFlagSet, DynamicLike dynamicLike) { - this(featureFlagSet); - this.loadFromTag(dynamicLike); + public GameRules(FeatureFlagSet enabledFeatures, DynamicLike tag) { + this(enabledFeatures); + this.loadFromTag(tag); } - public GameRules(FeatureFlagSet featureFlagSet) { + public GameRules(FeatureFlagSet enabledFeatures) { this( - (Map, GameRules.Value>)availableRules(featureFlagSet) + (Map, GameRules.Value>)availableRules(enabledFeatures) .collect(ImmutableMap.toImmutableMap(Entry::getKey, entry -> ((GameRules.Type)entry.getValue()).createRule())), - featureFlagSet + enabledFeatures ); } - private static Stream, GameRules.Type>> availableRules(FeatureFlagSet featureFlagSet) { - return GAME_RULE_TYPES.entrySet().stream().filter(entry -> ((GameRules.Type)entry.getValue()).requiredFeatures.isSubsetOf(featureFlagSet)); + private static Stream, GameRules.Type>> availableRules(FeatureFlagSet enabledFeatures) { + return GAME_RULE_TYPES.entrySet().stream().filter(entry -> ((GameRules.Type)entry.getValue()).requiredFeatures.isSubsetOf(enabledFeatures)); } - private GameRules(Map, GameRules.Value> map, FeatureFlagSet featureFlagSet) { - this.rules = map; - this.enabledFeatures = featureFlagSet; + private GameRules(Map, GameRules.Value> rules, FeatureFlagSet enabledFeatures) { + this.rules = rules; + this.enabledFeatures = enabledFeatures; } public > T getRule(GameRules.Key key) { @@ -268,27 +268,27 @@ public class GameRules { this.rules.forEach((key, value) -> dynamic.get(key.id).asString().ifSuccess(value::deserialize)); } - public GameRules copy(FeatureFlagSet featureFlagSet) { + public GameRules copy(FeatureFlagSet enabledFeatures) { return new GameRules( - (Map, GameRules.Value>)availableRules(featureFlagSet) + (Map, GameRules.Value>)availableRules(enabledFeatures) .collect( ImmutableMap.toImmutableMap( Entry::getKey, entry -> this.rules.containsKey(entry.getKey()) ? (GameRules.Value)this.rules.get(entry.getKey()) : ((GameRules.Type)entry.getValue()).createRule() ) ), - featureFlagSet + enabledFeatures ); } - public void visitGameRuleTypes(GameRules.GameRuleTypeVisitor gameRuleTypeVisitor) { - GAME_RULE_TYPES.forEach((key, type) -> this.callVisitorCap(gameRuleTypeVisitor, key, type)); + public void visitGameRuleTypes(GameRules.GameRuleTypeVisitor visitor) { + GAME_RULE_TYPES.forEach((key, type) -> this.callVisitorCap(visitor, key, type)); } - private > void callVisitorCap(GameRules.GameRuleTypeVisitor key, GameRules.Key type, GameRules.Type type2) { - if (type2.requiredFeatures.isSubsetOf(this.enabledFeatures)) { - key.visit(type, type2); - type2.callVisitor(key, type); + private > void callVisitorCap(GameRules.GameRuleTypeVisitor visitor, GameRules.Key key, GameRules.Type type) { + if (type.requiredFeatures.isSubsetOf(this.enabledFeatures)) { + visitor.visit(key, type); + type.callVisitor(visitor, key); } } @@ -419,14 +419,14 @@ public class GameRules { } static GameRules.Type create( - int i, int j, int k, FeatureFlagSet featureFlagSet, BiConsumer biConsumer + int defaultValue, int min, int max, FeatureFlagSet requiredFeatures, BiConsumer changeListener ) { return new GameRules.Type<>( - () -> IntegerArgumentType.integer(j, k), - type -> new GameRules.IntegerValue(type, i), - biConsumer, + () -> IntegerArgumentType.integer(min, max), + type -> new GameRules.IntegerValue(type, defaultValue), + changeListener, GameRules.GameRuleTypeVisitor::visitInteger, - featureFlagSet + requiredFeatures ); } @@ -546,17 +546,17 @@ public class GameRules { final FeatureFlagSet requiredFeatures; Type( - Supplier> supplier, - Function, T> function, - BiConsumer biConsumer, + Supplier> argument, + Function, T> constructor, + BiConsumer callback, GameRules.VisitorCaller visitorCaller, - FeatureFlagSet featureFlagSet + FeatureFlagSet requiredFeature ) { - this.argument = supplier; - this.constructor = function; - this.callback = biConsumer; + this.argument = argument; + this.constructor = constructor; + this.callback = callback; this.visitorCaller = visitorCaller; - this.requiredFeatures = featureFlagSet; + this.requiredFeatures = requiredFeature; } public RequiredArgumentBuilder createArgument(String name) { diff --git a/net/minecraft/world/level/GameType.java b/net/minecraft/world/level/GameType.java index 9fe2686f..46374ce9 100644 --- a/net/minecraft/world/level/GameType.java +++ b/net/minecraft/world/level/GameType.java @@ -133,7 +133,7 @@ public enum GameType implements StringRepresentable { return id == -1 ? null : byId(id); } - public static boolean isValidId(int i) { - return Arrays.stream(values()).anyMatch(gameType -> gameType.id == i); + public static boolean isValidId(int id) { + return Arrays.stream(values()).anyMatch(gameType -> gameType.id == id); } } diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java index e01c4ec2..63fad6af 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -122,20 +122,20 @@ public abstract class Level implements LevelAccessor, AutoCloseable { private long subTickCount; protected Level( - WritableLevelData writableLevelData, - ResourceKey resourceKey, + WritableLevelData levelData, + ResourceKey dimension, RegistryAccess registryAccess, - Holder holder, - boolean bl, - boolean bl2, - long l, - int i + Holder dimensionTypeRegistration, + boolean isClientSide, + boolean isDebug, + long biomeZoomSeed, + int maxChainedNeighborUpdates ) { - this.levelData = writableLevelData; - this.dimensionTypeRegistration = holder; - final DimensionType dimensionType = holder.value(); - this.dimension = resourceKey; - this.isClientSide = bl; + this.levelData = levelData; + this.dimensionTypeRegistration = dimensionTypeRegistration; + final DimensionType dimensionType = dimensionTypeRegistration.value(); + this.dimension = dimension; + this.isClientSide = isClientSide; if (dimensionType.coordinateScale() != 1.0) { this.worldBorder = new WorldBorder() { @Override @@ -153,9 +153,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } this.thread = Thread.currentThread(); - this.biomeManager = new BiomeManager(this, l); - this.isDebug = bl2; - this.neighborUpdater = new CollectingNeighborUpdater(this, i); + this.biomeManager = new BiomeManager(this, biomeZoomSeed); + this.isDebug = isDebug; + this.neighborUpdater = new CollectingNeighborUpdater(this, maxChainedNeighborUpdates); this.registryAccess = registryAccess; this.damageSources = new DamageSources(registryAccess); } @@ -316,21 +316,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public void updateNeighborsAt(BlockPos pos, Block block) { } - public void updateNeighborsAt(BlockPos blockPos, Block block, @Nullable Orientation orientation) { + public void updateNeighborsAt(BlockPos pos, Block block, @Nullable Orientation orientation) { } - public void updateNeighborsAtExceptFromFacing(BlockPos blockPos, Block block, Direction direction, @Nullable Orientation orientation) { + public void updateNeighborsAtExceptFromFacing(BlockPos pos, Block block, Direction facing, @Nullable Orientation orientation) { } - public void neighborChanged(BlockPos blockPos, Block block, @Nullable Orientation orientation) { + public void neighborChanged(BlockPos pos, Block block, @Nullable Orientation orientation) { } - public void neighborChanged(BlockState blockState, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { + public void neighborChanged(BlockState state, BlockPos pos, Block block, @Nullable Orientation orientation, boolean movedByPiston) { } @Override - public void neighborShapeChanged(Direction direction, BlockPos blockPos, BlockPos blockPos2, BlockState blockState, int i, int j) { - this.neighborUpdater.shapeUpdate(direction, blockState, blockPos, blockPos2, i, j); + public void neighborShapeChanged(Direction direction, BlockPos pos, BlockPos neighborPos, BlockState neighborState, int flags, int recursionLeft) { + this.neighborUpdater.shapeUpdate(direction, neighborState, pos, neighborPos, flags, recursionLeft); } @Override @@ -509,15 +509,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return this.shouldTickBlocksAt(ChunkPos.asLong(pos)); } - public void explode(@Nullable Entity entity, double d, double e, double f, float g, Level.ExplosionInteraction explosionInteraction) { + public void explode(@Nullable Entity source, double x, double y, double z, float radius, Level.ExplosionInteraction explosionInteraction) { this.explode( - entity, - Explosion.getDefaultDamageSource(this, entity), + source, + Explosion.getDefaultDamageSource(this, source), null, - d, - e, - f, - g, + x, + y, + z, + radius, false, explosionInteraction, ParticleTypes.EXPLOSION, @@ -526,16 +526,16 @@ public abstract class Level implements LevelAccessor, AutoCloseable { ); } - public void explode(@Nullable Entity entity, double d, double e, double f, float g, boolean bl, Level.ExplosionInteraction explosionInteraction) { + public void explode(@Nullable Entity source, double x, double y, double z, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction) { this.explode( - entity, - Explosion.getDefaultDamageSource(this, entity), + source, + Explosion.getDefaultDamageSource(this, source), null, - d, - e, - f, - g, - bl, + x, + y, + z, + radius, + fire, explosionInteraction, ParticleTypes.EXPLOSION, ParticleTypes.EXPLOSION_EMITTER, @@ -544,23 +544,23 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public void explode( - @Nullable Entity entity, + @Nullable Entity source, @Nullable DamageSource damageSource, - @Nullable ExplosionDamageCalculator explosionDamageCalculator, - Vec3 vec3, - float f, - boolean bl, + @Nullable ExplosionDamageCalculator damageCalculator, + Vec3 pos, + float radius, + boolean fire, Level.ExplosionInteraction explosionInteraction ) { this.explode( - entity, + source, damageSource, - explosionDamageCalculator, - vec3.x(), - vec3.y(), - vec3.z(), - f, - bl, + damageCalculator, + pos.x(), + pos.y(), + pos.z(), + radius, + fire, explosionInteraction, ParticleTypes.EXPLOSION, ParticleTypes.EXPLOSION_EMITTER, @@ -569,25 +569,25 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public void explode( - @Nullable Entity entity, + @Nullable Entity source, @Nullable DamageSource damageSource, - @Nullable ExplosionDamageCalculator explosionDamageCalculator, - double d, - double e, - double f, - float g, - boolean bl, + @Nullable ExplosionDamageCalculator damageCalculator, + double x, + double y, + double z, + float radius, + boolean fire, Level.ExplosionInteraction explosionInteraction ) { this.explode( - entity, + source, damageSource, - explosionDamageCalculator, - d, - e, - f, - g, - bl, + damageCalculator, + x, + y, + z, + radius, + fire, explosionInteraction, ParticleTypes.EXPLOSION, ParticleTypes.EXPLOSION_EMITTER, @@ -596,18 +596,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public abstract void explode( - @Nullable Entity entity, + @Nullable Entity source, @Nullable DamageSource damageSource, - @Nullable ExplosionDamageCalculator explosionDamageCalculator, - double d, - double e, - double f, - float g, - boolean bl, + @Nullable ExplosionDamageCalculator damageCalculator, + double x, + double y, + double z, + float radius, + boolean fire, Level.ExplosionInteraction explosionInteraction, - ParticleOptions particleOptions, - ParticleOptions particleOptions2, - Holder holder + ParticleOptions smallExplosionParticles, + ParticleOptions largeExplosionParticles, + Holder explosionSound ); /** @@ -669,8 +669,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { this.skyDarken = (int)((1.0 - f * d * e) * 11.0); } - public void setSpawnSettings(boolean bl) { - this.getChunkSource().setSpawnSettings(bl); + public void setSpawnSettings(boolean spawnSettings) { + this.getChunkSource().setSpawnSettings(spawnSettings); } public BlockPos getSharedSpawnPos() { @@ -819,8 +819,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public abstract TickRateManager tickRateManager(); - public float getThunderLevel(float delta) { - return Mth.lerp(delta, this.oThunderLevel, this.thunderLevel) * this.getRainLevel(delta); + public float getThunderLevel(float partialTick) { + return Mth.lerp(partialTick, this.oThunderLevel, this.thunderLevel) * this.getRainLevel(partialTick); } /** @@ -835,8 +835,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { /** * Returns rain strength. */ - public float getRainLevel(float delta) { - return Mth.lerp(delta, this.oRainLevel, this.rainLevel); + public float getRainLevel(float partialTick) { + return Mth.lerp(partialTick, this.oRainLevel, this.rainLevel); } /** diff --git a/net/minecraft/world/level/LevelAccessor.java b/net/minecraft/world/level/LevelAccessor.java index 3967a7c2..7538d90e 100644 --- a/net/minecraft/world/level/LevelAccessor.java +++ b/net/minecraft/world/level/LevelAccessor.java @@ -35,13 +35,13 @@ public interface LevelAccessor extends CommonLevelAccessor, LevelTimeAccess, Sch long nextSubTickCount(); @Override - default ScheduledTick createTick(BlockPos blockPos, T object, int i, TickPriority tickPriority) { - return new ScheduledTick<>(object, blockPos, this.getLevelData().getGameTime() + i, tickPriority, this.nextSubTickCount()); + default ScheduledTick createTick(BlockPos pos, T type, int delay, TickPriority priority) { + return new ScheduledTick<>(type, pos, this.getLevelData().getGameTime() + delay, priority, this.nextSubTickCount()); } @Override - default ScheduledTick createTick(BlockPos blockPos, T object, int i) { - return new ScheduledTick<>(object, blockPos, this.getLevelData().getGameTime() + i, this.nextSubTickCount()); + default ScheduledTick createTick(BlockPos pos, T type, int delay) { + return new ScheduledTick<>(type, pos, this.getLevelData().getGameTime() + delay, this.nextSubTickCount()); } /** @@ -73,8 +73,8 @@ public interface LevelAccessor extends CommonLevelAccessor, LevelTimeAccess, Sch default void blockUpdated(BlockPos pos, Block block) { } - default void neighborShapeChanged(Direction direction, BlockPos blockPos, BlockPos blockPos2, BlockState blockState, int i, int j) { - NeighborUpdater.executeShapeUpdate(this, direction, blockPos, blockPos2, blockState, i, j - 1); + default void neighborShapeChanged(Direction direction, BlockPos pos, BlockPos neighborPos, BlockState neighborState, int flags, int recursionLeft) { + NeighborUpdater.executeShapeUpdate(this, direction, pos, neighborPos, neighborState, flags, recursionLeft - 1); } default void playSound(@Nullable Player player, BlockPos pos, SoundEvent sound, SoundSource source) { diff --git a/net/minecraft/world/level/LevelHeightAccessor.java b/net/minecraft/world/level/LevelHeightAccessor.java index 4e863412..4c03f55d 100644 --- a/net/minecraft/world/level/LevelHeightAccessor.java +++ b/net/minecraft/world/level/LevelHeightAccessor.java @@ -24,8 +24,8 @@ public interface LevelHeightAccessor { return SectionPos.blockToSectionCoord(this.getMaxY()); } - default boolean isInsideBuildHeight(int i) { - return i >= this.getMinY() && i <= this.getMaxY(); + default boolean isInsideBuildHeight(int y) { + return y >= this.getMinY() && y <= this.getMaxY(); } default boolean isOutsideBuildHeight(BlockPos pos) { diff --git a/net/minecraft/world/level/NaturalSpawner.java b/net/minecraft/world/level/NaturalSpawner.java index 593864ba..61decfc0 100644 --- a/net/minecraft/world/level/NaturalSpawner.java +++ b/net/minecraft/world/level/NaturalSpawner.java @@ -98,13 +98,15 @@ public final class NaturalSpawner { return chunk.getNoiseBiome(QuartPos.fromBlock(pos.getX()), QuartPos.fromBlock(pos.getY()), QuartPos.fromBlock(pos.getZ())).value(); } - public static List getFilteredSpawningCategories(NaturalSpawner.SpawnState spawnState, boolean bl, boolean bl2, boolean bl3) { + public static List getFilteredSpawningCategories( + NaturalSpawner.SpawnState spawnState, boolean spawnFriendlies, boolean spawnEnemies, boolean spawnPassives + ) { List list = new ArrayList(SPAWNING_CATEGORIES.length); for (MobCategory mobCategory : SPAWNING_CATEGORIES) { - if ((bl || !mobCategory.isFriendly()) - && (bl2 || mobCategory.isFriendly()) - && (bl3 || !mobCategory.isPersistent()) + if ((spawnFriendlies || !mobCategory.isFriendly()) + && (spawnEnemies || mobCategory.isFriendly()) + && (spawnPassives || !mobCategory.isPersistent()) && spawnState.canSpawnForCategoryGlobal(mobCategory)) { list.add(mobCategory); } @@ -113,13 +115,13 @@ public final class NaturalSpawner { return list; } - public static void spawnForChunk(ServerLevel serverLevel, LevelChunk levelChunk, NaturalSpawner.SpawnState spawnState, List list) { + public static void spawnForChunk(ServerLevel level, LevelChunk chunk, NaturalSpawner.SpawnState spawnState, List categories) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("spawner"); - for (MobCategory mobCategory : list) { - if (spawnState.canSpawnForCategoryLocal(mobCategory, levelChunk.getPos())) { - spawnCategoryForChunk(mobCategory, serverLevel, levelChunk, spawnState::canSpawn, spawnState::afterSpawn); + for (MobCategory mobCategory : categories) { + if (spawnState.canSpawnForCategoryLocal(mobCategory, chunk.getPos())) { + spawnCategoryForChunk(mobCategory, level, chunk, spawnState::canSpawn, spawnState::afterSpawn); } } @@ -487,13 +489,13 @@ public final class NaturalSpawner { return this.unmodifiableMobCategoryCounts; } - boolean canSpawnForCategoryGlobal(MobCategory mobCategory) { - int i = mobCategory.getMaxInstancesPerChunk() * this.spawnableChunkCount / NaturalSpawner.MAGIC_NUMBER; - return this.mobCategoryCounts.getInt(mobCategory) < i; + boolean canSpawnForCategoryGlobal(MobCategory category) { + int i = category.getMaxInstancesPerChunk() * this.spawnableChunkCount / NaturalSpawner.MAGIC_NUMBER; + return this.mobCategoryCounts.getInt(category) < i; } - boolean canSpawnForCategoryLocal(MobCategory mobCategory, ChunkPos chunkPos) { - return this.localMobCapCalculator.canSpawn(mobCategory, chunkPos); + boolean canSpawnForCategoryLocal(MobCategory category, ChunkPos chunkPos) { + return this.localMobCapCalculator.canSpawn(category, chunkPos); } } } diff --git a/net/minecraft/world/level/ScheduledTickAccess.java b/net/minecraft/world/level/ScheduledTickAccess.java index d1affb63..04250848 100644 --- a/net/minecraft/world/level/ScheduledTickAccess.java +++ b/net/minecraft/world/level/ScheduledTickAccess.java @@ -8,27 +8,27 @@ import net.minecraft.world.ticks.ScheduledTick; import net.minecraft.world.ticks.TickPriority; public interface ScheduledTickAccess { - ScheduledTick createTick(BlockPos blockPos, T object, int i, TickPriority tickPriority); + ScheduledTick createTick(BlockPos pos, T type, int delay, TickPriority priority); - ScheduledTick createTick(BlockPos blockPos, T object, int i); + ScheduledTick createTick(BlockPos pos, T type, int delay); LevelTickAccess getBlockTicks(); - default void scheduleTick(BlockPos blockPos, Block block, int i, TickPriority tickPriority) { - this.getBlockTicks().schedule(this.createTick(blockPos, block, i, tickPriority)); + default void scheduleTick(BlockPos pos, Block block, int delay, TickPriority priority) { + this.getBlockTicks().schedule(this.createTick(pos, block, delay, priority)); } - default void scheduleTick(BlockPos blockPos, Block block, int i) { - this.getBlockTicks().schedule(this.createTick(blockPos, block, i)); + default void scheduleTick(BlockPos pos, Block block, int delay) { + this.getBlockTicks().schedule(this.createTick(pos, block, delay)); } LevelTickAccess getFluidTicks(); - default void scheduleTick(BlockPos blockPos, Fluid fluid, int i, TickPriority tickPriority) { - this.getFluidTicks().schedule(this.createTick(blockPos, fluid, i, tickPriority)); + default void scheduleTick(BlockPos pos, Fluid fluid, int delay, TickPriority priority) { + this.getFluidTicks().schedule(this.createTick(pos, fluid, delay, priority)); } - default void scheduleTick(BlockPos blockPos, Fluid fluid, int i) { - this.getFluidTicks().schedule(this.createTick(blockPos, fluid, i)); + default void scheduleTick(BlockPos pos, Fluid fluid, int delay) { + this.getFluidTicks().schedule(this.createTick(pos, fluid, delay)); } } diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java index 7fbbbf5a..f9c40194 100644 --- a/net/minecraft/world/level/ServerExplosion.java +++ b/net/minecraft/world/level/ServerExplosion.java @@ -50,30 +50,30 @@ public class ServerExplosion implements Explosion { private final Map hitPlayers = new HashMap(); public ServerExplosion( - ServerLevel serverLevel, - @Nullable Entity entity, + ServerLevel level, + @Nullable Entity source, @Nullable DamageSource damageSource, - @Nullable ExplosionDamageCalculator explosionDamageCalculator, - Vec3 vec3, - float f, - boolean bl, + @Nullable ExplosionDamageCalculator damageCalculator, + Vec3 center, + float radius, + boolean fire, Explosion.BlockInteraction blockInteraction ) { - this.level = serverLevel; - this.source = entity; - this.radius = f; - this.center = vec3; - this.fire = bl; + this.level = level; + this.source = source; + this.radius = radius; + this.center = center; + this.fire = fire; this.blockInteraction = blockInteraction; - this.damageSource = damageSource == null ? serverLevel.damageSources().explosion(this) : damageSource; - this.damageCalculator = explosionDamageCalculator == null ? this.makeDamageCalculator(entity) : explosionDamageCalculator; + this.damageSource = damageSource == null ? level.damageSources().explosion(this) : damageSource; + this.damageCalculator = damageCalculator == null ? this.makeDamageCalculator(source) : damageCalculator; } private ExplosionDamageCalculator makeDamageCalculator(@Nullable Entity entity) { return (ExplosionDamageCalculator)(entity == null ? EXPLOSION_DAMAGE_CALCULATOR : new EntityBasedExplosionDamageCalculator(entity)); } - public static float getSeenPercent(Vec3 vec3, Entity entity) { + public static float getSeenPercent(Vec3 explosionVector, Entity entity) { AABB aABB = entity.getBoundingBox(); double d = 1.0 / ((aABB.maxX - aABB.minX) * 2.0 + 1.0); double e = 1.0 / ((aABB.maxY - aABB.minY) * 2.0 + 1.0); @@ -90,8 +90,8 @@ public class ServerExplosion implements Explosion { double n = Mth.lerp(k, aABB.minX, aABB.maxX); double o = Mth.lerp(l, aABB.minY, aABB.maxY); double p = Mth.lerp(m, aABB.minZ, aABB.maxZ); - Vec3 vec32 = new Vec3(n + g, o, p + h); - if (entity.level().clip(new ClipContext(vec32, vec3, Block.COLLIDER, Fluid.NONE, entity)).getType() == Type.MISS) { + Vec3 vec3 = new Vec3(n + g, o, p + h); + if (entity.level().clip(new ClipContext(vec3, explosionVector, Block.COLLIDER, Fluid.NONE, entity)).getType() == Type.MISS) { i++; } @@ -217,21 +217,21 @@ public class ServerExplosion implements Explosion { } } - private void interactWithBlocks(List list) { - List list2 = new ArrayList(); - Util.shuffle(list, this.level.random); + private void interactWithBlocks(List blocks) { + List list = new ArrayList(); + Util.shuffle(blocks, this.level.random); - for (BlockPos blockPos : list) { - this.level.getBlockState(blockPos).onExplosionHit(this.level, blockPos, this, (itemStack, blockPosx) -> addOrAppendStack(list2, itemStack, blockPosx)); + for (BlockPos blockPos : blocks) { + this.level.getBlockState(blockPos).onExplosionHit(this.level, blockPos, this, (itemStack, blockPosx) -> addOrAppendStack(list, itemStack, blockPosx)); } - for (ServerExplosion.StackCollector stackCollector : list2) { + for (ServerExplosion.StackCollector stackCollector : list) { net.minecraft.world.level.block.Block.popResource(this.level, stackCollector.pos, stackCollector.stack); } } - private void createFire(List list) { - for (BlockPos blockPos : list) { + private void createFire(List blocks) { + for (BlockPos blockPos : blocks) { if (this.level.random.nextInt(3) == 0 && this.level.getBlockState(blockPos).isAir() && this.level.getBlockState(blockPos.below()).isSolidRender()) { this.level.setBlockAndUpdate(blockPos, BaseFireBlock.getState(this.level, blockPos)); } @@ -254,15 +254,15 @@ public class ServerExplosion implements Explosion { } } - private static void addOrAppendStack(List list, ItemStack itemStack, BlockPos blockPos) { - for (ServerExplosion.StackCollector stackCollector : list) { - stackCollector.tryMerge(itemStack); - if (itemStack.isEmpty()) { + private static void addOrAppendStack(List stackCollectors, ItemStack stack, BlockPos pos) { + for (ServerExplosion.StackCollector stackCollector : stackCollectors) { + stackCollector.tryMerge(stack); + if (stack.isEmpty()) { return; } } - list.add(new ServerExplosion.StackCollector(blockPos, itemStack)); + stackCollectors.add(new ServerExplosion.StackCollector(pos, stack)); } private boolean interactsWithBlocks() { @@ -322,14 +322,14 @@ public class ServerExplosion implements Explosion { final BlockPos pos; ItemStack stack; - StackCollector(BlockPos blockPos, ItemStack itemStack) { - this.pos = blockPos; - this.stack = itemStack; + StackCollector(BlockPos pos, ItemStack stack) { + this.pos = pos; + this.stack = stack; } - public void tryMerge(ItemStack itemStack) { - if (ItemEntity.areMergable(this.stack, itemStack)) { - this.stack = ItemEntity.merge(this.stack, itemStack, 16); + public void tryMerge(ItemStack stack) { + if (ItemEntity.areMergable(this.stack, stack)) { + this.stack = ItemEntity.merge(this.stack, stack, 16); } } } diff --git a/net/minecraft/world/level/biome/Biome.java b/net/minecraft/world/level/biome/Biome.java index a1b8401e..12faaba7 100644 --- a/net/minecraft/world/level/biome/Biome.java +++ b/net/minecraft/world/level/biome/Biome.java @@ -94,34 +94,34 @@ public final class Biome { return this.climateSettings.hasPrecipitation(); } - public Biome.Precipitation getPrecipitationAt(BlockPos blockPos, int i) { + public Biome.Precipitation getPrecipitationAt(BlockPos pos, int seaLevel) { if (!this.hasPrecipitation()) { return Biome.Precipitation.NONE; } else { - return this.coldEnoughToSnow(blockPos, i) ? Biome.Precipitation.SNOW : Biome.Precipitation.RAIN; + return this.coldEnoughToSnow(pos, seaLevel) ? Biome.Precipitation.SNOW : Biome.Precipitation.RAIN; } } - private float getHeightAdjustedTemperature(BlockPos blockPos, int i) { - float f = this.climateSettings.temperatureModifier.modifyTemperature(blockPos, this.getBaseTemperature()); - int j = i + 17; - if (blockPos.getY() > j) { - float g = (float)(TEMPERATURE_NOISE.getValue(blockPos.getX() / 8.0F, blockPos.getZ() / 8.0F, false) * 8.0); - return f - (g + blockPos.getY() - j) * 0.05F / 40.0F; + private float getHeightAdjustedTemperature(BlockPos pos, int seaLevel) { + float f = this.climateSettings.temperatureModifier.modifyTemperature(pos, this.getBaseTemperature()); + int i = seaLevel + 17; + if (pos.getY() > i) { + float g = (float)(TEMPERATURE_NOISE.getValue(pos.getX() / 8.0F, pos.getZ() / 8.0F, false) * 8.0); + return f - (g + pos.getY() - i) * 0.05F / 40.0F; } else { return f; } } @Deprecated - private float getTemperature(BlockPos blockPos, int i) { - long l = blockPos.asLong(); + private float getTemperature(BlockPos pos, int seaLevel) { + long l = pos.asLong(); Long2FloatLinkedOpenHashMap long2FloatLinkedOpenHashMap = (Long2FloatLinkedOpenHashMap)this.temperatureCache.get(); float f = long2FloatLinkedOpenHashMap.get(l); if (!Float.isNaN(f)) { return f; } else { - float g = this.getHeightAdjustedTemperature(blockPos, i); + float g = this.getHeightAdjustedTemperature(pos, seaLevel); if (long2FloatLinkedOpenHashMap.size() == 1024) { long2FloatLinkedOpenHashMap.removeFirstFloat(); } @@ -158,16 +158,16 @@ public final class Biome { } } - public boolean coldEnoughToSnow(BlockPos blockPos, int i) { - return !this.warmEnoughToRain(blockPos, i); + public boolean coldEnoughToSnow(BlockPos pos, int seaLevel) { + return !this.warmEnoughToRain(pos, seaLevel); } - public boolean warmEnoughToRain(BlockPos blockPos, int i) { - return this.getTemperature(blockPos, i) >= 0.15F; + public boolean warmEnoughToRain(BlockPos pos, int seaLevel) { + return this.getTemperature(pos, seaLevel) >= 0.15F; } - public boolean shouldMeltFrozenOceanIcebergSlightly(BlockPos blockPos, int i) { - return this.getTemperature(blockPos, i) > 0.1F; + public boolean shouldMeltFrozenOceanIcebergSlightly(BlockPos pos, int seaLevel) { + return this.getTemperature(pos, seaLevel) > 0.1F; } public boolean shouldSnow(LevelReader level, BlockPos pos) { diff --git a/net/minecraft/world/level/biome/BiomeGenerationSettings.java b/net/minecraft/world/level/biome/BiomeGenerationSettings.java index 89b37d4e..44022813 100644 --- a/net/minecraft/world/level/biome/BiomeGenerationSettings.java +++ b/net/minecraft/world/level/biome/BiomeGenerationSettings.java @@ -44,18 +44,18 @@ public class BiomeGenerationSettings { private final Supplier>> flowerFeatures; private final Supplier> featureSet; - BiomeGenerationSettings(HolderSet> holderSet, List> list) { - this.carvers = holderSet; - this.features = list; + BiomeGenerationSettings(HolderSet> carvers, List> features) { + this.carvers = carvers; + this.features = features; this.flowerFeatures = Suppliers.memoize( - () -> (List>)list.stream() + () -> (List>)features.stream() .flatMap(HolderSet::stream) .map(Holder::value) .flatMap(PlacedFeature::getFeatures) .filter(configuredFeature -> configuredFeature.feature() == Feature.FLOWER) .collect(ImmutableList.toImmutableList()) ); - this.featureSet = Suppliers.memoize(() -> (Set)list.stream().flatMap(HolderSet::stream).map(Holder::value).collect(Collectors.toSet())); + this.featureSet = Suppliers.memoize(() -> (Set)features.stream().flatMap(HolderSet::stream).map(Holder::value).collect(Collectors.toSet())); } public Iterable>> getCarvers() { @@ -88,8 +88,8 @@ public class BiomeGenerationSettings { return this; } - public BiomeGenerationSettings.Builder addCarver(ResourceKey> resourceKey) { - this.addCarver(this.worldCarvers.getOrThrow(resourceKey)); + public BiomeGenerationSettings.Builder addCarver(ResourceKey> carver) { + this.addCarver(this.worldCarvers.getOrThrow(carver)); return this; } } @@ -108,8 +108,8 @@ public class BiomeGenerationSettings { return this; } - public BiomeGenerationSettings.PlainBuilder addCarver(Holder> holder) { - this.carvers.add(holder); + public BiomeGenerationSettings.PlainBuilder addCarver(Holder> carver) { + this.carvers.add(carver); return this; } diff --git a/net/minecraft/world/level/biome/MultiNoiseBiomeSourceParameterList.java b/net/minecraft/world/level/biome/MultiNoiseBiomeSourceParameterList.java index a8db3e40..cd9894f8 100644 --- a/net/minecraft/world/level/biome/MultiNoiseBiomeSourceParameterList.java +++ b/net/minecraft/world/level/biome/MultiNoiseBiomeSourceParameterList.java @@ -18,10 +18,13 @@ import net.minecraft.resources.RegistryFileCodec; import net.minecraft.resources.RegistryOps; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.biome.Climate.ParameterList; +import net.minecraft.world.level.biome.Climate.ParameterPoint; import net.minecraft.world.level.biome.MultiNoiseBiomeSourceParameterList.Preset.1; import net.minecraft.world.level.biome.MultiNoiseBiomeSourceParameterList.Preset.2; import net.minecraft.world.level.biome.MultiNoiseBiomeSourceParameterList.Preset.3; import net.minecraft.world.level.biome.MultiNoiseBiomeSourceParameterList.Preset.SourceProvider; +import net.minecraft.world.level.biome.OverworldBiomeBuilder.Modifier; public class MultiNoiseBiomeSourceParameterList { public static final Codec DIRECT_CODEC = RecordCodecBuilder.create( @@ -37,19 +40,19 @@ public class MultiNoiseBiomeSourceParameterList { Registries.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST, DIRECT_CODEC ); private final MultiNoiseBiomeSourceParameterList.Preset preset; - private final Climate.ParameterList> parameters; + private final ParameterList> parameters; public MultiNoiseBiomeSourceParameterList(MultiNoiseBiomeSourceParameterList.Preset preset, HolderGetter biomes) { this.preset = preset; this.parameters = preset.provider.apply(biomes::getOrThrow); } - public Climate.ParameterList> parameters() { + public ParameterList> parameters() { return this.parameters; } - public static Map>> knownPresets() { - return (Map>>)MultiNoiseBiomeSourceParameterList.Preset.BY_NAME + public static Map>> knownPresets() { + return (Map>>)MultiNoiseBiomeSourceParameterList.Preset.BY_NAME .values() .stream() .collect(Collectors.toMap(preset -> preset, preset -> preset.provider().apply(resourceKey -> resourceKey))); @@ -77,10 +80,10 @@ public class MultiNoiseBiomeSourceParameterList { preset -> DataResult.success(preset.id) ); - static Climate.ParameterList generateOverworldBiomes(Function, T> function, OverworldBiomeBuilder.Modifier modifier) { - Builder> builder = ImmutableList.builder(); - new OverworldBiomeBuilder(modifier).addBiomes(pair -> builder.add(pair.mapSecond(function))); - return new Climate.ParameterList<>(builder.build()); + static ParameterList generateOverworldBiomes(Function, T> valueGetter, Modifier modifier) { + Builder> builder = ImmutableList.builder(); + new OverworldBiomeBuilder(modifier).addBiomes(pair -> builder.add(pair.mapSecond(valueGetter))); + return new ParameterList<>(builder.build()); } public Stream> usedBiomes() { diff --git a/net/minecraft/world/level/biome/MultiNoiseBiomeSourceParameterLists.java b/net/minecraft/world/level/biome/MultiNoiseBiomeSourceParameterLists.java index 3fd1f635..4500da0d 100644 --- a/net/minecraft/world/level/biome/MultiNoiseBiomeSourceParameterLists.java +++ b/net/minecraft/world/level/biome/MultiNoiseBiomeSourceParameterLists.java @@ -16,9 +16,9 @@ public class MultiNoiseBiomeSourceParameterLists { context.register(OVERWORLD, new MultiNoiseBiomeSourceParameterList(MultiNoiseBiomeSourceParameterList.Preset.OVERWORLD, holderGetter)); } - public static void winterDrop(BootstrapContext bootstrapContext) { - HolderGetter holderGetter = bootstrapContext.lookup(Registries.BIOME); - bootstrapContext.register(OVERWORLD, new MultiNoiseBiomeSourceParameterList(MultiNoiseBiomeSourceParameterList.Preset.OVERWORLD_WINTER_DROP, holderGetter)); + public static void winterDrop(BootstrapContext context) { + HolderGetter holderGetter = context.lookup(Registries.BIOME); + context.register(OVERWORLD, new MultiNoiseBiomeSourceParameterList(MultiNoiseBiomeSourceParameterList.Preset.OVERWORLD_WINTER_DROP, holderGetter)); } private static ResourceKey register(String name) { diff --git a/net/minecraft/world/level/block/AbstractCandleBlock.java b/net/minecraft/world/level/block/AbstractCandleBlock.java index 6e731fb9..15cbf328 100644 --- a/net/minecraft/world/level/block/AbstractCandleBlock.java +++ b/net/minecraft/world/level/block/AbstractCandleBlock.java @@ -97,13 +97,11 @@ public abstract class AbstractCandleBlock extends Block { } @Override - protected void onExplosionHit( - BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer biConsumer - ) { - if (explosion.canTriggerBlocks() && (Boolean)blockState.getValue(LIT)) { - extinguish(null, blockState, serverLevel, blockPos); + protected void onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer dropConsumer) { + if (explosion.canTriggerBlocks() && (Boolean)state.getValue(LIT)) { + extinguish(null, state, level, pos); } - super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer); + super.onExplosionHit(state, level, pos, explosion, dropConsumer); } } diff --git a/net/minecraft/world/level/block/AbstractCauldronBlock.java b/net/minecraft/world/level/block/AbstractCauldronBlock.java index e5844c01..751bde88 100644 --- a/net/minecraft/world/level/block/AbstractCauldronBlock.java +++ b/net/minecraft/world/level/block/AbstractCauldronBlock.java @@ -55,10 +55,10 @@ public abstract class AbstractCauldronBlock extends Block { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - CauldronInteraction cauldronInteraction = (CauldronInteraction)this.interactions.map().get(itemStack.getItem()); - return cauldronInteraction.interact(blockState, level, blockPos, player, interactionHand, itemStack); + CauldronInteraction cauldronInteraction = (CauldronInteraction)this.interactions.map().get(stack.getItem()); + return cauldronInteraction.interact(state, level, pos, player, hand, stack); } @Override diff --git a/net/minecraft/world/level/block/AbstractSkullBlock.java b/net/minecraft/world/level/block/AbstractSkullBlock.java index 7d116408..a23d8e09 100644 --- a/net/minecraft/world/level/block/AbstractSkullBlock.java +++ b/net/minecraft/world/level/block/AbstractSkullBlock.java @@ -10,7 +10,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.SkullBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.pathfinder.PathComputationType; @@ -58,7 +58,7 @@ public abstract class AbstractSkullBlock extends BaseEntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(POWERED); } @@ -68,11 +68,11 @@ public abstract class AbstractSkullBlock extends BaseEntityBlock { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { if (!level.isClientSide) { - boolean bl2 = level.hasNeighborSignal(blockPos); - if (bl2 != (Boolean)blockState.getValue(POWERED)) { - level.setBlock(blockPos, blockState.setValue(POWERED, bl2), 2); + boolean bl = level.hasNeighborSignal(pos); + if (bl != (Boolean)state.getValue(POWERED)) { + level.setBlock(pos, state.setValue(POWERED, bl), 2); } } } diff --git a/net/minecraft/world/level/block/AmethystClusterBlock.java b/net/minecraft/world/level/block/AmethystClusterBlock.java index a89a0796..9372bb3f 100644 --- a/net/minecraft/world/level/block/AmethystClusterBlock.java +++ b/net/minecraft/world/level/block/AmethystClusterBlock.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -90,22 +90,22 @@ public class AmethystClusterBlock extends AmethystBlock implements SimpleWaterlo @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return direction == ((Direction)blockState.getValue(FACING)).getOpposite() && !blockState.canSurvive(levelReader, blockPos) + return direction == ((Direction)state.getValue(FACING)).getOpposite() && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Nullable @@ -134,7 +134,7 @@ public class AmethystClusterBlock extends AmethystBlock implements SimpleWaterlo } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(WATERLOGGED, FACING); } } diff --git a/net/minecraft/world/level/block/AnvilBlock.java b/net/minecraft/world/level/block/AnvilBlock.java index d4cf1119..138634d4 100644 --- a/net/minecraft/world/level/block/AnvilBlock.java +++ b/net/minecraft/world/level/block/AnvilBlock.java @@ -19,7 +19,7 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.pathfinder.PathComputationType; import net.minecraft.world.phys.BlockHitResult; @@ -120,7 +120,7 @@ public class AnvilBlock extends FallingBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING); } diff --git a/net/minecraft/world/level/block/AttachedStemBlock.java b/net/minecraft/world/level/block/AttachedStemBlock.java index c657292f..ada1b03b 100644 --- a/net/minecraft/world/level/block/AttachedStemBlock.java +++ b/net/minecraft/world/level/block/AttachedStemBlock.java @@ -19,7 +19,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -72,23 +72,23 @@ public class AttachedStemBlock extends BushBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (!blockState2.is(this.fruit) && direction == blockState.getValue(FACING)) { - Optional optional = levelReader.registryAccess().lookupOrThrow(Registries.BLOCK).getOptional(this.stem); + if (!neighborState.is(this.fruit) && direction == state.getValue(FACING)) { + Optional optional = level.registryAccess().lookupOrThrow(Registries.BLOCK).getOptional(this.stem); if (optional.isPresent()) { return ((Block)optional.get()).defaultBlockState().trySetValue(StemBlock.AGE, 7); } } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -112,7 +112,7 @@ public class AttachedStemBlock extends BushBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING); } } diff --git a/net/minecraft/world/level/block/BambooSaplingBlock.java b/net/minecraft/world/level/block/BambooSaplingBlock.java index c1633963..29423504 100644 --- a/net/minecraft/world/level/block/BambooSaplingBlock.java +++ b/net/minecraft/world/level/block/BambooSaplingBlock.java @@ -55,21 +55,21 @@ public class BambooSaplingBlock extends Block implements BonemealableBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (!blockState.canSurvive(levelReader, blockPos)) { + if (!state.canSurvive(level, pos)) { return Blocks.AIR.defaultBlockState(); } else { - return direction == Direction.UP && blockState2.is(Blocks.BAMBOO) + return direction == Direction.UP && neighborState.is(Blocks.BAMBOO) ? Blocks.BAMBOO.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } } diff --git a/net/minecraft/world/level/block/BambooStalkBlock.java b/net/minecraft/world/level/block/BambooStalkBlock.java index 85edde56..d0e1a425 100644 --- a/net/minecraft/world/level/block/BambooStalkBlock.java +++ b/net/minecraft/world/level/block/BambooStalkBlock.java @@ -15,7 +15,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BambooLeaves; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -55,12 +55,12 @@ public class BambooStalkBlock extends Block implements BonemealableBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AGE, LEAVES, STAGE); } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { + protected boolean propagatesSkylightDown(BlockState state) { return true; } @@ -144,22 +144,22 @@ public class BambooStalkBlock extends Block implements BonemealableBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (!blockState.canSurvive(levelReader, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + if (!state.canSurvive(level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 1); } - return direction == Direction.UP && blockState2.is(Blocks.BAMBOO) && blockState2.getValue(AGE) > blockState.getValue(AGE) - ? blockState.cycle(AGE) - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return direction == Direction.UP && neighborState.is(Blocks.BAMBOO) && neighborState.getValue(AGE) > state.getValue(AGE) + ? state.cycle(AGE) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/BannerBlock.java b/net/minecraft/world/level/block/BannerBlock.java index c71f71e8..9a8d6465 100644 --- a/net/minecraft/world/level/block/BannerBlock.java +++ b/net/minecraft/world/level/block/BannerBlock.java @@ -14,7 +14,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.block.state.properties.RotationSegment; @@ -57,18 +57,18 @@ public class BannerBlock extends AbstractBannerBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction == Direction.DOWN && !blockState.canSurvive(levelReader, blockPos) + return direction == Direction.DOWN && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -82,7 +82,7 @@ public class BannerBlock extends AbstractBannerBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(ROTATION); } diff --git a/net/minecraft/world/level/block/BarrierBlock.java b/net/minecraft/world/level/block/BarrierBlock.java index e7a1dc6d..cd62dd31 100644 --- a/net/minecraft/world/level/block/BarrierBlock.java +++ b/net/minecraft/world/level/block/BarrierBlock.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.Fluid; @@ -36,8 +36,8 @@ public class BarrierBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { - return blockState.getFluidState().isEmpty(); + protected boolean propagatesSkylightDown(BlockState state) { + return state.getFluidState().isEmpty(); } @Override @@ -52,20 +52,20 @@ public class BarrierBlock extends Block implements SimpleWaterloggedBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -80,7 +80,7 @@ public class BarrierBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(WATERLOGGED); } diff --git a/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java b/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java index 8c541883..6701420d 100644 --- a/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java +++ b/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java @@ -11,7 +11,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; @@ -32,11 +32,9 @@ public abstract class BaseCoralPlantTypeBlock extends Block implements SimpleWat @Override protected abstract MapCodec codec(); - protected void tryScheduleDieTick( - BlockState blockState, BlockGetter blockGetter, ScheduledTickAccess scheduledTickAccess, RandomSource randomSource, BlockPos blockPos - ) { - if (!scanForWater(blockState, blockGetter, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 60 + randomSource.nextInt(40)); + protected void tryScheduleDieTick(BlockState state, BlockGetter level, ScheduledTickAccess scheduledTickAccess, RandomSource random, BlockPos pos) { + if (!scanForWater(state, level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 60 + random.nextInt(40)); } } @@ -68,22 +66,22 @@ public abstract class BaseCoralPlantTypeBlock extends Block implements SimpleWat @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return direction == Direction.DOWN && !this.canSurvive(blockState, levelReader, blockPos) + return direction == Direction.DOWN && !this.canSurvive(state, level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -93,7 +91,7 @@ public abstract class BaseCoralPlantTypeBlock extends Block implements SimpleWat } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(WATERLOGGED); } diff --git a/net/minecraft/world/level/block/BaseCoralWallFanBlock.java b/net/minecraft/world/level/block/BaseCoralWallFanBlock.java index 78e3f540..3b46bef2 100644 --- a/net/minecraft/world/level/block/BaseCoralWallFanBlock.java +++ b/net/minecraft/world/level/block/BaseCoralWallFanBlock.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.material.Fluids; import net.minecraft.world.phys.shapes.CollisionContext; @@ -62,26 +62,26 @@ public class BaseCoralWallFanBlock extends BaseCoralFanBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, WATERLOGGED); } @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return direction.getOpposite() == blockState.getValue(FACING) && !blockState.canSurvive(levelReader, blockPos) ? Blocks.AIR.defaultBlockState() : blockState; + return direction.getOpposite() == state.getValue(FACING) && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() : state; } @Override diff --git a/net/minecraft/world/level/block/BasePressurePlateBlock.java b/net/minecraft/world/level/block/BasePressurePlateBlock.java index 302beb74..0b6db5f5 100644 --- a/net/minecraft/world/level/block/BasePressurePlateBlock.java +++ b/net/minecraft/world/level/block/BasePressurePlateBlock.java @@ -51,18 +51,18 @@ public abstract class BasePressurePlateBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction == Direction.DOWN && !blockState.canSurvive(levelReader, blockPos) + return direction == Direction.DOWN && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/BaseRailBlock.java b/net/minecraft/world/level/block/BaseRailBlock.java index e576f24d..452f9cb1 100644 --- a/net/minecraft/world/level/block/BaseRailBlock.java +++ b/net/minecraft/world/level/block/BaseRailBlock.java @@ -77,14 +77,14 @@ public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBl } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - if (!level.isClientSide && level.getBlockState(blockPos).is(this)) { - RailShape railShape = blockState.getValue(this.getShapeProperty()); - if (shouldBeRemoved(blockPos, level, railShape)) { - dropResources(blockState, level, blockPos); - level.removeBlock(blockPos, bl); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + if (!level.isClientSide && level.getBlockState(pos).is(this)) { + RailShape railShape = state.getValue(this.getShapeProperty()); + if (shouldBeRemoved(pos, level, railShape)) { + dropResources(state, level, pos); + level.removeBlock(pos, movedByPiston); } else { - this.updateState(blockState, level, blockPos, block); + this.updateState(state, level, pos, neighborBlock); } } } @@ -149,20 +149,20 @@ public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBl @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/BaseTorchBlock.java b/net/minecraft/world/level/block/BaseTorchBlock.java index 1b7cd74f..e3cdced1 100644 --- a/net/minecraft/world/level/block/BaseTorchBlock.java +++ b/net/minecraft/world/level/block/BaseTorchBlock.java @@ -30,18 +30,18 @@ public abstract class BaseTorchBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction == Direction.DOWN && !this.canSurvive(blockState, levelReader, blockPos) + return direction == Direction.DOWN && !this.canSurvive(state, level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/BedBlock.java b/net/minecraft/world/level/block/BedBlock.java index 66bbec14..2a6f6167 100644 --- a/net/minecraft/world/level/block/BedBlock.java +++ b/net/minecraft/world/level/block/BedBlock.java @@ -28,7 +28,7 @@ import net.minecraft.world.level.block.entity.BedBlockEntity; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BedPart; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; @@ -139,9 +139,9 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock } @Override - public void updateEntityMovementAfterFallOn(BlockGetter blockGetter, Entity entity) { + public void updateEntityMovementAfterFallOn(BlockGetter level, Entity entity) { if (entity.isSuppressingBounce()) { - super.updateEntityMovementAfterFallOn(blockGetter, entity); + super.updateEntityMovementAfterFallOn(level, entity); } else { this.bounceUp(entity); } @@ -157,21 +157,21 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction == getNeighbourDirection(blockState.getValue(PART), blockState.getValue(FACING))) { - return blockState2.is(this) && blockState2.getValue(PART) != blockState.getValue(PART) - ? blockState.setValue(OCCUPIED, (Boolean)blockState2.getValue(OCCUPIED)) + if (direction == getNeighbourDirection(state.getValue(PART), state.getValue(FACING))) { + return neighborState.is(this) && neighborState.getValue(PART) != state.getValue(PART) + ? state.setValue(OCCUPIED, (Boolean)neighborState.getValue(OCCUPIED)) : Blocks.AIR.defaultBlockState(); } else { - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } } @@ -304,7 +304,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, PART, OCCUPIED); } diff --git a/net/minecraft/world/level/block/BeehiveBlock.java b/net/minecraft/world/level/block/BeehiveBlock.java index d576c251..f627ad86 100644 --- a/net/minecraft/world/level/block/BeehiveBlock.java +++ b/net/minecraft/world/level/block/BeehiveBlock.java @@ -51,7 +51,7 @@ import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -105,11 +105,9 @@ public class BeehiveBlock extends BaseEntityBlock { } @Override - protected void onExplosionHit( - BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer biConsumer - ) { - super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer); - this.angerNearbyBees(serverLevel, blockPos); + protected void onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer dropConsumer) { + super.onExplosionHit(state, level, pos, explosion, dropConsumer); + this.angerNearbyBees(level, pos); } private void angerNearbyBees(Level level, BlockPos pos) { @@ -136,29 +134,29 @@ public class BeehiveBlock extends BaseEntityBlock { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - int i = (Integer)blockState.getValue(HONEY_LEVEL); + int i = (Integer)state.getValue(HONEY_LEVEL); boolean bl = false; if (i >= 5) { - Item item = itemStack.getItem(); - if (itemStack.is(Items.SHEARS)) { + Item item = stack.getItem(); + if (stack.is(Items.SHEARS)) { level.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BEEHIVE_SHEAR, SoundSource.BLOCKS, 1.0F, 1.0F); - dropHoneycomb(level, blockPos); - itemStack.hurtAndBreak(1, player, LivingEntity.getSlotForHand(interactionHand)); + dropHoneycomb(level, pos); + stack.hurtAndBreak(1, player, LivingEntity.getSlotForHand(hand)); bl = true; - level.gameEvent(player, GameEvent.SHEAR, blockPos); - } else if (itemStack.is(Items.GLASS_BOTTLE)) { - itemStack.shrink(1); + level.gameEvent(player, GameEvent.SHEAR, pos); + } else if (stack.is(Items.GLASS_BOTTLE)) { + stack.shrink(1); level.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.BLOCKS, 1.0F, 1.0F); - if (itemStack.isEmpty()) { - player.setItemInHand(interactionHand, new ItemStack(Items.HONEY_BOTTLE)); + if (stack.isEmpty()) { + player.setItemInHand(hand, new ItemStack(Items.HONEY_BOTTLE)); } else if (!player.getInventory().add(new ItemStack(Items.HONEY_BOTTLE))) { player.drop(new ItemStack(Items.HONEY_BOTTLE), false); } bl = true; - level.gameEvent(player, GameEvent.FLUID_PICKUP, blockPos); + level.gameEvent(player, GameEvent.FLUID_PICKUP, pos); } if (!level.isClientSide() && bl) { @@ -167,19 +165,19 @@ public class BeehiveBlock extends BaseEntityBlock { } if (bl) { - if (!CampfireBlock.isSmokeyPos(level, blockPos)) { - if (this.hiveContainsBees(level, blockPos)) { - this.angerNearbyBees(level, blockPos); + if (!CampfireBlock.isSmokeyPos(level, pos)) { + if (this.hiveContainsBees(level, pos)) { + this.angerNearbyBees(level, pos); } - this.releaseBeesAndResetHoneyLevel(level, blockState, blockPos, player, BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY); + this.releaseBeesAndResetHoneyLevel(level, state, pos, player, BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY); } else { - this.resetHoneyLevel(level, blockState, blockPos); + this.resetHoneyLevel(level, state, pos); } return InteractionResult.SUCCESS; } else { - return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult); + return super.useItemOn(stack, state, level, pos, player, hand, hitResult); } } @@ -253,7 +251,7 @@ public class BeehiveBlock extends BaseEntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(HONEY_LEVEL, FACING); } @@ -314,21 +312,20 @@ public class BeehiveBlock extends BaseEntityBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (levelReader.getBlockState(blockPos2).getBlock() instanceof FireBlock - && levelReader.getBlockEntity(blockPos) instanceof BeehiveBlockEntity beehiveBlockEntity) { - beehiveBlockEntity.emptyAllLivingFromHive(null, blockState, BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY); + if (level.getBlockState(neighborPos).getBlock() instanceof FireBlock && level.getBlockEntity(pos) instanceof BeehiveBlockEntity beehiveBlockEntity) { + beehiveBlockEntity.emptyAllLivingFromHive(null, state, BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/BellBlock.java b/net/minecraft/world/level/block/BellBlock.java index 88832db7..c7a6180d 100644 --- a/net/minecraft/world/level/block/BellBlock.java +++ b/net/minecraft/world/level/block/BellBlock.java @@ -26,7 +26,7 @@ import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BellAttachType; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; @@ -70,14 +70,14 @@ public class BellBlock extends BaseEntityBlock { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - boolean bl2 = level.hasNeighborSignal(blockPos); - if (bl2 != (Boolean)blockState.getValue(POWERED)) { - if (bl2) { - this.attemptToRing(level, blockPos, null); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + boolean bl = level.hasNeighborSignal(pos); + if (bl != (Boolean)state.getValue(POWERED)) { + if (bl) { + this.attemptToRing(level, pos, null); } - level.setBlock(blockPos, blockState.setValue(POWERED, bl2), 3); + level.setBlock(pos, state.setValue(POWERED, bl), 3); } } @@ -224,45 +224,43 @@ public class BellBlock extends BaseEntityBlock { } @Override - protected void onExplosionHit( - BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer biConsumer - ) { + protected void onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer dropConsumer) { if (explosion.canTriggerBlocks()) { - this.attemptToRing(serverLevel, blockPos, null); + this.attemptToRing(level, pos, null); } - super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer); + super.onExplosionHit(state, level, pos, explosion, dropConsumer); } @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - BellAttachType bellAttachType = blockState.getValue(ATTACHMENT); - Direction direction2 = getConnectedDirection(blockState).getOpposite(); - if (direction2 == direction && !blockState.canSurvive(levelReader, blockPos) && bellAttachType != BellAttachType.DOUBLE_WALL) { + BellAttachType bellAttachType = state.getValue(ATTACHMENT); + Direction direction2 = getConnectedDirection(state).getOpposite(); + if (direction2 == direction && !state.canSurvive(level, pos) && bellAttachType != BellAttachType.DOUBLE_WALL) { return Blocks.AIR.defaultBlockState(); } else { - if (direction.getAxis() == ((Direction)blockState.getValue(FACING)).getAxis()) { - if (bellAttachType == BellAttachType.DOUBLE_WALL && !blockState2.isFaceSturdy(levelReader, blockPos2, direction)) { - return blockState.setValue(ATTACHMENT, BellAttachType.SINGLE_WALL).setValue(FACING, direction.getOpposite()); + if (direction.getAxis() == ((Direction)state.getValue(FACING)).getAxis()) { + if (bellAttachType == BellAttachType.DOUBLE_WALL && !neighborState.isFaceSturdy(level, neighborPos, direction)) { + return state.setValue(ATTACHMENT, BellAttachType.SINGLE_WALL).setValue(FACING, direction.getOpposite()); } if (bellAttachType == BellAttachType.SINGLE_WALL && direction2.getOpposite() == direction - && blockState2.isFaceSturdy(levelReader, blockPos2, blockState.getValue(FACING))) { - return blockState.setValue(ATTACHMENT, BellAttachType.DOUBLE_WALL); + && neighborState.isFaceSturdy(level, neighborPos, state.getValue(FACING))) { + return state.setValue(ATTACHMENT, BellAttachType.DOUBLE_WALL); } } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } } @@ -286,7 +284,7 @@ public class BellBlock extends BaseEntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, ATTACHMENT, POWERED); } diff --git a/net/minecraft/world/level/block/BigDripleafBlock.java b/net/minecraft/world/level/block/BigDripleafBlock.java index 25a4f143..c3767be8 100644 --- a/net/minecraft/world/level/block/BigDripleafBlock.java +++ b/net/minecraft/world/level/block/BigDripleafBlock.java @@ -26,7 +26,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -148,25 +148,25 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction == Direction.DOWN && !blockState.canSurvive(levelReader, blockPos)) { + if (direction == Direction.DOWN && !state.canSurvive(level, pos)) { return Blocks.AIR.defaultBlockState(); } else { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return direction == Direction.UP && blockState2.is(this) - ? Blocks.BIG_DRIPLEAF_STEM.withPropertiesOf(blockState) - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return direction == Direction.UP && neighborState.is(this) + ? Blocks.BIG_DRIPLEAF_STEM.withPropertiesOf(state) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } } @@ -218,9 +218,9 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - if (level.hasNeighborSignal(blockPos)) { - resetTilt(blockState, level, blockPos); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + if (level.hasNeighborSignal(pos)) { + resetTilt(state, level, pos); } } @@ -281,7 +281,7 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(WATERLOGGED, FACING, TILT); } } diff --git a/net/minecraft/world/level/block/BigDripleafStemBlock.java b/net/minecraft/world/level/block/BigDripleafStemBlock.java index 003765a8..063197eb 100644 --- a/net/minecraft/world/level/block/BigDripleafStemBlock.java +++ b/net/minecraft/world/level/block/BigDripleafStemBlock.java @@ -16,7 +16,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; @@ -59,7 +59,7 @@ public class BigDripleafStemBlock extends HorizontalDirectionalBlock implements } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(WATERLOGGED, FACING); } @@ -86,24 +86,24 @@ public class BigDripleafStemBlock extends HorizontalDirectionalBlock implements @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((direction == Direction.DOWN || direction == Direction.UP) && !blockState.canSurvive(levelReader, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + if ((direction == Direction.DOWN || direction == Direction.UP) && !state.canSurvive(level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 1); } - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/Block.java b/net/minecraft/world/level/block/Block.java index 5a25e77e..125efd2d 100644 --- a/net/minecraft/world/level/block/Block.java +++ b/net/minecraft/world/level/block/Block.java @@ -13,8 +13,8 @@ import java.util.function.Supplier; import net.minecraft.SharedConstants; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.Holder; import net.minecraft.core.IdMapper; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; @@ -49,6 +49,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.gameevent.GameEvent; import net.minecraft.world.level.gameevent.GameEvent.Context; @@ -64,7 +65,7 @@ import org.slf4j.Logger; public class Block extends BlockBehaviour implements ItemLike { public static final MapCodec CODEC = simpleCodec(Block::new); private static final Logger LOGGER = LogUtils.getLogger(); - private final Holder.Reference builtInRegistryHolder = BuiltInRegistries.BLOCK.createIntrusiveHolder(this); + private final Reference builtInRegistryHolder = BuiltInRegistries.BLOCK.createIntrusiveHolder(this); public static final IdMapper BLOCK_STATE_REGISTRY = new IdMapper<>(); private static final LoadingCache SHAPE_FULL_BLOCK_CACHE = CacheBuilder.newBuilder() .maximumSize(512L) @@ -181,7 +182,7 @@ public class Block extends BlockBehaviour implements ItemLike { public Block(BlockBehaviour.Properties properties) { super(properties); - StateDefinition.Builder builder = new StateDefinition.Builder<>(this); + Builder builder = new Builder<>(this); this.createBlockStateDefinition(builder); this.stateDefinition = builder.create(Block::defaultBlockState, BlockState::new); this.registerDefaultState(this.stateDefinition.any()); @@ -203,16 +204,16 @@ public class Block extends BlockBehaviour implements ItemLike { || state.is(BlockTags.SHULKER_BOXES); } - public static boolean shouldRenderFace(BlockState blockState, BlockState blockState2, Direction direction) { - VoxelShape voxelShape = blockState2.getFaceOcclusionShape(direction.getOpposite()); + public static boolean shouldRenderFace(BlockState currentFace, BlockState neighboringFace, Direction face) { + VoxelShape voxelShape = neighboringFace.getFaceOcclusionShape(face.getOpposite()); if (voxelShape == Shapes.block()) { return false; - } else if (blockState.skipRendering(blockState2, direction)) { + } else if (currentFace.skipRendering(neighboringFace, face)) { return false; } else if (voxelShape == Shapes.empty()) { return true; } else { - VoxelShape voxelShape2 = blockState.getFaceOcclusionShape(direction); + VoxelShape voxelShape2 = currentFace.getFaceOcclusionShape(face); if (voxelShape2 == Shapes.empty()) { return true; } else { @@ -365,7 +366,7 @@ public class Block extends BlockBehaviour implements ItemLike { return this.explosionResistance; } - public void wasExploded(ServerLevel serverLevel, BlockPos blockPos, Explosion explosion) { + public void wasExploded(ServerLevel level, BlockPos pos, Explosion explosion) { } public void stepOn(Level level, BlockPos pos, BlockState state, Entity entity) { @@ -403,7 +404,7 @@ public class Block extends BlockBehaviour implements ItemLike { entity.causeFallDamage(fallDistance, 1.0F, entity.damageSources().fall()); } - public void updateEntityMovementAfterFallOn(BlockGetter blockGetter, Entity entity) { + public void updateEntityMovementAfterFallOn(BlockGetter level, Entity entity) { entity.setDeltaMovement(entity.getDeltaMovement().multiply(1.0, 0.0, 1.0)); } @@ -447,7 +448,7 @@ public class Block extends BlockBehaviour implements ItemLike { return true; } - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { } public StateDefinition getStateDefinition() { @@ -514,7 +515,7 @@ public class Block extends BlockBehaviour implements ItemLike { } @Deprecated - public Holder.Reference builtInRegistryHolder() { + public Reference builtInRegistryHolder() { return this.builtInRegistryHolder; } diff --git a/net/minecraft/world/level/block/Blocks.java b/net/minecraft/world/level/block/Blocks.java index c58e6008..55824a67 100644 --- a/net/minecraft/world/level/block/Blocks.java +++ b/net/minecraft/world/level/block/Blocks.java @@ -6364,24 +6364,24 @@ public class Blocks { return blockState -> blockState.getValue(BlockStateProperties.WATERLOGGED) ? MapColor.WATER : unwaterloggedMapColor; } - private static Boolean never(BlockState state, BlockGetter blockGetter, BlockPos pos, EntityType entity) { + private static Boolean never(BlockState state, BlockGetter level, BlockPos pos, EntityType entity) { return false; } - private static Boolean always(BlockState state, BlockGetter blockGetter, BlockPos pos, EntityType entity) { + private static Boolean always(BlockState state, BlockGetter level, BlockPos pos, EntityType entity) { return true; } - private static Boolean ocelotOrParrot(BlockState state, BlockGetter blockGetter, BlockPos pos, EntityType entity) { + private static Boolean ocelotOrParrot(BlockState state, BlockGetter level, BlockPos pos, EntityType entity) { return entity == EntityType.OCELOT || entity == EntityType.PARROT; } - private static Block registerBed(String string, DyeColor dyeColor) { + private static Block registerBed(String name, DyeColor color) { return register( - string, - properties -> new BedBlock(dyeColor, properties), + name, + properties -> new BedBlock(color, properties), BlockBehaviour.Properties.of() - .mapColor(blockState -> blockState.getValue(BedBlock.PART) == BedPart.FOOT ? dyeColor.getMapColor() : MapColor.WOOL) + .mapColor(blockState -> blockState.getValue(BedBlock.PART) == BedPart.FOOT ? color.getMapColor() : MapColor.WOOL) .sound(SoundType.WOOD) .strength(0.2F) .noOcclusion() @@ -6390,17 +6390,17 @@ public class Blocks { ); } - private static BlockBehaviour.Properties logProperties(MapColor mapColor, MapColor mapColor2, SoundType soundType) { + private static BlockBehaviour.Properties logProperties(MapColor sideColor, MapColor topColor, SoundType sound) { return BlockBehaviour.Properties.of() - .mapColor(blockState -> blockState.getValue(RotatedPillarBlock.AXIS) == Direction.Axis.Y ? mapColor : mapColor2) + .mapColor(blockState -> blockState.getValue(RotatedPillarBlock.AXIS) == Direction.Axis.Y ? sideColor : topColor) .instrument(NoteBlockInstrument.BASS) .strength(2.0F) - .sound(soundType) + .sound(sound) .ignitedByLava(); } - private static BlockBehaviour.Properties netherStemProperties(MapColor mapColor) { - return BlockBehaviour.Properties.of().mapColor(blockState -> mapColor).instrument(NoteBlockInstrument.BASS).strength(2.0F).sound(SoundType.STEM); + private static BlockBehaviour.Properties netherStemProperties(MapColor color) { + return BlockBehaviour.Properties.of().mapColor(blockState -> color).instrument(NoteBlockInstrument.BASS).strength(2.0F).sound(SoundType.STEM); } private static boolean always(BlockState state, BlockGetter blockGetter, BlockPos pos) { @@ -6411,12 +6411,12 @@ public class Blocks { return false; } - private static Block registerStainedGlass(String string, DyeColor dyeColor) { + private static Block registerStainedGlass(String name, DyeColor color) { return register( - string, - properties -> new StainedGlassBlock(dyeColor, properties), + name, + properties -> new StainedGlassBlock(color, properties), BlockBehaviour.Properties.of() - .mapColor(dyeColor) + .mapColor(color) .instrument(NoteBlockInstrument.HAT) .strength(0.3F) .sound(SoundType.GLASS) @@ -6428,12 +6428,12 @@ public class Blocks { ); } - private static BlockBehaviour.Properties leavesProperties(SoundType soundType) { + private static BlockBehaviour.Properties leavesProperties(SoundType sound) { return BlockBehaviour.Properties.of() .mapColor(MapColor.PLANT) .strength(0.2F) .randomTicks() - .sound(soundType) + .sound(sound) .noOcclusion() .isValidSpawn(Blocks::ocelotOrParrot) .isSuffocating(Blocks::never) @@ -6484,26 +6484,26 @@ public class Blocks { } @Deprecated - private static Block registerLegacyStair(String string, Block block) { - return register(string, properties -> new StairBlock(block.defaultBlockState(), properties), BlockBehaviour.Properties.ofLegacyCopy(block)); + private static Block registerLegacyStair(String name, Block baseBlock) { + return register(name, properties -> new StairBlock(baseBlock.defaultBlockState(), properties), BlockBehaviour.Properties.ofLegacyCopy(baseBlock)); } - private static Block registerStair(String string, Block block) { - return register(string, properties -> new StairBlock(block.defaultBlockState(), properties), BlockBehaviour.Properties.ofFullCopy(block)); + private static Block registerStair(String name, Block baseBlock) { + return register(name, properties -> new StairBlock(baseBlock.defaultBlockState(), properties), BlockBehaviour.Properties.ofFullCopy(baseBlock)); } - private static BlockBehaviour.Properties wallVariant(Block block, boolean bl) { - BlockBehaviour.Properties properties = block.properties(); - BlockBehaviour.Properties properties2 = BlockBehaviour.Properties.of().overrideLootTable(block.getLootTable()); - if (bl) { - properties2 = properties2.overrideDescription(block.getDescriptionId()); + private static BlockBehaviour.Properties wallVariant(Block baseBlock, boolean overrideDescription) { + BlockBehaviour.Properties properties = baseBlock.properties(); + BlockBehaviour.Properties properties2 = BlockBehaviour.Properties.of().overrideLootTable(baseBlock.getLootTable()); + if (overrideDescription) { + properties2 = properties2.overrideDescription(baseBlock.getDescriptionId()); } return properties2; } - private static Block register(ResourceKey resourceKey, Function function, BlockBehaviour.Properties properties) { - Block block = (Block)function.apply(properties.setId(resourceKey)); + private static Block register(ResourceKey resourceKey, Function factory, BlockBehaviour.Properties properties) { + Block block = (Block)factory.apply(properties.setId(resourceKey)); return Registry.register(BuiltInRegistries.BLOCK, resourceKey, block); } @@ -6511,16 +6511,16 @@ public class Blocks { return register(resourceKey, Block::new, properties); } - private static ResourceKey vanillaBlockId(String string) { - return ResourceKey.create(Registries.BLOCK, ResourceLocation.withDefaultNamespace(string)); + private static ResourceKey vanillaBlockId(String name) { + return ResourceKey.create(Registries.BLOCK, ResourceLocation.withDefaultNamespace(name)); } - private static Block register(String string, Function function, BlockBehaviour.Properties properties) { - return register(vanillaBlockId(string), function, properties); + private static Block register(String name, Function factory, BlockBehaviour.Properties properties) { + return register(vanillaBlockId(name), factory, properties); } - private static Block register(String string, BlockBehaviour.Properties properties) { - return register(string, Block::new, properties); + private static Block register(String name, BlockBehaviour.Properties properties) { + return register(name, Block::new, properties); } static { diff --git a/net/minecraft/world/level/block/BonemealableFeaturePlacerBlock.java b/net/minecraft/world/level/block/BonemealableFeaturePlacerBlock.java index 4ae62c81..486559f2 100644 --- a/net/minecraft/world/level/block/BonemealableFeaturePlacerBlock.java +++ b/net/minecraft/world/level/block/BonemealableFeaturePlacerBlock.java @@ -29,9 +29,9 @@ public class BonemealableFeaturePlacerBlock extends Block implements Bonemealabl return CODEC; } - public BonemealableFeaturePlacerBlock(ResourceKey> resourceKey, BlockBehaviour.Properties properties) { + public BonemealableFeaturePlacerBlock(ResourceKey> feature, BlockBehaviour.Properties properties) { super(properties); - this.feature = resourceKey; + this.feature = feature; } @Override diff --git a/net/minecraft/world/level/block/BrushableBlock.java b/net/minecraft/world/level/block/BrushableBlock.java index c9859bdd..02e0bc9d 100644 --- a/net/minecraft/world/level/block/BrushableBlock.java +++ b/net/minecraft/world/level/block/BrushableBlock.java @@ -18,7 +18,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BrushableBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.gameevent.GameEvent; @@ -55,7 +55,7 @@ public class BrushableBlock extends BaseEntityBlock implements Fallable { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(DUSTED); } @@ -71,17 +71,17 @@ public class BrushableBlock extends BaseEntityBlock implements Fallable { @Override public BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - scheduledTickAccess.scheduleTick(blockPos, this, 2); - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + scheduledTickAccess.scheduleTick(pos, this, 2); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/BubbleColumnBlock.java b/net/minecraft/world/level/block/BubbleColumnBlock.java index 6fbc52ff..09670fb4 100644 --- a/net/minecraft/world/level/block/BubbleColumnBlock.java +++ b/net/minecraft/world/level/block/BubbleColumnBlock.java @@ -21,7 +21,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; @@ -138,23 +138,23 @@ public class BubbleColumnBlock extends Block implements BucketPickup { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); - if (!blockState.canSurvive(levelReader, blockPos) + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); + if (!state.canSurvive(level, pos) || direction == Direction.DOWN - || direction == Direction.UP && !blockState2.is(Blocks.BUBBLE_COLUMN) && canExistIn(blockState2)) { - scheduledTickAccess.scheduleTick(blockPos, this, 5); + || direction == Direction.UP && !neighborState.is(Blocks.BUBBLE_COLUMN) && canExistIn(neighborState)) { + scheduledTickAccess.scheduleTick(pos, this, 5); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -174,7 +174,7 @@ public class BubbleColumnBlock extends Block implements BucketPickup { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(DRAG_DOWN); } diff --git a/net/minecraft/world/level/block/BushBlock.java b/net/minecraft/world/level/block/BushBlock.java index 940c4af0..c4e496dd 100644 --- a/net/minecraft/world/level/block/BushBlock.java +++ b/net/minecraft/world/level/block/BushBlock.java @@ -26,18 +26,18 @@ public abstract class BushBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return !blockState.canSurvive(levelReader, blockPos) + return !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -47,8 +47,8 @@ public abstract class BushBlock extends Block { } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { - return blockState.getFluidState().isEmpty(); + protected boolean propagatesSkylightDown(BlockState state) { + return state.getFluidState().isEmpty(); } @Override diff --git a/net/minecraft/world/level/block/ButtonBlock.java b/net/minecraft/world/level/block/ButtonBlock.java index 03a8806a..ad200d29 100644 --- a/net/minecraft/world/level/block/ButtonBlock.java +++ b/net/minecraft/world/level/block/ButtonBlock.java @@ -21,7 +21,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.AttachFace; import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.block.state.properties.BlockStateProperties; @@ -118,14 +118,12 @@ public class ButtonBlock extends FaceAttachedHorizontalDirectionalBlock { } @Override - protected void onExplosionHit( - BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer biConsumer - ) { - if (explosion.canTriggerBlocks() && !(Boolean)blockState.getValue(POWERED)) { - this.press(blockState, serverLevel, blockPos, null); + protected void onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer dropConsumer) { + if (explosion.canTriggerBlocks() && !(Boolean)state.getValue(POWERED)) { + this.press(state, level, pos, null); } - super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer); + super.onExplosionHit(state, level, pos, explosion, dropConsumer); } public void press(BlockState state, Level level, BlockPos pos, @Nullable Player player) { @@ -212,7 +210,7 @@ public class ButtonBlock extends FaceAttachedHorizontalDirectionalBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, POWERED, FACE); } } diff --git a/net/minecraft/world/level/block/CactusBlock.java b/net/minecraft/world/level/block/CactusBlock.java index a6f993b5..3a1362bc 100644 --- a/net/minecraft/world/level/block/CactusBlock.java +++ b/net/minecraft/world/level/block/CactusBlock.java @@ -14,7 +14,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.pathfinder.PathComputationType; @@ -82,20 +82,20 @@ public class CactusBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (!blockState.canSurvive(levelReader, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + if (!state.canSurvive(level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 1); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -117,7 +117,7 @@ public class CactusBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AGE); } diff --git a/net/minecraft/world/level/block/CakeBlock.java b/net/minecraft/world/level/block/CakeBlock.java index ed01ef44..62bf11ed 100644 --- a/net/minecraft/world/level/block/CakeBlock.java +++ b/net/minecraft/world/level/block/CakeBlock.java @@ -20,7 +20,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.gameevent.GameEvent; @@ -63,14 +63,14 @@ public class CakeBlock extends Block { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - Item item = itemStack.getItem(); - if (itemStack.is(ItemTags.CANDLES) && (Integer)blockState.getValue(BITES) == 0 && Block.byItem(item) instanceof CandleBlock candleBlock) { - itemStack.consume(1, player); - level.playSound(null, blockPos, SoundEvents.CAKE_ADD_CANDLE, SoundSource.BLOCKS, 1.0F, 1.0F); - level.setBlockAndUpdate(blockPos, CandleCakeBlock.byCandle(candleBlock)); - level.gameEvent(player, GameEvent.BLOCK_CHANGE, blockPos); + Item item = stack.getItem(); + if (stack.is(ItemTags.CANDLES) && (Integer)state.getValue(BITES) == 0 && Block.byItem(item) instanceof CandleBlock candleBlock) { + stack.consume(1, player); + level.playSound(null, pos, SoundEvents.CAKE_ADD_CANDLE, SoundSource.BLOCKS, 1.0F, 1.0F); + level.setBlockAndUpdate(pos, CandleCakeBlock.byCandle(candleBlock)); + level.gameEvent(player, GameEvent.BLOCK_CHANGE, pos); player.awardStat(Stats.ITEM_USED.get(item)); return InteractionResult.SUCCESS; } else { @@ -114,18 +114,18 @@ public class CakeBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction == Direction.DOWN && !blockState.canSurvive(levelReader, blockPos) + return direction == Direction.DOWN && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -134,7 +134,7 @@ public class CakeBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(BITES); } diff --git a/net/minecraft/world/level/block/CalibratedSculkSensorBlock.java b/net/minecraft/world/level/block/CalibratedSculkSensorBlock.java index eef13fc8..5b96db9e 100644 --- a/net/minecraft/world/level/block/CalibratedSculkSensorBlock.java +++ b/net/minecraft/world/level/block/CalibratedSculkSensorBlock.java @@ -12,7 +12,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.CalibratedSculkSensorBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.gameevent.vibrations.VibrationSystem.Ticker; @@ -64,7 +64,7 @@ public class CalibratedSculkSensorBlock extends SculkSensorBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { super.createBlockStateDefinition(builder); builder.add(FACING); } diff --git a/net/minecraft/world/level/block/CampfireBlock.java b/net/minecraft/world/level/block/CampfireBlock.java index da73d3f6..199e70c1 100644 --- a/net/minecraft/world/level/block/CampfireBlock.java +++ b/net/minecraft/world/level/block/CampfireBlock.java @@ -38,7 +38,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.CampfireBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -88,12 +88,12 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - if (level.getBlockEntity(blockPos) instanceof CampfireBlockEntity campfireBlockEntity) { - ItemStack itemStack2 = player.getItemInHand(interactionHand); - if (level.recipeAccess().propertySet(RecipePropertySet.CAMPFIRE_INPUT).test(itemStack2)) { - if (level instanceof ServerLevel serverLevel && campfireBlockEntity.placeFood(serverLevel, player, itemStack2)) { + if (level.getBlockEntity(pos) instanceof CampfireBlockEntity campfireBlockEntity) { + ItemStack itemStack = player.getItemInHand(hand); + if (level.recipeAccess().propertySet(RecipePropertySet.CAMPFIRE_INPUT).test(itemStack)) { + if (level instanceof ServerLevel serverLevel && campfireBlockEntity.placeFood(serverLevel, player, itemStack)) { player.awardStat(Stats.INTERACT_WITH_CAMPFIRE); return InteractionResult.SUCCESS_SERVER; } @@ -141,22 +141,22 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } return direction == Direction.DOWN - ? blockState.setValue(SIGNAL_FIRE, this.isSmokeSource(blockState2)) - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + ? state.setValue(SIGNAL_FIRE, this.isSmokeSource(neighborState)) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } /** @@ -311,7 +311,7 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(LIT, SIGNAL_FIRE, WATERLOGGED, FACING); } diff --git a/net/minecraft/world/level/block/CandleBlock.java b/net/minecraft/world/level/block/CandleBlock.java index f626e16e..0535f28a 100644 --- a/net/minecraft/world/level/block/CandleBlock.java +++ b/net/minecraft/world/level/block/CandleBlock.java @@ -24,7 +24,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -69,13 +69,13 @@ public class CandleBlock extends AbstractCandleBlock implements SimpleWaterlogge @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - if (itemStack.isEmpty() && player.getAbilities().mayBuild && (Boolean)blockState.getValue(LIT)) { - extinguish(player, blockState, level, blockPos); + if (stack.isEmpty() && player.getAbilities().mayBuild && (Boolean)state.getValue(LIT)) { + extinguish(player, state, level, pos); return InteractionResult.SUCCESS; } else { - return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult); + return super.useItemOn(stack, state, level, pos, player, hand, hitResult); } } @@ -100,20 +100,20 @@ public class CandleBlock extends AbstractCandleBlock implements SimpleWaterlogge @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -137,7 +137,7 @@ public class CandleBlock extends AbstractCandleBlock implements SimpleWaterlogge } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(CANDLES, LIT, WATERLOGGED); } diff --git a/net/minecraft/world/level/block/CandleCakeBlock.java b/net/minecraft/world/level/block/CandleCakeBlock.java index dad0950a..4c8f4394 100644 --- a/net/minecraft/world/level/block/CandleCakeBlock.java +++ b/net/minecraft/world/level/block/CandleCakeBlock.java @@ -21,7 +21,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.pathfinder.PathComputationType; import net.minecraft.world.phys.BlockHitResult; @@ -74,15 +74,15 @@ public class CandleCakeBlock extends AbstractCandleBlock { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - if (itemStack.is(Items.FLINT_AND_STEEL) || itemStack.is(Items.FIRE_CHARGE)) { + if (stack.is(Items.FLINT_AND_STEEL) || stack.is(Items.FIRE_CHARGE)) { return InteractionResult.PASS; - } else if (candleHit(blockHitResult) && itemStack.isEmpty() && (Boolean)blockState.getValue(LIT)) { - extinguish(player, blockState, level, blockPos); + } else if (candleHit(hitResult) && stack.isEmpty() && (Boolean)state.getValue(LIT)) { + extinguish(player, state, level, pos); return InteractionResult.SUCCESS; } else { - return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult); + return super.useItemOn(stack, state, level, pos, player, hand, hitResult); } } @@ -101,7 +101,7 @@ public class CandleCakeBlock extends AbstractCandleBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(LIT); } @@ -112,18 +112,18 @@ public class CandleCakeBlock extends AbstractCandleBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction == Direction.DOWN && !blockState.canSurvive(levelReader, blockPos) + return direction == Direction.DOWN && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/CarpetBlock.java b/net/minecraft/world/level/block/CarpetBlock.java index f81272a0..18dc539b 100644 --- a/net/minecraft/world/level/block/CarpetBlock.java +++ b/net/minecraft/world/level/block/CarpetBlock.java @@ -32,18 +32,18 @@ public class CarpetBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return !blockState.canSurvive(levelReader, blockPos) + return !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/CaveVinesBlock.java b/net/minecraft/world/level/block/CaveVinesBlock.java index 576e37a1..d75d04c5 100644 --- a/net/minecraft/world/level/block/CaveVinesBlock.java +++ b/net/minecraft/world/level/block/CaveVinesBlock.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.phys.BlockHitResult; public class CaveVinesBlock extends GrowingPlantHeadBlock implements CaveVines { @@ -66,7 +66,7 @@ public class CaveVinesBlock extends GrowingPlantHeadBlock implements CaveVines { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { super.createBlockStateDefinition(builder); builder.add(BERRIES); } diff --git a/net/minecraft/world/level/block/CaveVinesPlantBlock.java b/net/minecraft/world/level/block/CaveVinesPlantBlock.java index a5a6ac23..a911abf0 100644 --- a/net/minecraft/world/level/block/CaveVinesPlantBlock.java +++ b/net/minecraft/world/level/block/CaveVinesPlantBlock.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.phys.BlockHitResult; public class CaveVinesPlantBlock extends GrowingPlantBodyBlock implements CaveVines { @@ -50,7 +50,7 @@ public class CaveVinesPlantBlock extends GrowingPlantBodyBlock implements CaveVi } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(BERRIES); } diff --git a/net/minecraft/world/level/block/CeilingHangingSignBlock.java b/net/minecraft/world/level/block/CeilingHangingSignBlock.java index 917ca894..89ccf8ad 100644 --- a/net/minecraft/world/level/block/CeilingHangingSignBlock.java +++ b/net/minecraft/world/level/block/CeilingHangingSignBlock.java @@ -27,7 +27,7 @@ import net.minecraft.world.level.block.entity.HangingSignBlockEntity; import net.minecraft.world.level.block.entity.SignBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -73,12 +73,12 @@ public class CeilingHangingSignBlock extends SignBlock { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - return (InteractionResult)(level.getBlockEntity(blockPos) instanceof SignBlockEntity signBlockEntity - && this.shouldTryToChainAnotherHangingSign(player, blockHitResult, signBlockEntity, itemStack) + return (InteractionResult)(level.getBlockEntity(pos) instanceof SignBlockEntity signBlockEntity + && this.shouldTryToChainAnotherHangingSign(player, hitResult, signBlockEntity, stack) ? InteractionResult.PASS - : super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult)); + : super.useItemOn(stack, state, level, pos, player, hand, hitResult)); } private boolean shouldTryToChainAnotherHangingSign(Player player, BlockHitResult hitResult, SignBlockEntity sign, ItemStack stack) { @@ -132,18 +132,18 @@ public class CeilingHangingSignBlock extends SignBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction == Direction.UP && !this.canSurvive(blockState, levelReader, blockPos) + return direction == Direction.UP && !this.canSurvive(state, level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -162,7 +162,7 @@ public class CeilingHangingSignBlock extends SignBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(ROTATION, ATTACHED, WATERLOGGED); } diff --git a/net/minecraft/world/level/block/ChainBlock.java b/net/minecraft/world/level/block/ChainBlock.java index dcb5cb00..15c501a0 100644 --- a/net/minecraft/world/level/block/ChainBlock.java +++ b/net/minecraft/world/level/block/ChainBlock.java @@ -10,7 +10,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; @@ -62,24 +62,24 @@ public class ChainBlock extends RotatedPillarBlock implements SimpleWaterloggedB @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(WATERLOGGED).add(AXIS); } diff --git a/net/minecraft/world/level/block/ChestBlock.java b/net/minecraft/world/level/block/ChestBlock.java index 2641f555..8df3400d 100644 --- a/net/minecraft/world/level/block/ChestBlock.java +++ b/net/minecraft/world/level/block/ChestBlock.java @@ -36,7 +36,7 @@ import net.minecraft.world.level.block.entity.ChestBlockEntity; import net.minecraft.world.level.block.entity.LidBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.ChestType; @@ -96,8 +96,8 @@ public class ChestBlock extends AbstractChestBlock implements return CODEC; } - protected ChestBlock(Supplier> supplier, BlockBehaviour.Properties properties) { - super(properties, supplier); + protected ChestBlock(Supplier> blockEntityType, BlockBehaviour.Properties properties) { + super(properties, blockEntityType); this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(TYPE, ChestType.SINGLE).setValue(WATERLOGGED, false)); } @@ -117,32 +117,32 @@ public class ChestBlock extends AbstractChestBlock implements @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - if (blockState2.is(this) && direction.getAxis().isHorizontal()) { - ChestType chestType = blockState2.getValue(TYPE); - if (blockState.getValue(TYPE) == ChestType.SINGLE + if (neighborState.is(this) && direction.getAxis().isHorizontal()) { + ChestType chestType = neighborState.getValue(TYPE); + if (state.getValue(TYPE) == ChestType.SINGLE && chestType != ChestType.SINGLE - && blockState.getValue(FACING) == blockState2.getValue(FACING) - && getConnectedDirection(blockState2) == direction.getOpposite()) { - return blockState.setValue(TYPE, chestType.getOpposite()); + && state.getValue(FACING) == neighborState.getValue(FACING) + && getConnectedDirection(neighborState) == direction.getOpposite()) { + return state.setValue(TYPE, chestType.getOpposite()); } - } else if (getConnectedDirection(blockState) == direction) { - return blockState.setValue(TYPE, ChestType.SINGLE); + } else if (getConnectedDirection(state) == direction) { + return state.setValue(TYPE, ChestType.SINGLE); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -339,7 +339,7 @@ public class ChestBlock extends AbstractChestBlock implements } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, TYPE, WATERLOGGED); } diff --git a/net/minecraft/world/level/block/ChiseledBookShelfBlock.java b/net/minecraft/world/level/block/ChiseledBookShelfBlock.java index 2b1ffa3b..653f04e3 100644 --- a/net/minecraft/world/level/block/ChiseledBookShelfBlock.java +++ b/net/minecraft/world/level/block/ChiseledBookShelfBlock.java @@ -23,7 +23,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.ChiseledBookShelfBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.Property; @@ -69,19 +69,19 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - if (level.getBlockEntity(blockPos) instanceof ChiseledBookShelfBlockEntity chiseledBookShelfBlockEntity) { - if (!itemStack.is(ItemTags.BOOKSHELF_BOOKS)) { + if (level.getBlockEntity(pos) instanceof ChiseledBookShelfBlockEntity chiseledBookShelfBlockEntity) { + if (!stack.is(ItemTags.BOOKSHELF_BOOKS)) { return InteractionResult.TRY_WITH_EMPTY_HAND; } else { - OptionalInt optionalInt = this.getHitSlot(blockHitResult, blockState); + OptionalInt optionalInt = this.getHitSlot(hitResult, state); if (optionalInt.isEmpty()) { return InteractionResult.PASS; - } else if ((Boolean)blockState.getValue((Property)SLOT_OCCUPIED_PROPERTIES.get(optionalInt.getAsInt()))) { + } else if ((Boolean)state.getValue((Property)SLOT_OCCUPIED_PROPERTIES.get(optionalInt.getAsInt()))) { return InteractionResult.TRY_WITH_EMPTY_HAND; } else { - addBook(level, blockPos, player, chiseledBookShelfBlockEntity, itemStack, optionalInt.getAsInt()); + addBook(level, pos, player, chiseledBookShelfBlockEntity, stack, optionalInt.getAsInt()); return InteractionResult.SUCCESS; } } @@ -176,7 +176,7 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(HorizontalDirectionalBlock.FACING); SLOT_OCCUPIED_PROPERTIES.forEach(property -> builder.add(property)); } diff --git a/net/minecraft/world/level/block/ChorusFlowerBlock.java b/net/minecraft/world/level/block/ChorusFlowerBlock.java index 97986a6e..5eede083 100644 --- a/net/minecraft/world/level/block/ChorusFlowerBlock.java +++ b/net/minecraft/world/level/block/ChorusFlowerBlock.java @@ -15,7 +15,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.phys.BlockHitResult; @@ -147,20 +147,20 @@ public class ChorusFlowerBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction != Direction.UP && !blockState.canSurvive(levelReader, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + if (direction != Direction.UP && !state.canSurvive(level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 1); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -193,7 +193,7 @@ public class ChorusFlowerBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AGE); } diff --git a/net/minecraft/world/level/block/ChorusPlantBlock.java b/net/minecraft/world/level/block/ChorusPlantBlock.java index 3ab3f7c1..2bad9e77 100644 --- a/net/minecraft/world/level/block/ChorusPlantBlock.java +++ b/net/minecraft/world/level/block/ChorusPlantBlock.java @@ -11,7 +11,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.pathfinder.PathComputationType; @@ -60,21 +60,21 @@ public class ChorusPlantBlock extends PipeBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (!blockState.canSurvive(levelReader, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + if (!state.canSurvive(level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 1); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } else { - boolean bl = blockState2.is(this) || blockState2.is(Blocks.CHORUS_FLOWER) || direction == Direction.DOWN && blockState2.is(Blocks.END_STONE); - return blockState.setValue((Property)PROPERTY_BY_DIRECTION.get(direction), bl); + boolean bl = neighborState.is(this) || neighborState.is(Blocks.CHORUS_FLOWER) || direction == Direction.DOWN && neighborState.is(Blocks.END_STONE); + return state.setValue((Property)PROPERTY_BY_DIRECTION.get(direction), bl); } } @@ -109,7 +109,7 @@ public class ChorusPlantBlock extends PipeBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(NORTH, EAST, SOUTH, WEST, UP, DOWN); } diff --git a/net/minecraft/world/level/block/CocoaBlock.java b/net/minecraft/world/level/block/CocoaBlock.java index e43f9dd1..70a5820a 100644 --- a/net/minecraft/world/level/block/CocoaBlock.java +++ b/net/minecraft/world/level/block/CocoaBlock.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.pathfinder.PathComputationType; @@ -115,18 +115,18 @@ public class CocoaBlock extends HorizontalDirectionalBlock implements Bonemealab @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction == blockState.getValue(FACING) && !blockState.canSurvive(levelReader, blockPos) + return direction == state.getValue(FACING) && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -145,7 +145,7 @@ public class CocoaBlock extends HorizontalDirectionalBlock implements Bonemealab } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, AGE); } diff --git a/net/minecraft/world/level/block/CommandBlock.java b/net/minecraft/world/level/block/CommandBlock.java index 7879f554..36c2afad 100644 --- a/net/minecraft/world/level/block/CommandBlock.java +++ b/net/minecraft/world/level/block/CommandBlock.java @@ -22,7 +22,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.CommandBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -60,25 +60,25 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { if (!level.isClientSide) { - if (level.getBlockEntity(blockPos) instanceof CommandBlockEntity commandBlockEntity) { - this.setPoweredAndUpdate(level, blockPos, commandBlockEntity, level.hasNeighborSignal(blockPos)); + if (level.getBlockEntity(pos) instanceof CommandBlockEntity commandBlockEntity) { + this.setPoweredAndUpdate(level, pos, commandBlockEntity, level.hasNeighborSignal(pos)); } } } - private void setPoweredAndUpdate(Level level, BlockPos blockPos, CommandBlockEntity commandBlockEntity, boolean bl) { - boolean bl2 = commandBlockEntity.isPowered(); - if (bl != bl2) { - commandBlockEntity.setPowered(bl); - if (bl) { - if (commandBlockEntity.isAutomatic() || commandBlockEntity.getMode() == CommandBlockEntity.Mode.SEQUENCE) { + private void setPoweredAndUpdate(Level level, BlockPos pos, CommandBlockEntity blockEntity, boolean powered) { + boolean bl = blockEntity.isPowered(); + if (powered != bl) { + blockEntity.setPowered(powered); + if (powered) { + if (blockEntity.isAutomatic() || blockEntity.getMode() == CommandBlockEntity.Mode.SEQUENCE) { return; } - commandBlockEntity.markConditionMet(); - level.scheduleTick(blockPos, this, 1); + blockEntity.markConditionMet(); + level.scheduleTick(pos, this, 1); } } } @@ -113,14 +113,14 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock { } } - private void execute(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, BaseCommandBlock baseCommandBlock, boolean bl) { - if (bl) { - baseCommandBlock.performCommand(serverLevel); + private void execute(BlockState state, ServerLevel level, BlockPos pos, BaseCommandBlock logic, boolean canTrigger) { + if (canTrigger) { + logic.performCommand(level); } else { - baseCommandBlock.setSuccessCount(0); + logic.setSuccessCount(0); } - executeChain(serverLevel, blockPos, blockState.getValue(FACING)); + executeChain(level, pos, state.getValue(FACING)); } @Override @@ -177,7 +177,7 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, CONDITIONAL); } @@ -186,17 +186,17 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock { return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite()); } - private static void executeChain(ServerLevel serverLevel, BlockPos blockPos, Direction direction) { - BlockPos.MutableBlockPos mutableBlockPos = blockPos.mutable(); - GameRules gameRules = serverLevel.getGameRules(); + private static void executeChain(ServerLevel level, BlockPos pos, Direction direction) { + BlockPos.MutableBlockPos mutableBlockPos = pos.mutable(); + GameRules gameRules = level.getGameRules(); int i = gameRules.getInt(GameRules.RULE_MAX_COMMAND_CHAIN_LENGTH); while (i-- > 0) { mutableBlockPos.move(direction); - BlockState blockState = serverLevel.getBlockState(mutableBlockPos); + BlockState blockState = level.getBlockState(mutableBlockPos); Block block = blockState.getBlock(); if (!blockState.is(Blocks.CHAIN_COMMAND_BLOCK) - || !(serverLevel.getBlockEntity(mutableBlockPos) instanceof CommandBlockEntity commandBlockEntity) + || !(level.getBlockEntity(mutableBlockPos) instanceof CommandBlockEntity commandBlockEntity) || commandBlockEntity.getMode() != CommandBlockEntity.Mode.SEQUENCE) { break; } @@ -204,11 +204,11 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock { if (commandBlockEntity.isPowered() || commandBlockEntity.isAutomatic()) { BaseCommandBlock baseCommandBlock = commandBlockEntity.getCommandBlock(); if (commandBlockEntity.markConditionMet()) { - if (!baseCommandBlock.performCommand(serverLevel)) { + if (!baseCommandBlock.performCommand(level)) { break; } - serverLevel.updateNeighbourForOutputSignal(mutableBlockPos, block); + level.updateNeighbourForOutputSignal(mutableBlockPos, block); } else if (commandBlockEntity.isConditional()) { baseCommandBlock.setSuccessCount(0); } diff --git a/net/minecraft/world/level/block/ComparatorBlock.java b/net/minecraft/world/level/block/ComparatorBlock.java index ff47aefb..b7f18fab 100644 --- a/net/minecraft/world/level/block/ComparatorBlock.java +++ b/net/minecraft/world/level/block/ComparatorBlock.java @@ -19,7 +19,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.ComparatorBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.ComparatorMode; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -49,18 +49,18 @@ public class ComparatorBlock extends DiodeBlock implements EntityBlock { @Override public BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction == Direction.DOWN && !this.canSurviveOn(levelReader, blockPos2, blockState2) + return direction == Direction.DOWN && !this.canSurviveOn(level, neighborPos, neighborState) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -195,7 +195,7 @@ public class ComparatorBlock extends DiodeBlock implements EntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, MODE, POWERED); } } diff --git a/net/minecraft/world/level/block/ComposterBlock.java b/net/minecraft/world/level/block/ComposterBlock.java index 91084313..1a9dca78 100644 --- a/net/minecraft/world/level/block/ComposterBlock.java +++ b/net/minecraft/world/level/block/ComposterBlock.java @@ -28,7 +28,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.gameevent.GameEvent; @@ -236,20 +236,20 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - int i = (Integer)blockState.getValue(LEVEL); - if (i < 8 && COMPOSTABLES.containsKey(itemStack.getItem())) { + int i = (Integer)state.getValue(LEVEL); + if (i < 8 && COMPOSTABLES.containsKey(stack.getItem())) { if (i < 7 && !level.isClientSide) { - BlockState blockState2 = addItem(player, blockState, level, blockPos, itemStack); - level.levelEvent(1500, blockPos, blockState != blockState2 ? 1 : 0); - player.awardStat(Stats.ITEM_USED.get(itemStack.getItem())); - itemStack.consume(1, player); + BlockState blockState = addItem(player, state, level, pos, stack); + level.levelEvent(1500, pos, state != blockState ? 1 : 0); + player.awardStat(Stats.ITEM_USED.get(stack.getItem())); + stack.consume(1, player); } return InteractionResult.SUCCESS; } else { - return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult); + return super.useItemOn(stack, state, level, pos, player, hand, hitResult); } } @@ -332,7 +332,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(LEVEL); } diff --git a/net/minecraft/world/level/block/ConcretePowderBlock.java b/net/minecraft/world/level/block/ConcretePowderBlock.java index 6812816a..9ec9d75f 100644 --- a/net/minecraft/world/level/block/ConcretePowderBlock.java +++ b/net/minecraft/world/level/block/ConcretePowderBlock.java @@ -79,18 +79,18 @@ public class ConcretePowderBlock extends FallingBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return touchesLiquid(levelReader, blockPos) + return touchesLiquid(level, pos) ? this.concrete.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/ConduitBlock.java b/net/minecraft/world/level/block/ConduitBlock.java index 300d075e..4f791ecc 100644 --- a/net/minecraft/world/level/block/ConduitBlock.java +++ b/net/minecraft/world/level/block/ConduitBlock.java @@ -16,7 +16,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.ConduitBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; @@ -43,7 +43,7 @@ public class ConduitBlock extends BaseEntityBlock implements SimpleWaterloggedBl } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(WATERLOGGED); } @@ -70,20 +70,20 @@ public class ConduitBlock extends BaseEntityBlock implements SimpleWaterloggedBl @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/CopperBulbBlock.java b/net/minecraft/world/level/block/CopperBulbBlock.java index d8319e2e..95733d43 100644 --- a/net/minecraft/world/level/block/CopperBulbBlock.java +++ b/net/minecraft/world/level/block/CopperBulbBlock.java @@ -8,7 +8,7 @@ import net.minecraft.sounds.SoundSource; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.redstone.Orientation; @@ -37,9 +37,9 @@ public class CopperBulbBlock extends Block { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { if (level instanceof ServerLevel serverLevel) { - this.checkAndFlip(blockState, serverLevel, blockPos); + this.checkAndFlip(state, serverLevel, pos); } } @@ -57,7 +57,7 @@ public class CopperBulbBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(LIT, POWERED); } diff --git a/net/minecraft/world/level/block/CoralBlock.java b/net/minecraft/world/level/block/CoralBlock.java index 40cee6d4..ca683cfc 100644 --- a/net/minecraft/world/level/block/CoralBlock.java +++ b/net/minecraft/world/level/block/CoralBlock.java @@ -43,20 +43,20 @@ public class CoralBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (!this.scanForWater(levelReader, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 60 + randomSource.nextInt(40)); + if (!this.scanForWater(level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 60 + random.nextInt(40)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } protected boolean scanForWater(BlockGetter level, BlockPos pos) { diff --git a/net/minecraft/world/level/block/CoralFanBlock.java b/net/minecraft/world/level/block/CoralFanBlock.java index 0f77c973..792d2545 100644 --- a/net/minecraft/world/level/block/CoralFanBlock.java +++ b/net/minecraft/world/level/block/CoralFanBlock.java @@ -44,24 +44,24 @@ public class CoralFanBlock extends BaseCoralFanBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction == Direction.DOWN && !blockState.canSurvive(levelReader, blockPos)) { + if (direction == Direction.DOWN && !state.canSurvive(level, pos)) { return Blocks.AIR.defaultBlockState(); } else { - this.tryScheduleDieTick(blockState, levelReader, scheduledTickAccess, randomSource, blockPos); - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + this.tryScheduleDieTick(state, level, scheduledTickAccess, random, pos); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } } } diff --git a/net/minecraft/world/level/block/CoralPlantBlock.java b/net/minecraft/world/level/block/CoralPlantBlock.java index 0f6d747b..f146e563 100644 --- a/net/minecraft/world/level/block/CoralPlantBlock.java +++ b/net/minecraft/world/level/block/CoralPlantBlock.java @@ -49,24 +49,24 @@ public class CoralPlantBlock extends BaseCoralPlantTypeBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction == Direction.DOWN && !blockState.canSurvive(levelReader, blockPos)) { + if (direction == Direction.DOWN && !state.canSurvive(level, pos)) { return Blocks.AIR.defaultBlockState(); } else { - this.tryScheduleDieTick(blockState, levelReader, scheduledTickAccess, randomSource, blockPos); - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + this.tryScheduleDieTick(state, level, scheduledTickAccess, random, pos); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } } diff --git a/net/minecraft/world/level/block/CoralWallFanBlock.java b/net/minecraft/world/level/block/CoralWallFanBlock.java index 8d03d490..a3f50539 100644 --- a/net/minecraft/world/level/block/CoralWallFanBlock.java +++ b/net/minecraft/world/level/block/CoralWallFanBlock.java @@ -44,24 +44,24 @@ public class CoralWallFanBlock extends BaseCoralWallFanBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction.getOpposite() == blockState.getValue(FACING) && !blockState.canSurvive(levelReader, blockPos)) { + if (direction.getOpposite() == state.getValue(FACING) && !state.canSurvive(level, pos)) { return Blocks.AIR.defaultBlockState(); } else { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - this.tryScheduleDieTick(blockState, levelReader, scheduledTickAccess, randomSource, blockPos); - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + this.tryScheduleDieTick(state, level, scheduledTickAccess, random, pos); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } } } diff --git a/net/minecraft/world/level/block/CrafterBlock.java b/net/minecraft/world/level/block/CrafterBlock.java index 3094895f..e09e6225 100644 --- a/net/minecraft/world/level/block/CrafterBlock.java +++ b/net/minecraft/world/level/block/CrafterBlock.java @@ -29,7 +29,7 @@ import net.minecraft.world.level.block.entity.CrafterBlockEntity; import net.minecraft.world.level.block.entity.HopperBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -70,16 +70,16 @@ public class CrafterBlock extends BaseEntityBlock { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - boolean bl2 = level.hasNeighborSignal(blockPos); - boolean bl3 = (Boolean)blockState.getValue(TRIGGERED); - BlockEntity blockEntity = level.getBlockEntity(blockPos); - if (bl2 && !bl3) { - level.scheduleTick(blockPos, this, 4); - level.setBlock(blockPos, blockState.setValue(TRIGGERED, true), 2); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + boolean bl = level.hasNeighborSignal(pos); + boolean bl2 = (Boolean)state.getValue(TRIGGERED); + BlockEntity blockEntity = level.getBlockEntity(pos); + if (bl && !bl2) { + level.scheduleTick(pos, this, 4); + level.setBlock(pos, state.setValue(TRIGGERED, true), 2); this.setBlockEntityTriggered(blockEntity, true); - } else if (!bl2 && bl3) { - level.setBlock(blockPos, blockState.setValue(TRIGGERED, false).setValue(CRAFTING, false), 2); + } else if (!bl && bl2) { + level.setBlock(pos, state.setValue(TRIGGERED, false).setValue(CRAFTING, false), 2); this.setBlockEntityTriggered(blockEntity, false); } } @@ -178,8 +178,8 @@ public class CrafterBlock extends BaseEntityBlock { } } - public static Optional> getPotentialResults(ServerLevel serverLevel, CraftingInput craftingInput) { - return RECIPE_CACHE.get(serverLevel, craftingInput); + public static Optional> getPotentialResults(ServerLevel level, CraftingInput craftingInput) { + return RECIPE_CACHE.get(level, craftingInput); } private void dispenseItem(ServerLevel level, BlockPos pos, CrafterBlockEntity crafter, ItemStack stack, BlockState state, RecipeHolder recipe) { @@ -236,7 +236,7 @@ public class CrafterBlock extends BaseEntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(ORIENTATION, TRIGGERED, CRAFTING); } } diff --git a/net/minecraft/world/level/block/CreakingHeartBlock.java b/net/minecraft/world/level/block/CreakingHeartBlock.java index e19ace71..d41edcfb 100644 --- a/net/minecraft/world/level/block/CreakingHeartBlock.java +++ b/net/minecraft/world/level/block/CreakingHeartBlock.java @@ -20,7 +20,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.CreakingHeartBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.Property; @@ -75,33 +75,33 @@ public class CreakingHeartBlock extends BaseEntityBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - BlockState blockState3 = super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); - return updateState(blockState3, levelReader, blockPos); + BlockState blockState = super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); + return updateState(blockState, level, pos); } - private static BlockState updateState(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { - boolean bl = hasRequiredLogs(blockState, levelReader, blockPos); - CreakingHeartBlock.CreakingHeartState creakingHeartState = blockState.getValue(CREAKING); + private static BlockState updateState(BlockState state, LevelReader level, BlockPos pos) { + boolean bl = hasRequiredLogs(state, level, pos); + CreakingHeartBlock.CreakingHeartState creakingHeartState = state.getValue(CREAKING); return bl && creakingHeartState == CreakingHeartBlock.CreakingHeartState.DISABLED - ? blockState.setValue(CREAKING, CreakingHeartBlock.CreakingHeartState.DORMANT) - : blockState; + ? state.setValue(CREAKING, CreakingHeartBlock.CreakingHeartState.DORMANT) + : state; } - public static boolean hasRequiredLogs(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { - Direction.Axis axis = blockState.getValue(AXIS); + public static boolean hasRequiredLogs(BlockState state, LevelReader level, BlockPos pos) { + Direction.Axis axis = state.getValue(AXIS); for (Direction direction : axis.getDirections()) { - BlockState blockState2 = levelReader.getBlockState(blockPos.relative(direction)); - if (!blockState2.is(BlockTags.PALE_OAK_LOGS) || blockState2.getValue(AXIS) != axis) { + BlockState blockState = level.getBlockState(pos.relative(direction)); + if (!blockState.is(BlockTags.PALE_OAK_LOGS) || blockState.getValue(AXIS) != axis) { return false; } } @@ -109,10 +109,10 @@ public class CreakingHeartBlock extends BaseEntityBlock { return true; } - private static boolean isSurroundedByLogs(LevelAccessor levelAccessor, BlockPos blockPos) { + private static boolean isSurroundedByLogs(LevelAccessor level, BlockPos pos) { for (Direction direction : Direction.values()) { - BlockPos blockPos2 = blockPos.relative(direction); - BlockState blockState = levelAccessor.getBlockState(blockPos2); + BlockPos blockPos = pos.relative(direction); + BlockState blockState = level.getBlockState(blockPos); if (!blockState.is(BlockTags.PALE_OAK_LOGS)) { return false; } @@ -138,7 +138,7 @@ public class CreakingHeartBlock extends BaseEntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AXIS, CREAKING); } @@ -181,8 +181,8 @@ public class CreakingHeartBlock extends BaseEntityBlock { private final String name; - private CreakingHeartState(final String string2) { - this.name = string2; + private CreakingHeartState(final String name) { + this.name = name; } @Override diff --git a/net/minecraft/world/level/block/CropBlock.java b/net/minecraft/world/level/block/CropBlock.java index 3a6ccaa8..5758b125 100644 --- a/net/minecraft/world/level/block/CropBlock.java +++ b/net/minecraft/world/level/block/CropBlock.java @@ -16,7 +16,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.phys.shapes.CollisionContext; @@ -196,7 +196,7 @@ public class CropBlock extends BushBlock implements BonemealableBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AGE); } } diff --git a/net/minecraft/world/level/block/CrossCollisionBlock.java b/net/minecraft/world/level/block/CrossCollisionBlock.java index 04801200..a6ae3596 100644 --- a/net/minecraft/world/level/block/CrossCollisionBlock.java +++ b/net/minecraft/world/level/block/CrossCollisionBlock.java @@ -88,8 +88,8 @@ public abstract class CrossCollisionBlock extends Block implements SimpleWaterlo } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { - return !(Boolean)blockState.getValue(WATERLOGGED); + protected boolean propagatesSkylightDown(BlockState state) { + return !(Boolean)state.getValue(WATERLOGGED); } @Override diff --git a/net/minecraft/world/level/block/DecoratedPotBlock.java b/net/minecraft/world/level/block/DecoratedPotBlock.java index 3c10ea99..5da4f0fc 100644 --- a/net/minecraft/world/level/block/DecoratedPotBlock.java +++ b/net/minecraft/world/level/block/DecoratedPotBlock.java @@ -40,7 +40,7 @@ import net.minecraft.world.level.block.entity.DecoratedPotBlockEntity; import net.minecraft.world.level.block.entity.PotDecorations; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -75,20 +75,20 @@ public class DecoratedPotBlock extends BaseEntityBlock implements SimpleWaterlog @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -102,34 +102,35 @@ public class DecoratedPotBlock extends BaseEntityBlock implements SimpleWaterlog @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - if (level.getBlockEntity(blockPos) instanceof DecoratedPotBlockEntity decoratedPotBlockEntity) { + if (level.getBlockEntity(pos) instanceof DecoratedPotBlockEntity decoratedPotBlockEntity) { if (level.isClientSide) { return InteractionResult.SUCCESS; } else { - ItemStack itemStack2 = decoratedPotBlockEntity.getTheItem(); - if (!itemStack.isEmpty() - && (itemStack2.isEmpty() || ItemStack.isSameItemSameComponents(itemStack2, itemStack) && itemStack2.getCount() < itemStack2.getMaxStackSize())) { + ItemStack itemStack = decoratedPotBlockEntity.getTheItem(); + if (!stack.isEmpty() && (itemStack.isEmpty() || ItemStack.isSameItemSameComponents(itemStack, stack) && itemStack.getCount() < itemStack.getMaxStackSize()) + ) + { decoratedPotBlockEntity.wobble(DecoratedPotBlockEntity.WobbleStyle.POSITIVE); - player.awardStat(Stats.ITEM_USED.get(itemStack.getItem())); - ItemStack itemStack3 = itemStack.consumeAndReturn(1, player); + player.awardStat(Stats.ITEM_USED.get(stack.getItem())); + ItemStack itemStack2 = stack.consumeAndReturn(1, player); float f; if (decoratedPotBlockEntity.isEmpty()) { - decoratedPotBlockEntity.setTheItem(itemStack3); - f = (float)itemStack3.getCount() / itemStack3.getMaxStackSize(); - } else { - itemStack2.grow(1); + decoratedPotBlockEntity.setTheItem(itemStack2); f = (float)itemStack2.getCount() / itemStack2.getMaxStackSize(); + } else { + itemStack.grow(1); + f = (float)itemStack.getCount() / itemStack.getMaxStackSize(); } - level.playSound(null, blockPos, SoundEvents.DECORATED_POT_INSERT, SoundSource.BLOCKS, 1.0F, 0.7F + 0.5F * f); + level.playSound(null, pos, SoundEvents.DECORATED_POT_INSERT, SoundSource.BLOCKS, 1.0F, 0.7F + 0.5F * f); if (level instanceof ServerLevel serverLevel) { - serverLevel.sendParticles(ParticleTypes.DUST_PLUME, blockPos.getX() + 0.5, blockPos.getY() + 1.2, blockPos.getZ() + 0.5, 7, 0.0, 0.0, 0.0, 0.0); + serverLevel.sendParticles(ParticleTypes.DUST_PLUME, pos.getX() + 0.5, pos.getY() + 1.2, pos.getZ() + 0.5, 7, 0.0, 0.0, 0.0, 0.0); } decoratedPotBlockEntity.setChanged(); - level.gameEvent(player, GameEvent.BLOCK_CHANGE, blockPos); + level.gameEvent(player, GameEvent.BLOCK_CHANGE, pos); return InteractionResult.SUCCESS; } else { return InteractionResult.TRY_WITH_EMPTY_HAND; @@ -163,7 +164,7 @@ public class DecoratedPotBlock extends BaseEntityBlock implements SimpleWaterlog } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(HORIZONTAL_FACING, WATERLOGGED, CRACKED); } diff --git a/net/minecraft/world/level/block/DetectorRailBlock.java b/net/minecraft/world/level/block/DetectorRailBlock.java index 84133ad3..5e7f7dbe 100644 --- a/net/minecraft/world/level/block/DetectorRailBlock.java +++ b/net/minecraft/world/level/block/DetectorRailBlock.java @@ -17,7 +17,7 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -283,7 +283,7 @@ public class DetectorRailBlock extends BaseRailBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(SHAPE, POWERED, WATERLOGGED); } } diff --git a/net/minecraft/world/level/block/DiodeBlock.java b/net/minecraft/world/level/block/DiodeBlock.java index 06c7a548..59f8346b 100644 --- a/net/minecraft/world/level/block/DiodeBlock.java +++ b/net/minecraft/world/level/block/DiodeBlock.java @@ -81,16 +81,16 @@ public abstract class DiodeBlock extends HorizontalDirectionalBlock { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - if (blockState.canSurvive(level, blockPos)) { - this.checkTickOnNeighbor(level, blockPos, blockState); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + if (state.canSurvive(level, pos)) { + this.checkTickOnNeighbor(level, pos, state); } else { - BlockEntity blockEntity = blockState.hasBlockEntity() ? level.getBlockEntity(blockPos) : null; - dropResources(blockState, level, blockPos, blockEntity); - level.removeBlock(blockPos, false); + BlockEntity blockEntity = state.hasBlockEntity() ? level.getBlockEntity(pos) : null; + dropResources(state, level, pos, blockEntity); + level.removeBlock(pos, false); for (Direction direction : Direction.values()) { - level.updateNeighborsAt(blockPos.relative(direction), this); + level.updateNeighborsAt(pos.relative(direction), this); } } } diff --git a/net/minecraft/world/level/block/DirtPathBlock.java b/net/minecraft/world/level/block/DirtPathBlock.java index 35d37921..20fe49a8 100644 --- a/net/minecraft/world/level/block/DirtPathBlock.java +++ b/net/minecraft/world/level/block/DirtPathBlock.java @@ -42,20 +42,20 @@ public class DirtPathBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction == Direction.UP && !blockState.canSurvive(levelReader, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + if (direction == Direction.UP && !state.canSurvive(level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 1); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/DispenserBlock.java b/net/minecraft/world/level/block/DispenserBlock.java index 8eff399d..46811a5c 100644 --- a/net/minecraft/world/level/block/DispenserBlock.java +++ b/net/minecraft/world/level/block/DispenserBlock.java @@ -31,7 +31,7 @@ import net.minecraft.world.level.block.entity.DispenserBlockEntity; import net.minecraft.world.level.block.entity.DropperBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -112,19 +112,19 @@ public class DispenserBlock extends BaseEntityBlock { } } - private static DispenseItemBehavior getDefaultDispenseMethod(ItemStack itemStack) { - return (DispenseItemBehavior)(itemStack.has(DataComponents.EQUIPPABLE) ? EquipmentDispenseItemBehavior.INSTANCE : DEFAULT_BEHAVIOR); + private static DispenseItemBehavior getDefaultDispenseMethod(ItemStack stack) { + return (DispenseItemBehavior)(stack.has(DataComponents.EQUIPPABLE) ? EquipmentDispenseItemBehavior.INSTANCE : DEFAULT_BEHAVIOR); } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - boolean bl2 = level.hasNeighborSignal(blockPos) || level.hasNeighborSignal(blockPos.above()); - boolean bl3 = (Boolean)blockState.getValue(TRIGGERED); - if (bl2 && !bl3) { - level.scheduleTick(blockPos, this, 4); - level.setBlock(blockPos, blockState.setValue(TRIGGERED, true), 2); - } else if (!bl2 && bl3) { - level.setBlock(blockPos, blockState.setValue(TRIGGERED, false), 2); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + boolean bl = level.hasNeighborSignal(pos) || level.hasNeighborSignal(pos.above()); + boolean bl2 = (Boolean)state.getValue(TRIGGERED); + if (bl && !bl2) { + level.scheduleTick(pos, this, 4); + level.setBlock(pos, state.setValue(TRIGGERED, true), 2); + } else if (!bl && bl2) { + level.setBlock(pos, state.setValue(TRIGGERED, false), 2); } } @@ -185,7 +185,7 @@ public class DispenserBlock extends BaseEntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, TRIGGERED); } } diff --git a/net/minecraft/world/level/block/DoorBlock.java b/net/minecraft/world/level/block/DoorBlock.java index a516757c..be1d615c 100644 --- a/net/minecraft/world/level/block/DoorBlock.java +++ b/net/minecraft/world/level/block/DoorBlock.java @@ -22,7 +22,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; @@ -93,39 +93,34 @@ public class DoorBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - DoubleBlockHalf doubleBlockHalf = blockState.getValue(HALF); + DoubleBlockHalf doubleBlockHalf = state.getValue(HALF); if (direction.getAxis() != Direction.Axis.Y || doubleBlockHalf == DoubleBlockHalf.LOWER != (direction == Direction.UP)) { - return doubleBlockHalf == DoubleBlockHalf.LOWER && direction == Direction.DOWN && !blockState.canSurvive(levelReader, blockPos) + return doubleBlockHalf == DoubleBlockHalf.LOWER && direction == Direction.DOWN && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } else { - return blockState2.getBlock() instanceof DoorBlock && blockState2.getValue(HALF) != doubleBlockHalf - ? blockState2.setValue(HALF, doubleBlockHalf) + return neighborState.getBlock() instanceof DoorBlock && neighborState.getValue(HALF) != doubleBlockHalf + ? neighborState.setValue(HALF, doubleBlockHalf) : Blocks.AIR.defaultBlockState(); } } @Override - protected void onExplosionHit( - BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer biConsumer - ) { - if (explosion.canTriggerBlocks() - && blockState.getValue(HALF) == DoubleBlockHalf.LOWER - && this.type.canOpenByWindCharge() - && !(Boolean)blockState.getValue(POWERED)) { - this.setOpen(null, serverLevel, blockState, blockPos, !this.isOpen(blockState)); + protected void onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer dropConsumer) { + if (explosion.canTriggerBlocks() && state.getValue(HALF) == DoubleBlockHalf.LOWER && this.type.canOpenByWindCharge() && !(Boolean)state.getValue(POWERED)) { + this.setOpen(null, level, state, pos, !this.isOpen(state)); } - super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer); + super.onExplosionHit(state, level, pos, explosion, dropConsumer); } @Override @@ -231,16 +226,16 @@ public class DoorBlock extends Block { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - boolean bl2 = level.hasNeighborSignal(blockPos) - || level.hasNeighborSignal(blockPos.relative(blockState.getValue(HALF) == DoubleBlockHalf.LOWER ? Direction.UP : Direction.DOWN)); - if (!this.defaultBlockState().is(block) && bl2 != (Boolean)blockState.getValue(POWERED)) { - if (bl2 != (Boolean)blockState.getValue(OPEN)) { - this.playSound(null, level, blockPos, bl2); - level.gameEvent(null, bl2 ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, blockPos); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + boolean bl = level.hasNeighborSignal(pos) + || level.hasNeighborSignal(pos.relative(state.getValue(HALF) == DoubleBlockHalf.LOWER ? Direction.UP : Direction.DOWN)); + if (!this.defaultBlockState().is(neighborBlock) && bl != (Boolean)state.getValue(POWERED)) { + if (bl != (Boolean)state.getValue(OPEN)) { + this.playSound(null, level, pos, bl); + level.gameEvent(null, bl ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, pos); } - level.setBlock(blockPos, blockState.setValue(POWERED, bl2).setValue(OPEN, bl2), 2); + level.setBlock(pos, state.setValue(POWERED, bl).setValue(OPEN, bl), 2); } } @@ -271,7 +266,7 @@ public class DoorBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(HALF, FACING, OPEN, HINGE, POWERED); } diff --git a/net/minecraft/world/level/block/DoubleBlockCombiner.java b/net/minecraft/world/level/block/DoubleBlockCombiner.java index 6a695567..c237a955 100644 --- a/net/minecraft/world/level/block/DoubleBlockCombiner.java +++ b/net/minecraft/world/level/block/DoubleBlockCombiner.java @@ -15,36 +15,38 @@ import net.minecraft.world.level.block.state.properties.Property; public class DoubleBlockCombiner { public static DoubleBlockCombiner.NeighborCombineResult combineWithNeigbour( BlockEntityType blockEntityType, - Function function, - Function function2, - Property property, - BlockState blockState, - LevelAccessor levelAccessor, - BlockPos blockPos, - BiPredicate biPredicate + Function doubleBlockTypeGetter, + Function directionGetter, + Property directionProperty, + BlockState state, + LevelAccessor level, + BlockPos pos, + BiPredicate blockedChestTest ) { - S blockEntity = blockEntityType.getBlockEntity(levelAccessor, blockPos); + S blockEntity = blockEntityType.getBlockEntity(level, pos); if (blockEntity == null) { return DoubleBlockCombiner.Combiner::acceptNone; - } else if (biPredicate.test(levelAccessor, blockPos)) { + } else if (blockedChestTest.test(level, pos)) { return DoubleBlockCombiner.Combiner::acceptNone; } else { - DoubleBlockCombiner.BlockType blockType = (DoubleBlockCombiner.BlockType)function.apply(blockState); + DoubleBlockCombiner.BlockType blockType = (DoubleBlockCombiner.BlockType)doubleBlockTypeGetter.apply(state); boolean bl = blockType == DoubleBlockCombiner.BlockType.SINGLE; boolean bl2 = blockType == DoubleBlockCombiner.BlockType.FIRST; if (bl) { return new Single(blockEntity); } else { - BlockPos blockPos2 = blockPos.relative((Direction)function2.apply(blockState)); - BlockState blockState2 = levelAccessor.getBlockState(blockPos2); - if (blockState2.is(blockState.getBlock())) { - DoubleBlockCombiner.BlockType blockType2 = (DoubleBlockCombiner.BlockType)function.apply(blockState2); - if (blockType2 != DoubleBlockCombiner.BlockType.SINGLE && blockType != blockType2 && blockState2.getValue(property) == blockState.getValue(property)) { - if (biPredicate.test(levelAccessor, blockPos2)) { + BlockPos blockPos = pos.relative((Direction)directionGetter.apply(state)); + BlockState blockState = level.getBlockState(blockPos); + if (blockState.is(state.getBlock())) { + DoubleBlockCombiner.BlockType blockType2 = (DoubleBlockCombiner.BlockType)doubleBlockTypeGetter.apply(blockState); + if (blockType2 != DoubleBlockCombiner.BlockType.SINGLE + && blockType != blockType2 + && blockState.getValue(directionProperty) == state.getValue(directionProperty)) { + if (blockedChestTest.test(level, blockPos)) { return DoubleBlockCombiner.Combiner::acceptNone; } - S blockEntity2 = blockEntityType.getBlockEntity(levelAccessor, blockPos2); + S blockEntity2 = blockEntityType.getBlockEntity(level, blockPos); if (blockEntity2 != null) { S blockEntity3 = bl2 ? blockEntity : blockEntity2; S blockEntity4 = bl2 ? blockEntity2 : blockEntity; diff --git a/net/minecraft/world/level/block/DoublePlantBlock.java b/net/minecraft/world/level/block/DoublePlantBlock.java index 0ac685d0..89109c28 100644 --- a/net/minecraft/world/level/block/DoublePlantBlock.java +++ b/net/minecraft/world/level/block/DoublePlantBlock.java @@ -16,7 +16,7 @@ import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -39,22 +39,22 @@ public class DoublePlantBlock extends BushBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - DoubleBlockHalf doubleBlockHalf = blockState.getValue(HALF); + DoubleBlockHalf doubleBlockHalf = state.getValue(HALF); if (direction.getAxis() != Direction.Axis.Y || doubleBlockHalf == DoubleBlockHalf.LOWER != (direction == Direction.UP) - || blockState2.is(this) && blockState2.getValue(HALF) != doubleBlockHalf) { - return doubleBlockHalf == DoubleBlockHalf.LOWER && direction == Direction.DOWN && !blockState.canSurvive(levelReader, blockPos) + || neighborState.is(this) && neighborState.getValue(HALF) != doubleBlockHalf) { + return doubleBlockHalf == DoubleBlockHalf.LOWER && direction == Direction.DOWN && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } else { return Blocks.AIR.defaultBlockState(); } @@ -126,7 +126,7 @@ public class DoublePlantBlock extends BushBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(HALF); } diff --git a/net/minecraft/world/level/block/EndGatewayBlock.java b/net/minecraft/world/level/block/EndGatewayBlock.java index 98340a32..885fe8ef 100644 --- a/net/minecraft/world/level/block/EndGatewayBlock.java +++ b/net/minecraft/world/level/block/EndGatewayBlock.java @@ -98,17 +98,15 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal { @Nullable @Override - public TeleportTransition getPortalDestination(ServerLevel serverLevel, Entity entity, BlockPos blockPos) { - if (serverLevel.getBlockEntity(blockPos) instanceof TheEndGatewayBlockEntity theEndGatewayBlockEntity) { - Vec3 vec3 = theEndGatewayBlockEntity.getPortalPosition(serverLevel, blockPos); + public TeleportTransition getPortalDestination(ServerLevel level, Entity entity, BlockPos pos) { + if (level.getBlockEntity(pos) instanceof TheEndGatewayBlockEntity theEndGatewayBlockEntity) { + Vec3 vec3 = theEndGatewayBlockEntity.getPortalPosition(level, pos); if (vec3 == null) { return null; } else { return entity instanceof ThrownEnderpearl - ? new TeleportTransition(serverLevel, vec3, Vec3.ZERO, 0.0F, 0.0F, Set.of(), TeleportTransition.PLACE_PORTAL_TICKET) - : new TeleportTransition( - serverLevel, vec3, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), TeleportTransition.PLACE_PORTAL_TICKET - ); + ? new TeleportTransition(level, vec3, Vec3.ZERO, 0.0F, 0.0F, Set.of(), TeleportTransition.PLACE_PORTAL_TICKET) + : new TeleportTransition(level, vec3, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), TeleportTransition.PLACE_PORTAL_TICKET); } } else { return null; diff --git a/net/minecraft/world/level/block/EndPortalBlock.java b/net/minecraft/world/level/block/EndPortalBlock.java index 1b8796ed..93afc52b 100644 --- a/net/minecraft/world/level/block/EndPortalBlock.java +++ b/net/minecraft/world/level/block/EndPortalBlock.java @@ -50,8 +50,8 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { } @Override - protected VoxelShape getEntityInsideCollisionShape(BlockState blockState, Level level, BlockPos blockPos) { - return blockState.getShape(level, blockPos); + protected VoxelShape getEntityInsideCollisionShape(BlockState state, Level level, BlockPos pos) { + return state.getShape(level, pos); } @Override @@ -66,19 +66,19 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { } @Override - public TeleportTransition getPortalDestination(ServerLevel serverLevel, Entity entity, BlockPos blockPos) { - ResourceKey resourceKey = serverLevel.dimension() == Level.END ? Level.OVERWORLD : Level.END; - ServerLevel serverLevel2 = serverLevel.getServer().getLevel(resourceKey); - if (serverLevel2 == null) { + public TeleportTransition getPortalDestination(ServerLevel level, Entity entity, BlockPos pos) { + ResourceKey resourceKey = level.dimension() == Level.END ? Level.OVERWORLD : Level.END; + ServerLevel serverLevel = level.getServer().getLevel(resourceKey); + if (serverLevel == null) { return null; } else { boolean bl = resourceKey == Level.END; - BlockPos blockPos2 = bl ? ServerLevel.END_SPAWN_POINT : serverLevel2.getSharedSpawnPos(); - Vec3 vec3 = blockPos2.getBottomCenter(); + BlockPos blockPos = bl ? ServerLevel.END_SPAWN_POINT : serverLevel.getSharedSpawnPos(); + Vec3 vec3 = blockPos.getBottomCenter(); float f; Set set; if (bl) { - EndPlatformFeature.createEndPlatform(serverLevel2, BlockPos.containing(vec3).below(), true); + EndPlatformFeature.createEndPlatform(serverLevel, BlockPos.containing(vec3).below(), true); f = Direction.WEST.toYRot(); set = Relative.union(Relative.DELTA, Set.of(Relative.X_ROT)); if (entity instanceof ServerPlayer) { @@ -91,10 +91,10 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { return serverPlayer.findRespawnPositionAndUseSpawnBlock(false, TeleportTransition.DO_NOTHING); } - vec3 = entity.adjustSpawnLocation(serverLevel2, blockPos2).getBottomCenter(); + vec3 = entity.adjustSpawnLocation(serverLevel, blockPos).getBottomCenter(); } - return new TeleportTransition(serverLevel2, vec3, Vec3.ZERO, f, 0.0F, set, TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET)); + return new TeleportTransition(serverLevel, vec3, Vec3.ZERO, f, 0.0F, set, TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET)); } } diff --git a/net/minecraft/world/level/block/EndPortalFrameBlock.java b/net/minecraft/world/level/block/EndPortalFrameBlock.java index d335b91c..21934bcf 100644 --- a/net/minecraft/world/level/block/EndPortalFrameBlock.java +++ b/net/minecraft/world/level/block/EndPortalFrameBlock.java @@ -9,7 +9,7 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.pattern.BlockInWorld; import net.minecraft.world.level.block.state.pattern.BlockPattern; import net.minecraft.world.level.block.state.pattern.BlockPatternBuilder; @@ -77,7 +77,7 @@ public class EndPortalFrameBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, HAS_EYE); } diff --git a/net/minecraft/world/level/block/EnderChestBlock.java b/net/minecraft/world/level/block/EnderChestBlock.java index efbea59b..29a31811 100644 --- a/net/minecraft/world/level/block/EnderChestBlock.java +++ b/net/minecraft/world/level/block/EnderChestBlock.java @@ -26,7 +26,7 @@ import net.minecraft.world.level.block.entity.ChestBlockEntity; import net.minecraft.world.level.block.entity.EnderChestBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -135,7 +135,7 @@ public class EnderChestBlock extends AbstractChestBlock i } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, WATERLOGGED); } @@ -146,20 +146,20 @@ public class EnderChestBlock extends AbstractChestBlock i @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/FaceAttachedHorizontalDirectionalBlock.java b/net/minecraft/world/level/block/FaceAttachedHorizontalDirectionalBlock.java index 1b2e2dce..0e612bff 100644 --- a/net/minecraft/world/level/block/FaceAttachedHorizontalDirectionalBlock.java +++ b/net/minecraft/world/level/block/FaceAttachedHorizontalDirectionalBlock.java @@ -57,18 +57,18 @@ public abstract class FaceAttachedHorizontalDirectionalBlock extends HorizontalD @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return getConnectedDirection(blockState).getOpposite() == direction && !blockState.canSurvive(levelReader, blockPos) + return getConnectedDirection(state).getOpposite() == direction && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } protected static Direction getConnectedDirection(BlockState state) { diff --git a/net/minecraft/world/level/block/FallingBlock.java b/net/minecraft/world/level/block/FallingBlock.java index 8d2a1cf8..cf83b44e 100644 --- a/net/minecraft/world/level/block/FallingBlock.java +++ b/net/minecraft/world/level/block/FallingBlock.java @@ -32,17 +32,17 @@ public abstract class FallingBlock extends Block implements Fallable { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - scheduledTickAccess.scheduleTick(blockPos, this, this.getDelayAfterPlace()); - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + scheduledTickAccess.scheduleTick(pos, this, this.getDelayAfterPlace()); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/FarmBlock.java b/net/minecraft/world/level/block/FarmBlock.java index c8a44543..ee281e24 100644 --- a/net/minecraft/world/level/block/FarmBlock.java +++ b/net/minecraft/world/level/block/FarmBlock.java @@ -19,7 +19,7 @@ import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.piston.MovingPistonBlock; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.gameevent.GameEvent; @@ -47,20 +47,20 @@ public class FarmBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction == Direction.UP && !blockState.canSurvive(levelReader, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + if (direction == Direction.UP && !state.canSurvive(level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 1); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -141,7 +141,7 @@ public class FarmBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(MOISTURE); } diff --git a/net/minecraft/world/level/block/FenceBlock.java b/net/minecraft/world/level/block/FenceBlock.java index fc420701..1127eccb 100644 --- a/net/minecraft/world/level/block/FenceBlock.java +++ b/net/minecraft/world/level/block/FenceBlock.java @@ -15,7 +15,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.material.Fluids; @@ -42,8 +42,8 @@ public class FenceBlock extends CrossCollisionBlock { } @Override - protected VoxelShape getOcclusionShape(BlockState blockState) { - return this.occlusionByIndex[this.getAABBIndex(blockState)]; + protected VoxelShape getOcclusionShape(BlockState state) { + return this.occlusionByIndex[this.getAABBIndex(state)]; } @Override @@ -95,29 +95,29 @@ public class FenceBlock extends CrossCollisionBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } return direction.getAxis().isHorizontal() - ? blockState.setValue( + ? state.setValue( (Property)PROPERTY_BY_DIRECTION.get(direction), - this.connectsTo(blockState2, blockState2.isFaceSturdy(levelReader, blockPos2, direction.getOpposite()), direction.getOpposite()) + this.connectsTo(neighborState, neighborState.isFaceSturdy(level, neighborPos, direction.getOpposite()), direction.getOpposite()) ) - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(NORTH, EAST, WEST, SOUTH, WATERLOGGED); } } diff --git a/net/minecraft/world/level/block/FenceGateBlock.java b/net/minecraft/world/level/block/FenceGateBlock.java index db255029..01532f14 100644 --- a/net/minecraft/world/level/block/FenceGateBlock.java +++ b/net/minecraft/world/level/block/FenceGateBlock.java @@ -20,7 +20,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.WoodType; @@ -78,21 +78,21 @@ public class FenceGateBlock extends HorizontalDirectionalBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { Direction.Axis axis = direction.getAxis(); - if (((Direction)blockState.getValue(FACING)).getClockWise().getAxis() != axis) { - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + if (((Direction)state.getValue(FACING)).getClockWise().getAxis() != axis) { + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } else { - boolean bl = this.isWall(blockState2) || this.isWall(levelReader.getBlockState(blockPos.relative(direction.getOpposite()))); - return blockState.setValue(IN_WALL, bl); + boolean bl = this.isWall(neighborState) || this.isWall(level.getBlockState(pos.relative(direction.getOpposite()))); + return state.setValue(IN_WALL, bl); } } @@ -115,11 +115,11 @@ public class FenceGateBlock extends HorizontalDirectionalBlock { } @Override - protected VoxelShape getOcclusionShape(BlockState blockState) { - if ((Boolean)blockState.getValue(IN_WALL)) { - return ((Direction)blockState.getValue(FACING)).getAxis() == Direction.Axis.X ? X_OCCLUSION_SHAPE_LOW : Z_OCCLUSION_SHAPE_LOW; + protected VoxelShape getOcclusionShape(BlockState state) { + if ((Boolean)state.getValue(IN_WALL)) { + return ((Direction)state.getValue(FACING)).getAxis() == Direction.Axis.X ? X_OCCLUSION_SHAPE_LOW : Z_OCCLUSION_SHAPE_LOW; } else { - return ((Direction)blockState.getValue(FACING)).getAxis() == Direction.Axis.X ? X_OCCLUSION_SHAPE : Z_OCCLUSION_SHAPE; + return ((Direction)state.getValue(FACING)).getAxis() == Direction.Axis.X ? X_OCCLUSION_SHAPE : Z_OCCLUSION_SHAPE; } } @@ -177,39 +177,37 @@ public class FenceGateBlock extends HorizontalDirectionalBlock { } @Override - protected void onExplosionHit( - BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer biConsumer - ) { - if (explosion.canTriggerBlocks() && !(Boolean)blockState.getValue(POWERED)) { - boolean bl = (Boolean)blockState.getValue(OPEN); - serverLevel.setBlockAndUpdate(blockPos, blockState.setValue(OPEN, !bl)); - serverLevel.playSound( - null, blockPos, bl ? this.type.fenceGateClose() : this.type.fenceGateOpen(), SoundSource.BLOCKS, 1.0F, serverLevel.getRandom().nextFloat() * 0.1F + 0.9F + protected void onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer dropConsumer) { + if (explosion.canTriggerBlocks() && !(Boolean)state.getValue(POWERED)) { + boolean bl = (Boolean)state.getValue(OPEN); + level.setBlockAndUpdate(pos, state.setValue(OPEN, !bl)); + level.playSound( + null, pos, bl ? this.type.fenceGateClose() : this.type.fenceGateOpen(), SoundSource.BLOCKS, 1.0F, level.getRandom().nextFloat() * 0.1F + 0.9F ); - serverLevel.gameEvent(bl ? GameEvent.BLOCK_CLOSE : GameEvent.BLOCK_OPEN, blockPos, Context.of(blockState)); + level.gameEvent(bl ? GameEvent.BLOCK_CLOSE : GameEvent.BLOCK_OPEN, pos, Context.of(state)); } - super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer); + super.onExplosionHit(state, level, pos, explosion, dropConsumer); } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { if (!level.isClientSide) { - boolean bl2 = level.hasNeighborSignal(blockPos); - if ((Boolean)blockState.getValue(POWERED) != bl2) { - level.setBlock(blockPos, blockState.setValue(POWERED, bl2).setValue(OPEN, bl2), 2); - if ((Boolean)blockState.getValue(OPEN) != bl2) { + boolean bl = level.hasNeighborSignal(pos); + if ((Boolean)state.getValue(POWERED) != bl) { + level.setBlock(pos, state.setValue(POWERED, bl).setValue(OPEN, bl), 2); + if ((Boolean)state.getValue(OPEN) != bl) { level.playSound( - null, blockPos, bl2 ? this.type.fenceGateOpen() : this.type.fenceGateClose(), SoundSource.BLOCKS, 1.0F, level.getRandom().nextFloat() * 0.1F + 0.9F + null, pos, bl ? this.type.fenceGateOpen() : this.type.fenceGateClose(), SoundSource.BLOCKS, 1.0F, level.getRandom().nextFloat() * 0.1F + 0.9F ); - level.gameEvent(null, bl2 ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, blockPos); + level.gameEvent(null, bl ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, pos); } } } } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, OPEN, POWERED, IN_WALL); } diff --git a/net/minecraft/world/level/block/FireBlock.java b/net/minecraft/world/level/block/FireBlock.java index 9f16279a..07bf51a3 100644 --- a/net/minecraft/world/level/block/FireBlock.java +++ b/net/minecraft/world/level/block/FireBlock.java @@ -21,7 +21,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -106,18 +106,16 @@ public class FireBlock extends BaseFireBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return this.canSurvive(blockState, levelReader, blockPos) - ? this.getStateWithAge(levelReader, blockPos, (Integer)blockState.getValue(AGE)) - : Blocks.AIR.defaultBlockState(); + return this.canSurvive(state, level, pos) ? this.getStateWithAge(level, pos, (Integer)state.getValue(AGE)) : Blocks.AIR.defaultBlockState(); } @Override @@ -265,9 +263,9 @@ public class FireBlock extends BaseFireBlock { } } - private BlockState getStateWithAge(LevelReader levelReader, BlockPos blockPos, int i) { - BlockState blockState = getState(levelReader, blockPos); - return blockState.is(Blocks.FIRE) ? blockState.setValue(AGE, i) : blockState; + private BlockState getStateWithAge(LevelReader level, BlockPos pos, int age) { + BlockState blockState = getState(level, pos); + return blockState.is(Blocks.FIRE) ? blockState.setValue(AGE, age) : blockState; } private boolean isValidFireLocation(BlockGetter level, BlockPos pos) { @@ -314,7 +312,7 @@ public class FireBlock extends BaseFireBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AGE, NORTH, EAST, SOUTH, WEST, UP); } diff --git a/net/minecraft/world/level/block/FlowerPotBlock.java b/net/minecraft/world/level/block/FlowerPotBlock.java index ac9ef206..854a2ed7 100644 --- a/net/minecraft/world/level/block/FlowerPotBlock.java +++ b/net/minecraft/world/level/block/FlowerPotBlock.java @@ -54,21 +54,21 @@ public class FlowerPotBlock extends Block { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - BlockState blockState2 = (itemStack.getItem() instanceof BlockItem blockItem + BlockState blockState = (stack.getItem() instanceof BlockItem blockItem ? (Block)POTTED_BY_CONTENT.getOrDefault(blockItem.getBlock(), Blocks.AIR) : Blocks.AIR) .defaultBlockState(); - if (blockState2.isAir()) { + if (blockState.isAir()) { return InteractionResult.TRY_WITH_EMPTY_HAND; } else if (!this.isEmpty()) { return InteractionResult.CONSUME; } else { - level.setBlock(blockPos, blockState2, 3); - level.gameEvent(player, GameEvent.BLOCK_CHANGE, blockPos); + level.setBlock(pos, blockState, 3); + level.gameEvent(player, GameEvent.BLOCK_CHANGE, pos); player.awardStat(Stats.POT_FLOWER); - itemStack.consume(1, player); + stack.consume(1, player); return InteractionResult.SUCCESS; } } @@ -100,18 +100,18 @@ public class FlowerPotBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction == Direction.DOWN && !blockState.canSurvive(levelReader, blockPos) + return direction == Direction.DOWN && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } public Block getPotted() { diff --git a/net/minecraft/world/level/block/FrogspawnBlock.java b/net/minecraft/world/level/block/FrogspawnBlock.java index 8db5dc09..c1d95f86 100644 --- a/net/minecraft/world/level/block/FrogspawnBlock.java +++ b/net/minecraft/world/level/block/FrogspawnBlock.java @@ -64,18 +64,18 @@ public class FrogspawnBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return !this.canSurvive(blockState, levelReader, blockPos) + return !this.canSurvive(state, level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/FrostedIceBlock.java b/net/minecraft/world/level/block/FrostedIceBlock.java index 2b191179..eea57b3b 100644 --- a/net/minecraft/world/level/block/FrostedIceBlock.java +++ b/net/minecraft/world/level/block/FrostedIceBlock.java @@ -12,7 +12,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.redstone.Orientation; @@ -71,12 +71,12 @@ public class FrostedIceBlock extends IceBlock { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - if (block.defaultBlockState().is(this) && this.fewerNeigboursThan(level, blockPos, 2)) { - this.melt(blockState, level, blockPos); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + if (neighborBlock.defaultBlockState().is(this) && this.fewerNeigboursThan(level, pos, 2)) { + this.melt(state, level, pos); } - super.neighborChanged(blockState, level, blockPos, block, orientation, bl); + super.neighborChanged(state, level, pos, neighborBlock, orientation, movedByPiston); } private boolean fewerNeigboursThan(BlockGetter level, BlockPos pos, int neighborsRequired) { @@ -96,7 +96,7 @@ public class FrostedIceBlock extends IceBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AGE); } diff --git a/net/minecraft/world/level/block/GlowLichenBlock.java b/net/minecraft/world/level/block/GlowLichenBlock.java index 35de51fa..c49f67fd 100644 --- a/net/minecraft/world/level/block/GlowLichenBlock.java +++ b/net/minecraft/world/level/block/GlowLichenBlock.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; @@ -39,27 +39,27 @@ public class GlowLichenBlock extends MultifaceBlock implements BonemealableBlock } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { super.createBlockStateDefinition(builder); builder.add(WATERLOGGED); } @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -88,8 +88,8 @@ public class GlowLichenBlock extends MultifaceBlock implements BonemealableBlock } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { - return blockState.getFluidState().isEmpty(); + protected boolean propagatesSkylightDown(BlockState state) { + return state.getFluidState().isEmpty(); } @Override diff --git a/net/minecraft/world/level/block/GrindstoneBlock.java b/net/minecraft/world/level/block/GrindstoneBlock.java index eeb6a014..af8f39c8 100644 --- a/net/minecraft/world/level/block/GrindstoneBlock.java +++ b/net/minecraft/world/level/block/GrindstoneBlock.java @@ -16,7 +16,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.AttachFace; import net.minecraft.world.level.pathfinder.PathComputationType; import net.minecraft.world.phys.BlockHitResult; @@ -180,7 +180,7 @@ public class GrindstoneBlock extends FaceAttachedHorizontalDirectionalBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, FACE); } diff --git a/net/minecraft/world/level/block/GrowingPlantBlock.java b/net/minecraft/world/level/block/GrowingPlantBlock.java index 5c9a3c48..baa7c020 100644 --- a/net/minecraft/world/level/block/GrowingPlantBlock.java +++ b/net/minecraft/world/level/block/GrowingPlantBlock.java @@ -38,7 +38,7 @@ public abstract class GrowingPlantBlock extends Block { : this.getBodyBlock().defaultBlockState(); } - public BlockState getStateForPlacement(RandomSource randomSource) { + public BlockState getStateForPlacement(RandomSource random) { return this.defaultBlockState(); } diff --git a/net/minecraft/world/level/block/GrowingPlantBodyBlock.java b/net/minecraft/world/level/block/GrowingPlantBodyBlock.java index 1e74bafc..00f6e106 100644 --- a/net/minecraft/world/level/block/GrowingPlantBodyBlock.java +++ b/net/minecraft/world/level/block/GrowingPlantBodyBlock.java @@ -32,28 +32,28 @@ public abstract class GrowingPlantBodyBlock extends GrowingPlantBlock implements @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction == this.growthDirection.getOpposite() && !blockState.canSurvive(levelReader, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + if (direction == this.growthDirection.getOpposite() && !state.canSurvive(level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 1); } GrowingPlantHeadBlock growingPlantHeadBlock = this.getHeadBlock(); - if (direction == this.growthDirection && !blockState2.is(this) && !blockState2.is(growingPlantHeadBlock)) { - return this.updateHeadAfterConvertedFromBody(blockState, growingPlantHeadBlock.getStateForPlacement(randomSource)); + if (direction == this.growthDirection && !neighborState.is(this) && !neighborState.is(growingPlantHeadBlock)) { + return this.updateHeadAfterConvertedFromBody(state, growingPlantHeadBlock.getStateForPlacement(random)); } else { if (this.scheduleFluidTicks) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } } diff --git a/net/minecraft/world/level/block/GrowingPlantHeadBlock.java b/net/minecraft/world/level/block/GrowingPlantHeadBlock.java index 71b3f339..8966d4f6 100644 --- a/net/minecraft/world/level/block/GrowingPlantHeadBlock.java +++ b/net/minecraft/world/level/block/GrowingPlantHeadBlock.java @@ -10,7 +10,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.material.Fluids; @@ -33,8 +33,8 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements protected abstract MapCodec codec(); @Override - public BlockState getStateForPlacement(RandomSource randomSource) { - return this.defaultBlockState().setValue(AGE, randomSource.nextInt(25)); + public BlockState getStateForPlacement(RandomSource random) { + return this.defaultBlockState().setValue(AGE, random.nextInt(25)); } @Override @@ -70,32 +70,32 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction == this.growthDirection.getOpposite() && !blockState.canSurvive(levelReader, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + if (direction == this.growthDirection.getOpposite() && !state.canSurvive(level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 1); } - if (direction != this.growthDirection || !blockState2.is(this) && !blockState2.is(this.getBodyBlock())) { + if (direction != this.growthDirection || !neighborState.is(this) && !neighborState.is(this.getBodyBlock())) { if (this.scheduleFluidTicks) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } else { - return this.updateBodyAfterConvertedFromHead(blockState, this.getBodyBlock().defaultBlockState()); + return this.updateBodyAfterConvertedFromHead(state, this.getBodyBlock().defaultBlockState()); } } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AGE); } diff --git a/net/minecraft/world/level/block/HangingMossBlock.java b/net/minecraft/world/level/block/HangingMossBlock.java index fb25b00d..abb7efdd 100644 --- a/net/minecraft/world/level/block/HangingMossBlock.java +++ b/net/minecraft/world/level/block/HangingMossBlock.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.shapes.CollisionContext; @@ -52,7 +52,7 @@ public class HangingMossBlock extends Block implements BonemealableBlock { } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { + protected boolean propagatesSkylightDown(BlockState state) { return true; } @@ -61,28 +61,28 @@ public class HangingMossBlock extends Block implements BonemealableBlock { return this.canStayAtPosition(level, pos); } - private boolean canStayAtPosition(BlockGetter blockGetter, BlockPos blockPos) { - BlockPos blockPos2 = blockPos.relative(Direction.UP); - BlockState blockState = blockGetter.getBlockState(blockPos2); - return MultifaceBlock.canAttachTo(blockGetter, Direction.UP, blockPos2, blockState) || blockState.is(Blocks.PALE_HANGING_MOSS); + private boolean canStayAtPosition(BlockGetter level, BlockPos pos) { + BlockPos blockPos = pos.relative(Direction.UP); + BlockState blockState = level.getBlockState(blockPos); + return MultifaceBlock.canAttachTo(level, Direction.UP, blockPos, blockState) || blockState.is(Blocks.PALE_HANGING_MOSS); } @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (!this.canStayAtPosition(levelReader, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + if (!this.canStayAtPosition(level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 1); } - return blockState.setValue(TIP, !levelReader.getBlockState(blockPos.below()).is(this)); + return state.setValue(TIP, !level.getBlockState(pos.below()).is(this)); } @Override @@ -93,7 +93,7 @@ public class HangingMossBlock extends Block implements BonemealableBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(TIP); } @@ -102,17 +102,17 @@ public class HangingMossBlock extends Block implements BonemealableBlock { return this.canGrowInto(level.getBlockState(this.getTip(level, pos).below())); } - private boolean canGrowInto(BlockState blockState) { - return blockState.isAir(); + private boolean canGrowInto(BlockState state) { + return state.isAir(); } - public BlockPos getTip(BlockGetter blockGetter, BlockPos blockPos) { - BlockPos.MutableBlockPos mutableBlockPos = blockPos.mutable(); + public BlockPos getTip(BlockGetter level, BlockPos pos) { + BlockPos.MutableBlockPos mutableBlockPos = pos.mutable(); BlockState blockState; do { mutableBlockPos.move(Direction.DOWN); - blockState = blockGetter.getBlockState(mutableBlockPos); + blockState = level.getBlockState(mutableBlockPos); } while (blockState.is(this)); return mutableBlockPos.relative(Direction.UP).immutable(); diff --git a/net/minecraft/world/level/block/HangingRootsBlock.java b/net/minecraft/world/level/block/HangingRootsBlock.java index da90fe3e..5b93d67b 100644 --- a/net/minecraft/world/level/block/HangingRootsBlock.java +++ b/net/minecraft/world/level/block/HangingRootsBlock.java @@ -10,7 +10,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; @@ -35,7 +35,7 @@ public class HangingRootsBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(WATERLOGGED); } @@ -70,23 +70,23 @@ public class HangingRootsBlock extends Block implements SimpleWaterloggedBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction == Direction.UP && !this.canSurvive(blockState, levelReader, blockPos)) { + if (direction == Direction.UP && !this.canSurvive(state, level, pos)) { return Blocks.AIR.defaultBlockState(); } else { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } } } diff --git a/net/minecraft/world/level/block/HeavyCoreBlock.java b/net/minecraft/world/level/block/HeavyCoreBlock.java index 8c1dec2c..dacdab06 100644 --- a/net/minecraft/world/level/block/HeavyCoreBlock.java +++ b/net/minecraft/world/level/block/HeavyCoreBlock.java @@ -10,7 +10,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; @@ -35,26 +35,26 @@ public class HeavyCoreBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(WATERLOGGED); } @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/HoneyBlock.java b/net/minecraft/world/level/block/HoneyBlock.java index 3047bf42..fd9b69fb 100644 --- a/net/minecraft/world/level/block/HoneyBlock.java +++ b/net/minecraft/world/level/block/HoneyBlock.java @@ -69,12 +69,12 @@ public class HoneyBlock extends HalfTransparentBlock { super.entityInside(state, level, pos, entity); } - private static double getOldDeltaY(double d) { - return d / 0.98F + 0.08; + private static double getOldDeltaY(double deltaY) { + return deltaY / 0.98F + 0.08; } - private static double getNewDeltaY(double d) { - return (d - 0.08) * 0.98F; + private static double getNewDeltaY(double deltaY) { + return (deltaY - 0.08) * 0.98F; } private boolean isSlidingDown(BlockPos pos, Entity entity) { diff --git a/net/minecraft/world/level/block/HopperBlock.java b/net/minecraft/world/level/block/HopperBlock.java index 4154d74f..c884481b 100644 --- a/net/minecraft/world/level/block/HopperBlock.java +++ b/net/minecraft/world/level/block/HopperBlock.java @@ -18,7 +18,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.HopperBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -132,8 +132,8 @@ public class HopperBlock extends BaseEntityBlock { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - this.checkPoweredState(level, blockPos, blockState); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + this.checkPoweredState(level, pos, state); } private void checkPoweredState(Level level, BlockPos pos, BlockState state) { @@ -175,7 +175,7 @@ public class HopperBlock extends BaseEntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, ENABLED); } diff --git a/net/minecraft/world/level/block/HugeMushroomBlock.java b/net/minecraft/world/level/block/HugeMushroomBlock.java index eb452650..fd28cc03 100644 --- a/net/minecraft/world/level/block/HugeMushroomBlock.java +++ b/net/minecraft/world/level/block/HugeMushroomBlock.java @@ -11,7 +11,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.Property; @@ -52,18 +52,18 @@ public class HugeMushroomBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return blockState2.is(this) - ? blockState.setValue((Property)PROPERTY_BY_DIRECTION.get(direction), false) - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return neighborState.is(this) + ? state.setValue((Property)PROPERTY_BY_DIRECTION.get(direction), false) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -87,7 +87,7 @@ public class HugeMushroomBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(UP, DOWN, NORTH, EAST, SOUTH, WEST); } } diff --git a/net/minecraft/world/level/block/InfestedRotatedPillarBlock.java b/net/minecraft/world/level/block/InfestedRotatedPillarBlock.java index 31690d9d..3ad43513 100644 --- a/net/minecraft/world/level/block/InfestedRotatedPillarBlock.java +++ b/net/minecraft/world/level/block/InfestedRotatedPillarBlock.java @@ -7,7 +7,7 @@ import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; public class InfestedRotatedPillarBlock extends InfestedBlock { public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( @@ -20,8 +20,8 @@ public class InfestedRotatedPillarBlock extends InfestedBlock { return CODEC; } - public InfestedRotatedPillarBlock(Block block, BlockBehaviour.Properties properties) { - super(block, properties); + public InfestedRotatedPillarBlock(Block hostBlock, BlockBehaviour.Properties properties) { + super(hostBlock, properties); this.registerDefaultState(this.defaultBlockState().setValue(RotatedPillarBlock.AXIS, Direction.Axis.Y)); } @@ -31,7 +31,7 @@ public class InfestedRotatedPillarBlock extends InfestedBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(RotatedPillarBlock.AXIS); } diff --git a/net/minecraft/world/level/block/IronBarsBlock.java b/net/minecraft/world/level/block/IronBarsBlock.java index 4ab075b7..ec8dbea1 100644 --- a/net/minecraft/world/level/block/IronBarsBlock.java +++ b/net/minecraft/world/level/block/IronBarsBlock.java @@ -11,7 +11,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.material.Fluids; @@ -57,24 +57,24 @@ public class IronBarsBlock extends CrossCollisionBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } return direction.getAxis().isHorizontal() - ? blockState.setValue( - (Property)PROPERTY_BY_DIRECTION.get(direction), this.attachsTo(blockState2, blockState2.isFaceSturdy(levelReader, blockPos2, direction.getOpposite())) + ? state.setValue( + (Property)PROPERTY_BY_DIRECTION.get(direction), this.attachsTo(neighborState, neighborState.isFaceSturdy(level, neighborPos, direction.getOpposite())) ) - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -103,7 +103,7 @@ public class IronBarsBlock extends CrossCollisionBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(NORTH, EAST, WEST, SOUTH, WATERLOGGED); } } diff --git a/net/minecraft/world/level/block/JigsawBlock.java b/net/minecraft/world/level/block/JigsawBlock.java index c90cfb3c..9673c26e 100644 --- a/net/minecraft/world/level/block/JigsawBlock.java +++ b/net/minecraft/world/level/block/JigsawBlock.java @@ -12,7 +12,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.JigsawBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate; @@ -33,7 +33,7 @@ public class JigsawBlock extends Block implements EntityBlock, GameMasterBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(ORIENTATION); } @@ -76,14 +76,14 @@ public class JigsawBlock extends Block implements EntityBlock, GameMasterBlock { } } - public static boolean canAttach(StructureTemplate.JigsawBlockInfo jigsawBlockInfo, StructureTemplate.JigsawBlockInfo jigsawBlockInfo2) { - Direction direction = getFrontFacing(jigsawBlockInfo.info().state()); - Direction direction2 = getFrontFacing(jigsawBlockInfo2.info().state()); - Direction direction3 = getTopFacing(jigsawBlockInfo.info().state()); - Direction direction4 = getTopFacing(jigsawBlockInfo2.info().state()); - JigsawBlockEntity.JointType jointType = jigsawBlockInfo.jointType(); + public static boolean canAttach(StructureTemplate.JigsawBlockInfo parent, StructureTemplate.JigsawBlockInfo child) { + Direction direction = getFrontFacing(parent.info().state()); + Direction direction2 = getFrontFacing(child.info().state()); + Direction direction3 = getTopFacing(parent.info().state()); + Direction direction4 = getTopFacing(child.info().state()); + JigsawBlockEntity.JointType jointType = parent.jointType(); boolean bl = jointType == JigsawBlockEntity.JointType.ROLLABLE; - return direction == direction2.getOpposite() && (bl || direction3 == direction4) && jigsawBlockInfo.target().equals(jigsawBlockInfo2.name()); + return direction == direction2.getOpposite() && (bl || direction3 == direction4) && parent.target().equals(child.name()); } /** diff --git a/net/minecraft/world/level/block/JukeboxBlock.java b/net/minecraft/world/level/block/JukeboxBlock.java index 8f1e0286..5d182ada 100644 --- a/net/minecraft/world/level/block/JukeboxBlock.java +++ b/net/minecraft/world/level/block/JukeboxBlock.java @@ -19,7 +19,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.JukeboxBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.BlockHitResult; @@ -60,13 +60,13 @@ public class JukeboxBlock extends BaseEntityBlock { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - if ((Boolean)blockState.getValue(HAS_RECORD)) { + if ((Boolean)state.getValue(HAS_RECORD)) { return InteractionResult.TRY_WITH_EMPTY_HAND; } else { - ItemStack itemStack2 = player.getItemInHand(interactionHand); - InteractionResult interactionResult = JukeboxPlayable.tryInsertIntoJukebox(level, blockPos, itemStack2, player); + ItemStack itemStack = player.getItemInHand(hand); + InteractionResult interactionResult = JukeboxPlayable.tryInsertIntoJukebox(level, pos, itemStack, player); return (InteractionResult)(!interactionResult.consumesAction() ? InteractionResult.TRY_WITH_EMPTY_HAND : interactionResult); } } @@ -113,7 +113,7 @@ public class JukeboxBlock extends BaseEntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(HAS_RECORD); } diff --git a/net/minecraft/world/level/block/LadderBlock.java b/net/minecraft/world/level/block/LadderBlock.java index 4d7fd474..4d04eb77 100644 --- a/net/minecraft/world/level/block/LadderBlock.java +++ b/net/minecraft/world/level/block/LadderBlock.java @@ -10,7 +10,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -68,23 +68,23 @@ public class LadderBlock extends Block implements SimpleWaterloggedBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction.getOpposite() == blockState.getValue(FACING) && !blockState.canSurvive(levelReader, blockPos)) { + if (direction.getOpposite() == state.getValue(FACING) && !state.canSurvive(level, pos)) { return Blocks.AIR.defaultBlockState(); } else { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } } @@ -126,7 +126,7 @@ public class LadderBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, WATERLOGGED); } diff --git a/net/minecraft/world/level/block/LanternBlock.java b/net/minecraft/world/level/block/LanternBlock.java index e09c54cb..2048fe60 100644 --- a/net/minecraft/world/level/block/LanternBlock.java +++ b/net/minecraft/world/level/block/LanternBlock.java @@ -10,7 +10,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; @@ -61,7 +61,7 @@ public class LanternBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(HANGING, WATERLOGGED); } @@ -77,22 +77,22 @@ public class LanternBlock extends Block implements SimpleWaterloggedBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return getConnectedDirection(blockState).getOpposite() == direction && !blockState.canSurvive(levelReader, blockPos) + return getConnectedDirection(state).getOpposite() == direction && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/LayeredCauldronBlock.java b/net/minecraft/world/level/block/LayeredCauldronBlock.java index e0d74cc0..2655775b 100644 --- a/net/minecraft/world/level/block/LayeredCauldronBlock.java +++ b/net/minecraft/world/level/block/LayeredCauldronBlock.java @@ -10,7 +10,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.gameevent.GameEvent; @@ -100,7 +100,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(LEVEL); } diff --git a/net/minecraft/world/level/block/LeavesBlock.java b/net/minecraft/world/level/block/LeavesBlock.java index ae91fb7e..32caf77a 100644 --- a/net/minecraft/world/level/block/LeavesBlock.java +++ b/net/minecraft/world/level/block/LeavesBlock.java @@ -17,7 +17,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -72,31 +72,31 @@ public class LeavesBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected int getLightBlock(BlockState blockState) { + protected int getLightBlock(BlockState state) { return 1; } @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - int i = getDistanceAt(blockState2) + 1; - if (i != 1 || (Integer)blockState.getValue(DISTANCE) != i) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + int i = getDistanceAt(neighborState) + 1; + if (i != 1 || (Integer)state.getValue(DISTANCE) != i) { + scheduledTickAccess.scheduleTick(pos, this, 1); } - return blockState; + return state; } private static BlockState updateDistance(BlockState state, LevelAccessor level, BlockPos pos) { @@ -145,7 +145,7 @@ public class LeavesBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(DISTANCE, PERSISTENT, WATERLOGGED); } diff --git a/net/minecraft/world/level/block/LecternBlock.java b/net/minecraft/world/level/block/LecternBlock.java index ec923398..8dabf7e2 100644 --- a/net/minecraft/world/level/block/LecternBlock.java +++ b/net/minecraft/world/level/block/LecternBlock.java @@ -26,7 +26,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.LecternBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -93,7 +93,7 @@ public class LecternBlock extends BaseEntityBlock { } @Override - protected VoxelShape getOcclusionShape(BlockState blockState) { + protected VoxelShape getOcclusionShape(BlockState state) { return SHAPE_COMMON; } @@ -150,7 +150,7 @@ public class LecternBlock extends BaseEntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, POWERED, HAS_BOOK); } @@ -268,16 +268,14 @@ public class LecternBlock extends BaseEntityBlock { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - if ((Boolean)blockState.getValue(HAS_BOOK)) { + if ((Boolean)state.getValue(HAS_BOOK)) { return InteractionResult.TRY_WITH_EMPTY_HAND; - } else if (itemStack.is(ItemTags.LECTERN_BOOKS)) { - return (InteractionResult)(tryPlaceBook(player, level, blockPos, blockState, itemStack) ? InteractionResult.SUCCESS : InteractionResult.PASS); + } else if (stack.is(ItemTags.LECTERN_BOOKS)) { + return (InteractionResult)(tryPlaceBook(player, level, pos, state, stack) ? InteractionResult.SUCCESS : InteractionResult.PASS); } else { - return (InteractionResult)(itemStack.isEmpty() && interactionHand == InteractionHand.MAIN_HAND - ? InteractionResult.PASS - : InteractionResult.TRY_WITH_EMPTY_HAND); + return (InteractionResult)(stack.isEmpty() && hand == InteractionHand.MAIN_HAND ? InteractionResult.PASS : InteractionResult.TRY_WITH_EMPTY_HAND); } } diff --git a/net/minecraft/world/level/block/LeverBlock.java b/net/minecraft/world/level/block/LeverBlock.java index e67f5a1d..e6843f63 100644 --- a/net/minecraft/world/level/block/LeverBlock.java +++ b/net/minecraft/world/level/block/LeverBlock.java @@ -18,7 +18,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.AttachFace; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; @@ -105,14 +105,12 @@ public class LeverBlock extends FaceAttachedHorizontalDirectionalBlock { } @Override - protected void onExplosionHit( - BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer biConsumer - ) { + protected void onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer dropConsumer) { if (explosion.canTriggerBlocks()) { - this.pull(blockState, serverLevel, blockPos, null); + this.pull(state, level, pos, null); } - super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer); + super.onExplosionHit(state, level, pos, explosion, dropConsumer); } public void pull(BlockState state, Level level, BlockPos pos, @Nullable Player player) { @@ -180,7 +178,7 @@ public class LeverBlock extends FaceAttachedHorizontalDirectionalBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACE, FACING, POWERED); } } diff --git a/net/minecraft/world/level/block/LightBlock.java b/net/minecraft/world/level/block/LightBlock.java index 5b233185..45e179cd 100644 --- a/net/minecraft/world/level/block/LightBlock.java +++ b/net/minecraft/world/level/block/LightBlock.java @@ -17,7 +17,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -46,7 +46,7 @@ public class LightBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(LEVEL, WATERLOGGED); } @@ -66,8 +66,8 @@ public class LightBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { - return blockState.getFluidState().isEmpty(); + protected boolean propagatesSkylightDown(BlockState state) { + return state.getFluidState().isEmpty(); } @Override @@ -82,20 +82,20 @@ public class LightBlock extends Block implements SimpleWaterloggedBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/LightningRodBlock.java b/net/minecraft/world/level/block/LightningRodBlock.java index 7d0f21f5..90e2f398 100644 --- a/net/minecraft/world/level/block/LightningRodBlock.java +++ b/net/minecraft/world/level/block/LightningRodBlock.java @@ -15,7 +15,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.levelgen.Heightmap; @@ -50,20 +50,20 @@ public class LightningRodBlock extends RodBlock implements SimpleWaterloggedBloc @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -129,7 +129,7 @@ public class LightningRodBlock extends RodBlock implements SimpleWaterloggedBloc } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, POWERED, WATERLOGGED); } diff --git a/net/minecraft/world/level/block/LiquidBlock.java b/net/minecraft/world/level/block/LiquidBlock.java index 97dabf79..738aa37e 100644 --- a/net/minecraft/world/level/block/LiquidBlock.java +++ b/net/minecraft/world/level/block/LiquidBlock.java @@ -25,7 +25,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.material.FlowingFluid; @@ -95,7 +95,7 @@ public class LiquidBlock extends Block implements BucketPickup { } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { + protected boolean propagatesSkylightDown(BlockState state) { return false; } @@ -139,26 +139,26 @@ public class LiquidBlock extends Block implements BucketPickup { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (blockState.getFluidState().isSource() || blockState2.getFluidState().isSource()) { - scheduledTickAccess.scheduleTick(blockPos, blockState.getFluidState().getType(), this.fluid.getTickDelay(levelReader)); + if (state.getFluidState().isSource() || neighborState.getFluidState().isSource()) { + scheduledTickAccess.scheduleTick(pos, state.getFluidState().getType(), this.fluid.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - if (this.shouldSpreadLiquid(level, blockPos, blockState)) { - level.scheduleTick(blockPos, blockState.getFluidState().getType(), this.fluid.getTickDelay(level)); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + if (this.shouldSpreadLiquid(level, pos, state)) { + level.scheduleTick(pos, state.getFluidState().getType(), this.fluid.getTickDelay(level)); } } @@ -191,7 +191,7 @@ public class LiquidBlock extends Block implements BucketPickup { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(LEVEL); } diff --git a/net/minecraft/world/level/block/MagmaBlock.java b/net/minecraft/world/level/block/MagmaBlock.java index 316269c5..dfa69831 100644 --- a/net/minecraft/world/level/block/MagmaBlock.java +++ b/net/minecraft/world/level/block/MagmaBlock.java @@ -42,20 +42,20 @@ public class MagmaBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction == Direction.UP && blockState2.is(Blocks.WATER)) { - scheduledTickAccess.scheduleTick(blockPos, this, 20); + if (direction == Direction.UP && neighborState.is(Blocks.WATER)) { + scheduledTickAccess.scheduleTick(pos, this, 20); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/MangrovePropaguleBlock.java b/net/minecraft/world/level/block/MangrovePropaguleBlock.java index f29da892..36467bb1 100644 --- a/net/minecraft/world/level/block/MangrovePropaguleBlock.java +++ b/net/minecraft/world/level/block/MangrovePropaguleBlock.java @@ -14,7 +14,7 @@ import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.grower.TreeGrower; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -53,7 +53,7 @@ public class MangrovePropaguleBlock extends SaplingBlock implements SimpleWaterl } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(STAGE).add(AGE).add(WATERLOGGED).add(HANGING); } @@ -90,22 +90,22 @@ public class MangrovePropaguleBlock extends SaplingBlock implements SimpleWaterl @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return direction == Direction.UP && !blockState.canSurvive(levelReader, blockPos) + return direction == Direction.UP && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/MangroveRootsBlock.java b/net/minecraft/world/level/block/MangroveRootsBlock.java index 62a905ff..759f9e82 100644 --- a/net/minecraft/world/level/block/MangroveRootsBlock.java +++ b/net/minecraft/world/level/block/MangroveRootsBlock.java @@ -9,7 +9,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; @@ -45,20 +45,20 @@ public class MangroveRootsBlock extends Block implements SimpleWaterloggedBlock @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -67,7 +67,7 @@ public class MangroveRootsBlock extends Block implements SimpleWaterloggedBlock } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(WATERLOGGED); } } diff --git a/net/minecraft/world/level/block/MossyCarpetBlock.java b/net/minecraft/world/level/block/MossyCarpetBlock.java index 73bf52b5..2d9661c8 100644 --- a/net/minecraft/world/level/block/MossyCarpetBlock.java +++ b/net/minecraft/world/level/block/MossyCarpetBlock.java @@ -22,7 +22,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -85,34 +85,34 @@ public class MossyCarpetBlock extends Block implements BonemealableBlock { } @Override - protected VoxelShape getOcclusionShape(BlockState blockState) { + protected VoxelShape getOcclusionShape(BlockState state) { return Shapes.empty(); } - private static VoxelShape calculateShape(BlockState blockState) { + private static VoxelShape calculateShape(BlockState state) { VoxelShape voxelShape = Shapes.empty(); - if ((Boolean)blockState.getValue(BASE)) { + if ((Boolean)state.getValue(BASE)) { voxelShape = DOWN_AABB; } - voxelShape = switch ((WallSide)blockState.getValue(NORTH)) { + voxelShape = switch ((WallSide)state.getValue(NORTH)) { case NONE -> voxelShape; case LOW -> Shapes.or(voxelShape, NORTH_SHORT_AABB); case TALL -> Shapes.or(voxelShape, NORTH_AABB); }; - voxelShape = switch ((WallSide)blockState.getValue(SOUTH)) { + voxelShape = switch ((WallSide)state.getValue(SOUTH)) { case NONE -> voxelShape; case LOW -> Shapes.or(voxelShape, SOUTH_SHORT_AABB); case TALL -> Shapes.or(voxelShape, SOUTH_AABB); }; - voxelShape = switch ((WallSide)blockState.getValue(EAST)) { + voxelShape = switch ((WallSide)state.getValue(EAST)) { case NONE -> voxelShape; case LOW -> Shapes.or(voxelShape, EAST_SHORT_AABB); case TALL -> Shapes.or(voxelShape, EAST_AABB); }; - voxelShape = switch ((WallSide)blockState.getValue(WEST)) { + voxelShape = switch ((WallSide)state.getValue(WEST)) { case NONE -> voxelShape; case LOW -> Shapes.or(voxelShape, WEST_SHORT_AABB); case TALL -> Shapes.or(voxelShape, WEST_AABB); @@ -131,7 +131,7 @@ public class MossyCarpetBlock extends Block implements BonemealableBlock { } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { + protected boolean propagatesSkylightDown(BlockState state) { return true; } @@ -141,12 +141,12 @@ public class MossyCarpetBlock extends Block implements BonemealableBlock { return state.getValue(BASE) ? !blockState.isAir() : blockState.is(this) && (Boolean)blockState.getValue(BASE); } - private static boolean hasFaces(BlockState blockState) { - if ((Boolean)blockState.getValue(BASE)) { + private static boolean hasFaces(BlockState state) { + if ((Boolean)state.getValue(BASE)) { return true; } else { for (EnumProperty enumProperty : PROPERTY_BY_DIRECTION.values()) { - if (blockState.getValue(enumProperty) != WallSide.NONE) { + if (state.getValue(enumProperty) != WallSide.NONE) { return true; } } @@ -155,47 +155,47 @@ public class MossyCarpetBlock extends Block implements BonemealableBlock { } } - private static boolean canSupportAtFace(BlockGetter blockGetter, BlockPos blockPos, Direction direction) { + private static boolean canSupportAtFace(BlockGetter level, BlockPos pos, Direction direction) { if (direction == Direction.UP) { return false; } else { - BlockPos blockPos2 = blockPos.relative(direction); - return MultifaceBlock.canAttachTo(blockGetter, direction, blockPos2, blockGetter.getBlockState(blockPos2)); + BlockPos blockPos = pos.relative(direction); + return MultifaceBlock.canAttachTo(level, direction, blockPos, level.getBlockState(blockPos)); } } - private static BlockState getUpdatedState(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, boolean bl) { + private static BlockState getUpdatedState(BlockState state, BlockGetter level, BlockPos pos, boolean tip) { + BlockState blockState = null; BlockState blockState2 = null; - BlockState blockState3 = null; - bl |= blockState.getValue(BASE); + tip |= state.getValue(BASE); for (Direction direction : Direction.Plane.HORIZONTAL) { EnumProperty enumProperty = getPropertyForFace(direction); - WallSide wallSide = canSupportAtFace(blockGetter, blockPos, direction) ? (bl ? WallSide.LOW : blockState.getValue(enumProperty)) : WallSide.NONE; + WallSide wallSide = canSupportAtFace(level, pos, direction) ? (tip ? WallSide.LOW : state.getValue(enumProperty)) : WallSide.NONE; if (wallSide == WallSide.LOW) { - if (blockState2 == null) { - blockState2 = blockGetter.getBlockState(blockPos.above()); + if (blockState == null) { + blockState = level.getBlockState(pos.above()); } - if (blockState2.is(Blocks.PALE_MOSS_CARPET) && blockState2.getValue(enumProperty) != WallSide.NONE && !(Boolean)blockState2.getValue(BASE)) { + if (blockState.is(Blocks.PALE_MOSS_CARPET) && blockState.getValue(enumProperty) != WallSide.NONE && !(Boolean)blockState.getValue(BASE)) { wallSide = WallSide.TALL; } - if (!(Boolean)blockState.getValue(BASE)) { - if (blockState3 == null) { - blockState3 = blockGetter.getBlockState(blockPos.below()); + if (!(Boolean)state.getValue(BASE)) { + if (blockState2 == null) { + blockState2 = level.getBlockState(pos.below()); } - if (blockState3.is(Blocks.PALE_MOSS_CARPET) && blockState3.getValue(enumProperty) == WallSide.NONE) { + if (blockState2.is(Blocks.PALE_MOSS_CARPET) && blockState2.getValue(enumProperty) == WallSide.NONE) { wallSide = WallSide.NONE; } } } - blockState = blockState.setValue(enumProperty, wallSide); + state = state.setValue(enumProperty, wallSide); } - return blockState; + return state; } @Nullable @@ -204,13 +204,13 @@ public class MossyCarpetBlock extends Block implements BonemealableBlock { return getUpdatedState(this.defaultBlockState(), context.getLevel(), context.getClickedPos(), true); } - public static void placeAt(LevelAccessor levelAccessor, BlockPos blockPos, RandomSource randomSource, int i) { + public static void placeAt(LevelAccessor level, BlockPos pos, RandomSource random, int flags) { BlockState blockState = Blocks.PALE_MOSS_CARPET.defaultBlockState(); - BlockState blockState2 = getUpdatedState(blockState, levelAccessor, blockPos, true); - levelAccessor.setBlock(blockPos, blockState2, 3); - BlockState blockState3 = createTopperWithSideChance(levelAccessor, blockPos, randomSource::nextBoolean); + BlockState blockState2 = getUpdatedState(blockState, level, pos, true); + level.setBlock(pos, blockState2, 3); + BlockState blockState3 = createTopperWithSideChance(level, pos, random::nextBoolean); if (!blockState3.isAir()) { - levelAccessor.setBlock(blockPos.above(), blockState3, i); + level.setBlock(pos.above(), blockState3, flags); } } @@ -225,17 +225,17 @@ public class MossyCarpetBlock extends Block implements BonemealableBlock { } } - private static BlockState createTopperWithSideChance(BlockGetter blockGetter, BlockPos blockPos, BooleanSupplier booleanSupplier) { - BlockPos blockPos2 = blockPos.above(); - BlockState blockState = blockGetter.getBlockState(blockPos2); + private static BlockState createTopperWithSideChance(BlockGetter level, BlockPos pos, BooleanSupplier placeSide) { + BlockPos blockPos = pos.above(); + BlockState blockState = level.getBlockState(blockPos); boolean bl = blockState.is(Blocks.PALE_MOSS_CARPET); if ((!bl || !(Boolean)blockState.getValue(BASE)) && (bl || blockState.canBeReplaced())) { BlockState blockState2 = Blocks.PALE_MOSS_CARPET.defaultBlockState().setValue(BASE, false); - BlockState blockState3 = getUpdatedState(blockState2, blockGetter, blockPos.above(), true); + BlockState blockState3 = getUpdatedState(blockState2, level, pos.above(), true); for (Direction direction : Direction.Plane.HORIZONTAL) { EnumProperty enumProperty = getPropertyForFace(direction); - if (blockState3.getValue(enumProperty) != WallSide.NONE && !booleanSupplier.getAsBoolean()) { + if (blockState3.getValue(enumProperty) != WallSide.NONE && !placeSide.getAsBoolean()) { blockState3 = blockState3.setValue(enumProperty, WallSide.NONE); } } @@ -248,25 +248,25 @@ public class MossyCarpetBlock extends Block implements BonemealableBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (!blockState.canSurvive(levelReader, blockPos)) { + if (!state.canSurvive(level, pos)) { return Blocks.AIR.defaultBlockState(); } else { - BlockState blockState3 = getUpdatedState(blockState, levelReader, blockPos, false); - return !hasFaces(blockState3) ? Blocks.AIR.defaultBlockState() : blockState3; + BlockState blockState = getUpdatedState(state, level, pos, false); + return !hasFaces(blockState) ? Blocks.AIR.defaultBlockState() : blockState; } } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(BASE, NORTH, EAST, SOUTH, WEST); } diff --git a/net/minecraft/world/level/block/MultifaceBlock.java b/net/minecraft/world/level/block/MultifaceBlock.java index 99fca4a0..efd06382 100644 --- a/net/minecraft/world/level/block/MultifaceBlock.java +++ b/net/minecraft/world/level/block/MultifaceBlock.java @@ -22,6 +22,7 @@ import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.Fluids; @@ -108,7 +109,7 @@ public abstract class MultifaceBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { for (Direction direction : DIRECTIONS) { if (this.isFaceSupported(direction)) { builder.add(getFaceProperty(direction)); @@ -118,21 +119,19 @@ public abstract class MultifaceBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (!hasAnyFace(blockState)) { + if (!hasAnyFace(state)) { return Blocks.AIR.defaultBlockState(); } else { - return hasFace(blockState, direction) && !canAttachTo(levelReader, direction, blockPos2, blockState2) - ? removeFace(blockState, getFaceProperty(direction)) - : blockState; + return hasFace(state, direction) && !canAttachTo(level, direction, neighborPos, neighborState) ? removeFace(state, getFaceProperty(direction)) : state; } } diff --git a/net/minecraft/world/level/block/NetherPortalBlock.java b/net/minecraft/world/level/block/NetherPortalBlock.java index 801f249a..8f103e11 100644 --- a/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/net/minecraft/world/level/block/NetherPortalBlock.java @@ -27,7 +27,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.border.WorldBorder; @@ -91,21 +91,21 @@ public class NetherPortalBlock extends Block implements Portal { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { Direction.Axis axis = direction.getAxis(); - Direction.Axis axis2 = blockState.getValue(AXIS); + Direction.Axis axis2 = state.getValue(AXIS); boolean bl = axis2 != axis && axis.isHorizontal(); - return !bl && !blockState2.is(this) && !PortalShape.findAnyShape(levelReader, blockPos, axis2).isComplete() + return !bl && !neighborState.is(this) && !PortalShape.findAnyShape(level, pos, axis2).isComplete() ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -128,40 +128,35 @@ public class NetherPortalBlock extends Block implements Portal { @Nullable @Override - public TeleportTransition getPortalDestination(ServerLevel serverLevel, Entity entity, BlockPos blockPos) { - ResourceKey resourceKey = serverLevel.dimension() == Level.NETHER ? Level.OVERWORLD : Level.NETHER; - ServerLevel serverLevel2 = serverLevel.getServer().getLevel(resourceKey); - if (serverLevel2 == null) { + public TeleportTransition getPortalDestination(ServerLevel level, Entity entity, BlockPos pos) { + ResourceKey resourceKey = level.dimension() == Level.NETHER ? Level.OVERWORLD : Level.NETHER; + ServerLevel serverLevel = level.getServer().getLevel(resourceKey); + if (serverLevel == null) { return null; } else { - boolean bl = serverLevel2.dimension() == Level.NETHER; - WorldBorder worldBorder = serverLevel2.getWorldBorder(); - double d = DimensionType.getTeleportationScale(serverLevel.dimensionType(), serverLevel2.dimensionType()); - BlockPos blockPos2 = worldBorder.clampToBounds(entity.getX() * d, entity.getY(), entity.getZ() * d); - return this.getExitPortal(serverLevel2, entity, blockPos, blockPos2, bl, worldBorder); + boolean bl = serverLevel.dimension() == Level.NETHER; + WorldBorder worldBorder = serverLevel.getWorldBorder(); + double d = DimensionType.getTeleportationScale(level.dimensionType(), serverLevel.dimensionType()); + BlockPos blockPos = worldBorder.clampToBounds(entity.getX() * d, entity.getY(), entity.getZ() * d); + return this.getExitPortal(serverLevel, entity, pos, blockPos, bl, worldBorder); } } @Nullable - private TeleportTransition getExitPortal(ServerLevel serverLevel, Entity entity, BlockPos blockPos, BlockPos blockPos2, boolean bl, WorldBorder worldBorder) { - Optional optional = serverLevel.getPortalForcer().findClosestPortalPosition(blockPos2, bl, worldBorder); + private TeleportTransition getExitPortal(ServerLevel level, Entity entity, BlockPos pos, BlockPos exitPos, boolean isNether, WorldBorder worldBorder) { + Optional optional = level.getPortalForcer().findClosestPortalPosition(exitPos, isNether, worldBorder); FoundRectangle foundRectangle; TeleportTransition.PostTeleportTransition postTeleportTransition; if (optional.isPresent()) { - BlockPos blockPos3 = (BlockPos)optional.get(); - BlockState blockState = serverLevel.getBlockState(blockPos3); + BlockPos blockPos = (BlockPos)optional.get(); + BlockState blockState = level.getBlockState(blockPos); foundRectangle = BlockUtil.getLargestRectangleAround( - blockPos3, - blockState.getValue(BlockStateProperties.HORIZONTAL_AXIS), - 21, - Direction.Axis.Y, - 21, - blockPosx -> serverLevel.getBlockState(blockPosx) == blockState + blockPos, blockState.getValue(BlockStateProperties.HORIZONTAL_AXIS), 21, Direction.Axis.Y, 21, blockPosx -> level.getBlockState(blockPosx) == blockState ); - postTeleportTransition = TeleportTransition.PLAY_PORTAL_SOUND.then(entityx -> entityx.placePortalTicket(blockPos3)); + postTeleportTransition = TeleportTransition.PLAY_PORTAL_SOUND.then(entityx -> entityx.placePortalTicket(blockPos)); } else { - Direction.Axis axis = (Direction.Axis)entity.level().getBlockState(blockPos).getOptionalValue(AXIS).orElse(Direction.Axis.X); - Optional optional2 = serverLevel.getPortalForcer().createPortal(blockPos2, axis); + Direction.Axis axis = (Direction.Axis)entity.level().getBlockState(pos).getOptionalValue(AXIS).orElse(Direction.Axis.X); + Optional optional2 = level.getPortalForcer().createPortal(exitPos, axis); if (optional2.isEmpty()) { LOGGER.error("Unable to create a portal, likely target out of worldborder"); return null; @@ -171,51 +166,51 @@ public class NetherPortalBlock extends Block implements Portal { postTeleportTransition = TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET); } - return getDimensionTransitionFromExit(entity, blockPos, foundRectangle, serverLevel, postTeleportTransition); + return getDimensionTransitionFromExit(entity, pos, foundRectangle, level, postTeleportTransition); } private static TeleportTransition getDimensionTransitionFromExit( - Entity entity, BlockPos blockPos, FoundRectangle foundRectangle, ServerLevel serverLevel, TeleportTransition.PostTeleportTransition postTeleportTransition + Entity entity, BlockPos pos, FoundRectangle rectangle, ServerLevel level, TeleportTransition.PostTeleportTransition postTeleportTransition ) { - BlockState blockState = entity.level().getBlockState(blockPos); + BlockState blockState = entity.level().getBlockState(pos); Direction.Axis axis; Vec3 vec3; if (blockState.hasProperty(BlockStateProperties.HORIZONTAL_AXIS)) { axis = blockState.getValue(BlockStateProperties.HORIZONTAL_AXIS); - FoundRectangle foundRectangle2 = BlockUtil.getLargestRectangleAround( - blockPos, axis, 21, Direction.Axis.Y, 21, blockPosx -> entity.level().getBlockState(blockPosx) == blockState + FoundRectangle foundRectangle = BlockUtil.getLargestRectangleAround( + pos, axis, 21, Direction.Axis.Y, 21, blockPos -> entity.level().getBlockState(blockPos) == blockState ); - vec3 = entity.getRelativePortalPosition(axis, foundRectangle2); + vec3 = entity.getRelativePortalPosition(axis, foundRectangle); } else { axis = Direction.Axis.X; vec3 = new Vec3(0.5, 0.0, 0.0); } - return createDimensionTransition(serverLevel, foundRectangle, axis, vec3, entity, postTeleportTransition); + return createDimensionTransition(level, rectangle, axis, vec3, entity, postTeleportTransition); } private static TeleportTransition createDimensionTransition( - ServerLevel serverLevel, - FoundRectangle foundRectangle, + ServerLevel level, + FoundRectangle rectangle, Direction.Axis axis, - Vec3 vec3, + Vec3 offset, Entity entity, TeleportTransition.PostTeleportTransition postTeleportTransition ) { - BlockPos blockPos = foundRectangle.minCorner; - BlockState blockState = serverLevel.getBlockState(blockPos); + BlockPos blockPos = rectangle.minCorner; + BlockState blockState = level.getBlockState(blockPos); Direction.Axis axis2 = (Direction.Axis)blockState.getOptionalValue(BlockStateProperties.HORIZONTAL_AXIS).orElse(Direction.Axis.X); - double d = foundRectangle.axis1Size; - double e = foundRectangle.axis2Size; + double d = rectangle.axis1Size; + double e = rectangle.axis2Size; EntityDimensions entityDimensions = entity.getDimensions(entity.getPose()); int i = axis == axis2 ? 0 : 90; - double f = entityDimensions.width() / 2.0 + (d - entityDimensions.width()) * vec3.x(); - double g = (e - entityDimensions.height()) * vec3.y(); - double h = 0.5 + vec3.z(); + double f = entityDimensions.width() / 2.0 + (d - entityDimensions.width()) * offset.x(); + double g = (e - entityDimensions.height()) * offset.y(); + double h = 0.5 + offset.z(); boolean bl = axis2 == Direction.Axis.X; - Vec3 vec32 = new Vec3(blockPos.getX() + (bl ? f : h), blockPos.getY() + g, blockPos.getZ() + (bl ? h : f)); - Vec3 vec33 = PortalShape.findCollisionFreePosition(vec32, serverLevel, entity, entityDimensions); - return new TeleportTransition(serverLevel, vec33, Vec3.ZERO, i, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), postTeleportTransition); + Vec3 vec3 = new Vec3(blockPos.getX() + (bl ? f : h), blockPos.getY() + g, blockPos.getZ() + (bl ? h : f)); + Vec3 vec32 = PortalShape.findCollisionFreePosition(vec3, level, entity, entityDimensions); + return new TeleportTransition(level, vec32, Vec3.ZERO, i, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), postTeleportTransition); } @Override @@ -275,7 +270,7 @@ public class NetherPortalBlock extends Block implements Portal { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AXIS); } } diff --git a/net/minecraft/world/level/block/NetherWartBlock.java b/net/minecraft/world/level/block/NetherWartBlock.java index 022e05f0..b33391c2 100644 --- a/net/minecraft/world/level/block/NetherWartBlock.java +++ b/net/minecraft/world/level/block/NetherWartBlock.java @@ -10,7 +10,7 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.phys.shapes.CollisionContext; @@ -67,7 +67,7 @@ public class NetherWartBlock extends BushBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AGE); } } diff --git a/net/minecraft/world/level/block/NoteBlock.java b/net/minecraft/world/level/block/NoteBlock.java index 606a5e8b..8b1842b5 100644 --- a/net/minecraft/world/level/block/NoteBlock.java +++ b/net/minecraft/world/level/block/NoteBlock.java @@ -23,7 +23,7 @@ import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.entity.SkullBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -51,14 +51,14 @@ public class NoteBlock extends Block { this.registerDefaultState(this.stateDefinition.any().setValue(INSTRUMENT, NoteBlockInstrument.HARP).setValue(NOTE, 0).setValue(POWERED, false)); } - private BlockState setInstrument(LevelReader levelReader, BlockPos blockPos, BlockState blockState) { - NoteBlockInstrument noteBlockInstrument = levelReader.getBlockState(blockPos.above()).instrument(); + private BlockState setInstrument(LevelReader level, BlockPos pos, BlockState state) { + NoteBlockInstrument noteBlockInstrument = level.getBlockState(pos.above()).instrument(); if (noteBlockInstrument.worksAboveNoteBlock()) { - return blockState.setValue(INSTRUMENT, noteBlockInstrument); + return state.setValue(INSTRUMENT, noteBlockInstrument); } else { - NoteBlockInstrument noteBlockInstrument2 = levelReader.getBlockState(blockPos.below()).instrument(); + NoteBlockInstrument noteBlockInstrument2 = level.getBlockState(pos.below()).instrument(); NoteBlockInstrument noteBlockInstrument3 = noteBlockInstrument2.worksAboveNoteBlock() ? NoteBlockInstrument.HARP : noteBlockInstrument2; - return blockState.setValue(INSTRUMENT, noteBlockInstrument3); + return state.setValue(INSTRUMENT, noteBlockInstrument3); } } @@ -69,30 +69,28 @@ public class NoteBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { boolean bl = direction.getAxis() == Direction.Axis.Y; - return bl - ? this.setInstrument(levelReader, blockPos, blockState) - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return bl ? this.setInstrument(level, pos, state) : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - boolean bl2 = level.hasNeighborSignal(blockPos); - if (bl2 != (Boolean)blockState.getValue(POWERED)) { - if (bl2) { - this.playNote(null, blockState, level, blockPos); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + boolean bl = level.hasNeighborSignal(pos); + if (bl != (Boolean)state.getValue(POWERED)) { + if (bl) { + this.playNote(null, state, level, pos); } - level.setBlock(blockPos, blockState.setValue(POWERED, bl2), 3); + level.setBlock(pos, state.setValue(POWERED, bl), 3); } } @@ -105,11 +103,11 @@ public class NoteBlock extends Block { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - return (InteractionResult)(itemStack.is(ItemTags.NOTE_BLOCK_TOP_INSTRUMENTS) && blockHitResult.getDirection() == Direction.UP + return (InteractionResult)(stack.is(ItemTags.NOTE_BLOCK_TOP_INSTRUMENTS) && hitResult.getDirection() == Direction.UP ? InteractionResult.PASS - : super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult)); + : super.useItemOn(stack, state, level, pos, player, hand, hitResult)); } @Override @@ -170,7 +168,7 @@ public class NoteBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(INSTRUMENT, POWERED, NOTE); } } diff --git a/net/minecraft/world/level/block/ObserverBlock.java b/net/minecraft/world/level/block/ObserverBlock.java index b8649aca..8ffa32f7 100644 --- a/net/minecraft/world/level/block/ObserverBlock.java +++ b/net/minecraft/world/level/block/ObserverBlock.java @@ -12,7 +12,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.redstone.ExperimentalRedstoneUtils; @@ -33,7 +33,7 @@ public class ObserverBlock extends DirectionalBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, POWERED); } @@ -61,25 +61,25 @@ public class ObserverBlock extends DirectionalBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (blockState.getValue(FACING) == direction && !(Boolean)blockState.getValue(POWERED)) { - this.startSignal(levelReader, scheduledTickAccess, blockPos); + if (state.getValue(FACING) == direction && !(Boolean)state.getValue(POWERED)) { + this.startSignal(level, scheduledTickAccess, pos); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } - private void startSignal(LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos blockPos) { - if (!levelReader.isClientSide() && !scheduledTickAccess.getBlockTicks().hasScheduledTick(blockPos, this)) { - scheduledTickAccess.scheduleTick(blockPos, this, 2); + private void startSignal(LevelReader level, ScheduledTickAccess scheduledTickAccess, BlockPos pos) { + if (!level.isClientSide() && !scheduledTickAccess.getBlockTicks().hasScheduledTick(pos, this)) { + scheduledTickAccess.scheduleTick(pos, this, 2); } } diff --git a/net/minecraft/world/level/block/PinkPetalsBlock.java b/net/minecraft/world/level/block/PinkPetalsBlock.java index c2cac83f..089346a5 100644 --- a/net/minecraft/world/level/block/PinkPetalsBlock.java +++ b/net/minecraft/world/level/block/PinkPetalsBlock.java @@ -14,7 +14,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -88,7 +88,7 @@ public class PinkPetalsBlock extends BushBlock implements BonemealableBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, AMOUNT); } diff --git a/net/minecraft/world/level/block/PipeBlock.java b/net/minecraft/world/level/block/PipeBlock.java index 6d6b0462..bda915a6 100644 --- a/net/minecraft/world/level/block/PipeBlock.java +++ b/net/minecraft/world/level/block/PipeBlock.java @@ -79,7 +79,7 @@ public abstract class PipeBlock extends Block { } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { + protected boolean propagatesSkylightDown(BlockState state) { return false; } diff --git a/net/minecraft/world/level/block/PitcherCropBlock.java b/net/minecraft/world/level/block/PitcherCropBlock.java index d554575f..a97503de 100644 --- a/net/minecraft/world/level/block/PitcherCropBlock.java +++ b/net/minecraft/world/level/block/PitcherCropBlock.java @@ -17,7 +17,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -73,19 +73,19 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl @Override public BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (isDouble((Integer)blockState.getValue(AGE))) { - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + if (isDouble((Integer)state.getValue(AGE))) { + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } else { - return blockState.canSurvive(levelReader, blockPos) ? blockState : Blocks.AIR.defaultBlockState(); + return state.canSurvive(level, pos) ? state : Blocks.AIR.defaultBlockState(); } } @@ -100,7 +100,7 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AGE); super.createBlockStateDefinition(builder); } diff --git a/net/minecraft/world/level/block/PointedDripstoneBlock.java b/net/minecraft/world/level/block/PointedDripstoneBlock.java index 95dfa2e6..4e80f612 100644 --- a/net/minecraft/world/level/block/PointedDripstoneBlock.java +++ b/net/minecraft/world/level/block/PointedDripstoneBlock.java @@ -25,7 +25,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.DripstoneThickness; @@ -89,7 +89,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(TIP_DIRECTION, THICKNESS, WATERLOGGED); } @@ -100,37 +100,37 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } if (direction != Direction.UP && direction != Direction.DOWN) { - return blockState; + return state; } else { - Direction direction2 = blockState.getValue(TIP_DIRECTION); - if (direction2 == Direction.DOWN && scheduledTickAccess.getBlockTicks().hasScheduledTick(blockPos, this)) { - return blockState; - } else if (direction == direction2.getOpposite() && !this.canSurvive(blockState, levelReader, blockPos)) { + Direction direction2 = state.getValue(TIP_DIRECTION); + if (direction2 == Direction.DOWN && scheduledTickAccess.getBlockTicks().hasScheduledTick(pos, this)) { + return state; + } else if (direction == direction2.getOpposite() && !this.canSurvive(state, level, pos)) { if (direction2 == Direction.DOWN) { - scheduledTickAccess.scheduleTick(blockPos, this, 2); + scheduledTickAccess.scheduleTick(pos, this, 2); } else { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + scheduledTickAccess.scheduleTick(pos, this, 1); } - return blockState; + return state; } else { - boolean bl = blockState.getValue(THICKNESS) == DripstoneThickness.TIP_MERGE; - DripstoneThickness dripstoneThickness = calculateDripstoneThickness(levelReader, blockPos, direction2, bl); - return blockState.setValue(THICKNESS, dripstoneThickness); + boolean bl = state.getValue(THICKNESS) == DripstoneThickness.TIP_MERGE; + DripstoneThickness dripstoneThickness = calculateDripstoneThickness(level, pos, direction2, bl); + return state.setValue(THICKNESS, dripstoneThickness); } } } @@ -260,7 +260,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate } @Override - protected VoxelShape getOcclusionShape(BlockState blockState) { + protected VoxelShape getOcclusionShape(BlockState state) { return Shapes.empty(); } diff --git a/net/minecraft/world/level/block/Portal.java b/net/minecraft/world/level/block/Portal.java index d173df53..2ccd8caa 100644 --- a/net/minecraft/world/level/block/Portal.java +++ b/net/minecraft/world/level/block/Portal.java @@ -12,7 +12,7 @@ public interface Portal { } @Nullable - TeleportTransition getPortalDestination(ServerLevel serverLevel, Entity entity, BlockPos blockPos); + TeleportTransition getPortalDestination(ServerLevel level, Entity entity, BlockPos pos); default Portal.Transition getLocalTransition() { return Portal.Transition.NONE; diff --git a/net/minecraft/world/level/block/PoweredRailBlock.java b/net/minecraft/world/level/block/PoweredRailBlock.java index 51d9f207..950fcc59 100644 --- a/net/minecraft/world/level/block/PoweredRailBlock.java +++ b/net/minecraft/world/level/block/PoweredRailBlock.java @@ -5,7 +5,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -263,7 +263,7 @@ public class PoweredRailBlock extends BaseRailBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(SHAPE, POWERED, WATERLOGGED); } } diff --git a/net/minecraft/world/level/block/PressurePlateBlock.java b/net/minecraft/world/level/block/PressurePlateBlock.java index b46c2e88..a07b92a8 100644 --- a/net/minecraft/world/level/block/PressurePlateBlock.java +++ b/net/minecraft/world/level/block/PressurePlateBlock.java @@ -8,7 +8,7 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; @@ -50,7 +50,7 @@ public class PressurePlateBlock extends BasePressurePlateBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(POWERED); } } diff --git a/net/minecraft/world/level/block/PumpkinBlock.java b/net/minecraft/world/level/block/PumpkinBlock.java index 81a7c569..2d81d508 100644 --- a/net/minecraft/world/level/block/PumpkinBlock.java +++ b/net/minecraft/world/level/block/PumpkinBlock.java @@ -33,30 +33,30 @@ public class PumpkinBlock extends Block { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - if (!itemStack.is(Items.SHEARS)) { - return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult); + if (!stack.is(Items.SHEARS)) { + return super.useItemOn(stack, state, level, pos, player, hand, hitResult); } else if (level.isClientSide) { return InteractionResult.SUCCESS; } else { - Direction direction = blockHitResult.getDirection(); + Direction direction = hitResult.getDirection(); Direction direction2 = direction.getAxis() == Direction.Axis.Y ? player.getDirection().getOpposite() : direction; - level.playSound(null, blockPos, SoundEvents.PUMPKIN_CARVE, SoundSource.BLOCKS, 1.0F, 1.0F); - level.setBlock(blockPos, Blocks.CARVED_PUMPKIN.defaultBlockState().setValue(CarvedPumpkinBlock.FACING, direction2), 11); + level.playSound(null, pos, SoundEvents.PUMPKIN_CARVE, SoundSource.BLOCKS, 1.0F, 1.0F); + level.setBlock(pos, Blocks.CARVED_PUMPKIN.defaultBlockState().setValue(CarvedPumpkinBlock.FACING, direction2), 11); ItemEntity itemEntity = new ItemEntity( level, - blockPos.getX() + 0.5 + direction2.getStepX() * 0.65, - blockPos.getY() + 0.1, - blockPos.getZ() + 0.5 + direction2.getStepZ() * 0.65, + pos.getX() + 0.5 + direction2.getStepX() * 0.65, + pos.getY() + 0.1, + pos.getZ() + 0.5 + direction2.getStepZ() * 0.65, new ItemStack(Items.PUMPKIN_SEEDS, 4) ); itemEntity.setDeltaMovement( 0.05 * direction2.getStepX() + level.random.nextDouble() * 0.02, 0.05, 0.05 * direction2.getStepZ() + level.random.nextDouble() * 0.02 ); level.addFreshEntity(itemEntity); - itemStack.hurtAndBreak(1, player, LivingEntity.getSlotForHand(interactionHand)); - level.gameEvent(player, GameEvent.SHEAR, blockPos); + stack.hurtAndBreak(1, player, LivingEntity.getSlotForHand(hand)); + level.gameEvent(player, GameEvent.SHEAR, pos); player.awardStat(Stats.ITEM_USED.get(Items.SHEARS)); return InteractionResult.SUCCESS; } diff --git a/net/minecraft/world/level/block/RailBlock.java b/net/minecraft/world/level/block/RailBlock.java index f7a4e02d..dde3cd00 100644 --- a/net/minecraft/world/level/block/RailBlock.java +++ b/net/minecraft/world/level/block/RailBlock.java @@ -5,7 +5,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.Property; @@ -170,7 +170,7 @@ public class RailBlock extends BaseRailBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(SHAPE, WATERLOGGED); } } diff --git a/net/minecraft/world/level/block/RedStoneOreBlock.java b/net/minecraft/world/level/block/RedStoneOreBlock.java index 1cdf519c..1141474b 100644 --- a/net/minecraft/world/level/block/RedStoneOreBlock.java +++ b/net/minecraft/world/level/block/RedStoneOreBlock.java @@ -17,7 +17,7 @@ import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.BlockHitResult; @@ -52,15 +52,15 @@ public class RedStoneOreBlock extends Block { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { if (level.isClientSide) { - spawnParticles(level, blockPos); + spawnParticles(level, pos); } else { - interact(blockState, level, blockPos); + interact(state, level, pos); } - return (InteractionResult)(itemStack.getItem() instanceof BlockItem && new BlockPlaceContext(player, interactionHand, itemStack, blockHitResult).canPlace() + return (InteractionResult)(stack.getItem() instanceof BlockItem && new BlockPlaceContext(player, hand, stack, hitResult).canPlace() ? InteractionResult.PASS : InteractionResult.SUCCESS); } @@ -116,7 +116,7 @@ public class RedStoneOreBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(LIT); } } diff --git a/net/minecraft/world/level/block/RedStoneWireBlock.java b/net/minecraft/world/level/block/RedStoneWireBlock.java index ea2904f6..48cba8e2 100644 --- a/net/minecraft/world/level/block/RedStoneWireBlock.java +++ b/net/minecraft/world/level/block/RedStoneWireBlock.java @@ -22,7 +22,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -195,28 +195,25 @@ public class RedStoneWireBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { if (direction == Direction.DOWN) { - return !this.canSurviveOn(levelReader, blockPos2, blockState2) ? Blocks.AIR.defaultBlockState() : blockState; + return !this.canSurviveOn(level, neighborPos, neighborState) ? Blocks.AIR.defaultBlockState() : state; } else if (direction == Direction.UP) { - return this.getConnectionState(levelReader, blockState, blockPos); + return this.getConnectionState(level, state, pos); } else { - RedstoneSide redstoneSide = this.getConnectingSide(levelReader, blockPos, direction); - return redstoneSide.isConnected() == ((RedstoneSide)blockState.getValue((Property)PROPERTY_BY_DIRECTION.get(direction))).isConnected() - && !isCross(blockState) - ? blockState.setValue((Property)PROPERTY_BY_DIRECTION.get(direction), redstoneSide) + RedstoneSide redstoneSide = this.getConnectingSide(level, pos, direction); + return redstoneSide.isConnected() == ((RedstoneSide)state.getValue((Property)PROPERTY_BY_DIRECTION.get(direction))).isConnected() && !isCross(state) + ? state.setValue((Property)PROPERTY_BY_DIRECTION.get(direction), redstoneSide) : this.getConnectionState( - levelReader, - this.crossState.setValue(POWER, (Integer)blockState.getValue(POWER)).setValue((Property)PROPERTY_BY_DIRECTION.get(direction), redstoneSide), - blockPos + level, this.crossState.setValue(POWER, (Integer)state.getValue(POWER)).setValue((Property)PROPERTY_BY_DIRECTION.get(direction), redstoneSide), pos ); } } @@ -294,17 +291,17 @@ public class RedStoneWireBlock extends Block { return state.isFaceSturdy(level, pos, Direction.UP) || state.is(Blocks.HOPPER); } - private void updatePowerStrength(Level level, BlockPos blockPos, BlockState blockState, @Nullable Orientation orientation, boolean bl) { + private void updatePowerStrength(Level level, BlockPos pos, BlockState state, @Nullable Orientation orientation, boolean updateShape) { if (useExperimentalEvaluator(level)) { - new ExperimentalRedstoneWireEvaluator(this).updatePowerStrength(level, blockPos, blockState, orientation, bl); + new ExperimentalRedstoneWireEvaluator(this).updatePowerStrength(level, pos, state, orientation, updateShape); } else { - this.evaluator.updatePowerStrength(level, blockPos, blockState, orientation, bl); + this.evaluator.updatePowerStrength(level, pos, state, orientation, updateShape); } } - public int getBlockSignal(Level level, BlockPos blockPos) { + public int getBlockSignal(Level level, BlockPos pos) { this.shouldSignal = false; - int i = level.getBestNeighborSignal(blockPos); + int i = level.getBestNeighborSignal(pos); this.shouldSignal = true; return i; } @@ -366,14 +363,14 @@ public class RedStoneWireBlock extends Block { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { if (!level.isClientSide) { - if (block != this || !useExperimentalEvaluator(level)) { - if (blockState.canSurvive(level, blockPos)) { - this.updatePowerStrength(level, blockPos, blockState, orientation, false); + if (neighborBlock != this || !useExperimentalEvaluator(level)) { + if (state.canSurvive(level, pos)) { + this.updatePowerStrength(level, pos, state, orientation, false); } else { - dropResources(blockState, level, blockPos); - level.removeBlock(blockPos, false); + dropResources(state, level, pos); + level.removeBlock(pos, false); } } } @@ -430,16 +427,16 @@ public class RedStoneWireBlock extends Block { } private static void spawnParticlesAlongLine( - Level level, RandomSource randomSource, BlockPos blockPos, int i, Direction direction, Direction direction2, float f, float g + Level level, RandomSource random, BlockPos pos, int color, Direction direction, Direction perpendicularDirection, float start, float end ) { - float h = g - f; - if (!(randomSource.nextFloat() >= 0.2F * h)) { - float j = 0.4375F; - float k = f + h * randomSource.nextFloat(); - double d = 0.5 + 0.4375F * direction.getStepX() + k * direction2.getStepX(); - double e = 0.5 + 0.4375F * direction.getStepY() + k * direction2.getStepY(); - double l = 0.5 + 0.4375F * direction.getStepZ() + k * direction2.getStepZ(); - level.addParticle(new DustParticleOptions(i, 1.0F), blockPos.getX() + d, blockPos.getY() + e, blockPos.getZ() + l, 0.0, 0.0, 0.0); + float f = end - start; + if (!(random.nextFloat() >= 0.2F * f)) { + float g = 0.4375F; + float h = start + f * random.nextFloat(); + double d = 0.5 + 0.4375F * direction.getStepX() + h * perpendicularDirection.getStepX(); + double e = 0.5 + 0.4375F * direction.getStepY() + h * perpendicularDirection.getStepY(); + double i = 0.5 + 0.4375F * direction.getStepZ() + h * perpendicularDirection.getStepZ(); + level.addParticle(new DustParticleOptions(color, 1.0F), pos.getX() + d, pos.getY() + e, pos.getZ() + i, 0.0, 0.0, 0.0); } } @@ -499,7 +496,7 @@ public class RedStoneWireBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(NORTH, EAST, SOUTH, WEST, POWER); } diff --git a/net/minecraft/world/level/block/RedstoneLampBlock.java b/net/minecraft/world/level/block/RedstoneLampBlock.java index 9e5b2d3c..94477cc9 100644 --- a/net/minecraft/world/level/block/RedstoneLampBlock.java +++ b/net/minecraft/world/level/block/RedstoneLampBlock.java @@ -8,7 +8,7 @@ import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.redstone.Orientation; import org.jetbrains.annotations.Nullable; @@ -34,14 +34,14 @@ public class RedstoneLampBlock extends Block { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { if (!level.isClientSide) { - boolean bl2 = (Boolean)blockState.getValue(LIT); - if (bl2 != level.hasNeighborSignal(blockPos)) { - if (bl2) { - level.scheduleTick(blockPos, this, 4); + boolean bl = (Boolean)state.getValue(LIT); + if (bl != level.hasNeighborSignal(pos)) { + if (bl) { + level.scheduleTick(pos, this, 4); } else { - level.setBlock(blockPos, blockState.cycle(LIT), 2); + level.setBlock(pos, state.cycle(LIT), 2); } } } @@ -55,7 +55,7 @@ public class RedstoneLampBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(LIT); } } diff --git a/net/minecraft/world/level/block/RedstoneTorchBlock.java b/net/minecraft/world/level/block/RedstoneTorchBlock.java index 73b90e23..6c9ad6fe 100644 --- a/net/minecraft/world/level/block/RedstoneTorchBlock.java +++ b/net/minecraft/world/level/block/RedstoneTorchBlock.java @@ -14,7 +14,7 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.redstone.ExperimentalRedstoneUtils; @@ -45,11 +45,11 @@ public class RedstoneTorchBlock extends BaseTorchBlock { this.notifyNeighbors(level, pos, state); } - private void notifyNeighbors(Level level, BlockPos blockPos, BlockState blockState) { - Orientation orientation = this.randomOrientation(level, blockState); + private void notifyNeighbors(Level level, BlockPos pos, BlockState state) { + Orientation orientation = this.randomOrientation(level, state); for (Direction direction : Direction.values()) { - level.updateNeighborsAt(blockPos.relative(direction), this, ExperimentalRedstoneUtils.withFront(orientation, direction)); + level.updateNeighborsAt(pos.relative(direction), this, ExperimentalRedstoneUtils.withFront(orientation, direction)); } } @@ -92,9 +92,9 @@ public class RedstoneTorchBlock extends BaseTorchBlock { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - if ((Boolean)blockState.getValue(LIT) == this.hasNeighborSignal(level, blockPos, blockState) && !level.getBlockTicks().willTickThisTick(blockPos, this)) { - level.scheduleTick(blockPos, this, 2); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + if ((Boolean)state.getValue(LIT) == this.hasNeighborSignal(level, pos, state) && !level.getBlockTicks().willTickThisTick(pos, this)) { + level.scheduleTick(pos, this, 2); } } @@ -119,7 +119,7 @@ public class RedstoneTorchBlock extends BaseTorchBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(LIT); } @@ -143,7 +143,7 @@ public class RedstoneTorchBlock extends BaseTorchBlock { } @Nullable - protected Orientation randomOrientation(Level level, BlockState blockState) { + protected Orientation randomOrientation(Level level, BlockState state) { return ExperimentalRedstoneUtils.initialOrientation(level, null, Direction.UP); } diff --git a/net/minecraft/world/level/block/RedstoneWallTorchBlock.java b/net/minecraft/world/level/block/RedstoneWallTorchBlock.java index 70ddde3c..17361900 100644 --- a/net/minecraft/world/level/block/RedstoneWallTorchBlock.java +++ b/net/minecraft/world/level/block/RedstoneWallTorchBlock.java @@ -12,7 +12,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.redstone.ExperimentalRedstoneUtils; @@ -48,16 +48,16 @@ public class RedstoneWallTorchBlock extends RedstoneTorchBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction.getOpposite() == blockState.getValue(FACING) && !blockState.canSurvive(levelReader, blockPos) ? Blocks.AIR.defaultBlockState() : blockState; + return direction.getOpposite() == state.getValue(FACING) && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() : state; } @Nullable @@ -101,13 +101,13 @@ public class RedstoneWallTorchBlock extends RedstoneTorchBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, LIT); } @Nullable @Override - protected Orientation randomOrientation(Level level, BlockState blockState) { - return ExperimentalRedstoneUtils.initialOrientation(level, ((Direction)blockState.getValue(FACING)).getOpposite(), Direction.UP); + protected Orientation randomOrientation(Level level, BlockState state) { + return ExperimentalRedstoneUtils.initialOrientation(level, ((Direction)state.getValue(FACING)).getOpposite(), Direction.UP); } } diff --git a/net/minecraft/world/level/block/RepeaterBlock.java b/net/minecraft/world/level/block/RepeaterBlock.java index c9e46336..4a1a4b79 100644 --- a/net/minecraft/world/level/block/RepeaterBlock.java +++ b/net/minecraft/world/level/block/RepeaterBlock.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -57,21 +57,21 @@ public class RepeaterBlock extends DiodeBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction == Direction.DOWN && !this.canSurviveOn(levelReader, blockPos2, blockState2)) { + if (direction == Direction.DOWN && !this.canSurviveOn(level, neighborPos, neighborState)) { return Blocks.AIR.defaultBlockState(); } else { - return !levelReader.isClientSide() && direction.getAxis() != ((Direction)blockState.getValue(FACING)).getAxis() - ? blockState.setValue(LOCKED, this.isLocked(levelReader, blockPos, blockState)) - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return !level.isClientSide() && direction.getAxis() != ((Direction)state.getValue(FACING)).getAxis() + ? state.setValue(LOCKED, this.isLocked(level, pos, state)) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } } @@ -105,7 +105,7 @@ public class RepeaterBlock extends DiodeBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, DELAY, LOCKED, POWERED); } } diff --git a/net/minecraft/world/level/block/RespawnAnchorBlock.java b/net/minecraft/world/level/block/RespawnAnchorBlock.java index 7bf2b426..e444a054 100644 --- a/net/minecraft/world/level/block/RespawnAnchorBlock.java +++ b/net/minecraft/world/level/block/RespawnAnchorBlock.java @@ -1,7 +1,6 @@ package net.minecraft.world.level.block; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableList.Builder; import com.mojang.serialization.MapCodec; import java.util.Optional; import net.minecraft.core.BlockPos; @@ -29,7 +28,7 @@ import net.minecraft.world.level.ExplosionDamageCalculator; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.gameevent.GameEvent; @@ -55,7 +54,7 @@ public class RespawnAnchorBlock extends Block { new Vec3i(-1, 0, 1), new Vec3i(1, 0, 1) ); - private static final ImmutableList RESPAWN_OFFSETS = new Builder() + private static final ImmutableList RESPAWN_OFFSETS = new com.google.common.collect.ImmutableList.Builder() .addAll(RESPAWN_HORIZONTAL_OFFSETS) .addAll(RESPAWN_HORIZONTAL_OFFSETS.stream().map(Vec3i::below).iterator()) .addAll(RESPAWN_HORIZONTAL_OFFSETS.stream().map(Vec3i::above).iterator()) @@ -74,16 +73,14 @@ public class RespawnAnchorBlock extends Block { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - if (isRespawnFuel(itemStack) && canBeCharged(blockState)) { - charge(player, level, blockPos, blockState); - itemStack.consume(1, player); + if (isRespawnFuel(stack) && canBeCharged(state)) { + charge(player, level, pos, state); + stack.consume(1, player); return InteractionResult.SUCCESS; } else { - return (InteractionResult)(interactionHand == InteractionHand.MAIN_HAND - && isRespawnFuel(player.getItemInHand(InteractionHand.OFF_HAND)) - && canBeCharged(blockState) + return (InteractionResult)(hand == InteractionHand.MAIN_HAND && isRespawnFuel(player.getItemInHand(InteractionHand.OFF_HAND)) && canBeCharged(state) ? InteractionResult.PASS : InteractionResult.TRY_WITH_EMPTY_HAND); } @@ -181,7 +178,7 @@ public class RespawnAnchorBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(CHARGE); } diff --git a/net/minecraft/world/level/block/RotatedPillarBlock.java b/net/minecraft/world/level/block/RotatedPillarBlock.java index 2333196f..6ce194ab 100644 --- a/net/minecraft/world/level/block/RotatedPillarBlock.java +++ b/net/minecraft/world/level/block/RotatedPillarBlock.java @@ -5,7 +5,7 @@ import net.minecraft.core.Direction; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -46,7 +46,7 @@ public class RotatedPillarBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AXIS); } diff --git a/net/minecraft/world/level/block/SaplingBlock.java b/net/minecraft/world/level/block/SaplingBlock.java index d3617dc2..df3b7589 100644 --- a/net/minecraft/world/level/block/SaplingBlock.java +++ b/net/minecraft/world/level/block/SaplingBlock.java @@ -11,7 +11,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.grower.TreeGrower; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.phys.shapes.CollisionContext; @@ -74,7 +74,7 @@ public class SaplingBlock extends BushBlock implements BonemealableBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(STAGE); } } diff --git a/net/minecraft/world/level/block/ScaffoldingBlock.java b/net/minecraft/world/level/block/ScaffoldingBlock.java index 16a45ae3..48557df2 100644 --- a/net/minecraft/world/level/block/ScaffoldingBlock.java +++ b/net/minecraft/world/level/block/ScaffoldingBlock.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -46,7 +46,7 @@ public class ScaffoldingBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(DISTANCE, WATERLOGGED, BOTTOM); } @@ -89,24 +89,24 @@ public class ScaffoldingBlock extends Block implements SimpleWaterloggedBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - if (!levelReader.isClientSide()) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + if (!level.isClientSide()) { + scheduledTickAccess.scheduleTick(pos, this, 1); } - return blockState; + return state; } @Override diff --git a/net/minecraft/world/level/block/SculkSensorBlock.java b/net/minecraft/world/level/block/SculkSensorBlock.java index cede5a56..2b83017f 100644 --- a/net/minecraft/world/level/block/SculkSensorBlock.java +++ b/net/minecraft/world/level/block/SculkSensorBlock.java @@ -26,7 +26,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.SculkSensorBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -131,20 +131,20 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } private static void updateNeighbours(Level level, BlockPos pos, BlockState state) { @@ -257,7 +257,7 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(PHASE, POWER, WATERLOGGED); } diff --git a/net/minecraft/world/level/block/SculkShriekerBlock.java b/net/minecraft/world/level/block/SculkShriekerBlock.java index e032b29c..6b48cbf2 100644 --- a/net/minecraft/world/level/block/SculkShriekerBlock.java +++ b/net/minecraft/world/level/block/SculkShriekerBlock.java @@ -20,7 +20,7 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.SculkShriekerBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.gameevent.vibrations.VibrationSystem.Ticker; @@ -49,7 +49,7 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(SHRIEKING); builder.add(WATERLOGGED); builder.add(CAN_SUMMON); @@ -96,7 +96,7 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo } @Override - protected VoxelShape getOcclusionShape(BlockState blockState) { + protected VoxelShape getOcclusionShape(BlockState state) { return COLLIDER; } @@ -113,20 +113,20 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Nullable diff --git a/net/minecraft/world/level/block/SculkSpreader.java b/net/minecraft/world/level/block/SculkSpreader.java index 14578e54..15b23e74 100644 --- a/net/minecraft/world/level/block/SculkSpreader.java +++ b/net/minecraft/world/level/block/SculkSpreader.java @@ -230,8 +230,8 @@ public class SculkSpreader { return this.pos; } - boolean isPosUnreasonable(BlockPos blockPos) { - return this.pos.distChessboard(blockPos) > 1024; + boolean isPosUnreasonable(BlockPos pos) { + return this.pos.distChessboard(pos) > 1024; } public int getCharge() { diff --git a/net/minecraft/world/level/block/SculkVeinBlock.java b/net/minecraft/world/level/block/SculkVeinBlock.java index 701b7a63..6c25a058 100644 --- a/net/minecraft/world/level/block/SculkVeinBlock.java +++ b/net/minecraft/world/level/block/SculkVeinBlock.java @@ -20,7 +20,7 @@ import net.minecraft.world.level.block.MultifaceSpreader.DefaultSpreaderConfig; import net.minecraft.world.level.block.MultifaceSpreader.SpreadType; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; @@ -156,24 +156,24 @@ public class SculkVeinBlock extends MultifaceBlock implements SculkBehaviour, Si @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { super.createBlockStateDefinition(builder); builder.add(WATERLOGGED); } diff --git a/net/minecraft/world/level/block/SeaPickleBlock.java b/net/minecraft/world/level/block/SeaPickleBlock.java index 8e1f1359..a1f3c4ef 100644 --- a/net/minecraft/world/level/block/SeaPickleBlock.java +++ b/net/minecraft/world/level/block/SeaPickleBlock.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -74,23 +74,23 @@ public class SeaPickleBlock extends BushBlock implements BonemealableBlock, Simp @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (!blockState.canSurvive(levelReader, blockPos)) { + if (!state.canSurvive(level, pos)) { return Blocks.AIR.defaultBlockState(); } else { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } } @@ -122,7 +122,7 @@ public class SeaPickleBlock extends BushBlock implements BonemealableBlock, Simp } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(PICKLES, WATERLOGGED); } diff --git a/net/minecraft/world/level/block/SeagrassBlock.java b/net/minecraft/world/level/block/SeagrassBlock.java index ee9f42dd..19a6b8d9 100644 --- a/net/minecraft/world/level/block/SeagrassBlock.java +++ b/net/minecraft/world/level/block/SeagrassBlock.java @@ -56,21 +56,21 @@ public class SeagrassBlock extends BushBlock implements BonemealableBlock, Liqui @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - BlockState blockState3 = super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); - if (!blockState3.isAir()) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + BlockState blockState = super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); + if (!blockState.isAir()) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return blockState3; + return blockState; } @Override diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java index e7558098..99bcb9ac 100644 --- a/net/minecraft/world/level/block/ShulkerBoxBlock.java +++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java @@ -37,7 +37,7 @@ import net.minecraft.world.level.block.entity.ShulkerBoxBlockEntity; import net.minecraft.world.level.block.entity.ShulkerBoxBlockEntity.AnimationStatus; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.storage.loot.LootParams; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; @@ -131,7 +131,7 @@ public class ShulkerBoxBlock extends BaseEntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING); } @@ -215,7 +215,7 @@ public class ShulkerBoxBlock extends BaseEntityBlock { } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { + protected boolean propagatesSkylightDown(BlockState state) { return false; } diff --git a/net/minecraft/world/level/block/SignBlock.java b/net/minecraft/world/level/block/SignBlock.java index 3a6e88e6..808d65d2 100644 --- a/net/minecraft/world/level/block/SignBlock.java +++ b/net/minecraft/world/level/block/SignBlock.java @@ -56,20 +56,20 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -89,19 +89,19 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - if (level.getBlockEntity(blockPos) instanceof SignBlockEntity signBlockEntity) { - SignApplicator signApplicator2 = itemStack.getItem() instanceof SignApplicator signApplicator ? signApplicator : null; + if (level.getBlockEntity(pos) instanceof SignBlockEntity signBlockEntity) { + SignApplicator signApplicator2 = stack.getItem() instanceof SignApplicator signApplicator ? signApplicator : null; boolean bl = signApplicator2 != null && player.mayBuild(); if (!level.isClientSide) { if (bl && !signBlockEntity.isWaxed() && !this.otherPlayerIsEditingSign(player, signBlockEntity)) { boolean bl2 = signBlockEntity.isFacingFrontText(player); if (signApplicator2.canApplyToSign(signBlockEntity.getText(bl2), player) && signApplicator2.tryApplyToSign(level, signBlockEntity, bl2, player)) { - signBlockEntity.executeClickCommandsIfPresent(player, level, blockPos, bl2); - player.awardStat(Stats.ITEM_USED.get(itemStack.getItem())); + signBlockEntity.executeClickCommandsIfPresent(player, level, pos, bl2); + player.awardStat(Stats.ITEM_USED.get(stack.getItem())); level.gameEvent(GameEvent.BLOCK_CHANGE, signBlockEntity.getBlockPos(), Context.of(player, signBlockEntity.getBlockState())); - itemStack.consume(1, player); + stack.consume(1, player); return InteractionResult.SUCCESS; } else { return InteractionResult.TRY_WITH_EMPTY_HAND; diff --git a/net/minecraft/world/level/block/SkullBlock.java b/net/minecraft/world/level/block/SkullBlock.java index 944e7ba5..f6f66492 100644 --- a/net/minecraft/world/level/block/SkullBlock.java +++ b/net/minecraft/world/level/block/SkullBlock.java @@ -11,7 +11,7 @@ import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.block.state.properties.RotationSegment; @@ -45,7 +45,7 @@ public class SkullBlock extends AbstractSkullBlock { } @Override - protected VoxelShape getOcclusionShape(BlockState blockState) { + protected VoxelShape getOcclusionShape(BlockState state) { return Shapes.empty(); } @@ -65,7 +65,7 @@ public class SkullBlock extends AbstractSkullBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { super.createBlockStateDefinition(builder); builder.add(ROTATION); } diff --git a/net/minecraft/world/level/block/SlabBlock.java b/net/minecraft/world/level/block/SlabBlock.java index d3f4eb7f..0cf71ea3 100644 --- a/net/minecraft/world/level/block/SlabBlock.java +++ b/net/minecraft/world/level/block/SlabBlock.java @@ -14,7 +14,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -51,7 +51,7 @@ public class SlabBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(TYPE, WATERLOGGED); } @@ -119,20 +119,20 @@ public class SlabBlock extends Block implements SimpleWaterloggedBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/SlimeBlock.java b/net/minecraft/world/level/block/SlimeBlock.java index 8450ed26..3bd07b06 100644 --- a/net/minecraft/world/level/block/SlimeBlock.java +++ b/net/minecraft/world/level/block/SlimeBlock.java @@ -30,9 +30,9 @@ public class SlimeBlock extends HalfTransparentBlock { } @Override - public void updateEntityMovementAfterFallOn(BlockGetter blockGetter, Entity entity) { + public void updateEntityMovementAfterFallOn(BlockGetter level, Entity entity) { if (entity.isSuppressingBounce()) { - super.updateEntityMovementAfterFallOn(blockGetter, entity); + super.updateEntityMovementAfterFallOn(level, entity); } else { this.bounceUp(entity); } diff --git a/net/minecraft/world/level/block/SmallDripleafBlock.java b/net/minecraft/world/level/block/SmallDripleafBlock.java index 86aad6c8..038768a4 100644 --- a/net/minecraft/world/level/block/SmallDripleafBlock.java +++ b/net/minecraft/world/level/block/SmallDripleafBlock.java @@ -15,7 +15,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; @@ -91,24 +91,24 @@ public class SmallDripleafBlock extends DoublePlantBlock implements Bonemealable @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(HALF, WATERLOGGED, FACING); } diff --git a/net/minecraft/world/level/block/SnifferEggBlock.java b/net/minecraft/world/level/block/SnifferEggBlock.java index d59a943c..1e3ffb94 100644 --- a/net/minecraft/world/level/block/SnifferEggBlock.java +++ b/net/minecraft/world/level/block/SnifferEggBlock.java @@ -15,7 +15,7 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.gameevent.GameEvent; @@ -45,7 +45,7 @@ public class SnifferEggBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(HATCH); } diff --git a/net/minecraft/world/level/block/SnowLayerBlock.java b/net/minecraft/world/level/block/SnowLayerBlock.java index 97a3b8c1..6e38ed0f 100644 --- a/net/minecraft/world/level/block/SnowLayerBlock.java +++ b/net/minecraft/world/level/block/SnowLayerBlock.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.LightLayer; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.pathfinder.PathComputationType; @@ -107,18 +107,18 @@ public class SnowLayerBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return !blockState.canSurvive(levelReader, blockPos) + return !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -152,7 +152,7 @@ public class SnowLayerBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(LAYERS); } } diff --git a/net/minecraft/world/level/block/SnowyDirtBlock.java b/net/minecraft/world/level/block/SnowyDirtBlock.java index 13d7dfa2..7b6cdd79 100644 --- a/net/minecraft/world/level/block/SnowyDirtBlock.java +++ b/net/minecraft/world/level/block/SnowyDirtBlock.java @@ -10,7 +10,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; @@ -30,18 +30,18 @@ public class SnowyDirtBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { return direction == Direction.UP - ? blockState.setValue(SNOWY, isSnowySetting(blockState2)) - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + ? state.setValue(SNOWY, isSnowySetting(neighborState)) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -55,7 +55,7 @@ public class SnowyDirtBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(SNOWY); } } diff --git a/net/minecraft/world/level/block/SoulFireBlock.java b/net/minecraft/world/level/block/SoulFireBlock.java index d20c34e6..d1fb9f2d 100644 --- a/net/minecraft/world/level/block/SoulFireBlock.java +++ b/net/minecraft/world/level/block/SoulFireBlock.java @@ -24,16 +24,16 @@ public class SoulFireBlock extends BaseFireBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return this.canSurvive(blockState, levelReader, blockPos) ? this.defaultBlockState() : Blocks.AIR.defaultBlockState(); + return this.canSurvive(state, level, pos) ? this.defaultBlockState() : Blocks.AIR.defaultBlockState(); } @Override diff --git a/net/minecraft/world/level/block/SoulSandBlock.java b/net/minecraft/world/level/block/SoulSandBlock.java index bf4ad3ea..28aedf4d 100644 --- a/net/minecraft/world/level/block/SoulSandBlock.java +++ b/net/minecraft/world/level/block/SoulSandBlock.java @@ -52,20 +52,20 @@ public class SoulSandBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (direction == Direction.UP && blockState2.is(Blocks.WATER)) { - scheduledTickAccess.scheduleTick(blockPos, this, 20); + if (direction == Direction.UP && neighborState.is(Blocks.WATER)) { + scheduledTickAccess.scheduleTick(pos, this, 20); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/SpongeBlock.java b/net/minecraft/world/level/block/SpongeBlock.java index 538999f5..dbd961b6 100644 --- a/net/minecraft/world/level/block/SpongeBlock.java +++ b/net/minecraft/world/level/block/SpongeBlock.java @@ -37,9 +37,9 @@ public class SpongeBlock extends Block { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - this.tryAbsorbWater(level, blockPos); - super.neighborChanged(blockState, level, blockPos, block, orientation, bl); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + this.tryAbsorbWater(level, pos); + super.neighborChanged(state, level, pos, neighborBlock, orientation, movedByPiston); } protected void tryAbsorbWater(Level level, BlockPos pos) { diff --git a/net/minecraft/world/level/block/SporeBlossomBlock.java b/net/minecraft/world/level/block/SporeBlossomBlock.java index fe3dd429..7696f3a0 100644 --- a/net/minecraft/world/level/block/SporeBlossomBlock.java +++ b/net/minecraft/world/level/block/SporeBlossomBlock.java @@ -38,18 +38,18 @@ public class SporeBlossomBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction == Direction.UP && !this.canSurvive(blockState, levelReader, blockPos) + return direction == Direction.UP && !this.canSurvive(state, level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override diff --git a/net/minecraft/world/level/block/StainedGlassBlock.java b/net/minecraft/world/level/block/StainedGlassBlock.java index 20be9ff3..b4a559a7 100644 --- a/net/minecraft/world/level/block/StainedGlassBlock.java +++ b/net/minecraft/world/level/block/StainedGlassBlock.java @@ -16,9 +16,9 @@ public class StainedGlassBlock extends TransparentBlock implements BeaconBeamBlo return CODEC; } - public StainedGlassBlock(DyeColor dyeColor, BlockBehaviour.Properties properties) { + public StainedGlassBlock(DyeColor color, BlockBehaviour.Properties properties) { super(properties); - this.color = dyeColor; + this.color = color; } @Override diff --git a/net/minecraft/world/level/block/StairBlock.java b/net/minecraft/world/level/block/StairBlock.java index 301071fc..2e16e929 100644 --- a/net/minecraft/world/level/block/StairBlock.java +++ b/net/minecraft/world/level/block/StairBlock.java @@ -12,7 +12,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -129,22 +129,22 @@ public class StairBlock extends Block implements SimpleWaterloggedBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } return direction.getAxis().isHorizontal() - ? blockState.setValue(SHAPE, getStairsShape(blockState, levelReader, blockPos)) - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + ? state.setValue(SHAPE, getStairsShape(state, level, pos)) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } /** @@ -235,7 +235,7 @@ public class StairBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, HALF, SHAPE, WATERLOGGED); } diff --git a/net/minecraft/world/level/block/StandingSignBlock.java b/net/minecraft/world/level/block/StandingSignBlock.java index 1b94a934..e7a4fde1 100644 --- a/net/minecraft/world/level/block/StandingSignBlock.java +++ b/net/minecraft/world/level/block/StandingSignBlock.java @@ -10,7 +10,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.block.state.properties.RotationSegment; @@ -49,18 +49,18 @@ public class StandingSignBlock extends SignBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction == Direction.DOWN && !this.canSurvive(blockState, levelReader, blockPos) + return direction == Direction.DOWN && !this.canSurvive(state, level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -79,7 +79,7 @@ public class StandingSignBlock extends SignBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(ROTATION, WATERLOGGED); } } diff --git a/net/minecraft/world/level/block/StemBlock.java b/net/minecraft/world/level/block/StemBlock.java index 379364f1..3fb1d03d 100644 --- a/net/minecraft/world/level/block/StemBlock.java +++ b/net/minecraft/world/level/block/StemBlock.java @@ -20,7 +20,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.phys.shapes.CollisionContext; @@ -129,7 +129,7 @@ public class StemBlock extends BushBlock implements BonemealableBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AGE); } } diff --git a/net/minecraft/world/level/block/StonecutterBlock.java b/net/minecraft/world/level/block/StonecutterBlock.java index 506dc994..06c59235 100644 --- a/net/minecraft/world/level/block/StonecutterBlock.java +++ b/net/minecraft/world/level/block/StonecutterBlock.java @@ -16,7 +16,7 @@ import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.pathfinder.PathComputationType; import net.minecraft.world.phys.BlockHitResult; @@ -87,7 +87,7 @@ public class StonecutterBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING); } diff --git a/net/minecraft/world/level/block/StructureBlock.java b/net/minecraft/world/level/block/StructureBlock.java index 241520c9..89dc89d1 100644 --- a/net/minecraft/world/level/block/StructureBlock.java +++ b/net/minecraft/world/level/block/StructureBlock.java @@ -12,7 +12,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.StructureBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.StructureMode; @@ -67,20 +67,20 @@ public class StructureBlock extends BaseEntityBlock implements GameMasterBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(MODE); } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { if (level instanceof ServerLevel) { - if (level.getBlockEntity(blockPos) instanceof StructureBlockEntity structureBlockEntity) { - boolean bl2 = level.hasNeighborSignal(blockPos); - boolean bl3 = structureBlockEntity.isPowered(); - if (bl2 && !bl3) { + if (level.getBlockEntity(pos) instanceof StructureBlockEntity structureBlockEntity) { + boolean bl = level.hasNeighborSignal(pos); + boolean bl2 = structureBlockEntity.isPowered(); + if (bl && !bl2) { structureBlockEntity.setPowered(true); this.trigger((ServerLevel)level, structureBlockEntity); - } else if (!bl2 && bl3) { + } else if (!bl && bl2) { structureBlockEntity.setPowered(false); } } diff --git a/net/minecraft/world/level/block/SugarCaneBlock.java b/net/minecraft/world/level/block/SugarCaneBlock.java index 20c82406..c1524632 100644 --- a/net/minecraft/world/level/block/SugarCaneBlock.java +++ b/net/minecraft/world/level/block/SugarCaneBlock.java @@ -12,7 +12,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.material.FluidState; @@ -70,20 +70,20 @@ public class SugarCaneBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if (!blockState.canSurvive(levelReader, blockPos)) { - scheduledTickAccess.scheduleTick(blockPos, this, 1); + if (!state.canSurvive(level, pos)) { + scheduledTickAccess.scheduleTick(pos, this, 1); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -109,7 +109,7 @@ public class SugarCaneBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AGE); } } diff --git a/net/minecraft/world/level/block/SweetBerryBushBlock.java b/net/minecraft/world/level/block/SweetBerryBushBlock.java index fcc688cc..39b95ad1 100644 --- a/net/minecraft/world/level/block/SweetBerryBushBlock.java +++ b/net/minecraft/world/level/block/SweetBerryBushBlock.java @@ -19,7 +19,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.gameevent.GameEvent; @@ -95,13 +95,11 @@ public class SweetBerryBushBlock extends BushBlock implements BonemealableBlock @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - int i = (Integer)blockState.getValue(AGE); + int i = (Integer)state.getValue(AGE); boolean bl = i == 3; - return (InteractionResult)(!bl && itemStack.is(Items.BONE_MEAL) - ? InteractionResult.PASS - : super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult)); + return (InteractionResult)(!bl && stack.is(Items.BONE_MEAL) ? InteractionResult.PASS : super.useItemOn(stack, state, level, pos, player, hand, hitResult)); } @Override @@ -122,7 +120,7 @@ public class SweetBerryBushBlock extends BushBlock implements BonemealableBlock } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(AGE); } diff --git a/net/minecraft/world/level/block/TallGrassBlock.java b/net/minecraft/world/level/block/TallGrassBlock.java index fb95991c..bae299d2 100644 --- a/net/minecraft/world/level/block/TallGrassBlock.java +++ b/net/minecraft/world/level/block/TallGrassBlock.java @@ -46,7 +46,7 @@ public class TallGrassBlock extends BushBlock implements BonemealableBlock { DoublePlantBlock.placeAt(level, getGrownBlock(state).defaultBlockState(), pos, 2); } - private static DoublePlantBlock getGrownBlock(BlockState blockState) { - return (DoublePlantBlock)(blockState.is(Blocks.FERN) ? Blocks.LARGE_FERN : Blocks.TALL_GRASS); + private static DoublePlantBlock getGrownBlock(BlockState state) { + return (DoublePlantBlock)(state.is(Blocks.FERN) ? Blocks.LARGE_FERN : Blocks.TALL_GRASS); } } diff --git a/net/minecraft/world/level/block/TargetBlock.java b/net/minecraft/world/level/block/TargetBlock.java index 7482b3b0..f8168371 100644 --- a/net/minecraft/world/level/block/TargetBlock.java +++ b/net/minecraft/world/level/block/TargetBlock.java @@ -17,7 +17,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.phys.BlockHitResult; @@ -99,7 +99,7 @@ public class TargetBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(OUTPUT_POWER); } diff --git a/net/minecraft/world/level/block/TintedGlassBlock.java b/net/minecraft/world/level/block/TintedGlassBlock.java index 8721a10d..8fae99bd 100644 --- a/net/minecraft/world/level/block/TintedGlassBlock.java +++ b/net/minecraft/world/level/block/TintedGlassBlock.java @@ -17,12 +17,12 @@ public class TintedGlassBlock extends TransparentBlock { } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { + protected boolean propagatesSkylightDown(BlockState state) { return false; } @Override - protected int getLightBlock(BlockState blockState) { + protected int getLightBlock(BlockState state) { return 15; } } diff --git a/net/minecraft/world/level/block/TntBlock.java b/net/minecraft/world/level/block/TntBlock.java index 8c2d8d3c..8ccb713b 100644 --- a/net/minecraft/world/level/block/TntBlock.java +++ b/net/minecraft/world/level/block/TntBlock.java @@ -20,7 +20,7 @@ import net.minecraft.world.level.Explosion; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.gameevent.GameEvent; @@ -53,10 +53,10 @@ public class TntBlock extends Block { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - if (level.hasNeighborSignal(blockPos)) { - explode(level, blockPos); - level.removeBlock(blockPos, false); + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + if (level.hasNeighborSignal(pos)) { + explode(level, pos); + level.removeBlock(pos, false); } } @@ -70,11 +70,11 @@ public class TntBlock extends Block { } @Override - public void wasExploded(ServerLevel serverLevel, BlockPos blockPos, Explosion explosion) { - PrimedTnt primedTnt = new PrimedTnt(serverLevel, blockPos.getX() + 0.5, blockPos.getY(), blockPos.getZ() + 0.5, explosion.getIndirectSourceEntity()); + public void wasExploded(ServerLevel level, BlockPos pos, Explosion explosion) { + PrimedTnt primedTnt = new PrimedTnt(level, pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5, explosion.getIndirectSourceEntity()); int i = primedTnt.getFuse(); - primedTnt.setFuse((short)(serverLevel.random.nextInt(i / 4) + i / 8)); - serverLevel.addFreshEntity(primedTnt); + primedTnt.setFuse((short)(level.random.nextInt(i / 4) + i / 8)); + level.addFreshEntity(primedTnt); } public static void explode(Level level, BlockPos pos) { @@ -92,18 +92,18 @@ public class TntBlock extends Block { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - if (!itemStack.is(Items.FLINT_AND_STEEL) && !itemStack.is(Items.FIRE_CHARGE)) { - return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult); + if (!stack.is(Items.FLINT_AND_STEEL) && !stack.is(Items.FIRE_CHARGE)) { + return super.useItemOn(stack, state, level, pos, player, hand, hitResult); } else { - explode(level, blockPos, player); - level.setBlock(blockPos, Blocks.AIR.defaultBlockState(), 11); - Item item = itemStack.getItem(); - if (itemStack.is(Items.FLINT_AND_STEEL)) { - itemStack.hurtAndBreak(1, player, LivingEntity.getSlotForHand(interactionHand)); + explode(level, pos, player); + level.setBlock(pos, Blocks.AIR.defaultBlockState(), 11); + Item item = stack.getItem(); + if (stack.is(Items.FLINT_AND_STEEL)) { + stack.hurtAndBreak(1, player, LivingEntity.getSlotForHand(hand)); } else { - itemStack.consume(1, player); + stack.consume(1, player); } player.awardStat(Stats.ITEM_USED.get(item)); @@ -129,7 +129,7 @@ public class TntBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(UNSTABLE); } } diff --git a/net/minecraft/world/level/block/TransparentBlock.java b/net/minecraft/world/level/block/TransparentBlock.java index 969687c1..02df105c 100644 --- a/net/minecraft/world/level/block/TransparentBlock.java +++ b/net/minecraft/world/level/block/TransparentBlock.java @@ -32,7 +32,7 @@ public class TransparentBlock extends HalfTransparentBlock { } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { + protected boolean propagatesSkylightDown(BlockState state) { return true; } } diff --git a/net/minecraft/world/level/block/TrapDoorBlock.java b/net/minecraft/world/level/block/TrapDoorBlock.java index 7d138986..d16a380c 100644 --- a/net/minecraft/world/level/block/TrapDoorBlock.java +++ b/net/minecraft/world/level/block/TrapDoorBlock.java @@ -19,7 +19,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; @@ -116,14 +116,12 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW } @Override - protected void onExplosionHit( - BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer biConsumer - ) { - if (explosion.canTriggerBlocks() && this.type.canOpenByWindCharge() && !(Boolean)blockState.getValue(POWERED)) { - this.toggle(blockState, serverLevel, blockPos, null); + protected void onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer dropConsumer) { + if (explosion.canTriggerBlocks() && this.type.canOpenByWindCharge() && !(Boolean)state.getValue(POWERED)) { + this.toggle(state, level, pos, null); } - super.onExplosionHit(blockState, serverLevel, blockPos, explosion, biConsumer); + super.onExplosionHit(state, level, pos, explosion, dropConsumer); } private void toggle(BlockState state, Level level, BlockPos pos, @Nullable Player player) { @@ -144,18 +142,18 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { if (!level.isClientSide) { - boolean bl2 = level.hasNeighborSignal(blockPos); - if (bl2 != (Boolean)blockState.getValue(POWERED)) { - if ((Boolean)blockState.getValue(OPEN) != bl2) { - blockState = blockState.setValue(OPEN, bl2); - this.playSound(null, level, blockPos, bl2); + boolean bl = level.hasNeighborSignal(pos); + if (bl != (Boolean)state.getValue(POWERED)) { + if ((Boolean)state.getValue(OPEN) != bl) { + state = state.setValue(OPEN, bl); + this.playSound(null, level, pos, bl); } - level.setBlock(blockPos, blockState.setValue(POWERED, bl2), 2); - if ((Boolean)blockState.getValue(WATERLOGGED)) { - level.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); + level.setBlock(pos, state.setValue(POWERED, bl), 2); + if ((Boolean)state.getValue(WATERLOGGED)) { + level.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } } } @@ -181,7 +179,7 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, OPEN, HALF, POWERED, WATERLOGGED); } @@ -192,20 +190,20 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } protected BlockSetType getType() { diff --git a/net/minecraft/world/level/block/TripWireBlock.java b/net/minecraft/world/level/block/TripWireBlock.java index 919eb05c..37b5feb9 100644 --- a/net/minecraft/world/level/block/TripWireBlock.java +++ b/net/minecraft/world/level/block/TripWireBlock.java @@ -19,7 +19,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.Property; @@ -84,18 +84,18 @@ public class TripWireBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { return direction.getAxis().isHorizontal() - ? blockState.setValue((Property)PROPERTY_BY_DIRECTION.get(direction), this.shouldConnectTo(blockState2, direction)) - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + ? state.setValue((Property)PROPERTY_BY_DIRECTION.get(direction), this.shouldConnectTo(neighborState, direction)) + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -142,8 +142,8 @@ public class TripWireBlock extends Block { } @Override - protected VoxelShape getEntityInsideCollisionShape(BlockState blockState, Level level, BlockPos blockPos) { - return blockState.getShape(level, blockPos); + protected VoxelShape getEntityInsideCollisionShape(BlockState state, Level level, BlockPos pos) { + return state.getShape(level, pos); } @Override @@ -168,12 +168,12 @@ public class TripWireBlock extends Block { this.checkPressed(level, pos, list); } - private void checkPressed(Level level, BlockPos blockPos, List list) { - BlockState blockState = level.getBlockState(blockPos); + private void checkPressed(Level level, BlockPos pos, List entities) { + BlockState blockState = level.getBlockState(pos); boolean bl = (Boolean)blockState.getValue(POWERED); boolean bl2 = false; - if (!list.isEmpty()) { - for (Entity entity : list) { + if (!entities.isEmpty()) { + for (Entity entity : entities) { if (!entity.isIgnoringBlockTriggers()) { bl2 = true; break; @@ -183,12 +183,12 @@ public class TripWireBlock extends Block { if (bl2 != bl) { blockState = blockState.setValue(POWERED, bl2); - level.setBlock(blockPos, blockState, 3); - this.updateSource(level, blockPos, blockState); + level.setBlock(pos, blockState, 3); + this.updateSource(level, pos, blockState); } if (bl2) { - level.scheduleTick(new BlockPos(blockPos), this, 10); + level.scheduleTick(new BlockPos(pos), this, 10); } } @@ -232,7 +232,7 @@ public class TripWireBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(POWERED, ATTACHED, DISARMED, NORTH, EAST, WEST, SOUTH); } } diff --git a/net/minecraft/world/level/block/TripWireHookBlock.java b/net/minecraft/world/level/block/TripWireHookBlock.java index 9f6ba43e..a39abca6 100644 --- a/net/minecraft/world/level/block/TripWireHookBlock.java +++ b/net/minecraft/world/level/block/TripWireHookBlock.java @@ -18,7 +18,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -78,18 +78,18 @@ public class TripWireHookBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction.getOpposite() == blockState.getValue(FACING) && !blockState.canSurvive(levelReader, blockPos) + return direction.getOpposite() == state.getValue(FACING) && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Nullable @@ -270,7 +270,7 @@ public class TripWireHookBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, POWERED, ATTACHED); } } diff --git a/net/minecraft/world/level/block/TurtleEggBlock.java b/net/minecraft/world/level/block/TurtleEggBlock.java index 5ee95159..bbe106ae 100644 --- a/net/minecraft/world/level/block/TurtleEggBlock.java +++ b/net/minecraft/world/level/block/TurtleEggBlock.java @@ -23,7 +23,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; import net.minecraft.world.level.gameevent.GameEvent; @@ -161,15 +161,15 @@ public class TurtleEggBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(HATCH, EGGS); } - private boolean canDestroyEgg(ServerLevel serverLevel, Entity entity) { + private boolean canDestroyEgg(ServerLevel level, Entity entity) { if (entity instanceof Turtle || entity instanceof Bat) { return false; } else { - return !(entity instanceof LivingEntity) ? false : entity instanceof Player || serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); + return !(entity instanceof LivingEntity) ? false : entity instanceof Player || level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); } } } diff --git a/net/minecraft/world/level/block/VaultBlock.java b/net/minecraft/world/level/block/VaultBlock.java index 371c1366..27b954a0 100644 --- a/net/minecraft/world/level/block/VaultBlock.java +++ b/net/minecraft/world/level/block/VaultBlock.java @@ -17,7 +17,7 @@ import net.minecraft.world.level.block.entity.vault.VaultBlockEntity; import net.minecraft.world.level.block.entity.vault.VaultState; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -42,17 +42,15 @@ public class VaultBlock extends BaseEntityBlock { } @Override - public InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult - ) { - if (!itemStack.isEmpty() && blockState.getValue(STATE) == VaultState.ACTIVE) { + public InteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + if (!stack.isEmpty() && state.getValue(STATE) == VaultState.ACTIVE) { if (level instanceof ServerLevel serverLevel) { - if (!(serverLevel.getBlockEntity(blockPos) instanceof VaultBlockEntity vaultBlockEntity)) { + if (!(serverLevel.getBlockEntity(pos) instanceof VaultBlockEntity vaultBlockEntity)) { return InteractionResult.TRY_WITH_EMPTY_HAND; } VaultBlockEntity.Server.tryInsertKey( - serverLevel, blockPos, blockState, vaultBlockEntity.getConfig(), vaultBlockEntity.getServerData(), vaultBlockEntity.getSharedData(), player, itemStack + serverLevel, pos, state, vaultBlockEntity.getConfig(), vaultBlockEntity.getServerData(), vaultBlockEntity.getSharedData(), player, stack ); } @@ -69,7 +67,7 @@ public class VaultBlock extends BaseEntityBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, STATE, OMINOUS); } diff --git a/net/minecraft/world/level/block/VineBlock.java b/net/minecraft/world/level/block/VineBlock.java index 9dced45b..9d22a59d 100644 --- a/net/minecraft/world/level/block/VineBlock.java +++ b/net/minecraft/world/level/block/VineBlock.java @@ -17,7 +17,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; @@ -93,7 +93,7 @@ public class VineBlock extends Block { } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { + protected boolean propagatesSkylightDown(BlockState state) { return true; } @@ -168,20 +168,20 @@ public class VineBlock extends Block { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { if (direction == Direction.DOWN) { - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } else { - BlockState blockState3 = this.getUpdatedState(blockState, levelReader, blockPos); - return !this.hasFaces(blockState3) ? Blocks.AIR.defaultBlockState() : blockState3; + BlockState blockState = this.getUpdatedState(state, level, pos); + return !this.hasFaces(blockState) ? Blocks.AIR.defaultBlockState() : blockState; } } @@ -324,7 +324,7 @@ public class VineBlock extends Block { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(UP, NORTH, EAST, SOUTH, WEST); } diff --git a/net/minecraft/world/level/block/WallBannerBlock.java b/net/minecraft/world/level/block/WallBannerBlock.java index d4073ce9..4cd9a4cd 100644 --- a/net/minecraft/world/level/block/WallBannerBlock.java +++ b/net/minecraft/world/level/block/WallBannerBlock.java @@ -15,7 +15,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -55,18 +55,18 @@ public class WallBannerBlock extends AbstractBannerBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction == ((Direction)blockState.getValue(FACING)).getOpposite() && !blockState.canSurvive(levelReader, blockPos) + return direction == ((Direction)state.getValue(FACING)).getOpposite() && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -105,7 +105,7 @@ public class WallBannerBlock extends AbstractBannerBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING); } } diff --git a/net/minecraft/world/level/block/WallBlock.java b/net/minecraft/world/level/block/WallBlock.java index 25b6d727..a38a748f 100644 --- a/net/minecraft/world/level/block/WallBlock.java +++ b/net/minecraft/world/level/block/WallBlock.java @@ -14,7 +14,6 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -172,25 +171,25 @@ public class WallBlock extends Block implements SimpleWaterloggedBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } if (direction == Direction.DOWN) { - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } else { return direction == Direction.UP - ? this.topUpdate(levelReader, blockState, blockPos2, blockState2) - : this.sideUpdate(levelReader, blockPos, blockState, blockPos2, blockState2, direction); + ? this.topUpdate(level, state, neighborPos, neighborState) + : this.sideUpdate(level, pos, state, neighborPos, neighborState, direction); } } @@ -290,12 +289,12 @@ public class WallBlock extends Block implements SimpleWaterloggedBlock { } @Override - protected boolean propagatesSkylightDown(BlockState blockState) { - return !(Boolean)blockState.getValue(WATERLOGGED); + protected boolean propagatesSkylightDown(BlockState state) { + return !(Boolean)state.getValue(WATERLOGGED); } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder builder) { builder.add(UP, NORTH_WALL, EAST_WALL, WEST_WALL, SOUTH_WALL, WATERLOGGED); } diff --git a/net/minecraft/world/level/block/WallHangingSignBlock.java b/net/minecraft/world/level/block/WallHangingSignBlock.java index bd1e0caf..45629adb 100644 --- a/net/minecraft/world/level/block/WallHangingSignBlock.java +++ b/net/minecraft/world/level/block/WallHangingSignBlock.java @@ -26,7 +26,7 @@ import net.minecraft.world.level.block.entity.HangingSignBlockEntity; import net.minecraft.world.level.block.entity.SignBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.WoodType; import net.minecraft.world.level.material.FluidState; @@ -63,12 +63,12 @@ public class WallHangingSignBlock extends SignBlock { @Override protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { - return (InteractionResult)(level.getBlockEntity(blockPos) instanceof SignBlockEntity signBlockEntity - && this.shouldTryToChainAnotherHangingSign(blockState, player, blockHitResult, signBlockEntity, itemStack) + return (InteractionResult)(level.getBlockEntity(pos) instanceof SignBlockEntity signBlockEntity + && this.shouldTryToChainAnotherHangingSign(state, player, hitResult, signBlockEntity, stack) ? InteractionResult.PASS - : super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult)); + : super.useItemOn(stack, state, level, pos, player, hand, hitResult)); } private boolean shouldTryToChainAnotherHangingSign(BlockState state, Player player, BlockHitResult hitResult, SignBlockEntity sign, ItemStack stack) { @@ -138,18 +138,18 @@ public class WallHangingSignBlock extends SignBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction.getAxis() == ((Direction)blockState.getValue(FACING)).getClockWise().getAxis() && !blockState.canSurvive(levelReader, blockPos) + return direction.getAxis() == ((Direction)state.getValue(FACING)).getClockWise().getAxis() && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -168,7 +168,7 @@ public class WallHangingSignBlock extends SignBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, WATERLOGGED); } diff --git a/net/minecraft/world/level/block/WallSignBlock.java b/net/minecraft/world/level/block/WallSignBlock.java index a5bc93eb..9c0061c8 100644 --- a/net/minecraft/world/level/block/WallSignBlock.java +++ b/net/minecraft/world/level/block/WallSignBlock.java @@ -14,7 +14,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.WoodType; import net.minecraft.world.level.material.FluidState; @@ -89,18 +89,18 @@ public class WallSignBlock extends SignBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction.getOpposite() == blockState.getValue(FACING) && !blockState.canSurvive(levelReader, blockPos) + return direction.getOpposite() == state.getValue(FACING) && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -125,7 +125,7 @@ public class WallSignBlock extends SignBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, WATERLOGGED); } } diff --git a/net/minecraft/world/level/block/WallSkullBlock.java b/net/minecraft/world/level/block/WallSkullBlock.java index 9785d8f3..fc103f8e 100644 --- a/net/minecraft/world/level/block/WallSkullBlock.java +++ b/net/minecraft/world/level/block/WallSkullBlock.java @@ -11,7 +11,7 @@ import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -81,7 +81,7 @@ public class WallSkullBlock extends AbstractSkullBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { super.createBlockStateDefinition(builder); builder.add(FACING); } diff --git a/net/minecraft/world/level/block/WallTorchBlock.java b/net/minecraft/world/level/block/WallTorchBlock.java index a5d3d0fe..51987a45 100644 --- a/net/minecraft/world/level/block/WallTorchBlock.java +++ b/net/minecraft/world/level/block/WallTorchBlock.java @@ -17,7 +17,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -96,16 +96,16 @@ public class WallTorchBlock extends TorchBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction.getOpposite() == blockState.getValue(FACING) && !blockState.canSurvive(levelReader, blockPos) ? Blocks.AIR.defaultBlockState() : blockState; + return direction.getOpposite() == state.getValue(FACING) && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() : state; } @Override @@ -132,7 +132,7 @@ public class WallTorchBlock extends TorchBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING); } } diff --git a/net/minecraft/world/level/block/WaterloggedTransparentBlock.java b/net/minecraft/world/level/block/WaterloggedTransparentBlock.java index d0c6928f..abfafe1d 100644 --- a/net/minecraft/world/level/block/WaterloggedTransparentBlock.java +++ b/net/minecraft/world/level/block/WaterloggedTransparentBlock.java @@ -9,7 +9,7 @@ import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.material.FluidState; @@ -39,20 +39,20 @@ public class WaterloggedTransparentBlock extends TransparentBlock implements Sim @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - if ((Boolean)blockState.getValue(WATERLOGGED)) { - scheduledTickAccess.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + if ((Boolean)state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(level)); } - return super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + return super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -61,7 +61,7 @@ public class WaterloggedTransparentBlock extends TransparentBlock implements Sim } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(WATERLOGGED); } } diff --git a/net/minecraft/world/level/block/WeightedPressurePlateBlock.java b/net/minecraft/world/level/block/WeightedPressurePlateBlock.java index e8794b69..c5257c45 100644 --- a/net/minecraft/world/level/block/WeightedPressurePlateBlock.java +++ b/net/minecraft/world/level/block/WeightedPressurePlateBlock.java @@ -9,7 +9,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -64,7 +64,7 @@ public class WeightedPressurePlateBlock extends BasePressurePlateBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(POWER); } } diff --git a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java index e3954e33..093ad215 100644 --- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java @@ -138,96 +138,96 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit tag.put("RecipesUsed", compoundTag); } - public static void serverTick(ServerLevel serverLevel, BlockPos blockPos, BlockState blockState, AbstractFurnaceBlockEntity abstractFurnaceBlockEntity) { - boolean bl = abstractFurnaceBlockEntity.isLit(); + public static void serverTick(ServerLevel level, BlockPos pos, BlockState state, AbstractFurnaceBlockEntity furnace) { + boolean bl = furnace.isLit(); boolean bl2 = false; - if (abstractFurnaceBlockEntity.isLit()) { - abstractFurnaceBlockEntity.litTime--; + if (furnace.isLit()) { + furnace.litTime--; } - ItemStack itemStack = abstractFurnaceBlockEntity.items.get(1); - ItemStack itemStack2 = abstractFurnaceBlockEntity.items.get(0); + ItemStack itemStack = furnace.items.get(1); + ItemStack itemStack2 = furnace.items.get(0); boolean bl3 = !itemStack2.isEmpty(); boolean bl4 = !itemStack.isEmpty(); - if (abstractFurnaceBlockEntity.litDuration == 0) { - abstractFurnaceBlockEntity.litDuration = abstractFurnaceBlockEntity.getBurnDuration(serverLevel.fuelValues(), itemStack); + if (furnace.litDuration == 0) { + furnace.litDuration = furnace.getBurnDuration(level.fuelValues(), itemStack); } - if (abstractFurnaceBlockEntity.isLit() || bl4 && bl3) { + if (furnace.isLit() || bl4 && bl3) { SingleRecipeInput singleRecipeInput = new SingleRecipeInput(itemStack2); RecipeHolder recipeHolder; if (bl3) { - recipeHolder = (RecipeHolder)abstractFurnaceBlockEntity.quickCheck - .getRecipeFor(singleRecipeInput, serverLevel) - .orElse(null); + recipeHolder = (RecipeHolder)furnace.quickCheck.getRecipeFor(singleRecipeInput, level).orElse(null); } else { recipeHolder = null; } - int i = abstractFurnaceBlockEntity.getMaxStackSize(); - if (!abstractFurnaceBlockEntity.isLit() && canBurn(serverLevel.registryAccess(), recipeHolder, singleRecipeInput, abstractFurnaceBlockEntity.items, i)) { - abstractFurnaceBlockEntity.litTime = abstractFurnaceBlockEntity.getBurnDuration(serverLevel.fuelValues(), itemStack); - abstractFurnaceBlockEntity.litDuration = abstractFurnaceBlockEntity.litTime; - if (abstractFurnaceBlockEntity.isLit()) { + int i = furnace.getMaxStackSize(); + if (!furnace.isLit() && canBurn(level.registryAccess(), recipeHolder, singleRecipeInput, furnace.items, i)) { + furnace.litTime = furnace.getBurnDuration(level.fuelValues(), itemStack); + furnace.litDuration = furnace.litTime; + if (furnace.isLit()) { bl2 = true; if (bl4) { Item item = itemStack.getItem(); itemStack.shrink(1); if (itemStack.isEmpty()) { - abstractFurnaceBlockEntity.items.set(1, item.getCraftingRemainder()); + furnace.items.set(1, item.getCraftingRemainder()); } } } } - if (abstractFurnaceBlockEntity.isLit() && canBurn(serverLevel.registryAccess(), recipeHolder, singleRecipeInput, abstractFurnaceBlockEntity.items, i)) { - abstractFurnaceBlockEntity.cookingProgress++; - if (abstractFurnaceBlockEntity.cookingProgress == abstractFurnaceBlockEntity.cookingTotalTime) { - abstractFurnaceBlockEntity.cookingProgress = 0; - abstractFurnaceBlockEntity.cookingTotalTime = getTotalCookTime(serverLevel, abstractFurnaceBlockEntity); - if (burn(serverLevel.registryAccess(), recipeHolder, singleRecipeInput, abstractFurnaceBlockEntity.items, i)) { - abstractFurnaceBlockEntity.setRecipeUsed(recipeHolder); + if (furnace.isLit() && canBurn(level.registryAccess(), recipeHolder, singleRecipeInput, furnace.items, i)) { + furnace.cookingProgress++; + if (furnace.cookingProgress == furnace.cookingTotalTime) { + furnace.cookingProgress = 0; + furnace.cookingTotalTime = getTotalCookTime(level, furnace); + if (burn(level.registryAccess(), recipeHolder, singleRecipeInput, furnace.items, i)) { + furnace.setRecipeUsed(recipeHolder); } bl2 = true; } } else { - abstractFurnaceBlockEntity.cookingProgress = 0; + furnace.cookingProgress = 0; } - } else if (!abstractFurnaceBlockEntity.isLit() && abstractFurnaceBlockEntity.cookingProgress > 0) { - abstractFurnaceBlockEntity.cookingProgress = Mth.clamp(abstractFurnaceBlockEntity.cookingProgress - 2, 0, abstractFurnaceBlockEntity.cookingTotalTime); + } else if (!furnace.isLit() && furnace.cookingProgress > 0) { + furnace.cookingProgress = Mth.clamp(furnace.cookingProgress - 2, 0, furnace.cookingTotalTime); } - if (bl != abstractFurnaceBlockEntity.isLit()) { + if (bl != furnace.isLit()) { bl2 = true; - blockState = blockState.setValue(AbstractFurnaceBlock.LIT, abstractFurnaceBlockEntity.isLit()); - serverLevel.setBlock(blockPos, blockState, 3); + state = state.setValue(AbstractFurnaceBlock.LIT, furnace.isLit()); + level.setBlock(pos, state, 3); } if (bl2) { - setChanged(serverLevel, blockPos, blockState); + setChanged(level, pos, state); } } private static boolean canBurn( RegistryAccess registryAccess, - @Nullable RecipeHolder recipeHolder, - SingleRecipeInput singleRecipeInput, - NonNullList nonNullList, - int i + @Nullable RecipeHolder recipe, + SingleRecipeInput recipeInput, + NonNullList items, + int maxStackSize ) { - if (!nonNullList.get(0).isEmpty() && recipeHolder != null) { - ItemStack itemStack = recipeHolder.value().assemble(singleRecipeInput, registryAccess); + if (!items.get(0).isEmpty() && recipe != null) { + ItemStack itemStack = recipe.value().assemble(recipeInput, registryAccess); if (itemStack.isEmpty()) { return false; } else { - ItemStack itemStack2 = nonNullList.get(2); + ItemStack itemStack2 = items.get(2); if (itemStack2.isEmpty()) { return true; } else if (!ItemStack.isSameItemSameComponents(itemStack2, itemStack)) { return false; } else { - return itemStack2.getCount() < i && itemStack2.getCount() < itemStack2.getMaxStackSize() ? true : itemStack2.getCount() < itemStack.getMaxStackSize(); + return itemStack2.getCount() < maxStackSize && itemStack2.getCount() < itemStack2.getMaxStackSize() + ? true + : itemStack2.getCount() < itemStack.getMaxStackSize(); } } } else { @@ -237,23 +237,23 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit private static boolean burn( RegistryAccess registryAccess, - @Nullable RecipeHolder recipeHolder, - SingleRecipeInput singleRecipeInput, - NonNullList nonNullList, - int i + @Nullable RecipeHolder recipe, + SingleRecipeInput recipeInput, + NonNullList items, + int maxStackSize ) { - if (recipeHolder != null && canBurn(registryAccess, recipeHolder, singleRecipeInput, nonNullList, i)) { - ItemStack itemStack = nonNullList.get(0); - ItemStack itemStack2 = recipeHolder.value().assemble(singleRecipeInput, registryAccess); - ItemStack itemStack3 = nonNullList.get(2); + if (recipe != null && canBurn(registryAccess, recipe, recipeInput, items, maxStackSize)) { + ItemStack itemStack = items.get(0); + ItemStack itemStack2 = recipe.value().assemble(recipeInput, registryAccess); + ItemStack itemStack3 = items.get(2); if (itemStack3.isEmpty()) { - nonNullList.set(2, itemStack2.copy()); + items.set(2, itemStack2.copy()); } else if (ItemStack.isSameItemSameComponents(itemStack3, itemStack2)) { itemStack3.grow(1); } - if (itemStack.is(Blocks.WET_SPONGE.asItem()) && !nonNullList.get(1).isEmpty() && nonNullList.get(1).is(Items.BUCKET)) { - nonNullList.set(1, new ItemStack(Items.WATER_BUCKET)); + if (itemStack.is(Blocks.WET_SPONGE.asItem()) && !items.get(1).isEmpty() && items.get(1).is(Items.BUCKET)) { + items.set(1, new ItemStack(Items.WATER_BUCKET)); } itemStack.shrink(1); @@ -263,14 +263,14 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit } } - protected int getBurnDuration(FuelValues fuelValues, ItemStack itemStack) { - return fuelValues.burnDuration(itemStack); + protected int getBurnDuration(FuelValues fuelValues, ItemStack stack) { + return fuelValues.burnDuration(stack); } - private static int getTotalCookTime(ServerLevel serverLevel, AbstractFurnaceBlockEntity abstractFurnaceBlockEntity) { - SingleRecipeInput singleRecipeInput = new SingleRecipeInput(abstractFurnaceBlockEntity.getItem(0)); - return (Integer)abstractFurnaceBlockEntity.quickCheck - .getRecipeFor(singleRecipeInput, serverLevel) + private static int getTotalCookTime(ServerLevel level, AbstractFurnaceBlockEntity furnace) { + SingleRecipeInput singleRecipeInput = new SingleRecipeInput(furnace.getItem(0)); + return (Integer)furnace.quickCheck + .getRecipeFor(singleRecipeInput, level) .map(recipeHolder -> ((AbstractCookingRecipe)recipeHolder.value()).cookingTime()) .orElse(200); } diff --git a/net/minecraft/world/level/block/entity/BlastFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/BlastFurnaceBlockEntity.java index 08d3e970..88cdc9a8 100644 --- a/net/minecraft/world/level/block/entity/BlastFurnaceBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BlastFurnaceBlockEntity.java @@ -20,8 +20,8 @@ public class BlastFurnaceBlockEntity extends AbstractFurnaceBlockEntity { } @Override - protected int getBurnDuration(FuelValues fuelValues, ItemStack itemStack) { - return super.getBurnDuration(fuelValues, itemStack) / 2; + protected int getBurnDuration(FuelValues fuelValues, ItemStack stack) { + return super.getBurnDuration(fuelValues, stack) / 2; } @Override diff --git a/net/minecraft/world/level/block/entity/BlockEntity.java b/net/minecraft/world/level/block/entity/BlockEntity.java index 167d5384..cea78c3c 100644 --- a/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/net/minecraft/world/level/block/entity/BlockEntity.java @@ -44,14 +44,14 @@ public abstract class BlockEntity { this.blockState = blockState; } - private void validateBlockState(BlockState blockState) { - if (!this.isValidBlockState(blockState)) { - throw new IllegalStateException("Invalid block entity " + this.getNameForReporting() + " state at " + this.worldPosition + ", got " + blockState); + private void validateBlockState(BlockState state) { + if (!this.isValidBlockState(state)) { + throw new IllegalStateException("Invalid block entity " + this.getNameForReporting() + " state at " + this.worldPosition + ", got " + state); } } - public boolean isValidBlockState(BlockState blockState) { - return this.type.isValid(blockState); + public boolean isValidBlockState(BlockState state) { + return this.type.isValid(state); } public static BlockPos getPosFromTag(CompoundTag tag) { diff --git a/net/minecraft/world/level/block/entity/BlockEntityType.java b/net/minecraft/world/level/block/entity/BlockEntityType.java index 22e40ff6..dc8bd630 100644 --- a/net/minecraft/world/level/block/entity/BlockEntityType.java +++ b/net/minecraft/world/level/block/entity/BlockEntityType.java @@ -4,8 +4,8 @@ import com.mojang.logging.LogUtils; import java.util.Set; import net.minecraft.Util; import net.minecraft.core.BlockPos; -import net.minecraft.core.Holder; import net.minecraft.core.Registry; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.datafix.fixes.References; @@ -224,27 +224,25 @@ public class BlockEntityType { public static final BlockEntityType VAULT = register("vault", VaultBlockEntity::new, Blocks.VAULT); private final BlockEntityType.BlockEntitySupplier factory; private final Set validBlocks; - private final Holder.Reference> builtInRegistryHolder = BuiltInRegistries.BLOCK_ENTITY_TYPE.createIntrusiveHolder(this); + private final Reference> builtInRegistryHolder = BuiltInRegistries.BLOCK_ENTITY_TYPE.createIntrusiveHolder(this); @Nullable public static ResourceLocation getKey(BlockEntityType blockEntityType) { return BuiltInRegistries.BLOCK_ENTITY_TYPE.getKey(blockEntityType); } - private static BlockEntityType register( - String string, BlockEntityType.BlockEntitySupplier blockEntitySupplier, Block... blocks - ) { - if (blocks.length == 0) { - LOGGER.warn("Block entity type {} requires at least one valid block to be defined!", string); + private static BlockEntityType register(String name, BlockEntityType.BlockEntitySupplier factory, Block... validBlocks) { + if (validBlocks.length == 0) { + LOGGER.warn("Block entity type {} requires at least one valid block to be defined!", name); } - Util.fetchChoiceType(References.BLOCK_ENTITY, string); - return Registry.register(BuiltInRegistries.BLOCK_ENTITY_TYPE, string, new BlockEntityType<>(blockEntitySupplier, Set.of(blocks))); + Util.fetchChoiceType(References.BLOCK_ENTITY, name); + return Registry.register(BuiltInRegistries.BLOCK_ENTITY_TYPE, name, new BlockEntityType<>(factory, Set.of(validBlocks))); } - private BlockEntityType(BlockEntityType.BlockEntitySupplier blockEntitySupplier, Set set) { - this.factory = blockEntitySupplier; - this.validBlocks = set; + private BlockEntityType(BlockEntityType.BlockEntitySupplier factory, Set validBlocks) { + this.factory = factory; + this.validBlocks = validBlocks; } @Nullable @@ -257,7 +255,7 @@ public class BlockEntityType { } @Deprecated - public Holder.Reference> builtInRegistryHolder() { + public Reference> builtInRegistryHolder() { return this.builtInRegistryHolder; } diff --git a/net/minecraft/world/level/block/entity/BrushableBlockEntity.java b/net/minecraft/world/level/block/entity/BrushableBlockEntity.java index edfbc856..5d1795b0 100644 --- a/net/minecraft/world/level/block/entity/BrushableBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BrushableBlockEntity.java @@ -54,28 +54,28 @@ public class BrushableBlockEntity extends BlockEntity { super(BlockEntityType.BRUSHABLE_BLOCK, pos, blockState); } - public boolean brush(long l, ServerLevel serverLevel, Player player, Direction direction, ItemStack itemStack) { + public boolean brush(long startTick, ServerLevel level, Player player, Direction hitDirection, ItemStack stack) { if (this.hitDirection == null) { - this.hitDirection = direction; + this.hitDirection = hitDirection; } - this.brushCountResetsAtTick = l + 40L; - if (l < this.coolDownEndsAtTick) { + this.brushCountResetsAtTick = startTick + 40L; + if (startTick < this.coolDownEndsAtTick) { return false; } else { - this.coolDownEndsAtTick = l + 10L; - this.unpackLootTable(serverLevel, player, itemStack); + this.coolDownEndsAtTick = startTick + 10L; + this.unpackLootTable(level, player, stack); int i = this.getCompletionState(); if (++this.brushCount >= 10) { - this.brushingCompleted(serverLevel, player, itemStack); + this.brushingCompleted(level, player, stack); return true; } else { - serverLevel.scheduleTick(this.getBlockPos(), this.getBlockState().getBlock(), 2); + level.scheduleTick(this.getBlockPos(), this.getBlockState().getBlock(), 2); int j = this.getCompletionState(); if (i != j) { BlockState blockState = this.getBlockState(); BlockState blockState2 = blockState.setValue(BlockStateProperties.DUSTED, j); - serverLevel.setBlock(this.getBlockPos(), blockState2, 3); + level.setBlock(this.getBlockPos(), blockState2, 3); } return false; @@ -83,18 +83,18 @@ public class BrushableBlockEntity extends BlockEntity { } } - private void unpackLootTable(ServerLevel serverLevel, Player player, ItemStack itemStack) { + private void unpackLootTable(ServerLevel level, Player player, ItemStack stack) { if (this.lootTable != null) { - LootTable lootTable = serverLevel.getServer().reloadableRegistries().getLootTable(this.lootTable); + LootTable lootTable = level.getServer().reloadableRegistries().getLootTable(this.lootTable); if (player instanceof ServerPlayer serverPlayer) { CriteriaTriggers.GENERATE_LOOT.trigger(serverPlayer, this.lootTable); } - LootParams lootParams = new LootParams.Builder(serverLevel) + LootParams lootParams = new LootParams.Builder(level) .withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(this.worldPosition)) .withLuck(player.getLuck()) .withParameter(LootContextParams.THIS_ENTITY, player) - .withParameter(LootContextParams.TOOL, itemStack) + .withParameter(LootContextParams.TOOL, stack) .create(LootContextParamSets.ARCHAEOLOGY); ObjectArrayList objectArrayList = lootTable.getRandomItems(lootParams, this.lootTableSeed); @@ -111,10 +111,10 @@ public class BrushableBlockEntity extends BlockEntity { } } - private void brushingCompleted(ServerLevel serverLevel, Player player, ItemStack itemStack) { - this.dropContent(serverLevel, player, itemStack); + private void brushingCompleted(ServerLevel level, Player player, ItemStack stack) { + this.dropContent(level, player, stack); BlockState blockState = this.getBlockState(); - serverLevel.levelEvent(3008, this.getBlockPos(), Block.getId(blockState)); + level.levelEvent(3008, this.getBlockPos(), Block.getId(blockState)); Block block2; if (this.getBlockState().getBlock() instanceof BrushableBlock brushableBlock) { block2 = brushableBlock.getTurnsInto(); @@ -122,11 +122,11 @@ public class BrushableBlockEntity extends BlockEntity { block2 = Blocks.AIR; } - serverLevel.setBlock(this.worldPosition, block2.defaultBlockState(), 3); + level.setBlock(this.worldPosition, block2.defaultBlockState(), 3); } - private void dropContent(ServerLevel serverLevel, Player player, ItemStack itemStack) { - this.unpackLootTable(serverLevel, player, itemStack); + private void dropContent(ServerLevel level, Player player, ItemStack stack) { + this.unpackLootTable(level, player, stack); if (!this.item.isEmpty()) { double d = EntityType.ITEM.getWidth(); double e = 1.0 - d; @@ -136,24 +136,24 @@ public class BrushableBlockEntity extends BlockEntity { double g = blockPos.getX() + 0.5 * e + f; double h = blockPos.getY() + 0.5 + EntityType.ITEM.getHeight() / 2.0F; double i = blockPos.getZ() + 0.5 * e + f; - ItemEntity itemEntity = new ItemEntity(serverLevel, g, h, i, this.item.split(serverLevel.random.nextInt(21) + 10)); + ItemEntity itemEntity = new ItemEntity(level, g, h, i, this.item.split(level.random.nextInt(21) + 10)); itemEntity.setDeltaMovement(Vec3.ZERO); - serverLevel.addFreshEntity(itemEntity); + level.addFreshEntity(itemEntity); this.item = ItemStack.EMPTY; } } - public void checkReset(ServerLevel serverLevel) { - if (this.brushCount != 0 && serverLevel.getGameTime() >= this.brushCountResetsAtTick) { + public void checkReset(ServerLevel level) { + if (this.brushCount != 0 && level.getGameTime() >= this.brushCountResetsAtTick) { int i = this.getCompletionState(); this.brushCount = Math.max(0, this.brushCount - 2); int j = this.getCompletionState(); if (i != j) { - serverLevel.setBlock(this.getBlockPos(), this.getBlockState().setValue(BlockStateProperties.DUSTED, j), 3); + level.setBlock(this.getBlockPos(), this.getBlockState().setValue(BlockStateProperties.DUSTED, j), 3); } int k = 4; - this.brushCountResetsAtTick = serverLevel.getGameTime() + 4L; + this.brushCountResetsAtTick = level.getGameTime() + 4L; } if (this.brushCount == 0) { @@ -161,7 +161,7 @@ public class BrushableBlockEntity extends BlockEntity { this.brushCountResetsAtTick = 0L; this.coolDownEndsAtTick = 0L; } else { - serverLevel.scheduleTick(this.getBlockPos(), this.getBlockState().getBlock(), 2); + level.scheduleTick(this.getBlockPos(), this.getBlockState().getBlock(), 2); } } diff --git a/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/net/minecraft/world/level/block/entity/CampfireBlockEntity.java index ac4a91bc..dc2b1108 100644 --- a/net/minecraft/world/level/block/entity/CampfireBlockEntity.java +++ b/net/minecraft/world/level/block/entity/CampfireBlockEntity.java @@ -43,36 +43,32 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { } public static void cookTick( - ServerLevel serverLevel, - BlockPos blockPos, - BlockState blockState, - CampfireBlockEntity campfireBlockEntity, - RecipeManager.CachedCheck cachedCheck + ServerLevel level, BlockPos pos, BlockState state, CampfireBlockEntity campfire, RecipeManager.CachedCheck check ) { boolean bl = false; - for (int i = 0; i < campfireBlockEntity.items.size(); i++) { - ItemStack itemStack = campfireBlockEntity.items.get(i); + for (int i = 0; i < campfire.items.size(); i++) { + ItemStack itemStack = campfire.items.get(i); if (!itemStack.isEmpty()) { bl = true; - campfireBlockEntity.cookingProgress[i]++; - if (campfireBlockEntity.cookingProgress[i] >= campfireBlockEntity.cookingTime[i]) { + campfire.cookingProgress[i]++; + if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) { SingleRecipeInput singleRecipeInput = new SingleRecipeInput(itemStack); - ItemStack itemStack2 = (ItemStack)cachedCheck.getRecipeFor(singleRecipeInput, serverLevel) - .map(recipeHolder -> ((CampfireCookingRecipe)recipeHolder.value()).assemble(singleRecipeInput, serverLevel.registryAccess())) + ItemStack itemStack2 = (ItemStack)check.getRecipeFor(singleRecipeInput, level) + .map(recipeHolder -> ((CampfireCookingRecipe)recipeHolder.value()).assemble(singleRecipeInput, level.registryAccess())) .orElse(itemStack); - if (itemStack2.isItemEnabled(serverLevel.enabledFeatures())) { - Containers.dropItemStack(serverLevel, blockPos.getX(), blockPos.getY(), blockPos.getZ(), itemStack2); - campfireBlockEntity.items.set(i, ItemStack.EMPTY); - serverLevel.sendBlockUpdated(blockPos, blockState, blockState, 3); - serverLevel.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, Context.of(blockState)); + if (itemStack2.isItemEnabled(level.enabledFeatures())) { + Containers.dropItemStack(level, pos.getX(), pos.getY(), pos.getZ(), itemStack2); + campfire.items.set(i, ItemStack.EMPTY); + level.sendBlockUpdated(pos, state, state, 3); + level.gameEvent(GameEvent.BLOCK_CHANGE, pos, Context.of(state)); } } } } if (bl) { - setChanged(serverLevel, blockPos, blockState); + setChanged(level, pos, state); } } @@ -158,20 +154,20 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { return compoundTag; } - public boolean placeFood(ServerLevel serverLevel, @Nullable LivingEntity livingEntity, ItemStack itemStack) { + public boolean placeFood(ServerLevel level, @Nullable LivingEntity entity, ItemStack stack) { for (int i = 0; i < this.items.size(); i++) { - ItemStack itemStack2 = this.items.get(i); - if (itemStack2.isEmpty()) { - Optional> optional = serverLevel.recipeAccess() - .getRecipeFor(RecipeType.CAMPFIRE_COOKING, new SingleRecipeInput(itemStack), serverLevel); + ItemStack itemStack = this.items.get(i); + if (itemStack.isEmpty()) { + Optional> optional = level.recipeAccess() + .getRecipeFor(RecipeType.CAMPFIRE_COOKING, new SingleRecipeInput(stack), level); if (optional.isEmpty()) { return false; } this.cookingTime[i] = ((CampfireCookingRecipe)((RecipeHolder)optional.get()).value()).cookingTime(); this.cookingProgress[i] = 0; - this.items.set(i, itemStack.consumeAndReturn(1, livingEntity)); - serverLevel.gameEvent(GameEvent.BLOCK_CHANGE, this.getBlockPos(), Context.of(livingEntity, this.getBlockState())); + this.items.set(i, stack.consumeAndReturn(1, entity)); + level.gameEvent(GameEvent.BLOCK_CHANGE, this.getBlockPos(), Context.of(entity, this.getBlockState())); this.markUpdated(); return true; } diff --git a/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java b/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java index 6cd381e0..48adafa3 100644 --- a/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java +++ b/net/minecraft/world/level/block/entity/CreakingHeartBlockEntity.java @@ -47,75 +47,75 @@ public class CreakingHeartBlockEntity extends BlockEntity { private Vec3 emitterTarget; private int outputSignal; - public CreakingHeartBlockEntity(BlockPos blockPos, BlockState blockState) { - super(BlockEntityType.CREAKING_HEART, blockPos, blockState); + public CreakingHeartBlockEntity(BlockPos pos, BlockState state) { + super(BlockEntityType.CREAKING_HEART, pos, state); } - public static void serverTick(Level level, BlockPos blockPos, BlockState blockState, CreakingHeartBlockEntity creakingHeartBlockEntity) { - int i = creakingHeartBlockEntity.computeAnalogOutputSignal(); - if (creakingHeartBlockEntity.outputSignal != i) { - creakingHeartBlockEntity.outputSignal = i; - level.updateNeighbourForOutputSignal(blockPos, Blocks.CREAKING_HEART); + public static void serverTick(Level level, BlockPos pos, BlockState state, CreakingHeartBlockEntity creakingHeart) { + int i = creakingHeart.computeAnalogOutputSignal(); + if (creakingHeart.outputSignal != i) { + creakingHeart.outputSignal = i; + level.updateNeighbourForOutputSignal(pos, Blocks.CREAKING_HEART); } - if (creakingHeartBlockEntity.emitter > 0) { - if (creakingHeartBlockEntity.emitter > 50) { - creakingHeartBlockEntity.emitParticles((ServerLevel)level, 1, true); - creakingHeartBlockEntity.emitParticles((ServerLevel)level, 1, false); + if (creakingHeart.emitter > 0) { + if (creakingHeart.emitter > 50) { + creakingHeart.emitParticles((ServerLevel)level, 1, true); + creakingHeart.emitParticles((ServerLevel)level, 1, false); } - if (creakingHeartBlockEntity.emitter % 10 == 0 && level instanceof ServerLevel serverLevel && creakingHeartBlockEntity.emitterTarget != null) { - if (creakingHeartBlockEntity.creaking != null) { - creakingHeartBlockEntity.emitterTarget = creakingHeartBlockEntity.creaking.getBoundingBox().getCenter(); + if (creakingHeart.emitter % 10 == 0 && level instanceof ServerLevel serverLevel && creakingHeart.emitterTarget != null) { + if (creakingHeart.creaking != null) { + creakingHeart.emitterTarget = creakingHeart.creaking.getBoundingBox().getCenter(); } - Vec3 vec3 = Vec3.atCenterOf(blockPos); - float f = 0.2F + 0.8F * (100 - creakingHeartBlockEntity.emitter) / 100.0F; - Vec3 vec32 = vec3.subtract(creakingHeartBlockEntity.emitterTarget).scale(f).add(creakingHeartBlockEntity.emitterTarget); - BlockPos blockPos2 = BlockPos.containing(vec32); - float g = creakingHeartBlockEntity.emitter / 2.0F / 100.0F + 0.5F; - serverLevel.playSound(null, blockPos2, SoundEvents.CREAKING_HEART_HURT, SoundSource.BLOCKS, g, 1.0F); + Vec3 vec3 = Vec3.atCenterOf(pos); + float f = 0.2F + 0.8F * (100 - creakingHeart.emitter) / 100.0F; + Vec3 vec32 = vec3.subtract(creakingHeart.emitterTarget).scale(f).add(creakingHeart.emitterTarget); + BlockPos blockPos = BlockPos.containing(vec32); + float g = creakingHeart.emitter / 2.0F / 100.0F + 0.5F; + serverLevel.playSound(null, blockPos, SoundEvents.CREAKING_HEART_HURT, SoundSource.BLOCKS, g, 1.0F); } - creakingHeartBlockEntity.emitter--; + creakingHeart.emitter--; } - if (creakingHeartBlockEntity.ticker-- < 0) { - creakingHeartBlockEntity.ticker = 20; - if (creakingHeartBlockEntity.creaking != null) { - if (CreakingHeartBlock.canSummonCreaking(level) && !(creakingHeartBlockEntity.distanceToCreaking() > 34.0)) { - if (creakingHeartBlockEntity.creaking.isRemoved()) { - creakingHeartBlockEntity.creaking = null; + if (creakingHeart.ticker-- < 0) { + creakingHeart.ticker = 20; + if (creakingHeart.creaking != null) { + if (CreakingHeartBlock.canSummonCreaking(level) && !(creakingHeart.distanceToCreaking() > 34.0)) { + if (creakingHeart.creaking.isRemoved()) { + creakingHeart.creaking = null; } - if (!CreakingHeartBlock.hasRequiredLogs(blockState, level, blockPos) && creakingHeartBlockEntity.creaking == null) { - level.setBlock(blockPos, blockState.setValue(CreakingHeartBlock.CREAKING, CreakingHeartBlock.CreakingHeartState.DISABLED), 3); + if (!CreakingHeartBlock.hasRequiredLogs(state, level, pos) && creakingHeart.creaking == null) { + level.setBlock(pos, state.setValue(CreakingHeartBlock.CREAKING, CreakingHeartBlock.CreakingHeartState.DISABLED), 3); } } else { - creakingHeartBlockEntity.removeProtector(null); + creakingHeart.removeProtector(null); } - } else if (!CreakingHeartBlock.hasRequiredLogs(blockState, level, blockPos)) { - level.setBlock(blockPos, blockState.setValue(CreakingHeartBlock.CREAKING, CreakingHeartBlock.CreakingHeartState.DISABLED), 3); + } else if (!CreakingHeartBlock.hasRequiredLogs(state, level, pos)) { + level.setBlock(pos, state.setValue(CreakingHeartBlock.CREAKING, CreakingHeartBlock.CreakingHeartState.DISABLED), 3); } else { if (!CreakingHeartBlock.canSummonCreaking(level)) { - if (blockState.getValue(CreakingHeartBlock.CREAKING) == CreakingHeartBlock.CreakingHeartState.ACTIVE) { - level.setBlock(blockPos, blockState.setValue(CreakingHeartBlock.CREAKING, CreakingHeartBlock.CreakingHeartState.DORMANT), 3); + if (state.getValue(CreakingHeartBlock.CREAKING) == CreakingHeartBlock.CreakingHeartState.ACTIVE) { + level.setBlock(pos, state.setValue(CreakingHeartBlock.CREAKING, CreakingHeartBlock.CreakingHeartState.DORMANT), 3); return; } - } else if (blockState.getValue(CreakingHeartBlock.CREAKING) == CreakingHeartBlock.CreakingHeartState.DORMANT) { - level.setBlock(blockPos, blockState.setValue(CreakingHeartBlock.CREAKING, CreakingHeartBlock.CreakingHeartState.ACTIVE), 3); + } else if (state.getValue(CreakingHeartBlock.CREAKING) == CreakingHeartBlock.CreakingHeartState.DORMANT) { + level.setBlock(pos, state.setValue(CreakingHeartBlock.CREAKING, CreakingHeartBlock.CreakingHeartState.ACTIVE), 3); return; } - if (blockState.getValue(CreakingHeartBlock.CREAKING) == CreakingHeartBlock.CreakingHeartState.ACTIVE) { + if (state.getValue(CreakingHeartBlock.CREAKING) == CreakingHeartBlock.CreakingHeartState.ACTIVE) { if (level.getDifficulty() != Difficulty.PEACEFUL) { if (!(level instanceof ServerLevel serverLevel && !serverLevel.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING))) { - Player player = level.getNearestPlayer(blockPos.getX(), blockPos.getY(), blockPos.getZ(), 32.0, false); + Player player = level.getNearestPlayer(pos.getX(), pos.getY(), pos.getZ(), 32.0, false); if (player != null) { - creakingHeartBlockEntity.creaking = spawnProtector((ServerLevel)level, creakingHeartBlockEntity); - if (creakingHeartBlockEntity.creaking != null) { - creakingHeartBlockEntity.creaking.makeSound(SoundEvents.CREAKING_SPAWN); - level.playSound(null, creakingHeartBlockEntity.getBlockPos(), SoundEvents.CREAKING_HEART_SPAWN, SoundSource.BLOCKS, 1.0F, 1.0F); + creakingHeart.creaking = spawnProtector((ServerLevel)level, creakingHeart); + if (creakingHeart.creaking != null) { + creakingHeart.creaking.makeSound(SoundEvents.CREAKING_SPAWN); + level.playSound(null, creakingHeart.getBlockPos(), SoundEvents.CREAKING_HEART_SPAWN, SoundSource.BLOCKS, 1.0F, 1.0F); } } } @@ -130,17 +130,17 @@ public class CreakingHeartBlockEntity extends BlockEntity { } @Nullable - private static CreakingTransient spawnProtector(ServerLevel serverLevel, CreakingHeartBlockEntity creakingHeartBlockEntity) { - BlockPos blockPos = creakingHeartBlockEntity.getBlockPos(); + private static CreakingTransient spawnProtector(ServerLevel level, CreakingHeartBlockEntity creakingHeart) { + BlockPos blockPos = creakingHeart.getBlockPos(); Optional optional = SpawnUtil.trySpawnMob( - EntityType.CREAKING_TRANSIENT, EntitySpawnReason.SPAWNER, serverLevel, blockPos, 5, 16, 8, SpawnUtil.Strategy.ON_TOP_OF_COLLIDER_NO_LEAVES + EntityType.CREAKING_TRANSIENT, EntitySpawnReason.SPAWNER, level, blockPos, 5, 16, 8, SpawnUtil.Strategy.ON_TOP_OF_COLLIDER_NO_LEAVES ); if (optional.isEmpty()) { return null; } else { CreakingTransient creakingTransient = (CreakingTransient)optional.get(); - serverLevel.gameEvent(creakingTransient, GameEvent.ENTITY_PLACE, creakingTransient.position()); - serverLevel.broadcastEntityEvent(creakingTransient, (byte)60); + level.gameEvent(creakingTransient, GameEvent.ENTITY_PLACE, creakingTransient.position()); + level.broadcastEntityEvent(creakingTransient, (byte)60); creakingTransient.bindToCreakingHeart(blockPos); return creakingTransient; } @@ -165,12 +165,12 @@ public class CreakingHeartBlockEntity extends BlockEntity { } } - private void emitParticles(ServerLevel serverLevel, int i, boolean bl) { + private void emitParticles(ServerLevel level, int count, boolean reverseDirection) { if (this.creaking != null) { - int j = bl ? 16545810 : 6250335; - RandomSource randomSource = serverLevel.random; + int i = reverseDirection ? 16545810 : 6250335; + RandomSource randomSource = level.random; - for (double d = 0.0; d < i; d++) { + for (double d = 0.0; d < count; d++) { Vec3 vec3 = this.creaking .getBoundingBox() .getMinPosition() @@ -180,14 +180,14 @@ public class CreakingHeartBlockEntity extends BlockEntity { randomSource.nextDouble() * this.creaking.getBoundingBox().getZsize() ); Vec3 vec32 = Vec3.atLowerCornerOf(this.getBlockPos()).add(randomSource.nextDouble(), randomSource.nextDouble(), randomSource.nextDouble()); - if (bl) { + if (reverseDirection) { Vec3 vec33 = vec3; vec3 = vec32; vec32 = vec33; } - TargetColorParticleOption targetColorParticleOption = new TargetColorParticleOption(vec32, j); - serverLevel.sendParticles(targetColorParticleOption, vec3.x, vec3.y, vec3.z, 1, 0.0, 0.0, 0.0, 0.0); + TargetColorParticleOption targetColorParticleOption = new TargetColorParticleOption(vec32, i); + level.sendParticles(targetColorParticleOption, vec3.x, vec3.y, vec3.z, 1, 0.0, 0.0, 0.0, 0.0); } } } diff --git a/net/minecraft/world/level/block/entity/FuelValues.java b/net/minecraft/world/level/block/entity/FuelValues.java index 6441b648..5893e746 100644 --- a/net/minecraft/world/level/block/entity/FuelValues.java +++ b/net/minecraft/world/level/block/entity/FuelValues.java @@ -19,87 +19,87 @@ import net.minecraft.world.level.block.Blocks; public class FuelValues { private final Object2IntSortedMap values; - FuelValues(Object2IntSortedMap object2IntSortedMap) { - this.values = object2IntSortedMap; + FuelValues(Object2IntSortedMap values) { + this.values = values; } - public boolean isFuel(ItemStack itemStack) { - return this.values.containsKey(itemStack.getItem()); + public boolean isFuel(ItemStack stack) { + return this.values.containsKey(stack.getItem()); } public SequencedSet fuelItems() { return Collections.unmodifiableSequencedSet(this.values.keySet()); } - public int burnDuration(ItemStack itemStack) { - return itemStack.isEmpty() ? 0 : this.values.getInt(itemStack.getItem()); + public int burnDuration(ItemStack stack) { + return stack.isEmpty() ? 0 : this.values.getInt(stack.getItem()); } - public static FuelValues vanillaBurnTimes(HolderLookup.Provider provider, FeatureFlagSet featureFlagSet) { - return vanillaBurnTimes(provider, featureFlagSet, 200); + public static FuelValues vanillaBurnTimes(HolderLookup.Provider registries, FeatureFlagSet enabledFeatures) { + return vanillaBurnTimes(registries, enabledFeatures, 200); } - public static FuelValues vanillaBurnTimes(HolderLookup.Provider provider, FeatureFlagSet featureFlagSet, int i) { - return new FuelValues.Builder(provider, featureFlagSet) - .add(Items.LAVA_BUCKET, i * 100) - .add(Blocks.COAL_BLOCK, i * 8 * 10) - .add(Items.BLAZE_ROD, i * 12) - .add(Items.COAL, i * 8) - .add(Items.CHARCOAL, i * 8) - .add(ItemTags.LOGS, i * 3 / 2) - .add(ItemTags.BAMBOO_BLOCKS, i * 3 / 2) - .add(ItemTags.PLANKS, i * 3 / 2) - .add(Blocks.BAMBOO_MOSAIC, i * 3 / 2) - .add(ItemTags.WOODEN_STAIRS, i * 3 / 2) - .add(Blocks.BAMBOO_MOSAIC_STAIRS, i * 3 / 2) - .add(ItemTags.WOODEN_SLABS, i * 3 / 4) - .add(Blocks.BAMBOO_MOSAIC_SLAB, i * 3 / 4) - .add(ItemTags.WOODEN_TRAPDOORS, i * 3 / 2) - .add(ItemTags.WOODEN_PRESSURE_PLATES, i * 3 / 2) - .add(ItemTags.WOODEN_FENCES, i * 3 / 2) - .add(ItemTags.FENCE_GATES, i * 3 / 2) - .add(Blocks.NOTE_BLOCK, i * 3 / 2) - .add(Blocks.BOOKSHELF, i * 3 / 2) - .add(Blocks.CHISELED_BOOKSHELF, i * 3 / 2) - .add(Blocks.LECTERN, i * 3 / 2) - .add(Blocks.JUKEBOX, i * 3 / 2) - .add(Blocks.CHEST, i * 3 / 2) - .add(Blocks.TRAPPED_CHEST, i * 3 / 2) - .add(Blocks.CRAFTING_TABLE, i * 3 / 2) - .add(Blocks.DAYLIGHT_DETECTOR, i * 3 / 2) - .add(ItemTags.BANNERS, i * 3 / 2) - .add(Items.BOW, i * 3 / 2) - .add(Items.FISHING_ROD, i * 3 / 2) - .add(Blocks.LADDER, i * 3 / 2) - .add(ItemTags.SIGNS, i) - .add(ItemTags.HANGING_SIGNS, i * 4) - .add(Items.WOODEN_SHOVEL, i) - .add(Items.WOODEN_SWORD, i) - .add(Items.WOODEN_HOE, i) - .add(Items.WOODEN_AXE, i) - .add(Items.WOODEN_PICKAXE, i) - .add(ItemTags.WOODEN_DOORS, i) - .add(ItemTags.BOATS, i * 6) - .add(ItemTags.WOOL, i / 2) - .add(ItemTags.WOODEN_BUTTONS, i / 2) - .add(Items.STICK, i / 2) - .add(ItemTags.SAPLINGS, i / 2) - .add(Items.BOWL, i / 2) - .add(ItemTags.WOOL_CARPETS, 1 + i / 3) - .add(Blocks.DRIED_KELP_BLOCK, 1 + i * 20) - .add(Items.CROSSBOW, i * 3 / 2) - .add(Blocks.BAMBOO, i / 4) - .add(Blocks.DEAD_BUSH, i / 2) - .add(Blocks.SCAFFOLDING, i / 4) - .add(Blocks.LOOM, i * 3 / 2) - .add(Blocks.BARREL, i * 3 / 2) - .add(Blocks.CARTOGRAPHY_TABLE, i * 3 / 2) - .add(Blocks.FLETCHING_TABLE, i * 3 / 2) - .add(Blocks.SMITHING_TABLE, i * 3 / 2) - .add(Blocks.COMPOSTER, i * 3 / 2) - .add(Blocks.AZALEA, i / 2) - .add(Blocks.FLOWERING_AZALEA, i / 2) - .add(Blocks.MANGROVE_ROOTS, i * 3 / 2) + public static FuelValues vanillaBurnTimes(HolderLookup.Provider registries, FeatureFlagSet enabledFeatures, int smeltingTime) { + return new FuelValues.Builder(registries, enabledFeatures) + .add(Items.LAVA_BUCKET, smeltingTime * 100) + .add(Blocks.COAL_BLOCK, smeltingTime * 8 * 10) + .add(Items.BLAZE_ROD, smeltingTime * 12) + .add(Items.COAL, smeltingTime * 8) + .add(Items.CHARCOAL, smeltingTime * 8) + .add(ItemTags.LOGS, smeltingTime * 3 / 2) + .add(ItemTags.BAMBOO_BLOCKS, smeltingTime * 3 / 2) + .add(ItemTags.PLANKS, smeltingTime * 3 / 2) + .add(Blocks.BAMBOO_MOSAIC, smeltingTime * 3 / 2) + .add(ItemTags.WOODEN_STAIRS, smeltingTime * 3 / 2) + .add(Blocks.BAMBOO_MOSAIC_STAIRS, smeltingTime * 3 / 2) + .add(ItemTags.WOODEN_SLABS, smeltingTime * 3 / 4) + .add(Blocks.BAMBOO_MOSAIC_SLAB, smeltingTime * 3 / 4) + .add(ItemTags.WOODEN_TRAPDOORS, smeltingTime * 3 / 2) + .add(ItemTags.WOODEN_PRESSURE_PLATES, smeltingTime * 3 / 2) + .add(ItemTags.WOODEN_FENCES, smeltingTime * 3 / 2) + .add(ItemTags.FENCE_GATES, smeltingTime * 3 / 2) + .add(Blocks.NOTE_BLOCK, smeltingTime * 3 / 2) + .add(Blocks.BOOKSHELF, smeltingTime * 3 / 2) + .add(Blocks.CHISELED_BOOKSHELF, smeltingTime * 3 / 2) + .add(Blocks.LECTERN, smeltingTime * 3 / 2) + .add(Blocks.JUKEBOX, smeltingTime * 3 / 2) + .add(Blocks.CHEST, smeltingTime * 3 / 2) + .add(Blocks.TRAPPED_CHEST, smeltingTime * 3 / 2) + .add(Blocks.CRAFTING_TABLE, smeltingTime * 3 / 2) + .add(Blocks.DAYLIGHT_DETECTOR, smeltingTime * 3 / 2) + .add(ItemTags.BANNERS, smeltingTime * 3 / 2) + .add(Items.BOW, smeltingTime * 3 / 2) + .add(Items.FISHING_ROD, smeltingTime * 3 / 2) + .add(Blocks.LADDER, smeltingTime * 3 / 2) + .add(ItemTags.SIGNS, smeltingTime) + .add(ItemTags.HANGING_SIGNS, smeltingTime * 4) + .add(Items.WOODEN_SHOVEL, smeltingTime) + .add(Items.WOODEN_SWORD, smeltingTime) + .add(Items.WOODEN_HOE, smeltingTime) + .add(Items.WOODEN_AXE, smeltingTime) + .add(Items.WOODEN_PICKAXE, smeltingTime) + .add(ItemTags.WOODEN_DOORS, smeltingTime) + .add(ItemTags.BOATS, smeltingTime * 6) + .add(ItemTags.WOOL, smeltingTime / 2) + .add(ItemTags.WOODEN_BUTTONS, smeltingTime / 2) + .add(Items.STICK, smeltingTime / 2) + .add(ItemTags.SAPLINGS, smeltingTime / 2) + .add(Items.BOWL, smeltingTime / 2) + .add(ItemTags.WOOL_CARPETS, 1 + smeltingTime / 3) + .add(Blocks.DRIED_KELP_BLOCK, 1 + smeltingTime * 20) + .add(Items.CROSSBOW, smeltingTime * 3 / 2) + .add(Blocks.BAMBOO, smeltingTime / 4) + .add(Blocks.DEAD_BUSH, smeltingTime / 2) + .add(Blocks.SCAFFOLDING, smeltingTime / 4) + .add(Blocks.LOOM, smeltingTime * 3 / 2) + .add(Blocks.BARREL, smeltingTime * 3 / 2) + .add(Blocks.CARTOGRAPHY_TABLE, smeltingTime * 3 / 2) + .add(Blocks.FLETCHING_TABLE, smeltingTime * 3 / 2) + .add(Blocks.SMITHING_TABLE, smeltingTime * 3 / 2) + .add(Blocks.COMPOSTER, smeltingTime * 3 / 2) + .add(Blocks.AZALEA, smeltingTime / 2) + .add(Blocks.FLOWERING_AZALEA, smeltingTime / 2) + .add(Blocks.MANGROVE_ROOTS, smeltingTime * 3 / 2) .remove(ItemTags.NON_FLAMMABLE_WOOD) .build(); } @@ -109,38 +109,38 @@ public class FuelValues { private final FeatureFlagSet enabledFeatures; private final Object2IntSortedMap values = new Object2IntLinkedOpenHashMap<>(); - public Builder(HolderLookup.Provider provider, FeatureFlagSet featureFlagSet) { - this.items = provider.lookupOrThrow(Registries.ITEM); - this.enabledFeatures = featureFlagSet; + public Builder(HolderLookup.Provider registries, FeatureFlagSet enabledFeatures) { + this.items = registries.lookupOrThrow(Registries.ITEM); + this.enabledFeatures = enabledFeatures; } public FuelValues build() { return new FuelValues(this.values); } - public FuelValues.Builder remove(TagKey tagKey) { - this.values.keySet().removeIf(item -> item.builtInRegistryHolder().is(tagKey)); + public FuelValues.Builder remove(TagKey tag) { + this.values.keySet().removeIf(item -> item.builtInRegistryHolder().is(tag)); return this; } - public FuelValues.Builder add(TagKey tagKey, int i) { - this.items.get(tagKey).ifPresent(named -> { + public FuelValues.Builder add(TagKey tag, int value) { + this.items.get(tag).ifPresent(named -> { for (Holder holder : named) { - this.putInternal(i, holder.value()); + this.putInternal(value, holder.value()); } }); return this; } - public FuelValues.Builder add(ItemLike itemLike, int i) { - Item item = itemLike.asItem(); - this.putInternal(i, item); + public FuelValues.Builder add(ItemLike item, int value) { + Item item2 = item.asItem(); + this.putInternal(value, item2); return this; } - private void putInternal(int i, Item item) { + private void putInternal(int value, Item item) { if (item.isEnabled(this.enabledFeatures)) { - this.values.put(item, i); + this.values.put(item, value); } } } diff --git a/net/minecraft/world/level/block/entity/LecternBlockEntity.java b/net/minecraft/world/level/block/entity/LecternBlockEntity.java index d55b7d6e..2672c9aa 100644 --- a/net/minecraft/world/level/block/entity/LecternBlockEntity.java +++ b/net/minecraft/world/level/block/entity/LecternBlockEntity.java @@ -193,7 +193,7 @@ public class LecternBlockEntity extends BlockEntity implements Clearable, MenuPr return stack; } - private CommandSourceStack createCommandSourceStack(@Nullable Player player, ServerLevel serverLevel) { + private CommandSourceStack createCommandSourceStack(@Nullable Player player, ServerLevel level) { String string; Component component; if (player == null) { @@ -205,7 +205,7 @@ public class LecternBlockEntity extends BlockEntity implements Clearable, MenuPr } Vec3 vec3 = Vec3.atCenterOf(this.worldPosition); - return new CommandSourceStack(CommandSource.NULL, vec3, Vec2.ZERO, serverLevel, 2, string, component, serverLevel.getServer(), player); + return new CommandSourceStack(CommandSource.NULL, vec3, Vec2.ZERO, level, 2, string, component, level.getServer(), player); } @Override diff --git a/net/minecraft/world/level/block/entity/SmokerBlockEntity.java b/net/minecraft/world/level/block/entity/SmokerBlockEntity.java index 8fa785e3..2eb2c1d6 100644 --- a/net/minecraft/world/level/block/entity/SmokerBlockEntity.java +++ b/net/minecraft/world/level/block/entity/SmokerBlockEntity.java @@ -20,8 +20,8 @@ public class SmokerBlockEntity extends AbstractFurnaceBlockEntity { } @Override - protected int getBurnDuration(FuelValues fuelValues, ItemStack itemStack) { - return super.getBurnDuration(fuelValues, itemStack) / 2; + protected int getBurnDuration(FuelValues fuelValues, ItemStack stack) { + return super.getBurnDuration(fuelValues, stack) / 2; } @Override diff --git a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java index 4af43839..150caccb 100644 --- a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java +++ b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java @@ -101,20 +101,20 @@ public final class TrialSpawner { } public TrialSpawner( - Holder holder, - Holder holder2, - TrialSpawnerData trialSpawnerData, - int i, - int j, + Holder normalConfig, + Holder ominousConfig, + TrialSpawnerData data, + int targetCooldownLength, + int requiredPlayerRange, TrialSpawner.StateAccessor stateAccessor, PlayerDetector playerDetector, EntitySelector entitySelector ) { - this.normalConfig = holder; - this.ominousConfig = holder2; - this.data = trialSpawnerData; - this.targetCooldownLength = i; - this.requiredPlayerRange = j; + this.normalConfig = normalConfig; + this.ominousConfig = ominousConfig; + this.data = data; + this.targetCooldownLength = targetCooldownLength; + this.requiredPlayerRange = requiredPlayerRange; this.stateAccessor = stateAccessor; this.playerDetector = playerDetector; this.entitySelector = entitySelector; @@ -182,11 +182,11 @@ public final class TrialSpawner { return this.entitySelector; } - public boolean canSpawnInLevel(ServerLevel serverLevel) { + public boolean canSpawnInLevel(ServerLevel level) { if (this.overridePeacefulAndMobSpawnRule) { return true; } else { - return serverLevel.getDifficulty() == Difficulty.PEACEFUL ? false : serverLevel.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING); + return level.getDifficulty() == Difficulty.PEACEFUL ? false : level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING); } } diff --git a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerConfig.java b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerConfig.java index 4773bba6..01265965 100644 --- a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerConfig.java +++ b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerConfig.java @@ -77,48 +77,48 @@ public record TrialSpawnerConfig( .build(); private ResourceKey itemsToDropWhenOminous = BuiltInLootTables.SPAWNER_TRIAL_ITEMS_TO_DROP_WHEN_OMINOUS; - public TrialSpawnerConfig.Builder spawnRange(int i) { - this.spawnRange = i; + public TrialSpawnerConfig.Builder spawnRange(int spawnRange) { + this.spawnRange = spawnRange; return this; } - public TrialSpawnerConfig.Builder totalMobs(float f) { - this.totalMobs = f; + public TrialSpawnerConfig.Builder totalMobs(float totalMobs) { + this.totalMobs = totalMobs; return this; } - public TrialSpawnerConfig.Builder simultaneousMobs(float f) { - this.simultaneousMobs = f; + public TrialSpawnerConfig.Builder simultaneousMobs(float simultaneousMobs) { + this.simultaneousMobs = simultaneousMobs; return this; } - public TrialSpawnerConfig.Builder totalMobsAddedPerPlayer(float f) { - this.totalMobsAddedPerPlayer = f; + public TrialSpawnerConfig.Builder totalMobsAddedPerPlayer(float totalMobsAddedPerPlayer) { + this.totalMobsAddedPerPlayer = totalMobsAddedPerPlayer; return this; } - public TrialSpawnerConfig.Builder simultaneousMobsAddedPerPlayer(float f) { - this.simultaneousMobsAddedPerPlayer = f; + public TrialSpawnerConfig.Builder simultaneousMobsAddedPerPlayer(float simultaneousMobsAddedPerPlayer) { + this.simultaneousMobsAddedPerPlayer = simultaneousMobsAddedPerPlayer; return this; } - public TrialSpawnerConfig.Builder ticksBetweenSpawn(int i) { - this.ticksBetweenSpawn = i; + public TrialSpawnerConfig.Builder ticksBetweenSpawn(int ticksBetweenSpawn) { + this.ticksBetweenSpawn = ticksBetweenSpawn; return this; } - public TrialSpawnerConfig.Builder spawnPotentialsDefinition(SimpleWeightedRandomList simpleWeightedRandomList) { - this.spawnPotentialsDefinition = simpleWeightedRandomList; + public TrialSpawnerConfig.Builder spawnPotentialsDefinition(SimpleWeightedRandomList spawnPotentialsDefinition) { + this.spawnPotentialsDefinition = spawnPotentialsDefinition; return this; } - public TrialSpawnerConfig.Builder lootTablesToEject(SimpleWeightedRandomList> simpleWeightedRandomList) { - this.lootTablesToEject = simpleWeightedRandomList; + public TrialSpawnerConfig.Builder lootTablesToEject(SimpleWeightedRandomList> lootTablesToEject) { + this.lootTablesToEject = lootTablesToEject; return this; } - public TrialSpawnerConfig.Builder itemsToDropWhenOminous(ResourceKey resourceKey) { - this.itemsToDropWhenOminous = resourceKey; + public TrialSpawnerConfig.Builder itemsToDropWhenOminous(ResourceKey itemsToDropWhenOminous) { + this.itemsToDropWhenOminous = itemsToDropWhenOminous; return this; } diff --git a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerConfigs.java b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerConfigs.java index 9af9eb4c..0ad3e7a9 100644 --- a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerConfigs.java +++ b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerConfigs.java @@ -35,9 +35,9 @@ public class TrialSpawnerConfigs { private static final TrialSpawnerConfigs.Keys TRIAL_CHAMBER_SMALL_MELEE_SILVERFISH = TrialSpawnerConfigs.Keys.of("trial_chamber/small_melee/silverfish"); private static final TrialSpawnerConfigs.Keys TRIAL_CHAMBER_SMALL_MELEE_SLIME = TrialSpawnerConfigs.Keys.of("trial_chamber/small_melee/slime"); - public static void bootstrap(BootstrapContext bootstrapContext) { + public static void bootstrap(BootstrapContext context) { register( - bootstrapContext, + context, TRIAL_CHAMBER_BREEZE, TrialSpawnerConfig.builder() .simultaneousMobs(1.0F) @@ -62,7 +62,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_MELEE_HUSK, trialChamberBase().spawnPotentialsDefinition(SimpleWeightedRandomList.single(spawnData(EntityType.HUSK))).build(), trialChamberBase() @@ -76,7 +76,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_MELEE_SPIDER, trialChamberBase().spawnPotentialsDefinition(SimpleWeightedRandomList.single(spawnData(EntityType.SPIDER))).build(), trialChamberMeleeOminous() @@ -90,7 +90,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_MELEE_ZOMBIE, trialChamberBase().spawnPotentialsDefinition(SimpleWeightedRandomList.single(spawnData(EntityType.ZOMBIE))).build(), trialChamberBase() @@ -104,7 +104,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_RANGED_POISON_SKELETON, trialChamberBase().spawnPotentialsDefinition(SimpleWeightedRandomList.single(spawnData(EntityType.BOGGED))).build(), trialChamberBase() @@ -118,7 +118,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_RANGED_SKELETON, trialChamberBase().spawnPotentialsDefinition(SimpleWeightedRandomList.single(spawnData(EntityType.SKELETON))).build(), trialChamberBase() @@ -132,7 +132,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_RANGED_STRAY, trialChamberBase().spawnPotentialsDefinition(SimpleWeightedRandomList.single(spawnData(EntityType.STRAY))).build(), trialChamberBase() @@ -146,7 +146,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_SLOW_RANGED_POISON_SKELETON, trialChamberSlowRanged().spawnPotentialsDefinition(SimpleWeightedRandomList.single(spawnData(EntityType.BOGGED))).build(), trialChamberSlowRanged() @@ -160,7 +160,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_SLOW_RANGED_SKELETON, trialChamberSlowRanged().spawnPotentialsDefinition(SimpleWeightedRandomList.single(spawnData(EntityType.SKELETON))).build(), trialChamberSlowRanged() @@ -174,7 +174,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_SLOW_RANGED_STRAY, trialChamberSlowRanged().spawnPotentialsDefinition(SimpleWeightedRandomList.single(spawnData(EntityType.STRAY))).build(), trialChamberSlowRanged() @@ -188,7 +188,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_SMALL_MELEE_BABY_ZOMBIE, TrialSpawnerConfig.builder() .simultaneousMobsAddedPerPlayer(0.5F) @@ -214,7 +214,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_SMALL_MELEE_CAVE_SPIDER, trialChamberBase().spawnPotentialsDefinition(SimpleWeightedRandomList.single(spawnData(EntityType.CAVE_SPIDER))).build(), trialChamberMeleeOminous() @@ -228,7 +228,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_SMALL_MELEE_SILVERFISH, trialChamberBase().spawnPotentialsDefinition(SimpleWeightedRandomList.single(spawnData(EntityType.SILVERFISH))).build(), trialChamberMeleeOminous() @@ -242,7 +242,7 @@ public class TrialSpawnerConfigs { .build() ); register( - bootstrapContext, + context, TRIAL_CHAMBER_SMALL_MELEE_SLIME, trialChamberBase() .spawnPotentialsDefinition( @@ -273,36 +273,33 @@ public class TrialSpawnerConfigs { return customSpawnDataWithEquipment(entityType, compoundTag -> {}, null); } - private static SpawnData customSpawnData(EntityType entityType, Consumer consumer) { - return customSpawnDataWithEquipment(entityType, consumer, null); + private static SpawnData customSpawnData(EntityType entityType, Consumer tagConsumer) { + return customSpawnDataWithEquipment(entityType, tagConsumer, null); } - private static SpawnData spawnDataWithEquipment(EntityType entityType, ResourceKey resourceKey) { - return customSpawnDataWithEquipment(entityType, compoundTag -> {}, resourceKey); + private static SpawnData spawnDataWithEquipment(EntityType entityType, ResourceKey lootTableKey) { + return customSpawnDataWithEquipment(entityType, compoundTag -> {}, lootTableKey); } private static SpawnData customSpawnDataWithEquipment( - EntityType entityType, Consumer consumer, @Nullable ResourceKey resourceKey + EntityType entityType, Consumer tagConsumer, @Nullable ResourceKey lootTableKey ) { CompoundTag compoundTag = new CompoundTag(); compoundTag.putString("id", BuiltInRegistries.ENTITY_TYPE.getKey(entityType).toString()); - consumer.accept(compoundTag); - Optional optional = Optional.ofNullable(resourceKey).map(resourceKeyx -> new EquipmentTable(resourceKeyx, 0.0F)); + tagConsumer.accept(compoundTag); + Optional optional = Optional.ofNullable(lootTableKey).map(resourceKey -> new EquipmentTable(resourceKey, 0.0F)); return new SpawnData(compoundTag, Optional.empty(), optional); } private static void register( - BootstrapContext bootstrapContext, - TrialSpawnerConfigs.Keys keys, - TrialSpawnerConfig trialSpawnerConfig, - TrialSpawnerConfig trialSpawnerConfig2 + BootstrapContext context, TrialSpawnerConfigs.Keys keys, TrialSpawnerConfig normal, TrialSpawnerConfig ominous ) { - bootstrapContext.register(keys.normal, trialSpawnerConfig); - bootstrapContext.register(keys.ominous, trialSpawnerConfig2); + context.register(keys.normal, normal); + context.register(keys.ominous, ominous); } - static ResourceKey registryKey(String string) { - return ResourceKey.create(Registries.TRIAL_SPAWNER_CONFIG, ResourceLocation.withDefaultNamespace(string)); + static ResourceKey registryKey(String name) { + return ResourceKey.create(Registries.TRIAL_SPAWNER_CONFIG, ResourceLocation.withDefaultNamespace(name)); } private static TrialSpawnerConfig.Builder trialChamberMeleeOminous() { @@ -319,8 +316,8 @@ public class TrialSpawnerConfigs { record Keys(ResourceKey normal, ResourceKey ominous) { - public static TrialSpawnerConfigs.Keys of(String string) { - return new TrialSpawnerConfigs.Keys(TrialSpawnerConfigs.registryKey(string + "/normal"), TrialSpawnerConfigs.registryKey(string + "/ominous")); + public static TrialSpawnerConfigs.Keys of(String key) { + return new TrialSpawnerConfigs.Keys(TrialSpawnerConfigs.registryKey(key + "/normal"), TrialSpawnerConfigs.registryKey(key + "/ominous")); } } } diff --git a/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java b/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java index 42aeed7e..6ef51a63 100644 --- a/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java +++ b/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java @@ -310,13 +310,13 @@ public class VaultBlockEntity extends BlockEntity { setVaultState(level, pos, state, state.setValue(VaultBlock.STATE, VaultState.UNLOCKING), config, sharedData); } - private static List resolveItemsToEject(ServerLevel serverLevel, VaultConfig vaultConfig, BlockPos blockPos, Player player, ItemStack itemStack) { - LootTable lootTable = serverLevel.getServer().reloadableRegistries().getLootTable(vaultConfig.lootTable()); - LootParams lootParams = new LootParams.Builder(serverLevel) - .withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(blockPos)) + private static List resolveItemsToEject(ServerLevel level, VaultConfig config, BlockPos pos, Player player, ItemStack key) { + LootTable lootTable = level.getServer().reloadableRegistries().getLootTable(config.lootTable()); + LootParams lootParams = new LootParams.Builder(level) + .withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(pos)) .withLuck(player.getLuck()) .withParameter(LootContextParams.THIS_ENTITY, player) - .withParameter(LootContextParams.TOOL, itemStack) + .withParameter(LootContextParams.TOOL, key) .create(LootContextParamSets.VAULT); return lootTable.getRandomItems(lootParams); } diff --git a/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/net/minecraft/world/level/block/piston/PistonBaseBlock.java index a25eeedc..1028a2c4 100644 --- a/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/net/minecraft/world/level/block/piston/PistonBaseBlock.java @@ -28,7 +28,7 @@ import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.PistonType; @@ -106,9 +106,9 @@ public class PistonBaseBlock extends DirectionalBlock { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { if (!level.isClientSide) { - this.checkIfExtend(level, blockPos, blockState); + this.checkIfExtend(level, pos, state); } } @@ -395,7 +395,7 @@ public class PistonBaseBlock extends DirectionalBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, EXTENDED); } diff --git a/net/minecraft/world/level/block/piston/PistonHeadBlock.java b/net/minecraft/world/level/block/piston/PistonHeadBlock.java index f76cb103..9064cc99 100644 --- a/net/minecraft/world/level/block/piston/PistonHeadBlock.java +++ b/net/minecraft/world/level/block/piston/PistonHeadBlock.java @@ -18,7 +18,7 @@ import net.minecraft.world.level.block.Mirror; import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; @@ -132,18 +132,18 @@ public class PistonHeadBlock extends DirectionalBlock { @Override protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return direction.getOpposite() == blockState.getValue(FACING) && !blockState.canSurvive(levelReader, blockPos) + return direction.getOpposite() == state.getValue(FACING) && !state.canSurvive(level, pos) ? Blocks.AIR.defaultBlockState() - : super.updateShape(blockState, levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState2, randomSource); + : super.updateShape(state, level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } @Override @@ -153,12 +153,12 @@ public class PistonHeadBlock extends DirectionalBlock { } @Override - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - if (blockState.canSurvive(level, blockPos)) { + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + if (state.canSurvive(level, pos)) { level.neighborChanged( - blockPos.relative(((Direction)blockState.getValue(FACING)).getOpposite()), - block, - ExperimentalRedstoneUtils.withFront(orientation, ((Direction)blockState.getValue(FACING)).getOpposite()) + pos.relative(((Direction)state.getValue(FACING)).getOpposite()), + neighborBlock, + ExperimentalRedstoneUtils.withFront(orientation, ((Direction)state.getValue(FACING)).getOpposite()) ); } } @@ -179,7 +179,7 @@ public class PistonHeadBlock extends DirectionalBlock { } @Override - protected void createBlockStateDefinition(StateDefinition.Builder builder) { + protected void createBlockStateDefinition(Builder builder) { builder.add(FACING, TYPE, SHORT); } diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java index 0a85ee45..74989d9f 100644 --- a/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -163,23 +163,23 @@ public abstract class BlockBehaviour implements FeatureElement { } protected BlockState updateShape( - BlockState blockState, - LevelReader levelReader, + BlockState state, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState2, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return blockState; + return state; } protected boolean skipRendering(BlockState state, BlockState adjacentState, Direction direction) { return false; } - protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { + protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { } protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) { @@ -191,16 +191,14 @@ public abstract class BlockBehaviour implements FeatureElement { } } - protected void onExplosionHit( - BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer biConsumer - ) { - if (!blockState.isAir() && explosion.getBlockInteraction() != Explosion.BlockInteraction.TRIGGER_BLOCK) { - Block block = blockState.getBlock(); + protected void onExplosionHit(BlockState state, ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer dropConsumer) { + if (!state.isAir() && explosion.getBlockInteraction() != Explosion.BlockInteraction.TRIGGER_BLOCK) { + Block block = state.getBlock(); boolean bl = explosion.getIndirectSourceEntity() instanceof Player; if (block.dropFromExplosion(explosion)) { - BlockEntity blockEntity = blockState.hasBlockEntity() ? serverLevel.getBlockEntity(blockPos) : null; - LootParams.Builder builder = new LootParams.Builder(serverLevel) - .withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(blockPos)) + BlockEntity blockEntity = state.hasBlockEntity() ? level.getBlockEntity(pos) : null; + LootParams.Builder builder = new LootParams.Builder(level) + .withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(pos)) .withParameter(LootContextParams.TOOL, ItemStack.EMPTY) .withOptionalParameter(LootContextParams.BLOCK_ENTITY, blockEntity) .withOptionalParameter(LootContextParams.THIS_ENTITY, explosion.getDirectSourceEntity()); @@ -208,12 +206,12 @@ public abstract class BlockBehaviour implements FeatureElement { builder.withParameter(LootContextParams.EXPLOSION_RADIUS, explosion.radius()); } - blockState.spawnAfterBreak(serverLevel, blockPos, ItemStack.EMPTY, bl); - blockState.getDrops(builder).forEach(itemStack -> biConsumer.accept(itemStack, blockPos)); + state.spawnAfterBreak(level, pos, ItemStack.EMPTY, bl); + state.getDrops(builder).forEach(itemStack -> dropConsumer.accept(itemStack, pos)); } - serverLevel.setBlock(blockPos, Blocks.AIR.defaultBlockState(), 3); - block.wasExploded(serverLevel, blockPos, explosion); + level.setBlock(pos, Blocks.AIR.defaultBlockState(), 3); + block.wasExploded(level, pos, explosion); } } @@ -222,7 +220,7 @@ public abstract class BlockBehaviour implements FeatureElement { } protected InteractionResult useItemOn( - ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult + ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { return InteractionResult.TRY_WITH_EMPTY_HAND; } @@ -313,8 +311,8 @@ public abstract class BlockBehaviour implements FeatureElement { return Mth.getSeed(pos); } - protected VoxelShape getOcclusionShape(BlockState blockState) { - return blockState.getShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO); + protected VoxelShape getOcclusionShape(BlockState state) { + return state.getShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO); } protected VoxelShape getBlockSupportShape(BlockState state, BlockGetter level, BlockPos pos) { @@ -325,11 +323,11 @@ public abstract class BlockBehaviour implements FeatureElement { return Shapes.empty(); } - protected int getLightBlock(BlockState blockState) { - if (blockState.isSolidRender()) { + protected int getLightBlock(BlockState state) { + if (state.isSolidRender()) { return 15; } else { - return blockState.propagatesSkylightDown() ? 0 : 1; + return state.propagatesSkylightDown() ? 0 : 1; } } @@ -414,7 +412,7 @@ public abstract class BlockBehaviour implements FeatureElement { protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity) { } - protected VoxelShape getEntityInsideCollisionShape(BlockState blockState, Level level, BlockPos blockPos) { + protected VoxelShape getEntityInsideCollisionShape(BlockState state, Level level, BlockPos pos) { return Shapes.block(); } @@ -440,8 +438,8 @@ public abstract class BlockBehaviour implements FeatureElement { protected void onProjectileHit(Level level, BlockState state, BlockHitResult hit, Projectile projectile) { } - protected boolean propagatesSkylightDown(BlockState blockState) { - return !Block.isShapeFullBlock(blockState.getShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO)) && blockState.getFluidState().isEmpty(); + protected boolean propagatesSkylightDown(BlockState state) { + return !Block.isShapeFullBlock(state.getShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO)) && state.getFluidState().isEmpty(); } protected boolean isRandomlyTicking(BlockState state) { @@ -604,8 +602,8 @@ public abstract class BlockBehaviour implements FeatureElement { return this.lightBlock; } - public VoxelShape getFaceOcclusionShape(Direction direction) { - return this.occlusionShapesByFace[direction.ordinal()]; + public VoxelShape getFaceOcclusionShape(Direction face) { + return this.occlusionShapesByFace[face.ordinal()]; } public VoxelShape getOcclusionShape() { @@ -754,9 +752,9 @@ public abstract class BlockBehaviour implements FeatureElement { return Block.isFaceFull(this.getCollisionShape(level, pos, CollisionContext.of(entity)), face); } - public Vec3 getOffset(BlockPos blockPos) { + public Vec3 getOffset(BlockPos pos) { BlockBehaviour.OffsetFunction offsetFunction = this.offsetFunction; - return offsetFunction != null ? offsetFunction.evaluate(this.asState(), blockPos) : Vec3.ZERO; + return offsetFunction != null ? offsetFunction.evaluate(this.asState(), pos) : Vec3.ZERO; } public boolean hasOffsetFunction() { @@ -767,9 +765,9 @@ public abstract class BlockBehaviour implements FeatureElement { return this.getBlock().triggerEvent(this.asState(), level, pos, id, param); } - public void handleNeighborChanged(Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - DebugPackets.sendNeighborsUpdatePacket(level, blockPos); - this.getBlock().neighborChanged(this.asState(), level, blockPos, block, orientation, bl); + public void handleNeighborChanged(Level level, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + DebugPackets.sendNeighborsUpdatePacket(level, pos); + this.getBlock().neighborChanged(this.asState(), level, pos, neighborBlock, orientation, movedByPiston); } public final void updateNeighbourShapes(LevelAccessor level, BlockPos pos, int flags) { @@ -801,8 +799,8 @@ public abstract class BlockBehaviour implements FeatureElement { this.getBlock().onRemove(this.asState(), level, pos, newState, movedByPiston); } - public void onExplosionHit(ServerLevel serverLevel, BlockPos blockPos, Explosion explosion, BiConsumer biConsumer) { - this.getBlock().onExplosionHit(this.asState(), serverLevel, blockPos, explosion, biConsumer); + public void onExplosionHit(ServerLevel level, BlockPos pos, Explosion explosion, BiConsumer dropConsumer) { + this.getBlock().onExplosionHit(this.asState(), level, pos, explosion, dropConsumer); } public void tick(ServerLevel level, BlockPos pos, RandomSource random) { @@ -817,8 +815,8 @@ public abstract class BlockBehaviour implements FeatureElement { this.getBlock().entityInside(this.asState(), level, pos, entity); } - public VoxelShape getEntityInsideCollisionShape(Level level, BlockPos blockPos) { - return this.getBlock().getEntityInsideCollisionShape(this.asState(), level, blockPos); + public VoxelShape getEntityInsideCollisionShape(Level level, BlockPos pos) { + return this.getBlock().getEntityInsideCollisionShape(this.asState(), level, pos); } public void spawnAfterBreak(ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) { @@ -829,8 +827,8 @@ public abstract class BlockBehaviour implements FeatureElement { return this.getBlock().getDrops(this.asState(), lootParams); } - public InteractionResult useItemOn(ItemStack itemStack, Level level, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) { - return this.getBlock().useItemOn(itemStack, this.asState(), level, blockHitResult.getBlockPos(), player, interactionHand, blockHitResult); + public InteractionResult useItemOn(ItemStack stack, Level level, Player player, InteractionHand hand, BlockHitResult hitResult) { + return this.getBlock().useItemOn(stack, this.asState(), level, hitResult.getBlockPos(), player, hand, hitResult); } public InteractionResult useWithoutItem(Level level, Player player, BlockHitResult hitResult) { @@ -850,19 +848,19 @@ public abstract class BlockBehaviour implements FeatureElement { } public BlockState updateShape( - LevelReader levelReader, + LevelReader level, ScheduledTickAccess scheduledTickAccess, - BlockPos blockPos, + BlockPos pos, Direction direction, - BlockPos blockPos2, - BlockState blockState, - RandomSource randomSource + BlockPos neighborPos, + BlockState neighborState, + RandomSource random ) { - return this.getBlock().updateShape(this.asState(), levelReader, scheduledTickAccess, blockPos, direction, blockPos2, blockState, randomSource); + return this.getBlock().updateShape(this.asState(), level, scheduledTickAccess, pos, direction, neighborPos, neighborState, random); } - public boolean isPathfindable(PathComputationType pathComputationType) { - return this.getBlock().isPathfindable(this.asState(), pathComputationType); + public boolean isPathfindable(PathComputationType type) { + return this.getBlock().isPathfindable(this.asState(), type); } public boolean canBeReplaced(BlockPlaceContext useContext) { @@ -1000,6 +998,9 @@ public abstract class BlockBehaviour implements FeatureElement { float jumpFactor = 1.0F; @Nullable private ResourceKey id; + /** + * Sets loot table information + */ private DependantName>> drops = resourceKey -> Optional.of( ResourceKey.create(Registries.LOOT_TABLE, resourceKey.location().withPrefix("blocks/")) ); @@ -1165,8 +1166,8 @@ public abstract class BlockBehaviour implements FeatureElement { return this; } - public BlockBehaviour.Properties overrideLootTable(Optional> optional) { - this.drops = DependantName.fixed(optional); + public BlockBehaviour.Properties overrideLootTable(Optional> lootTable) { + this.drops = DependantName.fixed(lootTable); return this; } @@ -1297,13 +1298,13 @@ public abstract class BlockBehaviour implements FeatureElement { return this; } - public BlockBehaviour.Properties setId(ResourceKey resourceKey) { - this.id = resourceKey; + public BlockBehaviour.Properties setId(ResourceKey id) { + this.id = id; return this; } - public BlockBehaviour.Properties overrideDescription(String string) { - this.descriptionId = DependantName.fixed(string); + public BlockBehaviour.Properties overrideDescription(String description) { + this.descriptionId = DependantName.fixed(description); return this; } diff --git a/net/minecraft/world/level/block/state/StateHolder.java b/net/minecraft/world/level/block/state/StateHolder.java index 8168d474..f47830e0 100644 --- a/net/minecraft/world/level/block/state/StateHolder.java +++ b/net/minecraft/world/level/block/state/StateHolder.java @@ -47,9 +47,9 @@ public abstract class StateHolder { return this.setValue(property, findNextInCollection(property.getPossibleValues(), this.getValue(property))); } - protected static T findNextInCollection(List list, T object) { - int i = list.indexOf(object) + 1; - return (T)(i == list.size() ? list.getFirst() : list.get(i)); + protected static T findNextInCollection(List possibleValues, T currentValue) { + int i = possibleValues.indexOf(currentValue) + 1; + return (T)(i == possibleValues.size() ? possibleValues.getFirst() : possibleValues.get(i)); } public String toString() { @@ -91,8 +91,8 @@ public abstract class StateHolder { return Optional.ofNullable(this.getNullableValue(property)); } - public > T getValueOrElse(Property property, T comparable) { - return (T)Objects.requireNonNullElse(this.getNullableValue(property), comparable); + public > T getValueOrElse(Property property, T defaultValue) { + return (T)Objects.requireNonNullElse(this.getNullableValue(property), defaultValue); } @Nullable @@ -115,13 +115,13 @@ public abstract class StateHolder { return (S)(comparable == null ? this : this.setValueInternal(property, value, comparable)); } - private , V extends T> S setValueInternal(Property property, V comparable, Comparable comparable2) { - if (comparable2.equals(comparable)) { + private , V extends T> S setValueInternal(Property property, V value, Comparable comparable) { + if (comparable.equals(value)) { return (S)this; } else { - int i = property.getInternalIndex((T)comparable); + int i = property.getInternalIndex((T)value); if (i < 0) { - throw new IllegalArgumentException("Cannot set property " + property + " to " + comparable + " on " + this.owner + ", it is not an allowed value"); + throw new IllegalArgumentException("Cannot set property " + property + " to " + value + " on " + this.owner + ", it is not an allowed value"); } else { return (S)this.neighbours.get(property)[i]; } diff --git a/net/minecraft/world/level/block/state/properties/BooleanProperty.java b/net/minecraft/world/level/block/state/properties/BooleanProperty.java index ec9e94d5..e4d4b48b 100644 --- a/net/minecraft/world/level/block/state/properties/BooleanProperty.java +++ b/net/minecraft/world/level/block/state/properties/BooleanProperty.java @@ -37,7 +37,7 @@ public final class BooleanProperty extends Property { return value.toString(); } - public int getInternalIndex(Boolean boolean_) { - return boolean_ ? 0 : 1; + public int getInternalIndex(Boolean value) { + return value ? 0 : 1; } } diff --git a/net/minecraft/world/level/block/state/properties/EnumProperty.java b/net/minecraft/world/level/block/state/properties/EnumProperty.java index eecadbd7..e11c3ef4 100644 --- a/net/minecraft/world/level/block/state/properties/EnumProperty.java +++ b/net/minecraft/world/level/block/state/properties/EnumProperty.java @@ -18,24 +18,24 @@ public final class EnumProperty & StringRepresentable> extends private final Map names; private final int[] ordinalToIndex; - private EnumProperty(String string, Class class_, List list) { - super(string, class_); - if (list.isEmpty()) { - throw new IllegalArgumentException("Trying to make empty EnumProperty '" + string + "'"); + private EnumProperty(String name, Class clazz, List values) { + super(name, clazz); + if (values.isEmpty()) { + throw new IllegalArgumentException("Trying to make empty EnumProperty '" + name + "'"); } else { - this.values = List.copyOf(list); - T[] enums = (T[])class_.getEnumConstants(); + this.values = List.copyOf(values); + T[] enums = (T[])clazz.getEnumConstants(); this.ordinalToIndex = new int[enums.length]; for (T enum_ : enums) { - this.ordinalToIndex[enum_.ordinal()] = list.indexOf(enum_); + this.ordinalToIndex[enum_.ordinal()] = values.indexOf(enum_); } Builder builder = ImmutableMap.builder(); - for (T enum2 : list) { - String string2 = enum2.getSerializedName(); - builder.put(string2, enum2); + for (T enum2 : values) { + String string = enum2.getSerializedName(); + builder.put(string, enum2); } this.names = builder.buildOrThrow(); @@ -59,8 +59,8 @@ public final class EnumProperty & StringRepresentable> extends return value.getSerializedName(); } - public int getInternalIndex(T enum_) { - return this.ordinalToIndex[enum_.ordinal()]; + public int getInternalIndex(T value) { + return this.ordinalToIndex[value.ordinal()]; } @Override @@ -100,7 +100,7 @@ public final class EnumProperty & StringRepresentable> extends return create(name, clazz, List.of(values)); } - public static & StringRepresentable> EnumProperty create(String string, Class class_, List list) { - return new EnumProperty<>(string, class_, list); + public static & StringRepresentable> EnumProperty create(String name, Class clazz, List values) { + return new EnumProperty<>(name, clazz, values); } } diff --git a/net/minecraft/world/level/block/state/properties/IntegerProperty.java b/net/minecraft/world/level/block/state/properties/IntegerProperty.java index a5825a96..c51898ea 100644 --- a/net/minecraft/world/level/block/state/properties/IntegerProperty.java +++ b/net/minecraft/world/level/block/state/properties/IntegerProperty.java @@ -63,7 +63,7 @@ public final class IntegerProperty extends Property { return value.toString(); } - public int getInternalIndex(Integer integer) { - return integer <= this.max ? integer - this.min : -1; + public int getInternalIndex(Integer value) { + return value <= this.max ? value - this.min : -1; } } diff --git a/net/minecraft/world/level/block/state/properties/Property.java b/net/minecraft/world/level/block/state/properties/Property.java index d903b2ce..6e6d2c1c 100644 --- a/net/minecraft/world/level/block/state/properties/Property.java +++ b/net/minecraft/world/level/block/state/properties/Property.java @@ -69,7 +69,7 @@ public abstract class Property> { public abstract Optional getValue(String value); - public abstract int getInternalIndex(T comparable); + public abstract int getInternalIndex(T value); public String toString() { return MoreObjects.toStringHelper(this).add("name", this.name).add("clazz", this.clazz).add("values", this.getPossibleValues()).toString(); diff --git a/net/minecraft/world/level/border/WorldBorder.java b/net/minecraft/world/level/border/WorldBorder.java index ea9cf75c..d162ba33 100644 --- a/net/minecraft/world/level/border/WorldBorder.java +++ b/net/minecraft/world/level/border/WorldBorder.java @@ -73,8 +73,8 @@ public class WorldBorder { return this.clampVec3ToBound(vec3.x, vec3.y, vec3.z); } - public Vec3 clampVec3ToBound(double d, double e, double f) { - return new Vec3(Mth.clamp(d, this.getMinX(), this.getMaxX() - 1.0E-5F), e, Mth.clamp(f, this.getMinZ(), this.getMaxZ() - 1.0E-5F)); + public Vec3 clampVec3ToBound(double x, double y, double z) { + return new Vec3(Mth.clamp(x, this.getMinX(), this.getMaxX() - 1.0E-5F), y, Mth.clamp(z, this.getMinZ(), this.getMaxZ() - 1.0E-5F)); } public double getDistanceToBorder(Entity entity) { diff --git a/net/minecraft/world/level/chunk/ChunkAccess.java b/net/minecraft/world/level/chunk/ChunkAccess.java index 302f98b6..65f00138 100644 --- a/net/minecraft/world/level/chunk/ChunkAccess.java +++ b/net/minecraft/world/level/chunk/ChunkAccess.java @@ -38,8 +38,8 @@ import net.minecraft.world.level.LevelHeightAccessor; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.BiomeGenerationSettings; import net.minecraft.world.level.biome.BiomeResolver; -import net.minecraft.world.level.biome.Climate; import net.minecraft.world.level.biome.BiomeManager.NoiseBiomeSource; +import net.minecraft.world.level.biome.Climate.Sampler; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; @@ -307,8 +307,8 @@ public abstract class ChunkAccess implements NoiseBiomeSource, LightChunk, Struc return this.postProcessing; } - public void addPackedPostProcess(ShortList shortList, int i) { - getOrCreateOffsetList(this.getPostProcessing(), i).addAll(shortList); + public void addPackedPostProcess(ShortList offsets, int index) { + getOrCreateOffsetList(this.getPostProcessing(), index).addAll(offsets); } public void setBlockEntityNbt(CompoundTag tag) { @@ -358,7 +358,7 @@ public abstract class ChunkAccess implements NoiseBiomeSource, LightChunk, Struc return true; } - public abstract ChunkAccess.PackedTicks getTicksForSerialization(long l); + public abstract ChunkAccess.PackedTicks getTicksForSerialization(long gametime); public UpgradeData getUpgradeData() { return this.upgradeData; @@ -445,7 +445,7 @@ public abstract class ChunkAccess implements NoiseBiomeSource, LightChunk, Struc } } - public void fillBiomesFromNoise(BiomeResolver resolver, Climate.Sampler sampler) { + public void fillBiomesFromNoise(BiomeResolver resolver, Sampler sampler) { ChunkPos chunkPos = this.getPos(); int i = QuartPos.fromBlock(chunkPos.getMinBlockX()); int j = QuartPos.fromBlock(chunkPos.getMinBlockZ()); diff --git a/net/minecraft/world/level/chunk/ChunkGenerator.java b/net/minecraft/world/level/chunk/ChunkGenerator.java index b80697bc..ec081e90 100644 --- a/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/net/minecraft/world/level/chunk/ChunkGenerator.java @@ -122,7 +122,7 @@ public abstract class ChunkGenerator { } public abstract void applyCarvers( - WorldGenRegion worldGenRegion, long l, RandomState randomState, BiomeManager biomeManager, StructureManager structureManager, ChunkAccess chunkAccess + WorldGenRegion level, long seed, RandomState random, BiomeManager biomeManager, StructureManager structureManager, ChunkAccess chunk ); @Nullable diff --git a/net/minecraft/world/level/chunk/ChunkSource.java b/net/minecraft/world/level/chunk/ChunkSource.java index 35d0cea2..4552981f 100644 --- a/net/minecraft/world/level/chunk/ChunkSource.java +++ b/net/minecraft/world/level/chunk/ChunkSource.java @@ -36,7 +36,7 @@ public abstract class ChunkSource implements LightChunkGetter, AutoCloseable { public abstract void tick(BooleanSupplier hasTimeLeft, boolean tickChunks); - public void onSectionEmptinessChanged(int i, int j, int k, boolean bl) { + public void onSectionEmptinessChanged(int x, int y, int z, boolean isEmpty) { } /** @@ -51,7 +51,7 @@ public abstract class ChunkSource implements LightChunkGetter, AutoCloseable { public abstract LevelLightEngine getLightEngine(); - public void setSpawnSettings(boolean bl) { + public void setSpawnSettings(boolean spawnSettings) { } public void updateChunkForced(ChunkPos pos, boolean add) { diff --git a/net/minecraft/world/level/chunk/GlobalPalette.java b/net/minecraft/world/level/chunk/GlobalPalette.java index 74a6a1f8..9ad4bd77 100644 --- a/net/minecraft/world/level/chunk/GlobalPalette.java +++ b/net/minecraft/world/level/chunk/GlobalPalette.java @@ -56,7 +56,7 @@ public class GlobalPalette implements Palette { } @Override - public Palette copy(PaletteResize paletteResize) { + public Palette copy(PaletteResize resizeHandler) { return this; } } diff --git a/net/minecraft/world/level/chunk/HashMapPalette.java b/net/minecraft/world/level/chunk/HashMapPalette.java index 5d2173c8..0cf914d4 100644 --- a/net/minecraft/world/level/chunk/HashMapPalette.java +++ b/net/minecraft/world/level/chunk/HashMapPalette.java @@ -111,7 +111,7 @@ public class HashMapPalette implements Palette { } @Override - public Palette copy(PaletteResize paletteResize) { - return new HashMapPalette<>(this.registry, this.bits, paletteResize, this.values.copy()); + public Palette copy(PaletteResize resizeHandler) { + return new HashMapPalette<>(this.registry, this.bits, resizeHandler, this.values.copy()); } } diff --git a/net/minecraft/world/level/chunk/ImposterProtoChunk.java b/net/minecraft/world/level/chunk/ImposterProtoChunk.java index 003015ff..a964619b 100644 --- a/net/minecraft/world/level/chunk/ImposterProtoChunk.java +++ b/net/minecraft/world/level/chunk/ImposterProtoChunk.java @@ -14,7 +14,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.BiomeResolver; -import net.minecraft.world.level.biome.Climate; +import net.minecraft.world.level.biome.Climate.Sampler; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; @@ -236,8 +236,8 @@ public class ImposterProtoChunk extends ProtoChunk { } @Override - public ChunkAccess.PackedTicks getTicksForSerialization(long l) { - return this.wrapped.getTicksForSerialization(l); + public ChunkAccess.PackedTicks getTicksForSerialization(long gametime) { + return this.wrapped.getTicksForSerialization(gametime); } @Nullable @@ -279,7 +279,7 @@ public class ImposterProtoChunk extends ProtoChunk { } @Override - public void fillBiomesFromNoise(BiomeResolver resolver, Climate.Sampler sampler) { + public void fillBiomesFromNoise(BiomeResolver resolver, Sampler sampler) { if (this.allowWrites) { this.wrapped.fillBiomesFromNoise(resolver, sampler); } diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java index 643937bd..cbbc3d69 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java @@ -181,8 +181,8 @@ public class LevelChunk extends ChunkAccess { } @Override - public ChunkAccess.PackedTicks getTicksForSerialization(long l) { - return new ChunkAccess.PackedTicks(this.blockTicks.pack(l), this.fluidTicks.pack(l)); + public ChunkAccess.PackedTicks getTicksForSerialization(long gametime) { + return new ChunkAccess.PackedTicks(this.blockTicks.pack(gametime), this.fluidTicks.pack(gametime)); } @Override @@ -545,7 +545,7 @@ public class LevelChunk extends ChunkAccess { return this.blockEntities; } - public void postProcessGeneration(ServerLevel serverLevel) { + public void postProcessGeneration(ServerLevel level) { ChunkPos chunkPos = this.getPos(); for (int i = 0; i < this.postProcessing.length; i++) { @@ -555,13 +555,13 @@ public class LevelChunk extends ChunkAccess { BlockState blockState = this.getBlockState(blockPos); FluidState fluidState = blockState.getFluidState(); if (!fluidState.isEmpty()) { - fluidState.tick(serverLevel, blockPos, blockState); + fluidState.tick(level, blockPos, blockState); } if (!(blockState.getBlock() instanceof LiquidBlock)) { - BlockState blockState2 = Block.updateFromNeighbourShapes(blockState, serverLevel, blockPos); + BlockState blockState2 = Block.updateFromNeighbourShapes(blockState, level, blockPos); if (blockState2 != blockState) { - serverLevel.setBlock(blockPos, blockState2, 20); + level.setBlock(blockPos, blockState2, 20); } } } diff --git a/net/minecraft/world/level/chunk/LevelChunkSection.java b/net/minecraft/world/level/chunk/LevelChunkSection.java index 67463630..35568cc2 100644 --- a/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/net/minecraft/world/level/chunk/LevelChunkSection.java @@ -7,7 +7,7 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.BiomeResolver; import net.minecraft.world.level.biome.Biomes; -import net.minecraft.world.level.biome.Climate; +import net.minecraft.world.level.biome.Climate.Sampler; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; @@ -24,12 +24,12 @@ public class LevelChunkSection { private final PalettedContainer states; private PalettedContainerRO> biomes; - private LevelChunkSection(LevelChunkSection levelChunkSection) { - this.nonEmptyBlockCount = levelChunkSection.nonEmptyBlockCount; - this.tickingBlockCount = levelChunkSection.tickingBlockCount; - this.tickingFluidCount = levelChunkSection.tickingFluidCount; - this.states = levelChunkSection.states.copy(); - this.biomes = levelChunkSection.biomes.copy(); + private LevelChunkSection(LevelChunkSection section) { + this.nonEmptyBlockCount = section.nonEmptyBlockCount; + this.tickingBlockCount = section.tickingBlockCount; + this.tickingFluidCount = section.tickingFluidCount; + this.states = section.states.copy(); + this.biomes = section.biomes.copy(); } public LevelChunkSection(PalettedContainer states, PalettedContainerRO> biomes) { @@ -197,7 +197,7 @@ public class LevelChunkSection { return this.biomes.get(x, y, z); } - public void fillBiomesFromNoise(BiomeResolver biomeResolver, Climate.Sampler climateSampler, int x, int y, int z) { + public void fillBiomesFromNoise(BiomeResolver biomeResolver, Sampler climateSampler, int x, int y, int z) { PalettedContainer> palettedContainer = this.biomes.recreate(); int i = 4; diff --git a/net/minecraft/world/level/chunk/LinearPalette.java b/net/minecraft/world/level/chunk/LinearPalette.java index eed86b9e..ba1919a7 100644 --- a/net/minecraft/world/level/chunk/LinearPalette.java +++ b/net/minecraft/world/level/chunk/LinearPalette.java @@ -113,7 +113,7 @@ public class LinearPalette implements Palette { } @Override - public Palette copy(PaletteResize paletteResize) { - return new LinearPalette<>(this.registry, (T[])((Object[])this.values.clone()), paletteResize, this.bits, this.size); + public Palette copy(PaletteResize resizeHandler) { + return new LinearPalette<>(this.registry, (T[])((Object[])this.values.clone()), resizeHandler, this.bits, this.size); } } diff --git a/net/minecraft/world/level/chunk/Palette.java b/net/minecraft/world/level/chunk/Palette.java index b33ba747..c2e4ac29 100644 --- a/net/minecraft/world/level/chunk/Palette.java +++ b/net/minecraft/world/level/chunk/Palette.java @@ -20,7 +20,7 @@ public interface Palette { int getSize(); - Palette copy(PaletteResize paletteResize); + Palette copy(PaletteResize resizeHandler); public interface Factory { Palette create(int i, IdMap idMap, PaletteResize paletteResize, List list); diff --git a/net/minecraft/world/level/chunk/PalettedContainer.java b/net/minecraft/world/level/chunk/PalettedContainer.java index 2fc97bc4..5f86f8ff 100644 --- a/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/net/minecraft/world/level/chunk/PalettedContainer.java @@ -25,6 +25,8 @@ import net.minecraft.util.ZeroBitStorage; import net.minecraft.util.SimpleBitStorage.InitializationException; import net.minecraft.world.level.chunk.PalettedContainer.Strategy.1; import net.minecraft.world.level.chunk.PalettedContainer.Strategy.2; +import net.minecraft.world.level.chunk.PalettedContainerRO.PackedData; +import net.minecraft.world.level.chunk.PalettedContainerRO.Unpacker; import org.jetbrains.annotations.Nullable; public class PalettedContainer implements PaletteResize, PalettedContainerRO { @@ -44,25 +46,25 @@ public class PalettedContainer implements PaletteResize, PalettedContainer } public static Codec> codecRW(IdMap registry, Codec codec, PalettedContainer.Strategy strategy, T value) { - PalettedContainerRO.Unpacker> unpacker = PalettedContainer::unpack; + Unpacker> unpacker = PalettedContainer::unpack; return codec(registry, codec, strategy, value, unpacker); } public static Codec> codecRO(IdMap registry, Codec codec, PalettedContainer.Strategy strategy, T value) { - PalettedContainerRO.Unpacker> unpacker = (idMap, strategyx, packedData) -> unpack(idMap, strategyx, packedData) + Unpacker> unpacker = (idMap, strategyx, packedData) -> unpack(idMap, strategyx, packedData) .map(palettedContainer -> palettedContainer); return codec(registry, codec, strategy, value, unpacker); } private static > Codec codec( - IdMap registry, Codec codec, PalettedContainer.Strategy strategy, T value, PalettedContainerRO.Unpacker unpacker + IdMap registry, Codec codec, PalettedContainer.Strategy strategy, T value, Unpacker unpacker ) { return RecordCodecBuilder.create( instance -> instance.group( - codec.mapResult(ExtraCodecs.orElsePartial(value)).listOf().fieldOf("palette").forGetter(PalettedContainerRO.PackedData::paletteEntries), - Codec.LONG_STREAM.lenientOptionalFieldOf("data").forGetter(PalettedContainerRO.PackedData::storage) + codec.mapResult(ExtraCodecs.orElsePartial(value)).listOf().fieldOf("palette").forGetter(PackedData::paletteEntries), + Codec.LONG_STREAM.lenientOptionalFieldOf("data").forGetter(PackedData::storage) ) - .apply(instance, PalettedContainerRO.PackedData::new) + .apply(instance, PackedData::new) ) .comapFlatMap(packedData -> unpacker.read(registry, strategy, packedData), palettedContainerRO -> palettedContainerRO.pack(registry, strategy)); } @@ -81,10 +83,10 @@ public class PalettedContainer implements PaletteResize, PalettedContainer this.data = data; } - private PalettedContainer(PalettedContainer palettedContainer) { - this.registry = palettedContainer.registry; - this.strategy = palettedContainer.strategy; - this.data = palettedContainer.data.copy(this); + private PalettedContainer(PalettedContainer other) { + this.registry = other.registry; + this.strategy = other.strategy; + this.data = other.data.copy(this); } public PalettedContainer(IdMap registry, T palette, PalettedContainer.Strategy strategy) { @@ -189,9 +191,7 @@ public class PalettedContainer implements PaletteResize, PalettedContainer } } - private static DataResult> unpack( - IdMap registry, PalettedContainer.Strategy strategy, PalettedContainerRO.PackedData packedData - ) { + private static DataResult> unpack(IdMap registry, PalettedContainer.Strategy strategy, PackedData packedData) { List list = packedData.paletteEntries(); int i = strategy.size(); int j = strategy.calculateBitsForSerialization(registry, list.size()); @@ -227,10 +227,10 @@ public class PalettedContainer implements PaletteResize, PalettedContainer } @Override - public PalettedContainerRO.PackedData pack(IdMap registry, PalettedContainer.Strategy strategy) { + public PackedData pack(IdMap registry, PalettedContainer.Strategy strategy) { this.acquire(); - PalettedContainerRO.PackedData var12; + PackedData var12; try { HashMapPalette hashMapPalette = new HashMapPalette<>(registry, this.data.storage.getBits(), this.dummyPaletteResize); int i = strategy.size(); @@ -246,7 +246,7 @@ public class PalettedContainer implements PaletteResize, PalettedContainer optional = Optional.empty(); } - var12 = new PalettedContainerRO.PackedData(hashMapPalette.getEntries(), optional); + var12 = new PackedData(hashMapPalette.getEntries(), optional); } finally { this.release(); } @@ -332,8 +332,8 @@ public class PalettedContainer implements PaletteResize, PalettedContainer buffer.writeLongArray(this.storage.getRaw()); } - public PalettedContainer.Data copy(PaletteResize paletteResize) { - return new PalettedContainer.Data<>(this.configuration, this.storage.copy(), this.palette.copy(paletteResize)); + public PalettedContainer.Data copy(PaletteResize resizeHandler) { + return new PalettedContainer.Data<>(this.configuration, this.storage.copy(), this.palette.copy(resizeHandler)); } } diff --git a/net/minecraft/world/level/chunk/ProtoChunk.java b/net/minecraft/world/level/chunk/ProtoChunk.java index 97eb8395..8bcea51d 100644 --- a/net/minecraft/world/level/chunk/ProtoChunk.java +++ b/net/minecraft/world/level/chunk/ProtoChunk.java @@ -81,8 +81,8 @@ public class ProtoChunk extends ChunkAccess { } @Override - public ChunkAccess.PackedTicks getTicksForSerialization(long l) { - return new ChunkAccess.PackedTicks(this.blockTicks.pack(l), this.fluidTicks.pack(l)); + public ChunkAccess.PackedTicks getTicksForSerialization(long gametime) { + return new ChunkAccess.PackedTicks(this.blockTicks.pack(gametime), this.fluidTicks.pack(gametime)); } @Override @@ -259,8 +259,8 @@ public class ProtoChunk extends ChunkAccess { } @Override - public void addPackedPostProcess(ShortList shortList, int i) { - ChunkAccess.getOrCreateOffsetList(this.postProcessing, i).addAll(shortList); + public void addPackedPostProcess(ShortList offsets, int index) { + ChunkAccess.getOrCreateOffsetList(this.postProcessing, index).addAll(offsets); } public Map getBlockEntityNbts() { diff --git a/net/minecraft/world/level/chunk/SingleValuePalette.java b/net/minecraft/world/level/chunk/SingleValuePalette.java index 31dcb570..3836cf58 100644 --- a/net/minecraft/world/level/chunk/SingleValuePalette.java +++ b/net/minecraft/world/level/chunk/SingleValuePalette.java @@ -84,7 +84,7 @@ public class SingleValuePalette implements Palette { } @Override - public Palette copy(PaletteResize paletteResize) { + public Palette copy(PaletteResize resizeHandler) { if (this.value == null) { throw new IllegalStateException("Use of an uninitialized palette"); } else { diff --git a/net/minecraft/world/level/chunk/UpgradeData.java b/net/minecraft/world/level/chunk/UpgradeData.java index 53831465..141450d8 100644 --- a/net/minecraft/world/level/chunk/UpgradeData.java +++ b/net/minecraft/world/level/chunk/UpgradeData.java @@ -84,14 +84,14 @@ public class UpgradeData { ); } - private UpgradeData(UpgradeData upgradeData) { - this.sides.addAll(upgradeData.sides); - this.neighborBlockTicks.addAll(upgradeData.neighborBlockTicks); - this.neighborFluidTicks.addAll(upgradeData.neighborFluidTicks); - this.index = new int[upgradeData.index.length][]; + private UpgradeData(UpgradeData other) { + this.sides.addAll(other.sides); + this.neighborBlockTicks.addAll(other.neighborBlockTicks); + this.neighborFluidTicks.addAll(other.neighborFluidTicks); + this.index = new int[other.index.length][]; - for (int i = 0; i < upgradeData.index.length; i++) { - int[] is = upgradeData.index[i]; + for (int i = 0; i < other.index.length; i++) { + int[] is = other.index[i]; this.index[i] = is != null ? IntArrays.copy(is) : null; } } diff --git a/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/net/minecraft/world/level/chunk/storage/ChunkStorage.java index c1118263..101aff66 100644 --- a/net/minecraft/world/level/chunk/storage/ChunkStorage.java +++ b/net/minecraft/world/level/chunk/storage/ChunkStorage.java @@ -106,9 +106,9 @@ public class ChunkStorage implements AutoCloseable { return this.worker.loadAsync(chunkPos); } - public CompletableFuture write(ChunkPos chunkPos, Supplier supplier) { - this.handleLegacyStructureIndex(chunkPos); - return this.worker.store(chunkPos, supplier); + public CompletableFuture write(ChunkPos pos, Supplier tagSupplier) { + this.handleLegacyStructureIndex(pos); + return this.worker.store(pos, tagSupplier); } protected void handleLegacyStructureIndex(ChunkPos chunkPos) { diff --git a/net/minecraft/world/level/chunk/storage/IOWorker.java b/net/minecraft/world/level/chunk/storage/IOWorker.java index 89d60803..3ccb7c21 100644 --- a/net/minecraft/world/level/chunk/storage/IOWorker.java +++ b/net/minecraft/world/level/chunk/storage/IOWorker.java @@ -117,10 +117,10 @@ public class IOWorker implements ChunkScanAccess, AutoCloseable { return this.store(chunkPos, () -> chunkData); } - public CompletableFuture store(ChunkPos chunkPos, Supplier supplier) { + public CompletableFuture store(ChunkPos chunkPos, Supplier dataSupplier) { return this.submitTask( () -> { - CompoundTag compoundTag = (CompoundTag)supplier.get(); + CompoundTag compoundTag = (CompoundTag)dataSupplier.get(); IOWorker.PendingStore pendingStore = (IOWorker.PendingStore)this.pendingWrites .computeIfAbsent(chunkPos, chunkPosxx -> new IOWorker.PendingStore(compoundTag)); pendingStore.data = compoundTag; @@ -186,11 +186,11 @@ public class IOWorker implements ChunkScanAccess, AutoCloseable { }); } - private CompletableFuture submitThrowingTask(IOWorker.ThrowingSupplier throwingSupplier) { + private CompletableFuture submitThrowingTask(IOWorker.ThrowingSupplier task) { return this.consecutiveExecutor.scheduleWithResult(IOWorker.Priority.FOREGROUND.ordinal(), completableFuture -> { if (!this.shutdownRequested.get()) { try { - completableFuture.complete(throwingSupplier.get()); + completableFuture.complete(task.get()); } catch (Exception var4) { completableFuture.completeExceptionally(var4); } diff --git a/net/minecraft/world/level/chunk/storage/RecreatingChunkStorage.java b/net/minecraft/world/level/chunk/storage/RecreatingChunkStorage.java index 15afa3ae..e50616c3 100644 --- a/net/minecraft/world/level/chunk/storage/RecreatingChunkStorage.java +++ b/net/minecraft/world/level/chunk/storage/RecreatingChunkStorage.java @@ -20,9 +20,9 @@ public class RecreatingChunkStorage extends ChunkStorage { } @Override - public CompletableFuture write(ChunkPos chunkPos, Supplier supplier) { - this.handleLegacyStructureIndex(chunkPos); - return this.writeWorker.store(chunkPos, supplier); + public CompletableFuture write(ChunkPos pos, Supplier tagSupplier) { + this.handleLegacyStructureIndex(pos); + return this.writeWorker.store(pos, tagSupplier); } @Override diff --git a/net/minecraft/world/level/chunk/storage/SectionStorage.java b/net/minecraft/world/level/chunk/storage/SectionStorage.java index 968fdb66..55a5b3bd 100644 --- a/net/minecraft/world/level/chunk/storage/SectionStorage.java +++ b/net/minecraft/world/level/chunk/storage/SectionStorage.java @@ -61,20 +61,20 @@ public class SectionStorage implements AutoCloseable { public SectionStorage( SimpleRegionStorage simpleRegionStorage, Codec

codec, - Function function, - BiFunction biFunction, - Function function2, + Function packer, + BiFunction unpacker, + Function factory, RegistryAccess registryAccess, - ChunkIOErrorReporter chunkIOErrorReporter, + ChunkIOErrorReporter errorReporter, LevelHeightAccessor levelHeightAccessor ) { this.simpleRegionStorage = simpleRegionStorage; this.codec = codec; - this.packer = function; - this.unpacker = biFunction; - this.factory = function2; + this.packer = packer; + this.unpacker = unpacker; + this.factory = factory; this.registryAccess = registryAccess; - this.errorReporter = chunkIOErrorReporter; + this.errorReporter = errorReporter; this.levelHeightAccessor = levelHeightAccessor; } @@ -162,18 +162,18 @@ public class SectionStorage implements AutoCloseable { } } - public CompletableFuture prefetch(ChunkPos chunkPos) { + public CompletableFuture prefetch(ChunkPos pos) { synchronized (this.loadLock) { - long l = chunkPos.toLong(); + long l = pos.toLong(); return this.loadedChunks.contains(l) ? CompletableFuture.completedFuture(null) : this.pendingLoads - .computeIfAbsent(l, (Long2ObjectFunction>>>)(lx -> this.tryRead(chunkPos))); + .computeIfAbsent(l, (Long2ObjectFunction>>>)(lx -> this.tryRead(pos))); } } - private void unpackChunk(ChunkPos chunkPos) { - long l = chunkPos.toLong(); + private void unpackChunk(ChunkPos pos) { + long l = pos.toLong(); CompletableFuture>> completableFuture; synchronized (this.loadLock) { if (!this.loadedChunks.add(l)) { @@ -181,10 +181,10 @@ public class SectionStorage implements AutoCloseable { } completableFuture = this.pendingLoads - .computeIfAbsent(l, (Long2ObjectFunction>>>)(lx -> this.tryRead(chunkPos))); + .computeIfAbsent(l, (Long2ObjectFunction>>>)(lx -> this.tryRead(pos))); } - this.unpackChunk(chunkPos, (SectionStorage.PackedChunk

)((Optional)completableFuture.join()).orElse(null)); + this.unpackChunk(pos, (SectionStorage.PackedChunk

)((Optional)completableFuture.join()).orElse(null)); synchronized (this.loadLock) { this.pendingLoads.remove(l); } @@ -211,16 +211,16 @@ public class SectionStorage implements AutoCloseable { }); } - private void unpackChunk(ChunkPos chunkPos, @Nullable SectionStorage.PackedChunk

packedChunk) { + private void unpackChunk(ChunkPos pos, @Nullable SectionStorage.PackedChunk

packedChunk) { if (packedChunk == null) { for (int i = this.levelHeightAccessor.getMinSectionY(); i <= this.levelHeightAccessor.getMaxSectionY(); i++) { - this.storage.put(getKey(chunkPos, i), Optional.empty()); + this.storage.put(getKey(pos, i), Optional.empty()); } } else { boolean bl = packedChunk.versionChanged(); for (int j = this.levelHeightAccessor.getMinSectionY(); j <= this.levelHeightAccessor.getMaxSectionY(); j++) { - long l = getKey(chunkPos, j); + long l = getKey(pos, j); Optional optional = Optional.ofNullable(packedChunk.sectionsByY.get(j)).map(object -> this.unpacker.apply(object, (Runnable)() -> this.setDirty(l))); this.storage.put(l, optional); optional.ifPresent(object -> { @@ -233,13 +233,13 @@ public class SectionStorage implements AutoCloseable { } } - private void writeChunk(ChunkPos chunkPos) { + private void writeChunk(ChunkPos pos) { RegistryOps registryOps = this.registryAccess.createSerializationContext(NbtOps.INSTANCE); - Dynamic dynamic = this.writeChunk(chunkPos, registryOps); + Dynamic dynamic = this.writeChunk(pos, registryOps); Tag tag = dynamic.getValue(); if (tag instanceof CompoundTag) { - this.simpleRegionStorage.write(chunkPos, (CompoundTag)tag).exceptionally(throwable -> { - this.errorReporter.reportChunkSaveFailure(throwable, this.simpleRegionStorage.storageInfo(), chunkPos); + this.simpleRegionStorage.write(pos, (CompoundTag)tag).exceptionally(throwable -> { + this.errorReporter.reportChunkSaveFailure(throwable, this.simpleRegionStorage.storageInfo(), pos); return null; }); } else { @@ -247,27 +247,27 @@ public class SectionStorage implements AutoCloseable { } } - private Dynamic writeChunk(ChunkPos chunkPos, DynamicOps dynamicOps) { + private Dynamic writeChunk(ChunkPos pos, DynamicOps ops) { Map map = Maps.newHashMap(); for (int i = this.levelHeightAccessor.getMinSectionY(); i <= this.levelHeightAccessor.getMaxSectionY(); i++) { - long l = getKey(chunkPos, i); + long l = getKey(pos, i); Optional optional = this.storage.get(l); if (optional != null && !optional.isEmpty()) { - DataResult dataResult = this.codec.encodeStart(dynamicOps, (P)this.packer.apply(optional.get())); + DataResult dataResult = this.codec.encodeStart(ops, (P)this.packer.apply(optional.get())); String string = Integer.toString(i); - dataResult.resultOrPartial(LOGGER::error).ifPresent(object -> map.put(dynamicOps.createString(string), object)); + dataResult.resultOrPartial(LOGGER::error).ifPresent(object -> map.put(ops.createString(string), object)); } } return new Dynamic<>( - dynamicOps, - dynamicOps.createMap( + ops, + ops.createMap( ImmutableMap.of( - dynamicOps.createString("Sections"), - dynamicOps.createMap(map), - dynamicOps.createString("DataVersion"), - dynamicOps.createInt(SharedConstants.getCurrentVersion().getDataVersion().getVersion()) + ops.createString("Sections"), + ops.createMap(map), + ops.createString("DataVersion"), + ops.createInt(SharedConstants.getCurrentVersion().getDataVersion().getVersion()) ) ) ); @@ -306,9 +306,9 @@ public class SectionStorage implements AutoCloseable { record PackedChunk(Int2ObjectMap sectionsByY, boolean versionChanged) { public static SectionStorage.PackedChunk parse( - Codec codec, DynamicOps dynamicOps, Tag tag, SimpleRegionStorage simpleRegionStorage, LevelHeightAccessor levelHeightAccessor + Codec codec, DynamicOps ops, Tag value, SimpleRegionStorage simpleRegionStorage, LevelHeightAccessor levelHeightAccessor ) { - Dynamic dynamic = new Dynamic<>(dynamicOps, tag); + Dynamic dynamic = new Dynamic<>(ops, value); int i = SectionStorage.getVersion(dynamic); int j = SharedConstants.getCurrentVersion().getDataVersion().getVersion(); boolean bl = i != j; diff --git a/net/minecraft/world/level/chunk/storage/SerializableChunkData.java b/net/minecraft/world/level/chunk/storage/SerializableChunkData.java index aaac50eb..e981bd6d 100644 --- a/net/minecraft/world/level/chunk/storage/SerializableChunkData.java +++ b/net/minecraft/world/level/chunk/storage/SerializableChunkData.java @@ -61,6 +61,7 @@ import net.minecraft.world.level.chunk.status.ChunkType; import net.minecraft.world.level.levelgen.BelowZeroRetrogen; import net.minecraft.world.level.levelgen.Heightmap; import net.minecraft.world.level.levelgen.blending.BlendingData; +import net.minecraft.world.level.levelgen.blending.BlendingData.Packed; import net.minecraft.world.level.levelgen.structure.Structure; import net.minecraft.world.level.levelgen.structure.StructureStart; import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceSerializationContext; @@ -79,7 +80,7 @@ public record SerializableChunkData( long lastUpdateTime, long inhabitedTime, ChunkStatus chunkStatus, - @Nullable BlendingData.Packed blendingData, + @Nullable Packed blendingData, @Nullable BelowZeroRetrogen belowZeroRetrogen, UpgradeData upgradeData, @Nullable long[] carvingMask, @@ -108,32 +109,27 @@ public record SerializableChunkData( public static final String SKY_LIGHT_TAG = "SkyLight"; @Nullable - public static SerializableChunkData parse(LevelHeightAccessor levelHeightAccessor, RegistryAccess registryAccess, CompoundTag compoundTag) { - if (!compoundTag.contains("Status", 8)) { + public static SerializableChunkData parse(LevelHeightAccessor levelHeightAccessor, RegistryAccess registries, CompoundTag tag) { + if (!tag.contains("Status", 8)) { return null; } else { - ChunkPos chunkPos = new ChunkPos(compoundTag.getInt("xPos"), compoundTag.getInt("zPos")); - long l = compoundTag.getLong("LastUpdate"); - long m = compoundTag.getLong("InhabitedTime"); - ChunkStatus chunkStatus = ChunkStatus.byName(compoundTag.getString("Status")); - UpgradeData upgradeData = compoundTag.contains("UpgradeData", 10) - ? new UpgradeData(compoundTag.getCompound("UpgradeData"), levelHeightAccessor) - : UpgradeData.EMPTY; - boolean bl = compoundTag.getBoolean("isLightOn"); - BlendingData.Packed packed; - if (compoundTag.contains("blending_data", 10)) { - packed = (BlendingData.Packed)BlendingData.Packed.CODEC - .parse(NbtOps.INSTANCE, compoundTag.getCompound("blending_data")) - .resultOrPartial(LOGGER::error) - .orElse(null); + ChunkPos chunkPos = new ChunkPos(tag.getInt("xPos"), tag.getInt("zPos")); + long l = tag.getLong("LastUpdate"); + long m = tag.getLong("InhabitedTime"); + ChunkStatus chunkStatus = ChunkStatus.byName(tag.getString("Status")); + UpgradeData upgradeData = tag.contains("UpgradeData", 10) ? new UpgradeData(tag.getCompound("UpgradeData"), levelHeightAccessor) : UpgradeData.EMPTY; + boolean bl = tag.getBoolean("isLightOn"); + Packed packed; + if (tag.contains("blending_data", 10)) { + packed = (Packed)Packed.CODEC.parse(NbtOps.INSTANCE, tag.getCompound("blending_data")).resultOrPartial(LOGGER::error).orElse(null); } else { packed = null; } BelowZeroRetrogen belowZeroRetrogen; - if (compoundTag.contains("below_zero_retrogen", 10)) { + if (tag.contains("below_zero_retrogen", 10)) { belowZeroRetrogen = (BelowZeroRetrogen)BelowZeroRetrogen.CODEC - .parse(NbtOps.INSTANCE, compoundTag.getCompound("below_zero_retrogen")) + .parse(NbtOps.INSTANCE, tag.getCompound("below_zero_retrogen")) .resultOrPartial(LOGGER::error) .orElse(null); } else { @@ -141,30 +137,30 @@ public record SerializableChunkData( } long[] ls; - if (compoundTag.contains("carving_mask", 12)) { - ls = compoundTag.getLongArray("carving_mask"); + if (tag.contains("carving_mask", 12)) { + ls = tag.getLongArray("carving_mask"); } else { ls = null; } - CompoundTag compoundTag2 = compoundTag.getCompound("Heightmaps"); + CompoundTag compoundTag = tag.getCompound("Heightmaps"); Map map = new EnumMap(Heightmap.Types.class); for (Heightmap.Types types : chunkStatus.heightmapsAfter()) { String string = types.getSerializationKey(); - if (compoundTag2.contains(string, 12)) { - map.put(types, compoundTag2.getLongArray(string)); + if (compoundTag.contains(string, 12)) { + map.put(types, compoundTag.getLongArray(string)); } } List> list = SavedTick.loadTickList( - compoundTag.getList("block_ticks", 10), string -> BuiltInRegistries.BLOCK.getOptional(ResourceLocation.tryParse(string)), chunkPos + tag.getList("block_ticks", 10), string -> BuiltInRegistries.BLOCK.getOptional(ResourceLocation.tryParse(string)), chunkPos ); List> list2 = SavedTick.loadTickList( - compoundTag.getList("fluid_ticks", 10), string -> BuiltInRegistries.FLUID.getOptional(ResourceLocation.tryParse(string)), chunkPos + tag.getList("fluid_ticks", 10), string -> BuiltInRegistries.FLUID.getOptional(ResourceLocation.tryParse(string)), chunkPos ); ChunkAccess.PackedTicks packedTicks = new ChunkAccess.PackedTicks(list, list2); - ListTag listTag = compoundTag.getList("PostProcessing", 9); + ListTag listTag = tag.getList("PostProcessing", 9); ShortList[] shortLists = new ShortList[listTag.size()]; for (int i = 0; i < listTag.size(); i++) { @@ -178,22 +174,22 @@ public record SerializableChunkData( shortLists[i] = shortList; } - List list3 = Lists.transform(compoundTag.getList("entities", 10), tag -> (CompoundTag)tag); - List list4 = Lists.transform(compoundTag.getList("block_entities", 10), tag -> (CompoundTag)tag); - CompoundTag compoundTag3 = compoundTag.getCompound("structures"); - ListTag listTag3 = compoundTag.getList("sections", 10); + List list3 = Lists.transform(tag.getList("entities", 10), tagx -> (CompoundTag)tagx); + List list4 = Lists.transform(tag.getList("block_entities", 10), tagx -> (CompoundTag)tagx); + CompoundTag compoundTag2 = tag.getCompound("structures"); + ListTag listTag3 = tag.getList("sections", 10); List list5 = new ArrayList(listTag3.size()); - Registry registry = registryAccess.lookupOrThrow(Registries.BIOME); + Registry registry = registries.lookupOrThrow(Registries.BIOME); Codec>> codec = makeBiomeCodec(registry); for (int k = 0; k < listTag3.size(); k++) { - CompoundTag compoundTag4 = listTag3.getCompound(k); - int n = compoundTag4.getByte("Y"); + CompoundTag compoundTag3 = listTag3.getCompound(k); + int n = compoundTag3.getByte("Y"); LevelChunkSection levelChunkSection; if (n >= levelHeightAccessor.getMinSectionY() && n <= levelHeightAccessor.getMaxSectionY()) { PalettedContainer palettedContainer; - if (compoundTag4.contains("block_states", 10)) { - palettedContainer = BLOCK_STATE_CODEC.parse(NbtOps.INSTANCE, compoundTag4.getCompound("block_states")) + if (compoundTag3.contains("block_states", 10)) { + palettedContainer = BLOCK_STATE_CODEC.parse(NbtOps.INSTANCE, compoundTag3.getCompound("block_states")) .promotePartial(string -> logErrors(chunkPos, n, string)) .getOrThrow(SerializableChunkData.ChunkReadException::new); } else { @@ -201,8 +197,8 @@ public record SerializableChunkData( } PalettedContainerRO> palettedContainerRO; - if (compoundTag4.contains("biomes", 10)) { - palettedContainerRO = codec.parse(NbtOps.INSTANCE, compoundTag4.getCompound("biomes")) + if (compoundTag3.contains("biomes", 10)) { + palettedContainerRO = codec.parse(NbtOps.INSTANCE, compoundTag3.getCompound("biomes")) .promotePartial(string -> logErrors(chunkPos, n, string)) .getOrThrow(SerializableChunkData.ChunkReadException::new); } else { @@ -214,8 +210,8 @@ public record SerializableChunkData( levelChunkSection = null; } - DataLayer dataLayer = compoundTag4.contains("BlockLight", 7) ? new DataLayer(compoundTag4.getByteArray("BlockLight")) : null; - DataLayer dataLayer2 = compoundTag4.contains("SkyLight", 7) ? new DataLayer(compoundTag4.getByteArray("SkyLight")) : null; + DataLayer dataLayer = compoundTag3.contains("BlockLight", 7) ? new DataLayer(compoundTag3.getByteArray("BlockLight")) : null; + DataLayer dataLayer2 = compoundTag3.contains("SkyLight", 7) ? new DataLayer(compoundTag3.getByteArray("SkyLight")) : null; list5.add(new SerializableChunkData.SectionData(n, levelChunkSection, dataLayer, dataLayer2)); } @@ -237,29 +233,29 @@ public record SerializableChunkData( list5, list3, list4, - compoundTag3 + compoundTag2 ); } } - public ProtoChunk read(ServerLevel serverLevel, PoiManager poiManager, RegionStorageInfo regionStorageInfo, ChunkPos chunkPos) { - if (!Objects.equals(chunkPos, this.chunkPos)) { - LOGGER.error("Chunk file at {} is in the wrong location; relocating. (Expected {}, got {})", chunkPos, chunkPos, this.chunkPos); - serverLevel.getServer().reportMisplacedChunk(this.chunkPos, chunkPos, regionStorageInfo); + public ProtoChunk read(ServerLevel level, PoiManager poiManager, RegionStorageInfo regionStorageInfo, ChunkPos pos) { + if (!Objects.equals(pos, this.chunkPos)) { + LOGGER.error("Chunk file at {} is in the wrong location; relocating. (Expected {}, got {})", pos, pos, this.chunkPos); + level.getServer().reportMisplacedChunk(this.chunkPos, pos, regionStorageInfo); } - int i = serverLevel.getSectionsCount(); + int i = level.getSectionsCount(); LevelChunkSection[] levelChunkSections = new LevelChunkSection[i]; - boolean bl = serverLevel.dimensionType().hasSkyLight(); - ChunkSource chunkSource = serverLevel.getChunkSource(); + boolean bl = level.dimensionType().hasSkyLight(); + ChunkSource chunkSource = level.getChunkSource(); LevelLightEngine levelLightEngine = chunkSource.getLightEngine(); - Registry registry = serverLevel.registryAccess().lookupOrThrow(Registries.BIOME); + Registry registry = level.registryAccess().lookupOrThrow(Registries.BIOME); boolean bl2 = false; for (SerializableChunkData.SectionData sectionData : this.sectionData) { - SectionPos sectionPos = SectionPos.of(chunkPos, sectionData.y); + SectionPos sectionPos = SectionPos.of(pos, sectionData.y); if (sectionData.chunkSection != null) { - levelChunkSections[serverLevel.getSectionIndexFromSectionY(sectionData.y)] = sectionData.chunkSection; + levelChunkSections[level.getSectionIndexFromSectionY(sectionData.y)] = sectionData.chunkSection; poiManager.checkConsistencyWithBlocks(sectionPos, sectionData.chunkSection); } @@ -267,7 +263,7 @@ public record SerializableChunkData( boolean bl4 = bl && sectionData.skyLight != null; if (bl3 || bl4) { if (!bl2) { - levelLightEngine.retainData(chunkPos, true); + levelLightEngine.retainData(pos, true); bl2 = true; } @@ -287,21 +283,21 @@ public record SerializableChunkData( LevelChunkTicks levelChunkTicks = new LevelChunkTicks<>(this.packedTicks.blocks()); LevelChunkTicks levelChunkTicks2 = new LevelChunkTicks<>(this.packedTicks.fluids()); chunkAccess = new LevelChunk( - serverLevel.getLevel(), - chunkPos, + level.getLevel(), + pos, this.upgradeData, levelChunkTicks, levelChunkTicks2, this.inhabitedTime, levelChunkSections, - postLoadChunk(serverLevel, this.entities, this.blockEntities), + postLoadChunk(level, this.entities, this.blockEntities), BlendingData.unpack(this.blendingData) ); } else { ProtoChunkTicks protoChunkTicks = ProtoChunkTicks.load(this.packedTicks.blocks()); ProtoChunkTicks protoChunkTicks2 = ProtoChunkTicks.load(this.packedTicks.fluids()); ProtoChunk protoChunk = new ProtoChunk( - chunkPos, this.upgradeData, levelChunkSections, protoChunkTicks, protoChunkTicks2, serverLevel, registry, BlendingData.unpack(this.blendingData) + pos, this.upgradeData, levelChunkSections, protoChunkTicks, protoChunkTicks2, level, registry, BlendingData.unpack(this.blendingData) ); chunkAccess = protoChunk; protoChunk.setInhabitedTime(this.inhabitedTime); @@ -328,8 +324,8 @@ public record SerializableChunkData( } Heightmap.primeHeightmaps(chunkAccess, enumSet); - chunkAccess.setAllStarts(unpackStructureStart(StructurePieceSerializationContext.fromLevel(serverLevel), this.structureData, serverLevel.getSeed())); - chunkAccess.setAllReferences(unpackStructureReferences(serverLevel.registryAccess(), chunkPos, this.structureData)); + chunkAccess.setAllStarts(unpackStructureStart(StructurePieceSerializationContext.fromLevel(level), this.structureData, level.getSeed())); + chunkAccess.setAllReferences(unpackStructureReferences(level.registryAccess(), pos, this.structureData)); for (int j = 0; j < this.postProcessingSections.length; j++) { chunkAccess.addPackedPostProcess(this.postProcessingSections[j], j); @@ -356,27 +352,27 @@ public record SerializableChunkData( } } - private static void logErrors(ChunkPos chunkPos, int i, String string) { - LOGGER.error("Recoverable errors when loading section [{}, {}, {}]: {}", chunkPos.x, i, chunkPos.z, string); + private static void logErrors(ChunkPos chunkPos, int sectionY, String error) { + LOGGER.error("Recoverable errors when loading section [{}, {}, {}]: {}", chunkPos.x, sectionY, chunkPos.z, error); } - private static Codec>> makeBiomeCodec(Registry registry) { + private static Codec>> makeBiomeCodec(Registry biomeRegistry) { return PalettedContainer.codecRO( - registry.asHolderIdMap(), registry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, registry.getOrThrow(Biomes.PLAINS) + biomeRegistry.asHolderIdMap(), biomeRegistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomeRegistry.getOrThrow(Biomes.PLAINS) ); } - public static SerializableChunkData copyOf(ServerLevel serverLevel, ChunkAccess chunkAccess) { - if (!chunkAccess.canBeSerialized()) { - throw new IllegalArgumentException("Chunk can't be serialized: " + chunkAccess); + public static SerializableChunkData copyOf(ServerLevel level, ChunkAccess chunk) { + if (!chunk.canBeSerialized()) { + throw new IllegalArgumentException("Chunk can't be serialized: " + chunk); } else { - ChunkPos chunkPos = chunkAccess.getPos(); + ChunkPos chunkPos = chunk.getPos(); List list = new ArrayList(); - LevelChunkSection[] levelChunkSections = chunkAccess.getSections(); - LevelLightEngine levelLightEngine = serverLevel.getChunkSource().getLightEngine(); + LevelChunkSection[] levelChunkSections = chunk.getSections(); + LevelLightEngine levelLightEngine = level.getChunkSource().getLightEngine(); for (int i = levelLightEngine.getMinLightSection(); i < levelLightEngine.getMaxLightSection(); i++) { - int j = chunkAccess.getSectionIndexFromSectionY(i); + int j = chunk.getSectionIndexFromSectionY(i); boolean bl = j >= 0 && j < levelChunkSections.length; DataLayer dataLayer = levelLightEngine.getLayerListener(LightLayer.BLOCK).getDataLayerData(SectionPos.of(chunkPos, i)); DataLayer dataLayer2 = levelLightEngine.getLayerListener(LightLayer.SKY).getDataLayerData(SectionPos.of(chunkPos, i)); @@ -388,10 +384,10 @@ public record SerializableChunkData( } } - List list2 = new ArrayList(chunkAccess.getBlockEntitiesPos().size()); + List list2 = new ArrayList(chunk.getBlockEntitiesPos().size()); - for (BlockPos blockPos : chunkAccess.getBlockEntitiesPos()) { - CompoundTag compoundTag = chunkAccess.getBlockEntityNbtForSaving(blockPos, serverLevel.registryAccess()); + for (BlockPos blockPos : chunk.getBlockEntitiesPos()) { + CompoundTag compoundTag = chunk.getBlockEntityNbtForSaving(blockPos, level.registryAccess()); if (compoundTag != null) { list2.add(compoundTag); } @@ -399,8 +395,8 @@ public record SerializableChunkData( List list3 = new ArrayList(); long[] ls = null; - if (chunkAccess.getPersistedStatus().getChunkType() == ChunkType.PROTOCHUNK) { - ProtoChunk protoChunk = (ProtoChunk)chunkAccess; + if (chunk.getPersistedStatus().getChunkType() == ChunkType.PROTOCHUNK) { + ProtoChunk protoChunk = (ProtoChunk)chunk; list3.addAll(protoChunk.getEntities()); CarvingMask carvingMask = protoChunk.getCarvingMask(); if (carvingMask != null) { @@ -410,35 +406,33 @@ public record SerializableChunkData( Map map = new EnumMap(Heightmap.Types.class); - for (Entry entry : chunkAccess.getHeightmaps()) { - if (chunkAccess.getPersistedStatus().heightmapsAfter().contains(entry.getKey())) { + for (Entry entry : chunk.getHeightmaps()) { + if (chunk.getPersistedStatus().heightmapsAfter().contains(entry.getKey())) { long[] ms = ((Heightmap)entry.getValue()).getRawData(); map.put((Heightmap.Types)entry.getKey(), (long[])ms.clone()); } } - ChunkAccess.PackedTicks packedTicks = chunkAccess.getTicksForSerialization(serverLevel.getGameTime()); - ShortList[] shortLists = (ShortList[])Arrays.stream(chunkAccess.getPostProcessing()) + ChunkAccess.PackedTicks packedTicks = chunk.getTicksForSerialization(level.getGameTime()); + ShortList[] shortLists = (ShortList[])Arrays.stream(chunk.getPostProcessing()) .map(shortList -> shortList != null ? new ShortArrayList(shortList) : null) .toArray(ShortList[]::new); - CompoundTag compoundTag2 = packStructureData( - StructurePieceSerializationContext.fromLevel(serverLevel), chunkPos, chunkAccess.getAllStarts(), chunkAccess.getAllReferences() - ); + CompoundTag compoundTag2 = packStructureData(StructurePieceSerializationContext.fromLevel(level), chunkPos, chunk.getAllStarts(), chunk.getAllReferences()); return new SerializableChunkData( - serverLevel.registryAccess().lookupOrThrow(Registries.BIOME), + level.registryAccess().lookupOrThrow(Registries.BIOME), chunkPos, - chunkAccess.getMinSectionY(), - serverLevel.getGameTime(), - chunkAccess.getInhabitedTime(), - chunkAccess.getPersistedStatus(), - Optionull.map(chunkAccess.getBlendingData(), BlendingData::pack), - chunkAccess.getBelowZeroRetrogen(), - chunkAccess.getUpgradeData().copy(), + chunk.getMinSectionY(), + level.getGameTime(), + chunk.getInhabitedTime(), + chunk.getPersistedStatus(), + Optionull.map(chunk.getBlendingData(), BlendingData::pack), + chunk.getBelowZeroRetrogen(), + chunk.getUpgradeData().copy(), ls, map, packedTicks, shortLists, - chunkAccess.isLightCorrect(), + chunk.isLightCorrect(), list, list3, list2, @@ -456,10 +450,7 @@ public record SerializableChunkData( compoundTag.putLong("InhabitedTime", this.inhabitedTime); compoundTag.putString("Status", BuiltInRegistries.CHUNK_STATUS.getKey(this.chunkStatus).toString()); if (this.blendingData != null) { - BlendingData.Packed.CODEC - .encodeStart(NbtOps.INSTANCE, this.blendingData) - .resultOrPartial(LOGGER::error) - .ifPresent(tag -> compoundTag.put("blending_data", tag)); + Packed.CODEC.encodeStart(NbtOps.INSTANCE, this.blendingData).resultOrPartial(LOGGER::error).ifPresent(tag -> compoundTag.put("blending_data", tag)); } if (this.belowZeroRetrogen != null) { @@ -524,41 +515,41 @@ public record SerializableChunkData( return compoundTag; } - private static void saveTicks(CompoundTag compoundTag, ChunkAccess.PackedTicks packedTicks) { + private static void saveTicks(CompoundTag tag, ChunkAccess.PackedTicks ticks) { ListTag listTag = new ListTag(); - for (SavedTick savedTick : packedTicks.blocks()) { + for (SavedTick savedTick : ticks.blocks()) { listTag.add(savedTick.save(block -> BuiltInRegistries.BLOCK.getKey(block).toString())); } - compoundTag.put("block_ticks", listTag); + tag.put("block_ticks", listTag); ListTag listTag2 = new ListTag(); - for (SavedTick savedTick2 : packedTicks.fluids()) { + for (SavedTick savedTick2 : ticks.fluids()) { listTag2.add(savedTick2.save(fluid -> BuiltInRegistries.FLUID.getKey(fluid).toString())); } - compoundTag.put("fluid_ticks", listTag2); + tag.put("fluid_ticks", listTag2); } - public static ChunkType getChunkTypeFromTag(@Nullable CompoundTag compoundTag) { - return compoundTag != null ? ChunkStatus.byName(compoundTag.getString("Status")).getChunkType() : ChunkType.PROTOCHUNK; + public static ChunkType getChunkTypeFromTag(@Nullable CompoundTag tag) { + return tag != null ? ChunkStatus.byName(tag.getString("Status")).getChunkType() : ChunkType.PROTOCHUNK; } @Nullable - private static LevelChunk.PostLoadProcessor postLoadChunk(ServerLevel serverLevel, List list, List list2) { - return list.isEmpty() && list2.isEmpty() ? null : levelChunk -> { - if (!list.isEmpty()) { - serverLevel.addLegacyChunkEntities(EntityType.loadEntitiesRecursive(list, serverLevel, EntitySpawnReason.LOAD)); + private static LevelChunk.PostLoadProcessor postLoadChunk(ServerLevel level, List entities, List blockEntities) { + return entities.isEmpty() && blockEntities.isEmpty() ? null : levelChunk -> { + if (!entities.isEmpty()) { + level.addLegacyChunkEntities(EntityType.loadEntitiesRecursive(entities, level, EntitySpawnReason.LOAD)); } - for (CompoundTag compoundTag : list2) { + for (CompoundTag compoundTag : blockEntities) { boolean bl = compoundTag.getBoolean("keepPacked"); if (bl) { levelChunk.setBlockEntityNbt(compoundTag); } else { BlockPos blockPos = BlockEntity.getPosFromTag(compoundTag); - BlockEntity blockEntity = BlockEntity.loadStatic(blockPos, levelChunk.getBlockState(blockPos), compoundTag, serverLevel.registryAccess()); + BlockEntity blockEntity = BlockEntity.loadStatic(blockPos, levelChunk.getBlockState(blockPos), compoundTag, level.registryAccess()); if (blockEntity != null) { levelChunk.setBlockEntity(blockEntity); } @@ -568,21 +559,21 @@ public record SerializableChunkData( } private static CompoundTag packStructureData( - StructurePieceSerializationContext structurePieceSerializationContext, ChunkPos chunkPos, Map map, Map map2 + StructurePieceSerializationContext context, ChunkPos pos, Map structureStarts, Map references ) { CompoundTag compoundTag = new CompoundTag(); CompoundTag compoundTag2 = new CompoundTag(); - Registry registry = structurePieceSerializationContext.registryAccess().lookupOrThrow(Registries.STRUCTURE); + Registry registry = context.registryAccess().lookupOrThrow(Registries.STRUCTURE); - for (Entry entry : map.entrySet()) { + for (Entry entry : structureStarts.entrySet()) { ResourceLocation resourceLocation = registry.getKey((Structure)entry.getKey()); - compoundTag2.put(resourceLocation.toString(), ((StructureStart)entry.getValue()).createTag(structurePieceSerializationContext, chunkPos)); + compoundTag2.put(resourceLocation.toString(), ((StructureStart)entry.getValue()).createTag(context, pos)); } compoundTag.put("starts", compoundTag2); CompoundTag compoundTag3 = new CompoundTag(); - for (Entry entry2 : map2.entrySet()) { + for (Entry entry2 : references.entrySet()) { if (!((LongSet)entry2.getValue()).isEmpty()) { ResourceLocation resourceLocation2 = registry.getKey((Structure)entry2.getKey()); compoundTag3.put(resourceLocation2.toString(), new LongArrayTag((LongSet)entry2.getValue())); @@ -593,20 +584,18 @@ public record SerializableChunkData( return compoundTag; } - private static Map unpackStructureStart( - StructurePieceSerializationContext structurePieceSerializationContext, CompoundTag compoundTag, long l - ) { + private static Map unpackStructureStart(StructurePieceSerializationContext context, CompoundTag tag, long seed) { Map map = Maps.newHashMap(); - Registry registry = structurePieceSerializationContext.registryAccess().lookupOrThrow(Registries.STRUCTURE); - CompoundTag compoundTag2 = compoundTag.getCompound("starts"); + Registry registry = context.registryAccess().lookupOrThrow(Registries.STRUCTURE); + CompoundTag compoundTag = tag.getCompound("starts"); - for (String string : compoundTag2.getAllKeys()) { + for (String string : compoundTag.getAllKeys()) { ResourceLocation resourceLocation = ResourceLocation.tryParse(string); Structure structure = registry.getValue(resourceLocation); if (structure == null) { LOGGER.error("Unknown structure start: {}", resourceLocation); } else { - StructureStart structureStart = StructureStart.loadStaticStart(structurePieceSerializationContext, compoundTag2.getCompound(string), l); + StructureStart structureStart = StructureStart.loadStaticStart(context, compoundTag.getCompound(string), seed); if (structureStart != null) { map.put(structure, structureStart); } @@ -616,23 +605,23 @@ public record SerializableChunkData( return map; } - private static Map unpackStructureReferences(RegistryAccess registryAccess, ChunkPos chunkPos, CompoundTag compoundTag) { + private static Map unpackStructureReferences(RegistryAccess registries, ChunkPos pos, CompoundTag tag) { Map map = Maps.newHashMap(); - Registry registry = registryAccess.lookupOrThrow(Registries.STRUCTURE); - CompoundTag compoundTag2 = compoundTag.getCompound("References"); + Registry registry = registries.lookupOrThrow(Registries.STRUCTURE); + CompoundTag compoundTag = tag.getCompound("References"); - for (String string : compoundTag2.getAllKeys()) { + for (String string : compoundTag.getAllKeys()) { ResourceLocation resourceLocation = ResourceLocation.tryParse(string); Structure structure = registry.getValue(resourceLocation); if (structure == null) { - LOGGER.warn("Found reference to unknown structure '{}' in chunk {}, discarding", resourceLocation, chunkPos); + LOGGER.warn("Found reference to unknown structure '{}' in chunk {}, discarding", resourceLocation, pos); } else { - long[] ls = compoundTag2.getLongArray(string); + long[] ls = compoundTag.getLongArray(string); if (ls.length != 0) { map.put(structure, new LongOpenHashSet(Arrays.stream(ls).filter(l -> { ChunkPos chunkPos2 = new ChunkPos(l); - if (chunkPos2.getChessboardDistance(chunkPos) > 8) { - LOGGER.warn("Found invalid structure reference [ {} @ {} ] for chunk {}.", resourceLocation, chunkPos2, chunkPos); + if (chunkPos2.getChessboardDistance(pos) > 8) { + LOGGER.warn("Found invalid structure reference [ {} @ {} ] for chunk {}.", resourceLocation, chunkPos2, pos); return false; } else { return true; @@ -645,10 +634,10 @@ public record SerializableChunkData( return map; } - private static ListTag packOffsets(ShortList[] shortLists) { + private static ListTag packOffsets(ShortList[] offsets) { ListTag listTag = new ListTag(); - for (ShortList shortList : shortLists) { + for (ShortList shortList : offsets) { ListTag listTag2 = new ListTag(); if (shortList != null) { for (int i = 0; i < shortList.size(); i++) { diff --git a/net/minecraft/world/level/levelgen/DebugLevelSource.java b/net/minecraft/world/level/levelgen/DebugLevelSource.java index e8481201..462ea56b 100644 --- a/net/minecraft/world/level/levelgen/DebugLevelSource.java +++ b/net/minecraft/world/level/levelgen/DebugLevelSource.java @@ -7,8 +7,8 @@ import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; import java.util.stream.StreamSupport; import net.minecraft.core.BlockPos; -import net.minecraft.core.Holder; import net.minecraft.core.SectionPos; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.RegistryOps; import net.minecraft.server.level.WorldGenRegion; @@ -46,7 +46,7 @@ public class DebugLevelSource extends ChunkGenerator { public static final int HEIGHT = 70; public static final int BARRIER_HEIGHT = 60; - public DebugLevelSource(Holder.Reference biome) { + public DebugLevelSource(Reference biome) { super(new FixedBiomeSource(biome)); } @@ -113,9 +113,7 @@ public class DebugLevelSource extends ChunkGenerator { } @Override - public void applyCarvers( - WorldGenRegion worldGenRegion, long l, RandomState randomState, BiomeManager biomeManager, StructureManager structureManager, ChunkAccess chunkAccess - ) { + public void applyCarvers(WorldGenRegion level, long seed, RandomState random, BiomeManager biomeManager, StructureManager structureManager, ChunkAccess chunk) { } @Override diff --git a/net/minecraft/world/level/levelgen/FlatLevelSource.java b/net/minecraft/world/level/levelgen/FlatLevelSource.java index ddeac4c7..59dfa6a9 100644 --- a/net/minecraft/world/level/levelgen/FlatLevelSource.java +++ b/net/minecraft/world/level/levelgen/FlatLevelSource.java @@ -121,9 +121,7 @@ public class FlatLevelSource extends ChunkGenerator { } @Override - public void applyCarvers( - WorldGenRegion worldGenRegion, long l, RandomState randomState, BiomeManager biomeManager, StructureManager structureManager, ChunkAccess chunkAccess - ) { + public void applyCarvers(WorldGenRegion level, long seed, RandomState random, BiomeManager biomeManager, StructureManager structureManager, ChunkAccess chunk) { } @Override diff --git a/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java index 6718562b..985b0522 100644 --- a/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java +++ b/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java @@ -40,6 +40,8 @@ import net.minecraft.world.level.chunk.ChunkGenerator; import net.minecraft.world.level.chunk.LevelChunkSection; import net.minecraft.world.level.chunk.ProtoChunk; import net.minecraft.world.level.dimension.DimensionType; +import net.minecraft.world.level.levelgen.Aquifer.FluidPicker; +import net.minecraft.world.level.levelgen.Aquifer.FluidStatus; import net.minecraft.world.level.levelgen.DensityFunction.SinglePointContext; import net.minecraft.world.level.levelgen.DensityFunctions.BeardifierMarker; import net.minecraft.world.level.levelgen.blending.Blender; @@ -58,7 +60,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { ); private static final BlockState AIR = Blocks.AIR.defaultBlockState(); private final Holder settings; - private final Supplier globalFluidPicker; + private final Supplier globalFluidPicker; public NoiseBasedChunkGenerator(BiomeSource biomeSource, Holder settings) { super(biomeSource); @@ -66,11 +68,11 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { this.globalFluidPicker = Suppliers.memoize(() -> createFluidPicker(settings.value())); } - private static Aquifer.FluidPicker createFluidPicker(NoiseGeneratorSettings settings) { - Aquifer.FluidStatus fluidStatus = new Aquifer.FluidStatus(-54, Blocks.LAVA.defaultBlockState()); + private static FluidPicker createFluidPicker(NoiseGeneratorSettings settings) { + FluidStatus fluidStatus = new FluidStatus(-54, Blocks.LAVA.defaultBlockState()); int i = settings.seaLevel(); - Aquifer.FluidStatus fluidStatus2 = new Aquifer.FluidStatus(i, settings.defaultFluid()); - Aquifer.FluidStatus fluidStatus3 = new Aquifer.FluidStatus(DimensionType.MIN_Y * 2, Blocks.AIR.defaultBlockState()); + FluidStatus fluidStatus2 = new FluidStatus(i, settings.defaultFluid()); + FluidStatus fluidStatus3 = new FluidStatus(DimensionType.MIN_Y * 2, Blocks.AIR.defaultBlockState()); return (j, k, l) -> k < Math.min(-54, i) ? fluidStatus : fluidStatus2; } @@ -90,12 +92,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { private NoiseChunk createNoiseChunk(ChunkAccess chunk, StructureManager structureManager, Blender blender, RandomState random) { return NoiseChunk.forChunk( - chunk, - random, - Beardifier.forStructuresInChunk(structureManager, chunk.getPos()), - this.settings.value(), - (Aquifer.FluidPicker)this.globalFluidPicker.get(), - blender + chunk, random, Beardifier.forStructuresInChunk(structureManager, chunk.getPos()), this.settings.value(), (FluidPicker)this.globalFluidPicker.get(), blender ); } @@ -181,7 +178,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { double d = (double)p / m; double e = (double)q / m; NoiseChunk noiseChunk = new NoiseChunk( - 1, random, r, s, noiseSettings, BeardifierMarker.INSTANCE, this.settings.value(), (Aquifer.FluidPicker)this.globalFluidPicker.get(), Blender.empty() + 1, random, r, s, noiseSettings, BeardifierMarker.INSTANCE, this.settings.value(), (FluidPicker)this.globalFluidPicker.get(), Blender.empty() ); noiseChunk.initializeForFirstCellX(); noiseChunk.advanceCellX(0); @@ -241,42 +238,38 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { } @Override - public void applyCarvers( - WorldGenRegion worldGenRegion, long l, RandomState randomState, BiomeManager biomeManager, StructureManager structureManager, ChunkAccess chunkAccess - ) { - BiomeManager biomeManager2 = biomeManager.withDifferentSource((ix, jx, kx) -> this.biomeSource.getNoiseBiome(ix, jx, kx, randomState.sampler())); + public void applyCarvers(WorldGenRegion level, long seed, RandomState random, BiomeManager biomeManager, StructureManager structureManager, ChunkAccess chunk) { + BiomeManager biomeManager2 = biomeManager.withDifferentSource((ix, jx, kx) -> this.biomeSource.getNoiseBiome(ix, jx, kx, random.sampler())); WorldgenRandom worldgenRandom = new WorldgenRandom(new LegacyRandomSource(RandomSupport.generateUniqueSeed())); int i = 8; - ChunkPos chunkPos = chunkAccess.getPos(); - NoiseChunk noiseChunk = chunkAccess.getOrCreateNoiseChunk( - chunkAccessx -> this.createNoiseChunk(chunkAccessx, structureManager, Blender.of(worldGenRegion), randomState) - ); + ChunkPos chunkPos = chunk.getPos(); + NoiseChunk noiseChunk = chunk.getOrCreateNoiseChunk(chunkAccessx -> this.createNoiseChunk(chunkAccessx, structureManager, Blender.of(level), random)); Aquifer aquifer = noiseChunk.aquifer(); CarvingContext carvingContext = new CarvingContext( - this, worldGenRegion.registryAccess(), chunkAccess.getHeightAccessorForGeneration(), noiseChunk, randomState, this.settings.value().surfaceRule() + this, level.registryAccess(), chunk.getHeightAccessorForGeneration(), noiseChunk, random, this.settings.value().surfaceRule() ); - CarvingMask carvingMask = ((ProtoChunk)chunkAccess).getOrCreateCarvingMask(); + CarvingMask carvingMask = ((ProtoChunk)chunk).getOrCreateCarvingMask(); for (int j = -8; j <= 8; j++) { for (int k = -8; k <= 8; k++) { ChunkPos chunkPos2 = new ChunkPos(chunkPos.x + j, chunkPos.z + k); - ChunkAccess chunkAccess2 = worldGenRegion.getChunk(chunkPos2.x, chunkPos2.z); - BiomeGenerationSettings biomeGenerationSettings = chunkAccess2.carverBiome( + ChunkAccess chunkAccess = level.getChunk(chunkPos2.x, chunkPos2.z); + BiomeGenerationSettings biomeGenerationSettings = chunkAccess.carverBiome( () -> this.getBiomeGenerationSettings( - this.biomeSource.getNoiseBiome(QuartPos.fromBlock(chunkPos2.getMinBlockX()), 0, QuartPos.fromBlock(chunkPos2.getMinBlockZ()), randomState.sampler()) + this.biomeSource.getNoiseBiome(QuartPos.fromBlock(chunkPos2.getMinBlockX()), 0, QuartPos.fromBlock(chunkPos2.getMinBlockZ()), random.sampler()) ) ); Iterable>> iterable = biomeGenerationSettings.getCarvers(); - int m = 0; + int l = 0; for (Holder> holder : iterable) { ConfiguredWorldCarver configuredWorldCarver = holder.value(); - worldgenRandom.setLargeFeatureSeed(l + m, chunkPos2.x, chunkPos2.z); + worldgenRandom.setLargeFeatureSeed(seed + l, chunkPos2.x, chunkPos2.z); if (configuredWorldCarver.isStartChunk(worldgenRandom)) { - configuredWorldCarver.carve(carvingContext, chunkAccess, biomeManager2::getBiome, worldgenRandom, aquifer, chunkPos2, carvingMask); + configuredWorldCarver.carve(carvingContext, chunk, biomeManager2::getBiome, worldgenRandom, aquifer, chunkPos2, carvingMask); } - m++; + l++; } } } diff --git a/net/minecraft/world/level/levelgen/NoiseRouterData.java b/net/minecraft/world/level/levelgen/NoiseRouterData.java index 7bf85cbb..796ac43e 100644 --- a/net/minecraft/world/level/levelgen/NoiseRouterData.java +++ b/net/minecraft/world/level/levelgen/NoiseRouterData.java @@ -9,8 +9,12 @@ import net.minecraft.data.worldgen.TerrainProvider; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.dimension.DimensionType; +import net.minecraft.world.level.levelgen.DensityFunctions.HolderHolder; +import net.minecraft.world.level.levelgen.DensityFunctions.Spline.Coordinate; +import net.minecraft.world.level.levelgen.DensityFunctions.WeirdScaledSampler.RarityValueMapper; +import net.minecraft.world.level.levelgen.OreVeinifier.VeinType; import net.minecraft.world.level.levelgen.synth.BlendedNoise; -import net.minecraft.world.level.levelgen.synth.NormalNoise; +import net.minecraft.world.level.levelgen.synth.NormalNoise.NoiseParameters; public class NoiseRouterData { public static final float GLOBAL_OFFSET = -0.50375F; @@ -64,7 +68,7 @@ public class NoiseRouterData { } public static Holder bootstrap(BootstrapContext context) { - HolderGetter holderGetter = context.lookup(Registries.NOISE); + HolderGetter holderGetter = context.lookup(Registries.NOISE); HolderGetter holderGetter2 = context.lookup(Registries.DENSITY_FUNCTION); context.register(ZERO, DensityFunctions.zero()); int i = DimensionType.MIN_Y * 2; @@ -130,7 +134,7 @@ public class NoiseRouterData { private static void registerTerrainNoises( BootstrapContext context, - HolderGetter densityFunctionGetter, + HolderGetter densityFunctionRegistry, DensityFunction jaggedNoise, Holder continentalness, Holder erosion, @@ -141,10 +145,10 @@ public class NoiseRouterData { ResourceKey slopedCheeseKey, boolean amplified ) { - DensityFunctions.Spline.Coordinate coordinate = new DensityFunctions.Spline.Coordinate(continentalness); - DensityFunctions.Spline.Coordinate coordinate2 = new DensityFunctions.Spline.Coordinate(erosion); - DensityFunctions.Spline.Coordinate coordinate3 = new DensityFunctions.Spline.Coordinate(densityFunctionGetter.getOrThrow(RIDGES)); - DensityFunctions.Spline.Coordinate coordinate4 = new DensityFunctions.Spline.Coordinate(densityFunctionGetter.getOrThrow(RIDGES_FOLDED)); + Coordinate coordinate = new Coordinate(continentalness); + Coordinate coordinate2 = new Coordinate(erosion); + Coordinate coordinate3 = new Coordinate(densityFunctionRegistry.getOrThrow(RIDGES)); + Coordinate coordinate4 = new Coordinate(densityFunctionRegistry.getOrThrow(RIDGES_FOLDED)); DensityFunction densityFunction = registerAndWrap( context, offsetKey, @@ -172,15 +176,15 @@ public class NoiseRouterData { ); DensityFunction densityFunction5 = DensityFunctions.mul(densityFunction4, jaggedNoise.halfNegative()); DensityFunction densityFunction6 = noiseGradientDensity(densityFunction2, DensityFunctions.add(densityFunction3, densityFunction5)); - context.register(slopedCheeseKey, DensityFunctions.add(densityFunction6, getFunction(densityFunctionGetter, BASE_3D_NOISE_OVERWORLD))); + context.register(slopedCheeseKey, DensityFunctions.add(densityFunction6, getFunction(densityFunctionRegistry, BASE_3D_NOISE_OVERWORLD))); } private static DensityFunction registerAndWrap(BootstrapContext context, ResourceKey key, DensityFunction value) { - return new DensityFunctions.HolderHolder(context.register(key, value)); + return new HolderHolder(context.register(key, value)); } - private static DensityFunction getFunction(HolderGetter densityFunctions, ResourceKey key) { - return new DensityFunctions.HolderHolder(densityFunctions.getOrThrow(key)); + private static DensityFunction getFunction(HolderGetter densityFunctionRegistry, ResourceKey key) { + return new HolderHolder(densityFunctionRegistry.getOrThrow(key)); } private static DensityFunction peaksAndValleys(DensityFunction densityFunction) { @@ -196,31 +200,31 @@ public class NoiseRouterData { return -(Math.abs(Math.abs(weirdness) - 0.6666667F) - 0.33333334F) * 3.0F; } - private static DensityFunction spaghettiRoughnessFunction(HolderGetter noiseParameters) { + private static DensityFunction spaghettiRoughnessFunction(HolderGetter noiseParameters) { DensityFunction densityFunction = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.SPAGHETTI_ROUGHNESS)); DensityFunction densityFunction2 = DensityFunctions.mappedNoise(noiseParameters.getOrThrow(Noises.SPAGHETTI_ROUGHNESS_MODULATOR), 0.0, -0.1); return DensityFunctions.cacheOnce(DensityFunctions.mul(densityFunction2, DensityFunctions.add(densityFunction.abs(), DensityFunctions.constant(-0.4)))); } - private static DensityFunction entrances(HolderGetter densityFunction, HolderGetter noiseParameters) { - DensityFunction densityFunction2 = DensityFunctions.cacheOnce(DensityFunctions.noise(noiseParameters.getOrThrow(Noises.SPAGHETTI_3D_RARITY), 2.0, 1.0)); - DensityFunction densityFunction3 = DensityFunctions.mappedNoise(noiseParameters.getOrThrow(Noises.SPAGHETTI_3D_THICKNESS), -0.065, -0.088); + private static DensityFunction entrances(HolderGetter densityFunctionRegistry, HolderGetter noiseParameters) { + DensityFunction densityFunction = DensityFunctions.cacheOnce(DensityFunctions.noise(noiseParameters.getOrThrow(Noises.SPAGHETTI_3D_RARITY), 2.0, 1.0)); + DensityFunction densityFunction2 = DensityFunctions.mappedNoise(noiseParameters.getOrThrow(Noises.SPAGHETTI_3D_THICKNESS), -0.065, -0.088); + DensityFunction densityFunction3 = DensityFunctions.weirdScaledSampler( + densityFunction, noiseParameters.getOrThrow(Noises.SPAGHETTI_3D_1), RarityValueMapper.TYPE1 + ); DensityFunction densityFunction4 = DensityFunctions.weirdScaledSampler( - densityFunction2, noiseParameters.getOrThrow(Noises.SPAGHETTI_3D_1), DensityFunctions.WeirdScaledSampler.RarityValueMapper.TYPE1 + densityFunction, noiseParameters.getOrThrow(Noises.SPAGHETTI_3D_2), RarityValueMapper.TYPE1 ); - DensityFunction densityFunction5 = DensityFunctions.weirdScaledSampler( - densityFunction2, noiseParameters.getOrThrow(Noises.SPAGHETTI_3D_2), DensityFunctions.WeirdScaledSampler.RarityValueMapper.TYPE1 + DensityFunction densityFunction5 = DensityFunctions.add(DensityFunctions.max(densityFunction3, densityFunction4), densityFunction2).clamp(-1.0, 1.0); + DensityFunction densityFunction6 = getFunction(densityFunctionRegistry, SPAGHETTI_ROUGHNESS_FUNCTION); + DensityFunction densityFunction7 = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.CAVE_ENTRANCE), 0.75, 0.5); + DensityFunction densityFunction8 = DensityFunctions.add( + DensityFunctions.add(densityFunction7, DensityFunctions.constant(0.37)), DensityFunctions.yClampedGradient(-10, 30, 0.3, 0.0) ); - DensityFunction densityFunction6 = DensityFunctions.add(DensityFunctions.max(densityFunction4, densityFunction5), densityFunction3).clamp(-1.0, 1.0); - DensityFunction densityFunction7 = getFunction(densityFunction, SPAGHETTI_ROUGHNESS_FUNCTION); - DensityFunction densityFunction8 = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.CAVE_ENTRANCE), 0.75, 0.5); - DensityFunction densityFunction9 = DensityFunctions.add( - DensityFunctions.add(densityFunction8, DensityFunctions.constant(0.37)), DensityFunctions.yClampedGradient(-10, 30, 0.3, 0.0) - ); - return DensityFunctions.cacheOnce(DensityFunctions.min(densityFunction9, DensityFunctions.add(densityFunction7, densityFunction6))); + return DensityFunctions.cacheOnce(DensityFunctions.min(densityFunction8, DensityFunctions.add(densityFunction6, densityFunction5))); } - private static DensityFunction noodle(HolderGetter densityFunctions, HolderGetter noiseParameters) { + private static DensityFunction noodle(HolderGetter densityFunctions, HolderGetter noiseParameters) { DensityFunction densityFunction = getFunction(densityFunctions, Y); int i = -64; int j = -60; @@ -244,7 +248,7 @@ public class NoiseRouterData { ); } - private static DensityFunction pillars(HolderGetter noiseParameters) { + private static DensityFunction pillars(HolderGetter noiseParameters) { double d = 25.0; double e = 0.3; DensityFunction densityFunction = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.PILLAR), 25.0, 0.3); @@ -254,13 +258,13 @@ public class NoiseRouterData { return DensityFunctions.cacheOnce(DensityFunctions.mul(densityFunction4, densityFunction3.cube())); } - private static DensityFunction spaghetti2D(HolderGetter densityFunctions, HolderGetter noiseParameters) { + private static DensityFunction spaghetti2D(HolderGetter densityFunctionRegistry, HolderGetter noiseParameters) { DensityFunction densityFunction = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.SPAGHETTI_2D_MODULATOR), 2.0, 1.0); DensityFunction densityFunction2 = DensityFunctions.weirdScaledSampler( - densityFunction, noiseParameters.getOrThrow(Noises.SPAGHETTI_2D), DensityFunctions.WeirdScaledSampler.RarityValueMapper.TYPE2 + densityFunction, noiseParameters.getOrThrow(Noises.SPAGHETTI_2D), RarityValueMapper.TYPE2 ); DensityFunction densityFunction3 = DensityFunctions.mappedNoise(noiseParameters.getOrThrow(Noises.SPAGHETTI_2D_ELEVATION), 0.0, Math.floorDiv(-64, 8), 8.0); - DensityFunction densityFunction4 = getFunction(densityFunctions, SPAGHETTI_2D_THICKNESS_MODULATOR); + DensityFunction densityFunction4 = getFunction(densityFunctionRegistry, SPAGHETTI_2D_THICKNESS_MODULATOR); DensityFunction densityFunction5 = DensityFunctions.add(densityFunction3, DensityFunctions.yClampedGradient(-64, 320, 8.0, -40.0)).abs(); DensityFunction densityFunction6 = DensityFunctions.add(densityFunction5, densityFunction4).cube(); double d = 0.083; @@ -269,26 +273,24 @@ public class NoiseRouterData { } private static DensityFunction underground( - HolderGetter densityFunctions, HolderGetter noiseParameters, DensityFunction densityFunction + HolderGetter densityFunctionRegistry, HolderGetter noiseParameters, DensityFunction slopedCheese ) { - DensityFunction densityFunction2 = getFunction(densityFunctions, SPAGHETTI_2D); - DensityFunction densityFunction3 = getFunction(densityFunctions, SPAGHETTI_ROUGHNESS_FUNCTION); - DensityFunction densityFunction4 = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.CAVE_LAYER), 8.0); - DensityFunction densityFunction5 = DensityFunctions.mul(DensityFunctions.constant(4.0), densityFunction4.square()); - DensityFunction densityFunction6 = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.CAVE_CHEESE), 0.6666666666666666); - DensityFunction densityFunction7 = DensityFunctions.add( - DensityFunctions.add(DensityFunctions.constant(0.27), densityFunction6).clamp(-1.0, 1.0), - DensityFunctions.add(DensityFunctions.constant(1.5), DensityFunctions.mul(DensityFunctions.constant(-0.64), densityFunction)).clamp(0.0, 0.5) + DensityFunction densityFunction = getFunction(densityFunctionRegistry, SPAGHETTI_2D); + DensityFunction densityFunction2 = getFunction(densityFunctionRegistry, SPAGHETTI_ROUGHNESS_FUNCTION); + DensityFunction densityFunction3 = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.CAVE_LAYER), 8.0); + DensityFunction densityFunction4 = DensityFunctions.mul(DensityFunctions.constant(4.0), densityFunction3.square()); + DensityFunction densityFunction5 = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.CAVE_CHEESE), 0.6666666666666666); + DensityFunction densityFunction6 = DensityFunctions.add( + DensityFunctions.add(DensityFunctions.constant(0.27), densityFunction5).clamp(-1.0, 1.0), + DensityFunctions.add(DensityFunctions.constant(1.5), DensityFunctions.mul(DensityFunctions.constant(-0.64), slopedCheese)).clamp(0.0, 0.5) ); - DensityFunction densityFunction8 = DensityFunctions.add(densityFunction5, densityFunction7); - DensityFunction densityFunction9 = DensityFunctions.min( - DensityFunctions.min(densityFunction8, getFunction(densityFunctions, ENTRANCES)), DensityFunctions.add(densityFunction2, densityFunction3) + DensityFunction densityFunction7 = DensityFunctions.add(densityFunction4, densityFunction6); + DensityFunction densityFunction8 = DensityFunctions.min( + DensityFunctions.min(densityFunction7, getFunction(densityFunctionRegistry, ENTRANCES)), DensityFunctions.add(densityFunction, densityFunction2) ); - DensityFunction densityFunction10 = getFunction(densityFunctions, PILLARS); - DensityFunction densityFunction11 = DensityFunctions.rangeChoice( - densityFunction10, -1000000.0, 0.03, DensityFunctions.constant(-1000000.0), densityFunction10 - ); - return DensityFunctions.max(densityFunction9, densityFunction11); + DensityFunction densityFunction9 = getFunction(densityFunctionRegistry, PILLARS); + DensityFunction densityFunction10 = DensityFunctions.rangeChoice(densityFunction9, -1000000.0, 0.03, DensityFunctions.constant(-1000000.0), densityFunction9); + return DensityFunctions.max(densityFunction8, densityFunction10); } private static DensityFunction postProcess(DensityFunction densityFunction) { @@ -297,34 +299,36 @@ public class NoiseRouterData { } protected static NoiseRouter overworld( - HolderGetter densityFunctions, HolderGetter noiseParameters, boolean large, boolean amplified + HolderGetter densityFunctionRegistry, HolderGetter noiseParameters, boolean large, boolean amplified ) { DensityFunction densityFunction = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.AQUIFER_BARRIER), 0.5); DensityFunction densityFunction2 = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.AQUIFER_FLUID_LEVEL_FLOODEDNESS), 0.67); DensityFunction densityFunction3 = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.AQUIFER_FLUID_LEVEL_SPREAD), 0.7142857142857143); DensityFunction densityFunction4 = DensityFunctions.noise(noiseParameters.getOrThrow(Noises.AQUIFER_LAVA)); - DensityFunction densityFunction5 = getFunction(densityFunctions, SHIFT_X); - DensityFunction densityFunction6 = getFunction(densityFunctions, SHIFT_Z); + DensityFunction densityFunction5 = getFunction(densityFunctionRegistry, SHIFT_X); + DensityFunction densityFunction6 = getFunction(densityFunctionRegistry, SHIFT_Z); DensityFunction densityFunction7 = DensityFunctions.shiftedNoise2d( densityFunction5, densityFunction6, 0.25, noiseParameters.getOrThrow(large ? Noises.TEMPERATURE_LARGE : Noises.TEMPERATURE) ); DensityFunction densityFunction8 = DensityFunctions.shiftedNoise2d( densityFunction5, densityFunction6, 0.25, noiseParameters.getOrThrow(large ? Noises.VEGETATION_LARGE : Noises.VEGETATION) ); - DensityFunction densityFunction9 = getFunction(densityFunctions, large ? FACTOR_LARGE : (amplified ? FACTOR_AMPLIFIED : FACTOR)); - DensityFunction densityFunction10 = getFunction(densityFunctions, large ? DEPTH_LARGE : (amplified ? DEPTH_AMPLIFIED : DEPTH)); + DensityFunction densityFunction9 = getFunction(densityFunctionRegistry, large ? FACTOR_LARGE : (amplified ? FACTOR_AMPLIFIED : FACTOR)); + DensityFunction densityFunction10 = getFunction(densityFunctionRegistry, large ? DEPTH_LARGE : (amplified ? DEPTH_AMPLIFIED : DEPTH)); DensityFunction densityFunction11 = noiseGradientDensity(DensityFunctions.cache2d(densityFunction9), densityFunction10); - DensityFunction densityFunction12 = getFunction(densityFunctions, large ? SLOPED_CHEESE_LARGE : (amplified ? SLOPED_CHEESE_AMPLIFIED : SLOPED_CHEESE)); + DensityFunction densityFunction12 = getFunction(densityFunctionRegistry, large ? SLOPED_CHEESE_LARGE : (amplified ? SLOPED_CHEESE_AMPLIFIED : SLOPED_CHEESE)); DensityFunction densityFunction13 = DensityFunctions.min( - densityFunction12, DensityFunctions.mul(DensityFunctions.constant(5.0), getFunction(densityFunctions, ENTRANCES)) + densityFunction12, DensityFunctions.mul(DensityFunctions.constant(5.0), getFunction(densityFunctionRegistry, ENTRANCES)) ); DensityFunction densityFunction14 = DensityFunctions.rangeChoice( - densityFunction12, -1000000.0, 1.5625, densityFunction13, underground(densityFunctions, noiseParameters, densityFunction12) + densityFunction12, -1000000.0, 1.5625, densityFunction13, underground(densityFunctionRegistry, noiseParameters, densityFunction12) ); - DensityFunction densityFunction15 = DensityFunctions.min(postProcess(slideOverworld(amplified, densityFunction14)), getFunction(densityFunctions, NOODLE)); - DensityFunction densityFunction16 = getFunction(densityFunctions, Y); - int i = Stream.of(OreVeinifier.VeinType.values()).mapToInt(veinType -> veinType.minY).min().orElse(-DimensionType.MIN_Y * 2); - int j = Stream.of(OreVeinifier.VeinType.values()).mapToInt(veinType -> veinType.maxY).max().orElse(-DimensionType.MIN_Y * 2); + DensityFunction densityFunction15 = DensityFunctions.min( + postProcess(slideOverworld(amplified, densityFunction14)), getFunction(densityFunctionRegistry, NOODLE) + ); + DensityFunction densityFunction16 = getFunction(densityFunctionRegistry, Y); + int i = Stream.of(VeinType.values()).mapToInt(veinType -> veinType.minY).min().orElse(-DimensionType.MIN_Y * 2); + int j = Stream.of(VeinType.values()).mapToInt(veinType -> veinType.maxY).max().orElse(-DimensionType.MIN_Y * 2); DensityFunction densityFunction17 = yLimitedInterpolatable( densityFunction16, DensityFunctions.noise(noiseParameters.getOrThrow(Noises.ORE_VEININESS), 1.5, 1.5), i, j, 0 ); @@ -346,10 +350,10 @@ public class NoiseRouterData { densityFunction4, densityFunction7, densityFunction8, - getFunction(densityFunctions, large ? CONTINENTS_LARGE : CONTINENTS), - getFunction(densityFunctions, large ? EROSION_LARGE : EROSION), + getFunction(densityFunctionRegistry, large ? CONTINENTS_LARGE : CONTINENTS), + getFunction(densityFunctionRegistry, large ? EROSION_LARGE : EROSION), densityFunction10, - getFunction(densityFunctions, RIDGES), + getFunction(densityFunctionRegistry, RIDGES), slideOverworld(amplified, DensityFunctions.add(densityFunction11, DensityFunctions.constant(-0.703125)).clamp(-64.0, 64.0)), densityFunction15, densityFunction17, @@ -359,28 +363,28 @@ public class NoiseRouterData { } private static NoiseRouter noNewCaves( - HolderGetter densityFunctions, HolderGetter noiseParameters, DensityFunction densityFunction + HolderGetter densityFunctions, HolderGetter noiseParameters, DensityFunction postProccessor ) { - DensityFunction densityFunction2 = getFunction(densityFunctions, SHIFT_X); - DensityFunction densityFunction3 = getFunction(densityFunctions, SHIFT_Z); - DensityFunction densityFunction4 = DensityFunctions.shiftedNoise2d(densityFunction2, densityFunction3, 0.25, noiseParameters.getOrThrow(Noises.TEMPERATURE)); - DensityFunction densityFunction5 = DensityFunctions.shiftedNoise2d(densityFunction2, densityFunction3, 0.25, noiseParameters.getOrThrow(Noises.VEGETATION)); - DensityFunction densityFunction6 = postProcess(densityFunction); + DensityFunction densityFunction = getFunction(densityFunctions, SHIFT_X); + DensityFunction densityFunction2 = getFunction(densityFunctions, SHIFT_Z); + DensityFunction densityFunction3 = DensityFunctions.shiftedNoise2d(densityFunction, densityFunction2, 0.25, noiseParameters.getOrThrow(Noises.TEMPERATURE)); + DensityFunction densityFunction4 = DensityFunctions.shiftedNoise2d(densityFunction, densityFunction2, 0.25, noiseParameters.getOrThrow(Noises.VEGETATION)); + DensityFunction densityFunction5 = postProcess(postProccessor); return new NoiseRouter( DensityFunctions.zero(), DensityFunctions.zero(), DensityFunctions.zero(), DensityFunctions.zero(), + densityFunction3, densityFunction4, + DensityFunctions.zero(), + DensityFunctions.zero(), + DensityFunctions.zero(), + DensityFunctions.zero(), + DensityFunctions.zero(), densityFunction5, DensityFunctions.zero(), DensityFunctions.zero(), - DensityFunctions.zero(), - DensityFunctions.zero(), - DensityFunctions.zero(), - densityFunction6, - DensityFunctions.zero(), - DensityFunctions.zero(), DensityFunctions.zero() ); } @@ -389,23 +393,23 @@ public class NoiseRouterData { return slide(densityFunction, -64, 384, amplified ? 16 : 80, amplified ? 0 : 64, -0.078125, 0, 24, amplified ? 0.4 : 0.1171875); } - private static DensityFunction slideNetherLike(HolderGetter densityFunctions, int minY, int maxY) { - return slide(getFunction(densityFunctions, BASE_3D_NOISE_NETHER), minY, maxY, 24, 0, 0.9375, -8, 24, 2.5); + private static DensityFunction slideNetherLike(HolderGetter densityFunctions, int minY, int height) { + return slide(getFunction(densityFunctions, BASE_3D_NOISE_NETHER), minY, height, 24, 0, 0.9375, -8, 24, 2.5); } - private static DensityFunction slideEndLike(DensityFunction densityFunction, int minY, int maxY) { - return slide(densityFunction, minY, maxY, 72, -184, -23.4375, 4, 32, -0.234375); + private static DensityFunction slideEndLike(DensityFunction densityFunction, int minY, int height) { + return slide(densityFunction, minY, height, 72, -184, -23.4375, 4, 32, -0.234375); } - protected static NoiseRouter nether(HolderGetter densityFunctions, HolderGetter noiseParameters) { + protected static NoiseRouter nether(HolderGetter densityFunctions, HolderGetter noiseParameters) { return noNewCaves(densityFunctions, noiseParameters, slideNetherLike(densityFunctions, 0, 128)); } - protected static NoiseRouter caves(HolderGetter densityFunctions, HolderGetter noiseParameters) { + protected static NoiseRouter caves(HolderGetter densityFunctions, HolderGetter noiseParameters) { return noNewCaves(densityFunctions, noiseParameters, slideNetherLike(densityFunctions, -64, 192)); } - protected static NoiseRouter floatingIslands(HolderGetter densityFunction, HolderGetter noiseParameters) { + protected static NoiseRouter floatingIslands(HolderGetter densityFunction, HolderGetter noiseParameters) { return noNewCaves(densityFunction, noiseParameters, slideEndLike(getFunction(densityFunction, BASE_3D_NOISE_END), 0, 256)); } @@ -469,11 +473,21 @@ public class NoiseRouterData { return DensityFunctions.interpolated(DensityFunctions.rangeChoice(input, minY, maxY + 1, whenInRange, DensityFunctions.constant(whenOutOfRange))); } - private static DensityFunction slide(DensityFunction input, int minY, int maxY, int i, int j, double d, int k, int l, double e) { - DensityFunction densityFunction2 = DensityFunctions.yClampedGradient(minY + maxY - i, minY + maxY - j, 1.0, 0.0); - DensityFunction densityFunction = DensityFunctions.lerp(densityFunction2, d, input); - DensityFunction densityFunction3 = DensityFunctions.yClampedGradient(minY + k, minY + l, 0.0, 1.0); - return DensityFunctions.lerp(densityFunction3, e, densityFunction); + private static DensityFunction slide( + DensityFunction input, + int minY, + int height, + int topStartOffset, + int topEndOffset, + double topDelta, + int bottomStartOffset, + int bottomEndOffset, + double bottomDelta + ) { + DensityFunction densityFunction2 = DensityFunctions.yClampedGradient(minY + height - topStartOffset, minY + height - topEndOffset, 1.0, 0.0); + DensityFunction densityFunction = DensityFunctions.lerp(densityFunction2, topDelta, input); + DensityFunction densityFunction3 = DensityFunctions.yClampedGradient(minY + bottomStartOffset, minY + bottomEndOffset, 0.0, 1.0); + return DensityFunctions.lerp(densityFunction3, bottomDelta, densityFunction); } protected static final class QuantizedSpaghettiRarity { diff --git a/net/minecraft/world/level/levelgen/SurfaceRules.java b/net/minecraft/world/level/levelgen/SurfaceRules.java index ecc26697..b67ba493 100644 --- a/net/minecraft/world/level/levelgen/SurfaceRules.java +++ b/net/minecraft/world/level/levelgen/SurfaceRules.java @@ -289,7 +289,7 @@ public class SurfaceRules { ChunkAccess chunk, NoiseChunk noiseChunk, Function> biomeGetter, - Registry registry, + Registry biomeRegistry, WorldGenerationContext context ) { this.system = system; diff --git a/net/minecraft/world/level/levelgen/WorldDimensions.java b/net/minecraft/world/level/levelgen/WorldDimensions.java index 8df44658..b2a7d6b9 100644 --- a/net/minecraft/world/level/levelgen/WorldDimensions.java +++ b/net/minecraft/world/level/levelgen/WorldDimensions.java @@ -21,6 +21,7 @@ import net.minecraft.core.RegistrationInfo; import net.minecraft.core.Registry; import net.minecraft.core.RegistryAccess; import net.minecraft.core.WritableRegistry; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceKey; import net.minecraft.world.level.Level; @@ -31,7 +32,7 @@ import net.minecraft.world.level.chunk.ChunkGenerator; import net.minecraft.world.level.dimension.BuiltinDimensionTypes; import net.minecraft.world.level.dimension.DimensionType; import net.minecraft.world.level.dimension.LevelStem; -import net.minecraft.world.level.storage.PrimaryLevelData; +import net.minecraft.world.level.storage.PrimaryLevelData.SpecialWorldProperty; public record WorldDimensions(Map, LevelStem> dimensions) { public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( @@ -53,25 +54,27 @@ public record WorldDimensions(Map, LevelStem> dimensions) } public WorldDimensions(Registry stemRegistry) { - this((Map, LevelStem>)stemRegistry.listElements().collect(Collectors.toMap(Holder.Reference::key, Holder.Reference::value))); + this((Map, LevelStem>)stemRegistry.listElements().collect(Collectors.toMap(Reference::key, Reference::value))); } public static Stream> keysInOrder(Stream> stemKeys) { return Stream.concat(BUILTIN_ORDER.stream(), stemKeys.filter(resourceKey -> !BUILTIN_ORDER.contains(resourceKey))); } - public WorldDimensions replaceOverworldGenerator(HolderLookup.Provider provider, ChunkGenerator chunkGenerator) { - HolderLookup holderLookup = provider.lookupOrThrow(Registries.DIMENSION_TYPE); + public WorldDimensions replaceOverworldGenerator(HolderLookup.Provider registries, ChunkGenerator chunkGenerator) { + HolderLookup holderLookup = registries.lookupOrThrow(Registries.DIMENSION_TYPE); Map, LevelStem> map = withOverworld(holderLookup, this.dimensions, chunkGenerator); return new WorldDimensions(map); } public static Map, LevelStem> withOverworld( - HolderLookup holderLookup, Map, LevelStem> map, ChunkGenerator chunkGenerator + HolderLookup dimensionTypeRegistry, Map, LevelStem> dimensions, ChunkGenerator chunkGenerator ) { - LevelStem levelStem = (LevelStem)map.get(LevelStem.OVERWORLD); - Holder holder = (Holder)(levelStem == null ? holderLookup.getOrThrow(BuiltinDimensionTypes.OVERWORLD) : levelStem.type()); - return withOverworld(map, holder, chunkGenerator); + LevelStem levelStem = (LevelStem)dimensions.get(LevelStem.OVERWORLD); + Holder holder = (Holder)(levelStem == null + ? dimensionTypeRegistry.getOrThrow(BuiltinDimensionTypes.OVERWORLD) + : levelStem.type()); + return withOverworld(dimensions, holder, chunkGenerator); } public static Map, LevelStem> withOverworld( @@ -104,15 +107,15 @@ public record WorldDimensions(Map, LevelStem> dimensions) return this.overworld() instanceof DebugLevelSource; } - private static PrimaryLevelData.SpecialWorldProperty specialWorldProperty(Registry stemRegistry) { - return (PrimaryLevelData.SpecialWorldProperty)stemRegistry.getOptional(LevelStem.OVERWORLD).map(levelStem -> { + private static SpecialWorldProperty specialWorldProperty(Registry stemRegistry) { + return (SpecialWorldProperty)stemRegistry.getOptional(LevelStem.OVERWORLD).map(levelStem -> { ChunkGenerator chunkGenerator = levelStem.generator(); if (chunkGenerator instanceof DebugLevelSource) { - return PrimaryLevelData.SpecialWorldProperty.DEBUG; + return SpecialWorldProperty.DEBUG; } else { - return chunkGenerator instanceof FlatLevelSource ? PrimaryLevelData.SpecialWorldProperty.FLAT : PrimaryLevelData.SpecialWorldProperty.NONE; + return chunkGenerator instanceof FlatLevelSource ? SpecialWorldProperty.FLAT : SpecialWorldProperty.NONE; } - }).orElse(PrimaryLevelData.SpecialWorldProperty.NONE); + }).orElse(SpecialWorldProperty.NONE); } static Lifecycle checkStability(ResourceKey key, LevelStem stem) { @@ -175,11 +178,11 @@ public record WorldDimensions(Map, LevelStem> dimensions) WritableRegistry writableRegistry = new MappedRegistry<>(Registries.LEVEL_STEM, lifecycle); list.forEach(arg -> writableRegistry.register(arg.key, arg.value, arg.registrationInfo())); Registry registry = writableRegistry.freeze(); - PrimaryLevelData.SpecialWorldProperty specialWorldProperty = specialWorldProperty(registry); + SpecialWorldProperty specialWorldProperty = specialWorldProperty(registry); return new WorldDimensions.Complete(registry.freeze(), specialWorldProperty); } - public record Complete(Registry dimensions, PrimaryLevelData.SpecialWorldProperty specialWorldProperty) { + public record Complete(Registry dimensions, SpecialWorldProperty specialWorldProperty) { public Lifecycle lifecycle() { return this.dimensions.registryLifecycle(); } diff --git a/net/minecraft/world/level/levelgen/feature/AbstractHugeMushroomFeature.java b/net/minecraft/world/level/levelgen/feature/AbstractHugeMushroomFeature.java index 9e280b0f..00a1c8ab 100644 --- a/net/minecraft/world/level/levelgen/feature/AbstractHugeMushroomFeature.java +++ b/net/minecraft/world/level/levelgen/feature/AbstractHugeMushroomFeature.java @@ -81,7 +81,7 @@ public abstract class AbstractHugeMushroomFeature extends Feature= height - 3) { - j = foliageRadius; + i = foliageRadius; } else if (y == height) { - j = foliageRadius; + i = foliageRadius; } - return j; + return i; } } diff --git a/net/minecraft/world/level/levelgen/feature/treedecorators/CreakingHeartDecorator.java b/net/minecraft/world/level/levelgen/feature/treedecorators/CreakingHeartDecorator.java index 00ef26f4..17867b8d 100644 --- a/net/minecraft/world/level/levelgen/feature/treedecorators/CreakingHeartDecorator.java +++ b/net/minecraft/world/level/levelgen/feature/treedecorators/CreakingHeartDecorator.java @@ -19,8 +19,8 @@ public class CreakingHeartDecorator extends TreeDecorator { .xmap(CreakingHeartDecorator::new, creakingHeartDecorator -> creakingHeartDecorator.probability); private final float probability; - public CreakingHeartDecorator(float f) { - this.probability = f; + public CreakingHeartDecorator(float probability) { + this.probability = probability; } @Override diff --git a/net/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java b/net/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java index 652959b1..08375619 100644 --- a/net/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java +++ b/net/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java @@ -35,10 +35,10 @@ public class PaleMossDecorator extends TreeDecorator { return TreeDecoratorType.PALE_MOSS; } - public PaleMossDecorator(float f, float g, float h) { - this.leavesProbability = f; - this.trunkProbability = g; - this.groundProbability = h; + public PaleMossDecorator(float leavesProbability, float trunkProbability, float groundProbability) { + this.leavesProbability = leavesProbability; + this.trunkProbability = trunkProbability; + this.groundProbability = groundProbability; } @Override @@ -90,12 +90,12 @@ public class PaleMossDecorator extends TreeDecorator { } } - private static void addMossHanger(BlockPos blockPos, TreeDecorator.Context context) { - while (context.isAir(blockPos.below()) && !(context.random().nextFloat() < 0.5)) { - context.setBlock(blockPos, Blocks.PALE_HANGING_MOSS.defaultBlockState().setValue(HangingMossBlock.TIP, false)); - blockPos = blockPos.below(); + private static void addMossHanger(BlockPos pos, TreeDecorator.Context context) { + while (context.isAir(pos.below()) && !(context.random().nextFloat() < 0.5)) { + context.setBlock(pos, Blocks.PALE_HANGING_MOSS.defaultBlockState().setValue(HangingMossBlock.TIP, false)); + pos = pos.below(); } - context.setBlock(blockPos, Blocks.PALE_HANGING_MOSS.defaultBlockState().setValue(HangingMossBlock.TIP, true)); + context.setBlock(pos, Blocks.PALE_HANGING_MOSS.defaultBlockState().setValue(HangingMossBlock.TIP, true)); } } diff --git a/net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java b/net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java index cc9bec22..d8291074 100644 --- a/net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java +++ b/net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java @@ -62,8 +62,8 @@ public abstract class TreeDecorator { return this.level.isStateAtPosition(pos, BlockBehaviour.BlockStateBase::isAir); } - public boolean checkBlock(BlockPos blockPos, Predicate predicate) { - return this.level.isStateAtPosition(blockPos, predicate); + public boolean checkBlock(BlockPos pos, Predicate predicate) { + return this.level.isStateAtPosition(pos, predicate); } public LevelSimulatedReader level() { diff --git a/net/minecraft/world/level/levelgen/presets/WorldPresets.java b/net/minecraft/world/level/levelgen/presets/WorldPresets.java index c84e7ad1..99e31b9f 100644 --- a/net/minecraft/world/level/levelgen/presets/WorldPresets.java +++ b/net/minecraft/world/level/levelgen/presets/WorldPresets.java @@ -5,6 +5,7 @@ import java.util.Optional; import net.minecraft.core.Holder; import net.minecraft.core.HolderGetter; import net.minecraft.core.HolderLookup; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstrapContext; import net.minecraft.resources.ResourceKey; @@ -57,16 +58,16 @@ public class WorldPresets { }); } - public static WorldDimensions createNormalWorldDimensions(HolderLookup.Provider provider) { - return provider.lookupOrThrow(Registries.WORLD_PRESET).getOrThrow(NORMAL).value().createWorldDimensions(); + public static WorldDimensions createNormalWorldDimensions(HolderLookup.Provider registries) { + return registries.lookupOrThrow(Registries.WORLD_PRESET).getOrThrow(NORMAL).value().createWorldDimensions(); } - public static LevelStem getNormalOverworld(HolderLookup.Provider provider) { - return (LevelStem)provider.lookupOrThrow(Registries.WORLD_PRESET).getOrThrow(NORMAL).value().overworld().orElseThrow(); + public static LevelStem getNormalOverworld(HolderLookup.Provider registries) { + return (LevelStem)registries.lookupOrThrow(Registries.WORLD_PRESET).getOrThrow(NORMAL).value().overworld().orElseThrow(); } - public static WorldDimensions createFlatWorldDimensions(HolderLookup.Provider provider) { - return provider.lookupOrThrow(Registries.WORLD_PRESET).getOrThrow(FLAT).value().createWorldDimensions(); + public static WorldDimensions createFlatWorldDimensions(HolderLookup.Provider registries) { + return registries.lookupOrThrow(Registries.WORLD_PRESET).getOrThrow(FLAT).value().createWorldDimensions(); } static class Bootstrap { @@ -91,8 +92,7 @@ public class WorldPresets { this.overworldDimensionType = holderGetter.getOrThrow(BuiltinDimensionTypes.OVERWORLD); Holder holder = holderGetter.getOrThrow(BuiltinDimensionTypes.NETHER); Holder holder2 = this.noiseSettings.getOrThrow(NoiseGeneratorSettings.NETHER); - Holder.Reference reference = this.multiNoiseBiomeSourceParameterLists - .getOrThrow(MultiNoiseBiomeSourceParameterLists.NETHER); + Reference reference = this.multiNoiseBiomeSourceParameterLists.getOrThrow(MultiNoiseBiomeSourceParameterLists.NETHER); this.netherStem = new LevelStem(holder, new NoiseBasedChunkGenerator(MultiNoiseBiomeSource.createFromPreset(reference), holder2)); Holder holder3 = holderGetter.getOrThrow(BuiltinDimensionTypes.END); Holder holder4 = this.noiseSettings.getOrThrow(NoiseGeneratorSettings.END); @@ -125,11 +125,10 @@ public class WorldPresets { } public void bootstrap() { - Holder.Reference reference = this.multiNoiseBiomeSourceParameterLists - .getOrThrow(MultiNoiseBiomeSourceParameterLists.OVERWORLD); + Reference reference = this.multiNoiseBiomeSourceParameterLists.getOrThrow(MultiNoiseBiomeSourceParameterLists.OVERWORLD); this.registerOverworlds(MultiNoiseBiomeSource.createFromPreset(reference)); Holder holder = this.noiseSettings.getOrThrow(NoiseGeneratorSettings.OVERWORLD); - Holder.Reference reference2 = this.biomes.getOrThrow(Biomes.PLAINS); + Reference reference2 = this.biomes.getOrThrow(Biomes.PLAINS); this.registerCustomOverworldPreset(WorldPresets.SINGLE_BIOME_SURFACE, this.makeNoiseBasedOverworld(new FixedBiomeSource(reference2), holder)); this.registerCustomOverworldPreset( WorldPresets.FLAT, this.makeOverworld(new FlatLevelSource(FlatLevelGeneratorSettings.getDefault(this.biomes, this.structureSets, this.placedFeatures))) diff --git a/net/minecraft/world/level/levelgen/structure/pools/JigsawPlacement.java b/net/minecraft/world/level/levelgen/structure/pools/JigsawPlacement.java index 3064e56d..c89da75d 100644 --- a/net/minecraft/world/level/levelgen/structure/pools/JigsawPlacement.java +++ b/net/minecraft/world/level/levelgen/structure/pools/JigsawPlacement.java @@ -436,8 +436,8 @@ public class JigsawPlacement { } } - private static ResourceKey readPoolKey(StructureTemplate.JigsawBlockInfo jigsawBlockInfo, PoolAliasLookup poolAliasLookup) { - return poolAliasLookup.lookup(Pools.createKey(jigsawBlockInfo.pool())); + private static ResourceKey readPoolKey(StructureTemplate.JigsawBlockInfo jigsawBlockInfo, PoolAliasLookup aliasLookup) { + return aliasLookup.lookup(Pools.createKey(jigsawBlockInfo.pool())); } } } diff --git a/net/minecraft/world/level/levelgen/structure/structures/MineshaftStructure.java b/net/minecraft/world/level/levelgen/structure/structures/MineshaftStructure.java index 85fdeaea..6326a52d 100644 --- a/net/minecraft/world/level/levelgen/structure/structures/MineshaftStructure.java +++ b/net/minecraft/world/level/levelgen/structure/structures/MineshaftStructure.java @@ -24,6 +24,7 @@ import net.minecraft.world.level.levelgen.structure.Structure.GenerationContext; import net.minecraft.world.level.levelgen.structure.Structure.GenerationStub; import net.minecraft.world.level.levelgen.structure.Structure.StructureSettings; import net.minecraft.world.level.levelgen.structure.pieces.StructurePiecesBuilder; +import net.minecraft.world.level.levelgen.structure.structures.MineshaftPieces.MineShaftRoom; public class MineshaftStructure extends Structure { public static final MapCodec CODEC = RecordCodecBuilder.mapCodec( @@ -53,7 +54,7 @@ public class MineshaftStructure extends Structure { ChunkPos chunkPos = context.chunkPos(); WorldgenRandom worldgenRandom = context.random(); ChunkGenerator chunkGenerator = context.chunkGenerator(); - MineshaftPieces.MineShaftRoom mineShaftRoom = new MineshaftPieces.MineShaftRoom(0, worldgenRandom, chunkPos.getBlockX(2), chunkPos.getBlockZ(2), this.type); + MineShaftRoom mineShaftRoom = new MineShaftRoom(0, worldgenRandom, chunkPos.getBlockX(2), chunkPos.getBlockZ(2), this.type); builder.addPiece(mineShaftRoom); mineShaftRoom.addChildren(mineShaftRoom, builder, worldgenRandom); int i = chunkGenerator.getSeaLevel(); diff --git a/net/minecraft/world/level/levelgen/structure/structures/RuinedPortalStructure.java b/net/minecraft/world/level/levelgen/structure/structures/RuinedPortalStructure.java index 08b079e4..553e5eab 100644 --- a/net/minecraft/world/level/levelgen/structure/structures/RuinedPortalStructure.java +++ b/net/minecraft/world/level/levelgen/structure/structures/RuinedPortalStructure.java @@ -161,8 +161,8 @@ public class RuinedPortalStructure extends Structure { } } - private static boolean isCold(BlockPos blockPos, Holder holder, int i) { - return holder.value().coldEnoughToSnow(blockPos, i); + private static boolean isCold(BlockPos pos, Holder biome, int seaLevel) { + return biome.value().coldEnoughToSnow(pos, seaLevel); } private static int findSuitableY( diff --git a/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java index f8107f8d..9bae8741 100644 --- a/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java +++ b/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java @@ -178,12 +178,12 @@ public class StructureTemplate { return this.filterBlocks(pos, settings, block, true); } - public List getJigsaws(BlockPos blockPos, Rotation rotation) { + public List getJigsaws(BlockPos pos, Rotation rotation) { if (this.palettes.isEmpty()) { return new ArrayList(); } else { StructurePlaceSettings structurePlaceSettings = new StructurePlaceSettings().setRotation(rotation); - List list = structurePlaceSettings.getRandomPalette(this.palettes, blockPos).jigsaws(); + List list = structurePlaceSettings.getRandomPalette(this.palettes, pos).jigsaws(); List list2 = new ArrayList(list.size()); for (StructureTemplate.JigsawBlockInfo jigsawBlockInfo : list) { @@ -191,7 +191,7 @@ public class StructureTemplate { list2.add( jigsawBlockInfo.withInfo( new StructureTemplate.StructureBlockInfo( - calculateRelativePosition(structurePlaceSettings, structureBlockInfo.pos()).offset(blockPos), + calculateRelativePosition(structurePlaceSettings, structureBlockInfo.pos()).offset(pos), structureBlockInfo.state.rotate(structurePlaceSettings.getRotation()), structureBlockInfo.nbt ) @@ -740,13 +740,11 @@ public class StructureTemplate { return listTag; } - public static JigsawBlockEntity.JointType getJointType(CompoundTag compoundTag, BlockState blockState) { + public static JigsawBlockEntity.JointType getJointType(CompoundTag tag, BlockState state) { return (JigsawBlockEntity.JointType)JigsawBlockEntity.JointType.CODEC .byName( - compoundTag.getString("joint"), - (Supplier)(() -> JigsawBlock.getFrontFacing(blockState).getAxis().isHorizontal() - ? JigsawBlockEntity.JointType.ALIGNED - : JigsawBlockEntity.JointType.ROLLABLE) + tag.getString("joint"), + (Supplier)(() -> JigsawBlock.getFrontFacing(state).getAxis().isHorizontal() ? JigsawBlockEntity.JointType.ALIGNED : JigsawBlockEntity.JointType.ROLLABLE) ); } @@ -788,10 +786,8 @@ public class StructureTemplate { ); } - public StructureTemplate.JigsawBlockInfo withInfo(StructureTemplate.StructureBlockInfo structureBlockInfo) { - return new StructureTemplate.JigsawBlockInfo( - structureBlockInfo, this.jointType, this.name, this.pool, this.target, this.placementPriority, this.selectionPriority - ); + public StructureTemplate.JigsawBlockInfo withInfo(StructureTemplate.StructureBlockInfo info) { + return new StructureTemplate.JigsawBlockInfo(info, this.jointType, this.name, this.pool, this.target, this.placementPriority, this.selectionPriority); } } diff --git a/net/minecraft/world/level/lighting/ChunkSkyLightSources.java b/net/minecraft/world/level/lighting/ChunkSkyLightSources.java index c1c735b3..b24ba809 100644 --- a/net/minecraft/world/level/lighting/ChunkSkyLightSources.java +++ b/net/minecraft/world/level/lighting/ChunkSkyLightSources.java @@ -129,12 +129,12 @@ public class ChunkSkyLightSources { return this.minY; } - private static boolean isEdgeOccluded(BlockState blockState, BlockState blockState2) { - if (blockState2.getLightBlock() != 0) { + private static boolean isEdgeOccluded(BlockState state1, BlockState state2) { + if (state2.getLightBlock() != 0) { return true; } else { - VoxelShape voxelShape = LightEngine.getOcclusionShape(blockState, Direction.DOWN); - VoxelShape voxelShape2 = LightEngine.getOcclusionShape(blockState2, Direction.UP); + VoxelShape voxelShape = LightEngine.getOcclusionShape(state1, Direction.DOWN); + VoxelShape voxelShape2 = LightEngine.getOcclusionShape(state2, Direction.UP); return Shapes.faceShapeOccludes(voxelShape, voxelShape2); } } diff --git a/net/minecraft/world/level/lighting/LayerLightSectionStorage.java b/net/minecraft/world/level/lighting/LayerLightSectionStorage.java index b778fc79..df255843 100644 --- a/net/minecraft/world/level/lighting/LayerLightSectionStorage.java +++ b/net/minecraft/world/level/lighting/LayerLightSectionStorage.java @@ -202,8 +202,8 @@ public abstract class LayerLightSectionStorage> return this.columnsWithSources.contains(l); } - protected boolean lightOnInColumn(long l) { - return this.columnsWithSources.contains(l); + protected boolean lightOnInColumn(long columnPos) { + return this.columnsWithSources.contains(columnPos); } public void retainData(long sectionColumnPos, boolean retain) { diff --git a/net/minecraft/world/level/lighting/LevelLightEngine.java b/net/minecraft/world/level/lighting/LevelLightEngine.java index 78c44eee..73877a69 100644 --- a/net/minecraft/world/level/lighting/LevelLightEngine.java +++ b/net/minecraft/world/level/lighting/LevelLightEngine.java @@ -152,8 +152,9 @@ public class LevelLightEngine implements LightEventListener { return Math.max(j, i); } - public boolean lightOnInColumn(long l) { - return this.blockEngine == null || this.blockEngine.storage.lightOnInColumn(l) && (this.skyEngine == null || this.skyEngine.storage.lightOnInColumn(l)); + public boolean lightOnInColumn(long columnPos) { + return this.blockEngine == null + || this.blockEngine.storage.lightOnInColumn(columnPos) && (this.skyEngine == null || this.skyEngine.storage.lightOnInColumn(columnPos)); } public int getLightSectionCount() { diff --git a/net/minecraft/world/level/lighting/LightEngine.java b/net/minecraft/world/level/lighting/LightEngine.java index b04ecccf..d1b43e84 100644 --- a/net/minecraft/world/level/lighting/LightEngine.java +++ b/net/minecraft/world/level/lighting/LightEngine.java @@ -38,29 +38,29 @@ public abstract class LightEngine, S extends La this.clearChunkCache(); } - public static boolean hasDifferentLightProperties(BlockState blockState, BlockState blockState2) { - return blockState2 == blockState + public static boolean hasDifferentLightProperties(BlockState state1, BlockState state2) { + return state2 == state1 ? false - : blockState2.getLightBlock() != blockState.getLightBlock() - || blockState2.getLightEmission() != blockState.getLightEmission() - || blockState2.useShapeForLightOcclusion() - || blockState.useShapeForLightOcclusion(); + : state2.getLightBlock() != state1.getLightBlock() + || state2.getLightEmission() != state1.getLightEmission() + || state2.useShapeForLightOcclusion() + || state1.useShapeForLightOcclusion(); } - public static int getLightBlockInto(BlockState blockState, BlockState blockState2, Direction direction, int i) { - boolean bl = isEmptyShape(blockState); - boolean bl2 = isEmptyShape(blockState2); + public static int getLightBlockInto(BlockState state1, BlockState state2, Direction direction, int defaultReturnValue) { + boolean bl = isEmptyShape(state1); + boolean bl2 = isEmptyShape(state2); if (bl && bl2) { - return i; + return defaultReturnValue; } else { - VoxelShape voxelShape = bl ? Shapes.empty() : blockState.getOcclusionShape(); - VoxelShape voxelShape2 = bl2 ? Shapes.empty() : blockState2.getOcclusionShape(); - return Shapes.mergedFaceOccludes(voxelShape, voxelShape2, direction) ? 16 : i; + VoxelShape voxelShape = bl ? Shapes.empty() : state1.getOcclusionShape(); + VoxelShape voxelShape2 = bl2 ? Shapes.empty() : state2.getOcclusionShape(); + return Shapes.mergedFaceOccludes(voxelShape, voxelShape2, direction) ? 16 : defaultReturnValue; } } - public static VoxelShape getOcclusionShape(BlockState blockState, Direction direction) { - return isEmptyShape(blockState) ? Shapes.empty() : blockState.getFaceOcclusionShape(direction); + public static VoxelShape getOcclusionShape(BlockState state, Direction direction) { + return isEmptyShape(state) ? Shapes.empty() : state.getFaceOcclusionShape(direction); } protected static boolean isEmptyShape(BlockState state) { @@ -74,13 +74,13 @@ public abstract class LightEngine, S extends La return lightChunk == null ? Blocks.BEDROCK.defaultBlockState() : lightChunk.getBlockState(pos); } - protected int getOpacity(BlockState blockState) { - return Math.max(1, blockState.getLightBlock()); + protected int getOpacity(BlockState state) { + return Math.max(1, state.getLightBlock()); } - protected boolean shapeOccludes(BlockState blockState, BlockState blockState2, Direction direction) { - VoxelShape voxelShape = getOcclusionShape(blockState, direction); - VoxelShape voxelShape2 = getOcclusionShape(blockState2, direction.getOpposite()); + protected boolean shapeOccludes(BlockState state1, BlockState state2, Direction direction) { + VoxelShape voxelShape = getOcclusionShape(state1, direction); + VoxelShape voxelShape2 = getOcclusionShape(state2, direction.getOpposite()); return Shapes.faceShapeOccludes(voxelShape, voxelShape2); } diff --git a/net/minecraft/world/level/material/FlowingFluid.java b/net/minecraft/world/level/material/FlowingFluid.java index ad02e4d1..a6f8104d 100644 --- a/net/minecraft/world/level/material/FlowingFluid.java +++ b/net/minecraft/world/level/material/FlowingFluid.java @@ -24,7 +24,7 @@ import net.minecraft.world.level.block.DoorBlock; import net.minecraft.world.level.block.IceBlock; import net.minecraft.world.level.block.LiquidBlockContainer; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.IntegerProperty; @@ -52,7 +52,7 @@ public abstract class FlowingFluid extends Fluid { private final Map shapes = Maps.newIdentityHashMap(); @Override - protected void createFluidStateDefinition(StateDefinition.Builder builder) { + protected void createFluidStateDefinition(Builder builder) { builder.add(FALLING); } @@ -120,58 +120,58 @@ public abstract class FlowingFluid extends Fluid { } } - protected void spread(ServerLevel serverLevel, BlockPos blockPos, BlockState blockState, FluidState fluidState) { + protected void spread(ServerLevel level, BlockPos pos, BlockState blockState, FluidState fluidState) { if (!fluidState.isEmpty()) { - BlockPos blockPos2 = blockPos.below(); - BlockState blockState2 = serverLevel.getBlockState(blockPos2); + BlockPos blockPos = pos.below(); + BlockState blockState2 = level.getBlockState(blockPos); FluidState fluidState2 = blockState2.getFluidState(); - if (this.canMaybePassThrough(serverLevel, blockPos, blockState, Direction.DOWN, blockPos2, blockState2, fluidState2)) { - FluidState fluidState3 = this.getNewLiquid(serverLevel, blockPos2, blockState2); + if (this.canMaybePassThrough(level, pos, blockState, Direction.DOWN, blockPos, blockState2, fluidState2)) { + FluidState fluidState3 = this.getNewLiquid(level, blockPos, blockState2); Fluid fluid = fluidState3.getType(); - if (fluidState2.canBeReplacedWith(serverLevel, blockPos2, fluid, Direction.DOWN) && canHoldSpecificFluid(serverLevel, blockPos2, blockState2, fluid)) { - this.spreadTo(serverLevel, blockPos2, blockState2, Direction.DOWN, fluidState3); - if (this.sourceNeighborCount(serverLevel, blockPos) >= 3) { - this.spreadToSides(serverLevel, blockPos, fluidState, blockState); + if (fluidState2.canBeReplacedWith(level, blockPos, fluid, Direction.DOWN) && canHoldSpecificFluid(level, blockPos, blockState2, fluid)) { + this.spreadTo(level, blockPos, blockState2, Direction.DOWN, fluidState3); + if (this.sourceNeighborCount(level, pos) >= 3) { + this.spreadToSides(level, pos, fluidState, blockState); } return; } } - if (fluidState.isSource() || !this.isWaterHole(serverLevel, blockPos, blockState, blockPos2, blockState2)) { - this.spreadToSides(serverLevel, blockPos, fluidState, blockState); + if (fluidState.isSource() || !this.isWaterHole(level, pos, blockState, blockPos, blockState2)) { + this.spreadToSides(level, pos, fluidState, blockState); } } } - private void spreadToSides(ServerLevel serverLevel, BlockPos blockPos, FluidState fluidState, BlockState blockState) { - int i = fluidState.getAmount() - this.getDropOff(serverLevel); + private void spreadToSides(ServerLevel level, BlockPos pos, FluidState fluidState, BlockState blockState) { + int i = fluidState.getAmount() - this.getDropOff(level); if ((Boolean)fluidState.getValue(FALLING)) { i = 7; } if (i > 0) { - Map map = this.getSpread(serverLevel, blockPos, blockState); + Map map = this.getSpread(level, pos, blockState); for (Entry entry : map.entrySet()) { Direction direction = (Direction)entry.getKey(); FluidState fluidState2 = (FluidState)entry.getValue(); - BlockPos blockPos2 = blockPos.relative(direction); - this.spreadTo(serverLevel, blockPos2, serverLevel.getBlockState(blockPos2), direction, fluidState2); + BlockPos blockPos = pos.relative(direction); + this.spreadTo(level, blockPos, level.getBlockState(blockPos), direction, fluidState2); } } } - protected FluidState getNewLiquid(ServerLevel serverLevel, BlockPos blockPos, BlockState blockState) { + protected FluidState getNewLiquid(ServerLevel level, BlockPos pos, BlockState state) { int i = 0; int j = 0; BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); for (Direction direction : Direction.Plane.HORIZONTAL) { - BlockPos blockPos2 = mutableBlockPos.setWithOffset(blockPos, direction); - BlockState blockState2 = serverLevel.getBlockState(blockPos2); - FluidState fluidState = blockState2.getFluidState(); - if (fluidState.getType().isSame(this) && canPassThroughWall(direction, serverLevel, blockPos, blockState, blockPos2, blockState2)) { + BlockPos blockPos = mutableBlockPos.setWithOffset(pos, direction); + BlockState blockState = level.getBlockState(blockPos); + FluidState fluidState = blockState.getFluidState(); + if (fluidState.getType().isSame(this) && canPassThroughWall(direction, level, pos, state, blockPos, blockState)) { if (fluidState.isSource()) { j++; } @@ -180,40 +180,38 @@ public abstract class FlowingFluid extends Fluid { } } - if (j >= 2 && this.canConvertToSource(serverLevel)) { - BlockState blockState3 = serverLevel.getBlockState(mutableBlockPos.setWithOffset(blockPos, Direction.DOWN)); - FluidState fluidState2 = blockState3.getFluidState(); - if (blockState3.isSolid() || this.isSourceBlockOfThisType(fluidState2)) { + if (j >= 2 && this.canConvertToSource(level)) { + BlockState blockState2 = level.getBlockState(mutableBlockPos.setWithOffset(pos, Direction.DOWN)); + FluidState fluidState2 = blockState2.getFluidState(); + if (blockState2.isSolid() || this.isSourceBlockOfThisType(fluidState2)) { return this.getSource(false); } } - BlockPos blockPos3 = mutableBlockPos.setWithOffset(blockPos, Direction.UP); - BlockState blockState4 = serverLevel.getBlockState(blockPos3); - FluidState fluidState3 = blockState4.getFluidState(); - if (!fluidState3.isEmpty() - && fluidState3.getType().isSame(this) - && canPassThroughWall(Direction.UP, serverLevel, blockPos, blockState, blockPos3, blockState4)) { + BlockPos blockPos2 = mutableBlockPos.setWithOffset(pos, Direction.UP); + BlockState blockState3 = level.getBlockState(blockPos2); + FluidState fluidState3 = blockState3.getFluidState(); + if (!fluidState3.isEmpty() && fluidState3.getType().isSame(this) && canPassThroughWall(Direction.UP, level, pos, state, blockPos2, blockState3)) { return this.getFlowing(8, true); } else { - int k = i - this.getDropOff(serverLevel); + int k = i - this.getDropOff(level); return k <= 0 ? Fluids.EMPTY.defaultFluidState() : this.getFlowing(k, false); } } - private static boolean canPassThroughWall(Direction direction2, BlockGetter direction, BlockPos level, BlockState pos, BlockPos state, BlockState spreadPos) { - VoxelShape voxelShape = spreadPos.getCollisionShape(direction, state); + private static boolean canPassThroughWall(Direction direction, BlockGetter level, BlockPos pos, BlockState state, BlockPos spreadPos, BlockState spreadState) { + VoxelShape voxelShape = spreadState.getCollisionShape(level, spreadPos); if (voxelShape == Shapes.block()) { return false; } else { - VoxelShape voxelShape2 = pos.getCollisionShape(direction, level); + VoxelShape voxelShape2 = state.getCollisionShape(level, pos); if (voxelShape2 == Shapes.block()) { return false; } else if (voxelShape2 == Shapes.empty() && voxelShape == Shapes.empty()) { return true; } else { Object2ByteLinkedOpenHashMap object2ByteLinkedOpenHashMap; - if (!pos.getBlock().hasDynamicShape() && !spreadPos.getBlock().hasDynamicShape()) { + if (!state.getBlock().hasDynamicShape() && !spreadState.getBlock().hasDynamicShape()) { object2ByteLinkedOpenHashMap = (Object2ByteLinkedOpenHashMap)OCCLUSION_CACHE.get(); } else { object2ByteLinkedOpenHashMap = null; @@ -221,7 +219,7 @@ public abstract class FlowingFluid extends Fluid { FlowingFluid.BlockStatePairKey blockStatePairKey; if (object2ByteLinkedOpenHashMap != null) { - blockStatePairKey = new FlowingFluid.BlockStatePairKey(pos, spreadPos, direction2); + blockStatePairKey = new FlowingFluid.BlockStatePairKey(state, spreadState, direction); byte b = object2ByteLinkedOpenHashMap.getAndMoveToFirst(blockStatePairKey); if (b != 127) { return b != 0; @@ -230,7 +228,7 @@ public abstract class FlowingFluid extends Fluid { blockStatePairKey = null; } - boolean bl = !Shapes.mergedFaceOccludes(voxelShape2, voxelShape, direction2); + boolean bl = !Shapes.mergedFaceOccludes(voxelShape2, voxelShape, direction); if (object2ByteLinkedOpenHashMap != null) { if (object2ByteLinkedOpenHashMap.size() == 200) { object2ByteLinkedOpenHashMap.removeLastByte(); @@ -256,7 +254,7 @@ public abstract class FlowingFluid extends Fluid { return this.getSource().defaultFluidState().setValue(FALLING, falling); } - protected abstract boolean canConvertToSource(ServerLevel serverLevel); + protected abstract boolean canConvertToSource(ServerLevel level); protected void spreadTo(LevelAccessor level, BlockPos pos, BlockState blockState, Direction direction, FluidState fluidState) { if (blockState.getBlock() instanceof LiquidBlockContainer liquidBlockContainer) { @@ -272,39 +270,37 @@ public abstract class FlowingFluid extends Fluid { protected abstract void beforeDestroyingBlock(LevelAccessor level, BlockPos pos, BlockState state); - protected int getSlopeDistance( - LevelReader levelReader, BlockPos blockPos, int i, Direction direction, BlockState blockState, FlowingFluid.SpreadContext spreadContext - ) { - int j = 1000; + protected int getSlopeDistance(LevelReader level, BlockPos pos, int depth, Direction direction, BlockState state, FlowingFluid.SpreadContext spreadContext) { + int i = 1000; for (Direction direction2 : Direction.Plane.HORIZONTAL) { if (direction2 != direction) { - BlockPos blockPos2 = blockPos.relative(direction2); - BlockState blockState2 = spreadContext.getBlockState(blockPos2); - FluidState fluidState = blockState2.getFluidState(); - if (this.canPassThrough(levelReader, this.getFlowing(), blockPos, blockState, direction2, blockPos2, blockState2, fluidState)) { - if (spreadContext.isHole(blockPos2)) { - return i; + BlockPos blockPos = pos.relative(direction2); + BlockState blockState = spreadContext.getBlockState(blockPos); + FluidState fluidState = blockState.getFluidState(); + if (this.canPassThrough(level, this.getFlowing(), pos, state, direction2, blockPos, blockState, fluidState)) { + if (spreadContext.isHole(blockPos)) { + return depth; } - if (i < this.getSlopeFindDistance(levelReader)) { - int k = this.getSlopeDistance(levelReader, blockPos2, i + 1, direction2.getOpposite(), blockState2, spreadContext); - if (k < j) { - j = k; + if (depth < this.getSlopeFindDistance(level)) { + int j = this.getSlopeDistance(level, blockPos, depth + 1, direction2.getOpposite(), blockState, spreadContext); + if (j < i) { + i = j; } } } } } - return j; + return i; } - boolean isWaterHole(BlockGetter blockGetter, BlockPos blockPos, BlockState blockState, BlockPos blockPos2, BlockState blockState2) { - if (!canPassThroughWall(Direction.DOWN, blockGetter, blockPos, blockState, blockPos2, blockState2)) { + boolean isWaterHole(BlockGetter level, BlockPos pos, BlockState state, BlockPos belowPos, BlockState belowState) { + if (!canPassThroughWall(Direction.DOWN, level, pos, state, belowPos, belowState)) { return false; } else { - return blockState2.getFluidState().getType().isSame(this) ? true : canHoldFluid(blockGetter, blockPos2, blockState2, this.getFlowing()); + return belowState.getFluidState().getType().isSame(this) ? true : canHoldFluid(level, belowPos, belowState, this.getFlowing()); } } @@ -316,11 +312,9 @@ public abstract class FlowingFluid extends Fluid { } private boolean canMaybePassThrough( - BlockGetter blockGetter, BlockPos blockPos, BlockState blockState, Direction direction, BlockPos blockPos2, BlockState blockState2, FluidState fluidState + BlockGetter level, BlockPos pos, BlockState state, Direction direction, BlockPos spreadPos, BlockState spreadState, FluidState fluidState ) { - return !this.isSourceBlockOfThisType(fluidState) - && canHoldAnyFluid(blockState2) - && canPassThroughWall(direction, blockGetter, blockPos, blockState, blockPos2, blockState2); + return !this.isSourceBlockOfThisType(fluidState) && canHoldAnyFluid(spreadState) && canPassThroughWall(direction, level, pos, state, spreadPos, spreadState); } private boolean isSourceBlockOfThisType(FluidState state) { @@ -346,27 +340,27 @@ public abstract class FlowingFluid extends Fluid { return i; } - protected Map getSpread(ServerLevel serverLevel, BlockPos blockPos, BlockState blockState) { + protected Map getSpread(ServerLevel level, BlockPos pos, BlockState state) { int i = 1000; Map map = Maps.newEnumMap(Direction.class); FlowingFluid.SpreadContext spreadContext = null; for (Direction direction : Direction.Plane.HORIZONTAL) { - BlockPos blockPos2 = blockPos.relative(direction); - BlockState blockState2 = serverLevel.getBlockState(blockPos2); - FluidState fluidState = blockState2.getFluidState(); - if (this.canMaybePassThrough(serverLevel, blockPos, blockState, direction, blockPos2, blockState2, fluidState)) { - FluidState fluidState2 = this.getNewLiquid(serverLevel, blockPos2, blockState2); - if (canHoldSpecificFluid(serverLevel, blockPos2, blockState2, fluidState2.getType())) { + BlockPos blockPos = pos.relative(direction); + BlockState blockState = level.getBlockState(blockPos); + FluidState fluidState = blockState.getFluidState(); + if (this.canMaybePassThrough(level, pos, state, direction, blockPos, blockState, fluidState)) { + FluidState fluidState2 = this.getNewLiquid(level, blockPos, blockState); + if (canHoldSpecificFluid(level, blockPos, blockState, fluidState2.getType())) { if (spreadContext == null) { - spreadContext = new FlowingFluid.SpreadContext(serverLevel, blockPos); + spreadContext = new FlowingFluid.SpreadContext(level, pos); } int j; - if (spreadContext.isHole(blockPos2)) { + if (spreadContext.isHole(blockPos)) { j = 0; } else { - j = this.getSlopeDistance(serverLevel, blockPos2, 1, direction.getOpposite(), blockState2, spreadContext); + j = this.getSlopeDistance(level, blockPos, 1, direction.getOpposite(), blockState, spreadContext); } if (j < i) { @@ -374,7 +368,7 @@ public abstract class FlowingFluid extends Fluid { } if (j <= i) { - if (fluidState.canBeReplacedWith(serverLevel, blockPos2, fluidState2.getType(), direction)) { + if (fluidState.canBeReplacedWith(level, blockPos, fluidState2.getType(), direction)) { map.put(direction, fluidState2); } @@ -387,33 +381,31 @@ public abstract class FlowingFluid extends Fluid { return map; } - private static boolean canHoldAnyFluid(BlockState blockState) { - Block block = blockState.getBlock(); + private static boolean canHoldAnyFluid(BlockState state) { + Block block = state.getBlock(); if (block instanceof LiquidBlockContainer) { return true; } else { - return blockState.blocksMotion() + return state.blocksMotion() ? false : !(block instanceof DoorBlock) - && !blockState.is(BlockTags.SIGNS) - && !blockState.is(Blocks.LADDER) - && !blockState.is(Blocks.SUGAR_CANE) - && !blockState.is(Blocks.BUBBLE_COLUMN) - && !blockState.is(Blocks.NETHER_PORTAL) - && !blockState.is(Blocks.END_PORTAL) - && !blockState.is(Blocks.END_GATEWAY) - && !blockState.is(Blocks.STRUCTURE_VOID); + && !state.is(BlockTags.SIGNS) + && !state.is(Blocks.LADDER) + && !state.is(Blocks.SUGAR_CANE) + && !state.is(Blocks.BUBBLE_COLUMN) + && !state.is(Blocks.NETHER_PORTAL) + && !state.is(Blocks.END_PORTAL) + && !state.is(Blocks.END_GATEWAY) + && !state.is(Blocks.STRUCTURE_VOID); } } - private static boolean canHoldFluid(BlockGetter blockGetter, BlockPos level, BlockState pos, Fluid state) { - return canHoldAnyFluid(pos) && canHoldSpecificFluid(blockGetter, level, pos, state); + private static boolean canHoldFluid(BlockGetter level, BlockPos pos, BlockState state, Fluid fluid) { + return canHoldAnyFluid(state) && canHoldSpecificFluid(level, pos, state, fluid); } - private static boolean canHoldSpecificFluid(BlockGetter blockGetter, BlockPos blockPos, BlockState blockState, Fluid fluid) { - return blockState.getBlock() instanceof LiquidBlockContainer liquidBlockContainer - ? liquidBlockContainer.canPlaceLiquid(null, blockGetter, blockPos, blockState, fluid) - : true; + private static boolean canHoldSpecificFluid(BlockGetter level, BlockPos pos, BlockState state, Fluid fluid) { + return state.getBlock() instanceof LiquidBlockContainer liquidBlockContainer ? liquidBlockContainer.canPlaceLiquid(null, level, pos, state, fluid) : true; } protected abstract int getDropOff(LevelReader level); @@ -423,23 +415,23 @@ public abstract class FlowingFluid extends Fluid { } @Override - public void tick(ServerLevel serverLevel, BlockPos blockPos, BlockState blockState, FluidState fluidState) { + public void tick(ServerLevel level, BlockPos pos, BlockState blockState, FluidState fluidState) { if (!fluidState.isSource()) { - FluidState fluidState2 = this.getNewLiquid(serverLevel, blockPos, serverLevel.getBlockState(blockPos)); - int i = this.getSpreadDelay(serverLevel, blockPos, fluidState, fluidState2); + FluidState fluidState2 = this.getNewLiquid(level, pos, level.getBlockState(pos)); + int i = this.getSpreadDelay(level, pos, fluidState, fluidState2); if (fluidState2.isEmpty()) { fluidState = fluidState2; blockState = Blocks.AIR.defaultBlockState(); - serverLevel.setBlock(blockPos, blockState, 3); + level.setBlock(pos, blockState, 3); } else if (!fluidState2.equals(fluidState)) { fluidState = fluidState2; blockState = fluidState2.createLegacyBlock(); - serverLevel.setBlock(blockPos, blockState, 3); - serverLevel.scheduleTick(blockPos, fluidState2.getType(), i); + level.setBlock(pos, blockState, 3); + level.scheduleTick(pos, fluidState2.getType(), i); } } - this.spread(serverLevel, blockPos, blockState, fluidState); + this.spread(level, pos, blockState, fluidState); } protected static int getLegacyLevel(FluidState state) { @@ -491,31 +483,31 @@ public abstract class FlowingFluid extends Fluid { private final Short2ObjectMap stateCache = new Short2ObjectOpenHashMap<>(); private final Short2BooleanMap holeCache = new Short2BooleanOpenHashMap(); - SpreadContext(final BlockGetter blockGetter, final BlockPos blockPos) { - this.level = blockGetter; - this.origin = blockPos; + SpreadContext(final BlockGetter level, final BlockPos origin) { + this.level = level; + this.origin = origin; } - public BlockState getBlockState(BlockPos blockPos) { - return this.getBlockState(blockPos, this.getCacheKey(blockPos)); + public BlockState getBlockState(BlockPos pos) { + return this.getBlockState(pos, this.getCacheKey(pos)); } - private BlockState getBlockState(BlockPos blockPos, short s) { - return this.stateCache.computeIfAbsent(s, (Short2ObjectFunction)(sx -> this.level.getBlockState(blockPos))); + private BlockState getBlockState(BlockPos pos, short cacheKey) { + return this.stateCache.computeIfAbsent(cacheKey, (Short2ObjectFunction)(s -> this.level.getBlockState(pos))); } - public boolean isHole(BlockPos blockPos) { - return this.holeCache.computeIfAbsent(this.getCacheKey(blockPos), (Short2BooleanFunction)(s -> { - BlockState blockState = this.getBlockState(blockPos, s); - BlockPos blockPos2 = blockPos.below(); + public boolean isHole(BlockPos pos) { + return this.holeCache.computeIfAbsent(this.getCacheKey(pos), (Short2BooleanFunction)(s -> { + BlockState blockState = this.getBlockState(pos, s); + BlockPos blockPos2 = pos.below(); BlockState blockState2 = this.level.getBlockState(blockPos2); - return FlowingFluid.this.isWaterHole(this.level, blockPos, blockState, blockPos2, blockState2); + return FlowingFluid.this.isWaterHole(this.level, pos, blockState, blockPos2, blockState2); })); } - private short getCacheKey(BlockPos blockPos) { - int i = blockPos.getX() - this.origin.getX(); - int j = blockPos.getZ() - this.origin.getZ(); + private short getCacheKey(BlockPos pos) { + int i = pos.getX() - this.origin.getX(); + int j = pos.getZ() - this.origin.getZ(); return (short)((i + 128 & 0xFF) << 8 | j + 128 & 0xFF); } } diff --git a/net/minecraft/world/level/material/Fluid.java b/net/minecraft/world/level/material/Fluid.java index 1d6ed35f..f0fe0d91 100644 --- a/net/minecraft/world/level/material/Fluid.java +++ b/net/minecraft/world/level/material/Fluid.java @@ -3,8 +3,8 @@ package net.minecraft.world.level.material; import java.util.Optional; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.Holder; import net.minecraft.core.IdMapper; +import net.minecraft.core.Holder.Reference; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.server.level.ServerLevel; @@ -17,6 +17,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.shapes.VoxelShape; import org.jetbrains.annotations.Nullable; @@ -25,16 +26,16 @@ public abstract class Fluid { public static final IdMapper FLUID_STATE_REGISTRY = new IdMapper<>(); protected final StateDefinition stateDefinition; private FluidState defaultFluidState; - private final Holder.Reference builtInRegistryHolder = BuiltInRegistries.FLUID.createIntrusiveHolder(this); + private final Reference builtInRegistryHolder = BuiltInRegistries.FLUID.createIntrusiveHolder(this); protected Fluid() { - StateDefinition.Builder builder = new StateDefinition.Builder<>(this); + Builder builder = new Builder<>(this); this.createFluidStateDefinition(builder); this.stateDefinition = builder.create(Fluid::defaultFluidState, FluidState::new); this.registerDefaultState(this.stateDefinition.any()); } - protected void createFluidStateDefinition(StateDefinition.Builder builder) { + protected void createFluidStateDefinition(Builder builder) { } public StateDefinition getStateDefinition() { @@ -54,10 +55,10 @@ public abstract class Fluid { protected void animateTick(Level level, BlockPos pos, FluidState state, RandomSource random) { } - protected void tick(ServerLevel serverLevel, BlockPos blockPos, BlockState blockState, FluidState fluidState) { + protected void tick(ServerLevel level, BlockPos pos, BlockState blockState, FluidState fluidState) { } - protected void randomTick(ServerLevel serverLevel, BlockPos blockPos, FluidState fluidState, RandomSource randomSource) { + protected void randomTick(ServerLevel level, BlockPos pos, FluidState state, RandomSource random) { } @Nullable @@ -107,7 +108,7 @@ public abstract class Fluid { } @Deprecated - public Holder.Reference builtInRegistryHolder() { + public Reference builtInRegistryHolder() { return this.builtInRegistryHolder; } } diff --git a/net/minecraft/world/level/material/FluidState.java b/net/minecraft/world/level/material/FluidState.java index 1872d885..5b6cae58 100644 --- a/net/minecraft/world/level/material/FluidState.java +++ b/net/minecraft/world/level/material/FluidState.java @@ -73,8 +73,8 @@ public final class FluidState extends StateHolder { return false; } - public void tick(ServerLevel serverLevel, BlockPos blockPos, BlockState blockState) { - this.getType().tick(serverLevel, blockPos, blockState, this); + public void tick(ServerLevel level, BlockPos pos, BlockState state) { + this.getType().tick(level, pos, state, this); } public void animateTick(Level level, BlockPos pos, RandomSource random) { @@ -85,8 +85,8 @@ public final class FluidState extends StateHolder { return this.getType().isRandomlyTicking(); } - public void randomTick(ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) { - this.getType().randomTick(serverLevel, blockPos, this, randomSource); + public void randomTick(ServerLevel level, BlockPos pos, RandomSource random) { + this.getType().randomTick(level, pos, this, random); } public Vec3 getFlow(BlockGetter level, BlockPos pos) { diff --git a/net/minecraft/world/level/material/LavaFluid.java b/net/minecraft/world/level/material/LavaFluid.java index 90fdabbe..30f35271 100644 --- a/net/minecraft/world/level/material/LavaFluid.java +++ b/net/minecraft/world/level/material/LavaFluid.java @@ -22,7 +22,7 @@ import net.minecraft.world.level.block.BaseFireBlock; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.LiquidBlock; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import org.jetbrains.annotations.Nullable; public abstract class LavaFluid extends FlowingFluid { @@ -71,22 +71,22 @@ public abstract class LavaFluid extends FlowingFluid { } @Override - public void randomTick(ServerLevel serverLevel, BlockPos blockPos, FluidState fluidState, RandomSource randomSource) { - if (serverLevel.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) { - int i = randomSource.nextInt(3); + public void randomTick(ServerLevel level, BlockPos pos, FluidState state, RandomSource random) { + if (level.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) { + int i = random.nextInt(3); if (i > 0) { - BlockPos blockPos2 = blockPos; + BlockPos blockPos = pos; for (int j = 0; j < i; j++) { - blockPos2 = blockPos2.offset(randomSource.nextInt(3) - 1, 1, randomSource.nextInt(3) - 1); - if (!serverLevel.isLoaded(blockPos2)) { + blockPos = blockPos.offset(random.nextInt(3) - 1, 1, random.nextInt(3) - 1); + if (!level.isLoaded(blockPos)) { return; } - BlockState blockState = serverLevel.getBlockState(blockPos2); + BlockState blockState = level.getBlockState(blockPos); if (blockState.isAir()) { - if (this.hasFlammableNeighbours(serverLevel, blockPos2)) { - serverLevel.setBlockAndUpdate(blockPos2, BaseFireBlock.getState(serverLevel, blockPos2)); + if (this.hasFlammableNeighbours(level, blockPos)) { + level.setBlockAndUpdate(blockPos, BaseFireBlock.getState(level, blockPos)); return; } } else if (blockState.blocksMotion()) { @@ -95,13 +95,13 @@ public abstract class LavaFluid extends FlowingFluid { } } else { for (int k = 0; k < 3; k++) { - BlockPos blockPos3 = blockPos.offset(randomSource.nextInt(3) - 1, 0, randomSource.nextInt(3) - 1); - if (!serverLevel.isLoaded(blockPos3)) { + BlockPos blockPos2 = pos.offset(random.nextInt(3) - 1, 0, random.nextInt(3) - 1); + if (!level.isLoaded(blockPos2)) { return; } - if (serverLevel.isEmptyBlock(blockPos3.above()) && this.isFlammable(serverLevel, blockPos3)) { - serverLevel.setBlockAndUpdate(blockPos3.above(), BaseFireBlock.getState(serverLevel, blockPos3)); + if (level.isEmptyBlock(blockPos2.above()) && this.isFlammable(level, blockPos2)) { + level.setBlockAndUpdate(blockPos2.above(), BaseFireBlock.getState(level, blockPos2)); } } } @@ -183,8 +183,8 @@ public abstract class LavaFluid extends FlowingFluid { } @Override - protected boolean canConvertToSource(ServerLevel serverLevel) { - return serverLevel.getGameRules().getBoolean(GameRules.RULE_LAVA_SOURCE_CONVERSION); + protected boolean canConvertToSource(ServerLevel level) { + return level.getGameRules().getBoolean(GameRules.RULE_LAVA_SOURCE_CONVERSION); } @Override @@ -221,7 +221,7 @@ public abstract class LavaFluid extends FlowingFluid { public static class Flowing extends LavaFluid { @Override - protected void createFluidStateDefinition(StateDefinition.Builder builder) { + protected void createFluidStateDefinition(Builder builder) { super.createFluidStateDefinition(builder); builder.add(LEVEL); } diff --git a/net/minecraft/world/level/material/WaterFluid.java b/net/minecraft/world/level/material/WaterFluid.java index 21c19700..fe127380 100644 --- a/net/minecraft/world/level/material/WaterFluid.java +++ b/net/minecraft/world/level/material/WaterFluid.java @@ -23,7 +23,7 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.LiquidBlock; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.StateDefinition.Builder; import org.jetbrains.annotations.Nullable; public abstract class WaterFluid extends FlowingFluid { @@ -71,8 +71,8 @@ public abstract class WaterFluid extends FlowingFluid { } @Override - protected boolean canConvertToSource(ServerLevel serverLevel) { - return serverLevel.getGameRules().getBoolean(GameRules.RULE_WATER_SOURCE_CONVERSION); + protected boolean canConvertToSource(ServerLevel level) { + return level.getGameRules().getBoolean(GameRules.RULE_WATER_SOURCE_CONVERSION); } @Override @@ -123,7 +123,7 @@ public abstract class WaterFluid extends FlowingFluid { public static class Flowing extends WaterFluid { @Override - protected void createFluidStateDefinition(StateDefinition.Builder builder) { + protected void createFluidStateDefinition(Builder builder) { super.createFluidStateDefinition(builder); builder.add(LEVEL); } diff --git a/net/minecraft/world/level/pathfinder/PathFinder.java b/net/minecraft/world/level/pathfinder/PathFinder.java index 5731fe70..f939dba6 100644 --- a/net/minecraft/world/level/pathfinder/PathFinder.java +++ b/net/minecraft/world/level/pathfinder/PathFinder.java @@ -31,8 +31,8 @@ public class PathFinder { this.maxVisitedNodes = maxVisitedNodes; } - public void setMaxVisitedNodes(int i) { - this.maxVisitedNodes = i; + public void setMaxVisitedNodes(int maxVisitedNodes) { + this.maxVisitedNodes = maxVisitedNodes; } /** @@ -54,24 +54,27 @@ public class PathFinder { } } + /** + * Finds a path to one of the specified positions and post-processes it or returns null if no path could be found within given accuracy + */ @Nullable - private Path findPath(Node node, Map map, float f, int i, float g) { + private Path findPath(Node node, Map targetPositions, float maxRange, int accuracy, float searchDepthMultiplier) { ProfilerFiller profilerFiller = Profiler.get(); profilerFiller.push("find_path"); profilerFiller.markForCharting(MetricCategory.PATH_FINDING); - Set set = map.keySet(); + Set set = targetPositions.keySet(); node.g = 0.0F; node.h = this.getBestH(node, set); node.f = node.h; this.openSet.clear(); this.openSet.insert(node); Set set2 = ImmutableSet.of(); - int j = 0; + int i = 0; Set set3 = Sets.newHashSetWithExpectedSize(set.size()); - int k = (int)(this.maxVisitedNodes * g); + int j = (int)(this.maxVisitedNodes * searchDepthMultiplier); while (!this.openSet.isEmpty()) { - if (++j >= k) { + if (++i >= j) { break; } @@ -79,7 +82,7 @@ public class PathFinder { node2.closed = true; for (Target target : set) { - if (node2.distanceManhattan(target) <= i) { + if (node2.distanceManhattan(target) <= accuracy) { target.setReached(); set3.add(target); } @@ -89,17 +92,17 @@ public class PathFinder { break; } - if (!(node2.distanceTo(node) >= f)) { - int l = this.nodeEvaluator.getNeighbors(this.neighbors, node2); + if (!(node2.distanceTo(node) >= maxRange)) { + int k = this.nodeEvaluator.getNeighbors(this.neighbors, node2); - for (int m = 0; m < l; m++) { - Node node3 = this.neighbors[m]; - float h = this.distance(node2, node3); - node3.walkedDistance = node2.walkedDistance + h; - float n = node2.g + h + node3.costMalus; - if (node3.walkedDistance < f && (!node3.inOpenSet() || n < node3.g)) { + for (int l = 0; l < k; l++) { + Node node3 = this.neighbors[l]; + float f = this.distance(node2, node3); + node3.walkedDistance = node2.walkedDistance + f; + float g = node2.g + f + node3.costMalus; + if (node3.walkedDistance < maxRange && (!node3.inOpenSet() || g < node3.g)) { node3.cameFrom = node2; - node3.g = n; + node3.g = g; node3.h = this.getBestH(node3, set) * 1.5F; if (node3.inOpenSet()) { this.openSet.changeCost(node3, node3.g + node3.h); @@ -114,10 +117,10 @@ public class PathFinder { Optional optional = !set3.isEmpty() ? set3.stream() - .map(targetx -> this.reconstructPath(targetx.getBestNode(), (BlockPos)map.get(targetx), true)) + .map(targetx -> this.reconstructPath(targetx.getBestNode(), (BlockPos)targetPositions.get(targetx), true)) .min(Comparator.comparingInt(Path::getNodeCount)) : set.stream() - .map(targetx -> this.reconstructPath(targetx.getBestNode(), (BlockPos)map.get(targetx), false)) + .map(targetx -> this.reconstructPath(targetx.getBestNode(), (BlockPos)targetPositions.get(targetx), false)) .min(Comparator.comparingDouble(Path::getDistToTarget).thenComparingInt(Path::getNodeCount)); profilerFiller.pop(); return optional.isEmpty() ? null : (Path)optional.get(); diff --git a/net/minecraft/world/level/portal/PortalShape.java b/net/minecraft/world/level/portal/PortalShape.java index 91711a64..4bb54415 100644 --- a/net/minecraft/world/level/portal/PortalShape.java +++ b/net/minecraft/world/level/portal/PortalShape.java @@ -38,13 +38,13 @@ public class PortalShape { private final int height; private final int width; - private PortalShape(Direction.Axis axis, int i, Direction direction, BlockPos blockPos, int j, int k) { + private PortalShape(Direction.Axis axis, int numPortalBlocks, Direction rightDir, BlockPos bottomLeft, int width, int height) { this.axis = axis; - this.numPortalBlocks = i; - this.rightDir = direction; - this.bottomLeft = blockPos; - this.width = j; - this.height = k; + this.numPortalBlocks = numPortalBlocks; + this.rightDir = rightDir; + this.bottomLeft = bottomLeft; + this.width = width; + this.height = height; } public static Optional findEmptyPortalShape(LevelAccessor level, BlockPos bottomLeft, Direction.Axis axis) { @@ -61,56 +61,56 @@ public class PortalShape { } } - public static PortalShape findAnyShape(BlockGetter blockGetter, BlockPos blockPos, Direction.Axis axis) { + public static PortalShape findAnyShape(BlockGetter level, BlockPos bottomLeft, Direction.Axis axis) { Direction direction = axis == Direction.Axis.X ? Direction.WEST : Direction.SOUTH; - BlockPos blockPos2 = calculateBottomLeft(blockGetter, direction, blockPos); - if (blockPos2 == null) { - return new PortalShape(axis, 0, direction, blockPos, 0, 0); + BlockPos blockPos = calculateBottomLeft(level, direction, bottomLeft); + if (blockPos == null) { + return new PortalShape(axis, 0, direction, bottomLeft, 0, 0); } else { - int i = calculateWidth(blockGetter, blockPos2, direction); + int i = calculateWidth(level, blockPos, direction); if (i == 0) { - return new PortalShape(axis, 0, direction, blockPos2, 0, 0); + return new PortalShape(axis, 0, direction, blockPos, 0, 0); } else { MutableInt mutableInt = new MutableInt(); - int j = calculateHeight(blockGetter, blockPos2, direction, i, mutableInt); - return new PortalShape(axis, mutableInt.getValue(), direction, blockPos2, i, j); + int j = calculateHeight(level, blockPos, direction, i, mutableInt); + return new PortalShape(axis, mutableInt.getValue(), direction, blockPos, i, j); } } } @Nullable - private static BlockPos calculateBottomLeft(BlockGetter blockGetter, Direction direction, BlockPos blockPos) { - int i = Math.max(blockGetter.getMinY(), blockPos.getY() - 21); + private static BlockPos calculateBottomLeft(BlockGetter level, Direction direction, BlockPos pos) { + int i = Math.max(level.getMinY(), pos.getY() - 21); - while (blockPos.getY() > i && isEmpty(blockGetter.getBlockState(blockPos.below()))) { - blockPos = blockPos.below(); + while (pos.getY() > i && isEmpty(level.getBlockState(pos.below()))) { + pos = pos.below(); } Direction direction2 = direction.getOpposite(); - int j = getDistanceUntilEdgeAboveFrame(blockGetter, blockPos, direction2) - 1; - return j < 0 ? null : blockPos.relative(direction2, j); + int j = getDistanceUntilEdgeAboveFrame(level, pos, direction2) - 1; + return j < 0 ? null : pos.relative(direction2, j); } - private static int calculateWidth(BlockGetter blockGetter, BlockPos blockPos, Direction direction) { - int i = getDistanceUntilEdgeAboveFrame(blockGetter, blockPos, direction); + private static int calculateWidth(BlockGetter level, BlockPos bottomLeft, Direction direction) { + int i = getDistanceUntilEdgeAboveFrame(level, bottomLeft, direction); return i >= 2 && i <= 21 ? i : 0; } - private static int getDistanceUntilEdgeAboveFrame(BlockGetter blockGetter, BlockPos blockPos, Direction direction) { + private static int getDistanceUntilEdgeAboveFrame(BlockGetter level, BlockPos pos, Direction direction) { BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); for (int i = 0; i <= 21; i++) { - mutableBlockPos.set(blockPos).move(direction, i); - BlockState blockState = blockGetter.getBlockState(mutableBlockPos); + mutableBlockPos.set(pos).move(direction, i); + BlockState blockState = level.getBlockState(mutableBlockPos); if (!isEmpty(blockState)) { - if (FRAME.test(blockState, blockGetter, mutableBlockPos)) { + if (FRAME.test(blockState, level, mutableBlockPos)) { return i; } break; } - BlockState blockState2 = blockGetter.getBlockState(mutableBlockPos.move(Direction.DOWN)); - if (!FRAME.test(blockState2, blockGetter, mutableBlockPos)) { + BlockState blockState2 = level.getBlockState(mutableBlockPos.move(Direction.DOWN)); + if (!FRAME.test(blockState2, level, mutableBlockPos)) { break; } } @@ -118,16 +118,16 @@ public class PortalShape { return 0; } - private static int calculateHeight(BlockGetter blockGetter, BlockPos blockPos, Direction direction, int i, MutableInt mutableInt) { + private static int calculateHeight(BlockGetter level, BlockPos pos, Direction direction, int width, MutableInt portalBlocks) { BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); - int j = getDistanceUntilTop(blockGetter, blockPos, direction, mutableBlockPos, i, mutableInt); - return j >= 3 && j <= 21 && hasTopFrame(blockGetter, blockPos, direction, mutableBlockPos, i, j) ? j : 0; + int i = getDistanceUntilTop(level, pos, direction, mutableBlockPos, width, portalBlocks); + return i >= 3 && i <= 21 && hasTopFrame(level, pos, direction, mutableBlockPos, width, i) ? i : 0; } - private static boolean hasTopFrame(BlockGetter blockGetter, BlockPos blockPos, Direction direction, BlockPos.MutableBlockPos mutableBlockPos, int i, int j) { - for (int k = 0; k < i; k++) { - BlockPos.MutableBlockPos mutableBlockPos2 = mutableBlockPos.set(blockPos).move(Direction.UP, j).move(direction, k); - if (!FRAME.test(blockGetter.getBlockState(mutableBlockPos2), blockGetter, mutableBlockPos2)) { + private static boolean hasTopFrame(BlockGetter level, BlockPos pos, Direction direction, BlockPos.MutableBlockPos checkPos, int width, int distanceUntilTop) { + for (int i = 0; i < width; i++) { + BlockPos.MutableBlockPos mutableBlockPos = checkPos.set(pos).move(Direction.UP, distanceUntilTop).move(direction, i); + if (!FRAME.test(level.getBlockState(mutableBlockPos), level, mutableBlockPos)) { return false; } } @@ -136,28 +136,28 @@ public class PortalShape { } private static int getDistanceUntilTop( - BlockGetter blockGetter, BlockPos blockPos, Direction direction, BlockPos.MutableBlockPos mutableBlockPos, int i, MutableInt mutableInt + BlockGetter level, BlockPos pos, Direction direction, BlockPos.MutableBlockPos checkPos, int width, MutableInt portalBlocks ) { - for (int j = 0; j < 21; j++) { - mutableBlockPos.set(blockPos).move(Direction.UP, j).move(direction, -1); - if (!FRAME.test(blockGetter.getBlockState(mutableBlockPos), blockGetter, mutableBlockPos)) { - return j; + for (int i = 0; i < 21; i++) { + checkPos.set(pos).move(Direction.UP, i).move(direction, -1); + if (!FRAME.test(level.getBlockState(checkPos), level, checkPos)) { + return i; } - mutableBlockPos.set(blockPos).move(Direction.UP, j).move(direction, i); - if (!FRAME.test(blockGetter.getBlockState(mutableBlockPos), blockGetter, mutableBlockPos)) { - return j; + checkPos.set(pos).move(Direction.UP, i).move(direction, width); + if (!FRAME.test(level.getBlockState(checkPos), level, checkPos)) { + return i; } - for (int k = 0; k < i; k++) { - mutableBlockPos.set(blockPos).move(Direction.UP, j).move(direction, k); - BlockState blockState = blockGetter.getBlockState(mutableBlockPos); + for (int j = 0; j < width; j++) { + checkPos.set(pos).move(Direction.UP, i).move(direction, j); + BlockState blockState = level.getBlockState(checkPos); if (!isEmpty(blockState)) { - return j; + return i; } if (blockState.is(Blocks.NETHER_PORTAL)) { - mutableInt.increment(); + portalBlocks.increment(); } } } @@ -173,10 +173,10 @@ public class PortalShape { return this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21; } - public void createPortalBlocks(LevelAccessor levelAccessor) { + public void createPortalBlocks(LevelAccessor level) { BlockState blockState = Blocks.NETHER_PORTAL.defaultBlockState().setValue(NetherPortalBlock.AXIS, this.axis); BlockPos.betweenClosed(this.bottomLeft, this.bottomLeft.relative(Direction.UP, this.height - 1).relative(this.rightDir, this.width - 1)) - .forEach(blockPos -> levelAccessor.setBlock(blockPos, blockState, 18)); + .forEach(blockPos -> level.setBlock(blockPos, blockState, 18)); } public boolean isComplete() { diff --git a/net/minecraft/world/level/portal/TeleportTransition.java b/net/minecraft/world/level/portal/TeleportTransition.java index 5884aae3..0e8f593c 100644 --- a/net/minecraft/world/level/portal/TeleportTransition.java +++ b/net/minecraft/world/level/portal/TeleportTransition.java @@ -24,18 +24,26 @@ public record TeleportTransition( public static final TeleportTransition.PostTeleportTransition PLAY_PORTAL_SOUND = TeleportTransition::playPortalSound; public static final TeleportTransition.PostTeleportTransition PLACE_PORTAL_TICKET = TeleportTransition::placePortalTicket; - public TeleportTransition(ServerLevel serverLevel, Vec3 vec3, Vec3 vec32, float f, float g, TeleportTransition.PostTeleportTransition postTeleportTransition) { - this(serverLevel, vec3, vec32, f, g, Set.of(), postTeleportTransition); + public TeleportTransition( + ServerLevel newLevel, Vec3 position, Vec3 deltaMovement, float yRot, float xRot, TeleportTransition.PostTeleportTransition postTeleportTransition + ) { + this(newLevel, position, deltaMovement, yRot, xRot, Set.of(), postTeleportTransition); } public TeleportTransition( - ServerLevel serverLevel, Vec3 vec3, Vec3 vec32, float f, float g, Set set, TeleportTransition.PostTeleportTransition postTeleportTransition + ServerLevel newLevel, + Vec3 position, + Vec3 deltaMovement, + float yRot, + float xRot, + Set relatives, + TeleportTransition.PostTeleportTransition postTeleportTransition ) { - this(serverLevel, vec3, vec32, f, g, false, false, set, postTeleportTransition); + this(newLevel, position, deltaMovement, yRot, xRot, false, false, relatives, postTeleportTransition); } - public TeleportTransition(ServerLevel serverLevel, Entity entity, TeleportTransition.PostTeleportTransition postTeleportTransition) { - this(serverLevel, findAdjustedSharedSpawnPos(serverLevel, entity), Vec3.ZERO, 0.0F, 0.0F, false, false, Set.of(), postTeleportTransition); + public TeleportTransition(ServerLevel level, Entity entity, TeleportTransition.PostTeleportTransition postTeleportTransition) { + this(level, findAdjustedSharedSpawnPos(level, entity), Vec3.ZERO, 0.0F, 0.0F, false, false, Set.of(), postTeleportTransition); } private static void playPortalSound(Entity entity) { @@ -48,23 +56,21 @@ public record TeleportTransition( entity.placePortalTicket(BlockPos.containing(entity.position())); } - public static TeleportTransition missingRespawnBlock(ServerLevel serverLevel, Entity entity, TeleportTransition.PostTeleportTransition postTeleportTransition) { - return new TeleportTransition( - serverLevel, findAdjustedSharedSpawnPos(serverLevel, entity), Vec3.ZERO, 0.0F, 0.0F, true, false, Set.of(), postTeleportTransition - ); + public static TeleportTransition missingRespawnBlock(ServerLevel level, Entity entity, TeleportTransition.PostTeleportTransition postTeleportTransition) { + return new TeleportTransition(level, findAdjustedSharedSpawnPos(level, entity), Vec3.ZERO, 0.0F, 0.0F, true, false, Set.of(), postTeleportTransition); } - private static Vec3 findAdjustedSharedSpawnPos(ServerLevel serverLevel, Entity entity) { - return entity.adjustSpawnLocation(serverLevel, serverLevel.getSharedSpawnPos()).getBottomCenter(); + private static Vec3 findAdjustedSharedSpawnPos(ServerLevel level, Entity entity) { + return entity.adjustSpawnLocation(level, level.getSharedSpawnPos()).getBottomCenter(); } - public TeleportTransition withRotation(float f, float g) { + public TeleportTransition withRotation(float yRot, float xRot) { return new TeleportTransition( this.newLevel(), this.position(), this.deltaMovement(), - f, - g, + yRot, + xRot, this.missingRespawnBlock(), this.asPassenger(), this.relatives(), @@ -72,10 +78,10 @@ public record TeleportTransition( ); } - public TeleportTransition withPosition(Vec3 vec3) { + public TeleportTransition withPosition(Vec3 position) { return new TeleportTransition( this.newLevel(), - vec3, + position, this.deltaMovement(), this.yRot(), this.xRot(), diff --git a/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java b/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java index 186af9ac..8b83921c 100644 --- a/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java +++ b/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java @@ -32,18 +32,18 @@ public class CollectingNeighborUpdater implements NeighborUpdater { } @Override - public void neighborChanged(BlockPos blockPos, Block block, @Nullable Orientation orientation) { - this.addAndRun(blockPos, new CollectingNeighborUpdater.SimpleNeighborUpdate(blockPos, block, orientation)); + public void neighborChanged(BlockPos pos, Block neighborBlock, @Nullable Orientation orientation) { + this.addAndRun(pos, new CollectingNeighborUpdater.SimpleNeighborUpdate(pos, neighborBlock, orientation)); } @Override - public void neighborChanged(BlockState blockState, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - this.addAndRun(blockPos, new CollectingNeighborUpdater.FullNeighborUpdate(blockState, blockPos.immutable(), block, orientation, bl)); + public void neighborChanged(BlockState state, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + this.addAndRun(pos, new CollectingNeighborUpdater.FullNeighborUpdate(state, pos.immutable(), neighborBlock, orientation, movedByPiston)); } @Override - public void updateNeighborsAtExceptFromFacing(BlockPos blockPos, Block block, @Nullable Direction direction, @Nullable Orientation orientation) { - this.addAndRun(blockPos, new CollectingNeighborUpdater.MultiNeighborUpdate(blockPos.immutable(), block, orientation, direction)); + public void updateNeighborsAtExceptFromFacing(BlockPos pos, Block block, @Nullable Direction facing, @Nullable Orientation orientation) { + this.addAndRun(pos, new CollectingNeighborUpdater.MultiNeighborUpdate(pos.immutable(), block, orientation, facing)); } private void addAndRun(BlockPos pos, CollectingNeighborUpdater.NeighborUpdates updates) { @@ -107,12 +107,12 @@ public class CollectingNeighborUpdater implements NeighborUpdater { private final Direction skipDirection; private int idx = 0; - MultiNeighborUpdate(BlockPos blockPos, Block block, @Nullable Orientation orientation, @Nullable Direction direction) { - this.sourcePos = blockPos; - this.sourceBlock = block; + MultiNeighborUpdate(BlockPos sourcePos, Block sourceBlock, @Nullable Orientation orientation, @Nullable Direction skipDirection) { + this.sourcePos = sourcePos; + this.sourceBlock = sourceBlock; this.orientation = orientation; - this.skipDirection = direction; - if (NeighborUpdater.UPDATE_ORDER[this.idx] == direction) { + this.skipDirection = skipDirection; + if (NeighborUpdater.UPDATE_ORDER[this.idx] == skipDirection) { this.idx++; } } diff --git a/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java b/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java index a4ebc495..03c47fbf 100644 --- a/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java +++ b/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java @@ -10,33 +10,33 @@ import net.minecraft.world.level.block.state.BlockState; import org.jetbrains.annotations.Nullable; public class DefaultRedstoneWireEvaluator extends RedstoneWireEvaluator { - public DefaultRedstoneWireEvaluator(RedStoneWireBlock redStoneWireBlock) { - super(redStoneWireBlock); + public DefaultRedstoneWireEvaluator(RedStoneWireBlock wireBlock) { + super(wireBlock); } @Override - public void updatePowerStrength(Level level, BlockPos blockPos, BlockState blockState, @Nullable Orientation orientation, boolean bl) { - int i = this.calculateTargetStrength(level, blockPos); - if ((Integer)blockState.getValue(RedStoneWireBlock.POWER) != i) { - if (level.getBlockState(blockPos) == blockState) { - level.setBlock(blockPos, blockState.setValue(RedStoneWireBlock.POWER, i), 2); + public void updatePowerStrength(Level level, BlockPos pos, BlockState state, @Nullable Orientation orientation, boolean updateShape) { + int i = this.calculateTargetStrength(level, pos); + if ((Integer)state.getValue(RedStoneWireBlock.POWER) != i) { + if (level.getBlockState(pos) == state) { + level.setBlock(pos, state.setValue(RedStoneWireBlock.POWER, i), 2); } Set set = Sets.newHashSet(); - set.add(blockPos); + set.add(pos); for (Direction direction : Direction.values()) { - set.add(blockPos.relative(direction)); + set.add(pos.relative(direction)); } - for (BlockPos blockPos2 : set) { - level.updateNeighborsAt(blockPos2, this.wireBlock); + for (BlockPos blockPos : set) { + level.updateNeighborsAt(blockPos, this.wireBlock); } } } - private int calculateTargetStrength(Level level, BlockPos blockPos) { - int i = this.getBlockSignal(level, blockPos); - return i == 15 ? i : Math.max(i, this.getIncomingWireSignal(level, blockPos)); + private int calculateTargetStrength(Level level, BlockPos pos) { + int i = this.getBlockSignal(level, pos); + return i == 15 ? i : Math.max(i, this.getIncomingWireSignal(level, pos)); } } diff --git a/net/minecraft/world/level/redstone/ExperimentalRedstoneUtils.java b/net/minecraft/world/level/redstone/ExperimentalRedstoneUtils.java index 04cfced5..1dba52ff 100644 --- a/net/minecraft/world/level/redstone/ExperimentalRedstoneUtils.java +++ b/net/minecraft/world/level/redstone/ExperimentalRedstoneUtils.java @@ -7,15 +7,15 @@ import org.jetbrains.annotations.Nullable; public class ExperimentalRedstoneUtils { @Nullable - public static Orientation initialOrientation(Level level, @Nullable Direction direction, @Nullable Direction direction2) { + public static Orientation initialOrientation(Level level, @Nullable Direction front, @Nullable Direction up) { if (level.enabledFeatures().contains(FeatureFlags.REDSTONE_EXPERIMENTS)) { Orientation orientation = Orientation.random(level.random).withSideBias(Orientation.SideBias.LEFT); - if (direction2 != null) { - orientation = orientation.withUp(direction2); + if (up != null) { + orientation = orientation.withUp(up); } - if (direction != null) { - orientation = orientation.withFront(direction); + if (front != null) { + orientation = orientation.withFront(front); } return orientation; diff --git a/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java b/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java index 91157c10..120683f7 100644 --- a/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java +++ b/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java @@ -20,29 +20,29 @@ public class ExperimentalRedstoneWireEvaluator extends RedstoneWireEvaluator { private final Deque wiresToTurnOn = new ArrayDeque(); private final Object2IntMap updatedWires = new Object2IntLinkedOpenHashMap<>(); - public ExperimentalRedstoneWireEvaluator(RedStoneWireBlock redStoneWireBlock) { - super(redStoneWireBlock); + public ExperimentalRedstoneWireEvaluator(RedStoneWireBlock wireBlock) { + super(wireBlock); } @Override - public void updatePowerStrength(Level level, BlockPos blockPos, BlockState blockState, @Nullable Orientation orientation, boolean bl) { + public void updatePowerStrength(Level level, BlockPos pos, BlockState state, @Nullable Orientation orientation, boolean updateShape) { Orientation orientation2 = getInitialOrientation(level, orientation); - this.calculateCurrentChanges(level, blockPos, orientation2); + this.calculateCurrentChanges(level, pos, orientation2); ObjectIterator> objectIterator = this.updatedWires.object2IntEntrySet().iterator(); - for (boolean bl2 = true; objectIterator.hasNext(); bl2 = false) { + for (boolean bl = true; objectIterator.hasNext(); bl = false) { Entry entry = (Entry)objectIterator.next(); - BlockPos blockPos2 = (BlockPos)entry.getKey(); + BlockPos blockPos = (BlockPos)entry.getKey(); int i = entry.getIntValue(); int j = unpackPower(i); - BlockState blockState2 = level.getBlockState(blockPos2); - if (blockState2.is(this.wireBlock) && !((Integer)blockState2.getValue(RedStoneWireBlock.POWER)).equals(j)) { + BlockState blockState = level.getBlockState(blockPos); + if (blockState.is(this.wireBlock) && !((Integer)blockState.getValue(RedStoneWireBlock.POWER)).equals(j)) { int k = 2; - if (!bl || !bl2) { + if (!updateShape || !bl) { k |= 128; } - level.setBlock(blockPos2, blockState2.setValue(RedStoneWireBlock.POWER, j), k); + level.setBlock(blockPos, blockState.setValue(RedStoneWireBlock.POWER, j), k); } else { objectIterator.remove(); } @@ -74,9 +74,9 @@ public class ExperimentalRedstoneWireEvaluator extends RedstoneWireEvaluator { }); } - private static boolean isConnected(BlockState blockState, Direction direction) { + private static boolean isConnected(BlockState state, Direction direction) { EnumProperty enumProperty = (EnumProperty)RedStoneWireBlock.PROPERTY_BY_DIRECTION.get(direction); - return enumProperty == null ? direction == Direction.DOWN : ((RedstoneSide)blockState.getValue(enumProperty)).isConnected(); + return enumProperty == null ? direction == Direction.DOWN : ((RedstoneSide)state.getValue(enumProperty)).isConnected(); } private static Orientation getInitialOrientation(Level level, @Nullable Orientation orientation) { @@ -90,27 +90,27 @@ public class ExperimentalRedstoneWireEvaluator extends RedstoneWireEvaluator { return orientation2.withUp(Direction.UP).withSideBias(Orientation.SideBias.LEFT); } - private void calculateCurrentChanges(Level level, BlockPos blockPos, Orientation orientation) { - BlockState blockState = level.getBlockState(blockPos); + private void calculateCurrentChanges(Level level, BlockPos pos, Orientation orientation) { + BlockState blockState = level.getBlockState(pos); if (blockState.is(this.wireBlock)) { - this.setPower(blockPos, (Integer)blockState.getValue(RedStoneWireBlock.POWER), orientation); - this.wiresToTurnOff.add(blockPos); + this.setPower(pos, (Integer)blockState.getValue(RedStoneWireBlock.POWER), orientation); + this.wiresToTurnOff.add(pos); } else { - this.propagateChangeToNeighbors(level, blockPos, 0, orientation, true); + this.propagateChangeToNeighbors(level, pos, 0, orientation, true); } while (!this.wiresToTurnOff.isEmpty()) { - BlockPos blockPos2 = (BlockPos)this.wiresToTurnOff.removeFirst(); - int i = this.updatedWires.getInt(blockPos2); + BlockPos blockPos = (BlockPos)this.wiresToTurnOff.removeFirst(); + int i = this.updatedWires.getInt(blockPos); Orientation orientation2 = unpackOrientation(i); int j = unpackPower(i); - int k = this.getBlockSignal(level, blockPos2); - int l = this.getIncomingWireSignal(level, blockPos2); + int k = this.getBlockSignal(level, blockPos); + int l = this.getIncomingWireSignal(level, blockPos); int m = Math.max(k, l); int n; if (m < j) { - if (k > 0 && !this.wiresToTurnOn.contains(blockPos2)) { - this.wiresToTurnOn.add(blockPos2); + if (k > 0 && !this.wiresToTurnOn.contains(blockPos)) { + this.wiresToTurnOn.add(blockPos); } n = 0; @@ -119,91 +119,91 @@ public class ExperimentalRedstoneWireEvaluator extends RedstoneWireEvaluator { } if (n != j) { - this.setPower(blockPos2, n, orientation2); + this.setPower(blockPos, n, orientation2); } - this.propagateChangeToNeighbors(level, blockPos2, n, orientation2, j > m); + this.propagateChangeToNeighbors(level, blockPos, n, orientation2, j > m); } while (!this.wiresToTurnOn.isEmpty()) { - BlockPos blockPos2x = (BlockPos)this.wiresToTurnOn.removeFirst(); - int ix = this.updatedWires.getInt(blockPos2x); + BlockPos blockPosx = (BlockPos)this.wiresToTurnOn.removeFirst(); + int ix = this.updatedWires.getInt(blockPosx); int o = unpackPower(ix); - int jx = this.getBlockSignal(level, blockPos2x); - int kx = this.getIncomingWireSignal(level, blockPos2x); + int jx = this.getBlockSignal(level, blockPosx); + int kx = this.getIncomingWireSignal(level, blockPosx); int lx = Math.max(jx, kx); Orientation orientation3 = unpackOrientation(ix); if (lx > o) { - this.setPower(blockPos2x, lx, orientation3); + this.setPower(blockPosx, lx, orientation3); } else if (lx < o) { throw new IllegalStateException("Turning off wire while trying to turn it on. Should not happen."); } - this.propagateChangeToNeighbors(level, blockPos2x, lx, orientation3, false); + this.propagateChangeToNeighbors(level, blockPosx, lx, orientation3, false); } } - private static int packOrientationAndPower(Orientation orientation, int i) { - return orientation.getIndex() << 4 | i; + private static int packOrientationAndPower(Orientation orientation, int power) { + return orientation.getIndex() << 4 | power; } - private static Orientation unpackOrientation(int i) { - return Orientation.fromIndex(i >> 4); + private static Orientation unpackOrientation(int data) { + return Orientation.fromIndex(data >> 4); } - private static int unpackPower(int i) { - return i & 15; + private static int unpackPower(int data) { + return data & 15; } - private void setPower(BlockPos blockPos, int i, Orientation orientation) { + private void setPower(BlockPos pos, int power, Orientation orientation) { this.updatedWires .compute( - blockPos, (blockPosx, integer) -> integer == null ? packOrientationAndPower(orientation, i) : packOrientationAndPower(unpackOrientation(integer), i) + pos, (blockPos, integer) -> integer == null ? packOrientationAndPower(orientation, power) : packOrientationAndPower(unpackOrientation(integer), power) ); } - private void propagateChangeToNeighbors(Level level, BlockPos blockPos, int i, Orientation orientation, boolean bl) { + private void propagateChangeToNeighbors(Level level, BlockPos pos, int power, Orientation orientation, boolean canTurnOff) { for (Direction direction : orientation.getHorizontalDirections()) { - BlockPos blockPos2 = blockPos.relative(direction); - this.enqueueNeighborWire(level, blockPos2, i, orientation.withFront(direction), bl); + BlockPos blockPos = pos.relative(direction); + this.enqueueNeighborWire(level, blockPos, power, orientation.withFront(direction), canTurnOff); } for (Direction direction : orientation.getVerticalDirections()) { - BlockPos blockPos2 = blockPos.relative(direction); - boolean bl2 = level.getBlockState(blockPos2).isRedstoneConductor(level, blockPos2); + BlockPos blockPos = pos.relative(direction); + boolean bl = level.getBlockState(blockPos).isRedstoneConductor(level, blockPos); for (Direction direction2 : orientation.getHorizontalDirections()) { - BlockPos blockPos3 = blockPos.relative(direction2); - if (direction == Direction.UP && !bl2) { - BlockPos blockPos4 = blockPos2.relative(direction2); - this.enqueueNeighborWire(level, blockPos4, i, orientation.withFront(direction2), bl); - } else if (direction == Direction.DOWN && !level.getBlockState(blockPos3).isRedstoneConductor(level, blockPos3)) { - BlockPos blockPos4 = blockPos2.relative(direction2); - this.enqueueNeighborWire(level, blockPos4, i, orientation.withFront(direction2), bl); + BlockPos blockPos2 = pos.relative(direction2); + if (direction == Direction.UP && !bl) { + BlockPos blockPos3 = blockPos.relative(direction2); + this.enqueueNeighborWire(level, blockPos3, power, orientation.withFront(direction2), canTurnOff); + } else if (direction == Direction.DOWN && !level.getBlockState(blockPos2).isRedstoneConductor(level, blockPos2)) { + BlockPos blockPos3 = blockPos.relative(direction2); + this.enqueueNeighborWire(level, blockPos3, power, orientation.withFront(direction2), canTurnOff); } } } } - private void enqueueNeighborWire(Level level, BlockPos blockPos, int i, Orientation orientation, boolean bl) { - BlockState blockState = level.getBlockState(blockPos); + private void enqueueNeighborWire(Level level, BlockPos pos, int power, Orientation orientation, boolean canTurnOff) { + BlockState blockState = level.getBlockState(pos); if (blockState.is(this.wireBlock)) { - int j = this.getWireSignal(blockPos, blockState); - if (j < i - 1 && !this.wiresToTurnOn.contains(blockPos)) { - this.wiresToTurnOn.add(blockPos); - this.setPower(blockPos, j, orientation); + int i = this.getWireSignal(pos, blockState); + if (i < power - 1 && !this.wiresToTurnOn.contains(pos)) { + this.wiresToTurnOn.add(pos); + this.setPower(pos, i, orientation); } - if (bl && j > i && !this.wiresToTurnOff.contains(blockPos)) { - this.wiresToTurnOff.add(blockPos); - this.setPower(blockPos, j, orientation); + if (canTurnOff && i > power && !this.wiresToTurnOff.contains(pos)) { + this.wiresToTurnOff.add(pos); + this.setPower(pos, i, orientation); } } } @Override - protected int getWireSignal(BlockPos blockPos, BlockState blockState) { - int i = this.updatedWires.getOrDefault(blockPos, -1); - return i != -1 ? unpackPower(i) : super.getWireSignal(blockPos, blockState); + protected int getWireSignal(BlockPos pos, BlockState state) { + int i = this.updatedWires.getOrDefault(pos, -1); + return i != -1 ? unpackPower(i) : super.getWireSignal(pos, state); } } diff --git a/net/minecraft/world/level/redstone/InstantNeighborUpdater.java b/net/minecraft/world/level/redstone/InstantNeighborUpdater.java index b88d4bf9..cc9a7d1c 100644 --- a/net/minecraft/world/level/redstone/InstantNeighborUpdater.java +++ b/net/minecraft/world/level/redstone/InstantNeighborUpdater.java @@ -20,13 +20,13 @@ public class InstantNeighborUpdater implements NeighborUpdater { } @Override - public void neighborChanged(BlockPos blockPos, Block block, @Nullable Orientation orientation) { - BlockState blockState = this.level.getBlockState(blockPos); - this.neighborChanged(blockState, blockPos, block, orientation, false); + public void neighborChanged(BlockPos pos, Block neighborBlock, @Nullable Orientation orientation) { + BlockState blockState = this.level.getBlockState(pos); + this.neighborChanged(blockState, pos, neighborBlock, orientation, false); } @Override - public void neighborChanged(BlockState blockState, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { - NeighborUpdater.executeUpdate(this.level, blockState, blockPos, block, orientation, bl); + public void neighborChanged(BlockState state, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { + NeighborUpdater.executeUpdate(this.level, state, pos, neighborBlock, orientation, movedByPiston); } } diff --git a/net/minecraft/world/level/redstone/NeighborUpdater.java b/net/minecraft/world/level/redstone/NeighborUpdater.java index 69858b87..cf121485 100644 --- a/net/minecraft/world/level/redstone/NeighborUpdater.java +++ b/net/minecraft/world/level/redstone/NeighborUpdater.java @@ -20,29 +20,31 @@ public interface NeighborUpdater { void shapeUpdate(Direction direction, BlockState state, BlockPos pos, BlockPos neighborPos, int flags, int recursionLevel); - void neighborChanged(BlockPos blockPos, Block block, @Nullable Orientation orientation); + void neighborChanged(BlockPos pos, Block neighborBlock, @Nullable Orientation orientation); - void neighborChanged(BlockState blockState, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl); + void neighborChanged(BlockState state, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston); - default void updateNeighborsAtExceptFromFacing(BlockPos blockPos, Block block, @Nullable Direction direction, @Nullable Orientation orientation) { - for (Direction direction2 : UPDATE_ORDER) { - if (direction2 != direction) { - this.neighborChanged(blockPos.relative(direction2), block, null); + default void updateNeighborsAtExceptFromFacing(BlockPos pos, Block block, @Nullable Direction facing, @Nullable Orientation orientation) { + for (Direction direction : UPDATE_ORDER) { + if (direction != facing) { + this.neighborChanged(pos.relative(direction), block, null); } } } - static void executeShapeUpdate(LevelAccessor levelAccessor, Direction direction, BlockPos blockPos, BlockPos blockPos2, BlockState blockState, int i, int j) { - BlockState blockState2 = levelAccessor.getBlockState(blockPos); - if ((i & 128) == 0 || !blockState2.is(Blocks.REDSTONE_WIRE)) { - BlockState blockState3 = blockState2.updateShape(levelAccessor, levelAccessor, blockPos, direction, blockPos2, blockState, levelAccessor.getRandom()); - Block.updateOrDestroy(blockState2, blockState3, levelAccessor, blockPos, i, j); + static void executeShapeUpdate( + LevelAccessor level, Direction direction, BlockPos pos, BlockPos neighborPos, BlockState neighborState, int flags, int recursionLeft + ) { + BlockState blockState = level.getBlockState(pos); + if ((flags & 128) == 0 || !blockState.is(Blocks.REDSTONE_WIRE)) { + BlockState blockState2 = blockState.updateShape(level, level, pos, direction, neighborPos, neighborState, level.getRandom()); + Block.updateOrDestroy(blockState, blockState2, level, pos, flags, recursionLeft); } } - static void executeUpdate(Level level, BlockState blockState, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) { + static void executeUpdate(Level level, BlockState state, BlockPos pos, Block neighborBlock, @Nullable Orientation orientation, boolean movedByPiston) { try { - blockState.handleNeighborChanged(level, blockPos, block, orientation, bl); + state.handleNeighborChanged(level, pos, neighborBlock, orientation, movedByPiston); } catch (Throwable var9) { CrashReport crashReport = CrashReport.forThrowable(var9, "Exception while updating neighbours"); CrashReportCategory crashReportCategory = crashReport.addCategory("Block being updated"); @@ -51,14 +53,18 @@ public interface NeighborUpdater { (CrashReportDetail)(() -> { try { return String.format( - Locale.ROOT, "ID #%s (%s // %s)", BuiltInRegistries.BLOCK.getKey(block), block.getDescriptionId(), block.getClass().getCanonicalName() + Locale.ROOT, + "ID #%s (%s // %s)", + BuiltInRegistries.BLOCK.getKey(neighborBlock), + neighborBlock.getDescriptionId(), + neighborBlock.getClass().getCanonicalName() ); } catch (Throwable var2) { - return "ID #" + BuiltInRegistries.BLOCK.getKey(block); + return "ID #" + BuiltInRegistries.BLOCK.getKey(neighborBlock); } }) ); - CrashReportCategory.populateBlockDetails(crashReportCategory, level, blockPos, blockState); + CrashReportCategory.populateBlockDetails(crashReportCategory, level, pos, state); throw new ReportedException(crashReport); } } diff --git a/net/minecraft/world/level/redstone/Orientation.java b/net/minecraft/world/level/redstone/Orientation.java index 2e2fbc16..1197b0b3 100644 --- a/net/minecraft/world/level/redstone/Orientation.java +++ b/net/minecraft/world/level/redstone/Orientation.java @@ -32,18 +32,18 @@ public class Orientation { private final Map withUp = new EnumMap(Direction.class); private final Map withSideBias = new EnumMap(Orientation.SideBias.class); - private Orientation(Direction direction, Direction direction2, Orientation.SideBias sideBias) { - this.up = direction; - this.front = direction2; + private Orientation(Direction up, Direction front, Orientation.SideBias sideBias) { + this.up = up; + this.front = front; this.sideBias = sideBias; - this.index = generateIndex(direction, direction2, sideBias); - Vec3i vec3i = direction2.getUnitVec3i().cross(direction.getUnitVec3i()); - Direction direction3 = Direction.getNearest(vec3i, null); - Objects.requireNonNull(direction3); + this.index = generateIndex(up, front, sideBias); + Vec3i vec3i = front.getUnitVec3i().cross(up.getUnitVec3i()); + Direction direction = Direction.getNearest(vec3i, null); + Objects.requireNonNull(direction); if (this.sideBias == Orientation.SideBias.RIGHT) { - this.side = direction3; + this.side = direction; } else { - this.side = direction3.getOpposite(); + this.side = direction.getOpposite(); } this.neighbors = List.of(this.front.getOpposite(), this.front, this.side, this.side.getOpposite(), this.up.getOpposite(), this.up); @@ -51,24 +51,24 @@ public class Orientation { this.verticalNeighbors = this.neighbors.stream().filter(directionx -> directionx.getAxis() == this.up.getAxis()).toList(); } - public static Orientation of(Direction direction, Direction direction2, Orientation.SideBias sideBias) { - return ORIENTATIONS[generateIndex(direction, direction2, sideBias)]; + public static Orientation of(Direction up, Direction front, Orientation.SideBias sideBias) { + return ORIENTATIONS[generateIndex(up, front, sideBias)]; } - public Orientation withUp(Direction direction) { - return (Orientation)this.withUp.get(direction); + public Orientation withUp(Direction up) { + return (Orientation)this.withUp.get(up); } - public Orientation withFront(Direction direction) { - return (Orientation)this.withFront.get(direction); + public Orientation withFront(Direction front) { + return (Orientation)this.withFront.get(front); } - public Orientation withFrontPreserveUp(Direction direction) { - return direction.getAxis() == this.up.getAxis() ? this : (Orientation)this.withFront.get(direction); + public Orientation withFrontPreserveUp(Direction front) { + return front.getAxis() == this.up.getAxis() ? this : (Orientation)this.withFront.get(front); } - public Orientation withFrontAdjustSideBias(Direction direction) { - Orientation orientation = this.withFront(direction); + public Orientation withFrontAdjustSideBias(Direction front) { + Orientation orientation = this.withFront(front); return this.front == orientation.side ? orientation.withMirror() : orientation; } @@ -116,68 +116,68 @@ public class Orientation { return this.index; } - public static Orientation fromIndex(int i) { - return ORIENTATIONS[i]; + public static Orientation fromIndex(int index) { + return ORIENTATIONS[index]; } - public static Orientation random(RandomSource randomSource) { - return Util.getRandom(ORIENTATIONS, randomSource); + public static Orientation random(RandomSource random) { + return Util.getRandom(ORIENTATIONS, random); } - private static Orientation generateContext(Orientation orientation, Orientation[] orientations) { - if (orientations[orientation.getIndex()] != null) { - return orientations[orientation.getIndex()]; + private static Orientation generateContext(Orientation start, Orientation[] output) { + if (output[start.getIndex()] != null) { + return output[start.getIndex()]; } else { - orientations[orientation.getIndex()] = orientation; + output[start.getIndex()] = start; for (Orientation.SideBias sideBias : Orientation.SideBias.values()) { - orientation.withSideBias.put(sideBias, generateContext(new Orientation(orientation.up, orientation.front, sideBias), orientations)); + start.withSideBias.put(sideBias, generateContext(new Orientation(start.up, start.front, sideBias), output)); } for (Direction direction : Direction.values()) { - Direction direction2 = orientation.up; - if (direction == orientation.up) { - direction2 = orientation.front.getOpposite(); + Direction direction2 = start.up; + if (direction == start.up) { + direction2 = start.front.getOpposite(); } - if (direction == orientation.up.getOpposite()) { - direction2 = orientation.front; + if (direction == start.up.getOpposite()) { + direction2 = start.front; } - orientation.withFront.put(direction, generateContext(new Orientation(direction2, direction, orientation.sideBias), orientations)); + start.withFront.put(direction, generateContext(new Orientation(direction2, direction, start.sideBias), output)); } for (Direction direction : Direction.values()) { - Direction direction2x = orientation.front; - if (direction == orientation.front) { - direction2x = orientation.up.getOpposite(); + Direction direction2x = start.front; + if (direction == start.front) { + direction2x = start.up.getOpposite(); } - if (direction == orientation.front.getOpposite()) { - direction2x = orientation.up; + if (direction == start.front.getOpposite()) { + direction2x = start.up; } - orientation.withUp.put(direction, generateContext(new Orientation(direction, direction2x, orientation.sideBias), orientations)); + start.withUp.put(direction, generateContext(new Orientation(direction, direction2x, start.sideBias), output)); } - return orientation; + return start; } } @VisibleForTesting - protected static int generateIndex(Direction direction, Direction direction2, Orientation.SideBias sideBias) { - if (direction.getAxis() == direction2.getAxis()) { + protected static int generateIndex(Direction up, Direction front, Orientation.SideBias sideBias) { + if (up.getAxis() == front.getAxis()) { throw new IllegalStateException("Up-vector and front-vector can not be on the same axis"); } else { int i; - if (direction.getAxis() == Direction.Axis.Y) { - i = direction2.getAxis() == Direction.Axis.X ? 1 : 0; + if (up.getAxis() == Direction.Axis.Y) { + i = front.getAxis() == Direction.Axis.X ? 1 : 0; } else { - i = direction2.getAxis() == Direction.Axis.Y ? 1 : 0; + i = front.getAxis() == Direction.Axis.Y ? 1 : 0; } - int j = i << 1 | direction2.getAxisDirection().ordinal(); - return ((direction.ordinal() << 2) + j << 1) + sideBias.ordinal(); + int j = i << 1 | front.getAxisDirection().ordinal(); + return ((up.ordinal() << 2) + j << 1) + sideBias.ordinal(); } } @@ -187,8 +187,8 @@ public class Orientation { private final String name; - private SideBias(final String string2) { - this.name = string2; + private SideBias(final String name) { + this.name = name; } public Orientation.SideBias getOpposite() { diff --git a/net/minecraft/world/level/redstone/RedstoneWireEvaluator.java b/net/minecraft/world/level/redstone/RedstoneWireEvaluator.java index 29c3ac02..30e7fe81 100644 --- a/net/minecraft/world/level/redstone/RedstoneWireEvaluator.java +++ b/net/minecraft/world/level/redstone/RedstoneWireEvaluator.java @@ -10,34 +10,34 @@ import org.jetbrains.annotations.Nullable; public abstract class RedstoneWireEvaluator { protected final RedStoneWireBlock wireBlock; - protected RedstoneWireEvaluator(RedStoneWireBlock redStoneWireBlock) { - this.wireBlock = redStoneWireBlock; + protected RedstoneWireEvaluator(RedStoneWireBlock wireBlock) { + this.wireBlock = wireBlock; } - public abstract void updatePowerStrength(Level level, BlockPos blockPos, BlockState blockState, @Nullable Orientation orientation, boolean bl); + public abstract void updatePowerStrength(Level level, BlockPos pos, BlockState state, @Nullable Orientation orientation, boolean updateShape); - protected int getBlockSignal(Level level, BlockPos blockPos) { - return this.wireBlock.getBlockSignal(level, blockPos); + protected int getBlockSignal(Level level, BlockPos pos) { + return this.wireBlock.getBlockSignal(level, pos); } - protected int getWireSignal(BlockPos blockPos, BlockState blockState) { - return blockState.is(this.wireBlock) ? (Integer)blockState.getValue(RedStoneWireBlock.POWER) : 0; + protected int getWireSignal(BlockPos pos, BlockState state) { + return state.is(this.wireBlock) ? (Integer)state.getValue(RedStoneWireBlock.POWER) : 0; } - protected int getIncomingWireSignal(Level level, BlockPos blockPos) { + protected int getIncomingWireSignal(Level level, BlockPos pos) { int i = 0; for (Direction direction : Direction.Plane.HORIZONTAL) { - BlockPos blockPos2 = blockPos.relative(direction); - BlockState blockState = level.getBlockState(blockPos2); - i = Math.max(i, this.getWireSignal(blockPos2, blockState)); - BlockPos blockPos3 = blockPos.above(); - if (blockState.isRedstoneConductor(level, blockPos2) && !level.getBlockState(blockPos3).isRedstoneConductor(level, blockPos3)) { - BlockPos blockPos4 = blockPos2.above(); - i = Math.max(i, this.getWireSignal(blockPos4, level.getBlockState(blockPos4))); - } else if (!blockState.isRedstoneConductor(level, blockPos2)) { - BlockPos blockPos4 = blockPos2.below(); - i = Math.max(i, this.getWireSignal(blockPos4, level.getBlockState(blockPos4))); + BlockPos blockPos = pos.relative(direction); + BlockState blockState = level.getBlockState(blockPos); + i = Math.max(i, this.getWireSignal(blockPos, blockState)); + BlockPos blockPos2 = pos.above(); + if (blockState.isRedstoneConductor(level, blockPos) && !level.getBlockState(blockPos2).isRedstoneConductor(level, blockPos2)) { + BlockPos blockPos3 = blockPos.above(); + i = Math.max(i, this.getWireSignal(blockPos3, level.getBlockState(blockPos3))); + } else if (!blockState.isRedstoneConductor(level, blockPos)) { + BlockPos blockPos3 = blockPos.below(); + i = Math.max(i, this.getWireSignal(blockPos3, level.getBlockState(blockPos3))); } } diff --git a/net/minecraft/world/level/saveddata/SavedData.java b/net/minecraft/world/level/saveddata/SavedData.java index a81c4a53..0e5c42b2 100644 --- a/net/minecraft/world/level/saveddata/SavedData.java +++ b/net/minecraft/world/level/saveddata/SavedData.java @@ -33,9 +33,9 @@ public abstract class SavedData { return this.dirty; } - public CompoundTag save(HolderLookup.Provider provider) { + public CompoundTag save(HolderLookup.Provider registries) { CompoundTag compoundTag = new CompoundTag(); - compoundTag.put("data", this.save(new CompoundTag(), provider)); + compoundTag.put("data", this.save(new CompoundTag(), registries)); NbtUtils.addCurrentDataVersion(compoundTag); this.setDirty(false); return compoundTag; diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java index fa6a80f0..21bbcbd4 100644 --- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java @@ -307,51 +307,51 @@ public class MapItemSavedData extends SavedData { @Nullable private MapItemSavedData.MapDecorationLocation calculateDecorationLocationAndType( - Holder holder, @Nullable LevelAccessor levelAccessor, double d, float f, float g + Holder decorationType, @Nullable LevelAccessor level, double yRot, float x, float z ) { - byte b = clampMapCoordinate(f); - byte c = clampMapCoordinate(g); - if (holder.is(MapDecorationTypes.PLAYER)) { - Pair, Byte> pair = this.playerDecorationTypeAndRotation(holder, levelAccessor, d, f, g); + byte b = clampMapCoordinate(x); + byte c = clampMapCoordinate(z); + if (decorationType.is(MapDecorationTypes.PLAYER)) { + Pair, Byte> pair = this.playerDecorationTypeAndRotation(decorationType, level, yRot, x, z); return pair == null ? null : new MapItemSavedData.MapDecorationLocation(pair.getFirst(), b, c, pair.getSecond()); } else { - return !isInsideMap(f, g) && !this.unlimitedTracking + return !isInsideMap(x, z) && !this.unlimitedTracking ? null - : new MapItemSavedData.MapDecorationLocation(holder, b, c, this.calculateRotation(levelAccessor, d)); + : new MapItemSavedData.MapDecorationLocation(decorationType, b, c, this.calculateRotation(level, yRot)); } } @Nullable private Pair, Byte> playerDecorationTypeAndRotation( - Holder holder, @Nullable LevelAccessor levelAccessor, double d, float f, float g + Holder decorationType, @Nullable LevelAccessor level, double yRot, float x, float z ) { - if (isInsideMap(f, g)) { - return Pair.of(holder, this.calculateRotation(levelAccessor, d)); + if (isInsideMap(x, z)) { + return Pair.of(decorationType, this.calculateRotation(level, yRot)); } else { - Holder holder2 = this.decorationTypeForPlayerOutsideMap(f, g); - return holder2 == null ? null : Pair.of(holder2, (byte)0); + Holder holder = this.decorationTypeForPlayerOutsideMap(x, z); + return holder == null ? null : Pair.of(holder, (byte)0); } } - private byte calculateRotation(@Nullable LevelAccessor levelAccessor, double d) { - if (this.dimension == Level.NETHER && levelAccessor != null) { - int i = (int)(levelAccessor.getLevelData().getDayTime() / 10L); + private byte calculateRotation(@Nullable LevelAccessor level, double yRot) { + if (this.dimension == Level.NETHER && level != null) { + int i = (int)(level.getLevelData().getDayTime() / 10L); return (byte)(i * i * 34187121 + i * 121 >> 15 & 15); } else { - double e = d < 0.0 ? d - 8.0 : d + 8.0; - return (byte)(e * 16.0 / 360.0); + double d = yRot < 0.0 ? yRot - 8.0 : yRot + 8.0; + return (byte)(d * 16.0 / 360.0); } } - private static boolean isInsideMap(float f, float g) { + private static boolean isInsideMap(float x, float z) { int i = 63; - return f >= -63.0F && g >= -63.0F && f <= 63.0F && g <= 63.0F; + return x >= -63.0F && z >= -63.0F && x <= 63.0F && z <= 63.0F; } @Nullable - private Holder decorationTypeForPlayerOutsideMap(float f, float g) { + private Holder decorationTypeForPlayerOutsideMap(float x, float z) { int i = 320; - boolean bl = Math.abs(f) < 320.0F && Math.abs(g) < 320.0F; + boolean bl = Math.abs(x) < 320.0F && Math.abs(z) < 320.0F; if (bl) { return MapDecorationTypes.PLAYER_OFF_MAP; } else { @@ -359,12 +359,12 @@ public class MapItemSavedData extends SavedData { } } - private static byte clampMapCoordinate(float f) { + private static byte clampMapCoordinate(float coord) { int i = 63; - if (f <= -63.0F) { + if (coord <= -63.0F) { return -128; } else { - return f >= 63.0F ? 127 : (byte)(f * 2.0F + 0.5); + return coord >= 63.0F ? 127 : (byte)(coord * 2.0F + 0.5); } } diff --git a/net/minecraft/world/level/storage/DimensionDataStorage.java b/net/minecraft/world/level/storage/DimensionDataStorage.java index d4a5a395..0a9c884e 100644 --- a/net/minecraft/world/level/storage/DimensionDataStorage.java +++ b/net/minecraft/world/level/storage/DimensionDataStorage.java @@ -36,14 +36,14 @@ public class DimensionDataStorage implements AutoCloseable { private final Path dataFolder; private CompletableFuture pendingWriteFuture = CompletableFuture.completedFuture(null); - public DimensionDataStorage(Path path, DataFixer dataFixer, HolderLookup.Provider provider) { - this.fixerUpper = dataFixer; - this.dataFolder = path; - this.registries = provider; + public DimensionDataStorage(Path dataFolder, DataFixer fixerUpper, HolderLookup.Provider registries) { + this.fixerUpper = fixerUpper; + this.dataFolder = dataFolder; + this.registries = registries; } - private Path getDataFile(String string) { - return this.dataFolder.resolve(string + ".dat"); + private Path getDataFile(String filename) { + return this.dataFolder.resolve(filename + ".dat"); } public T computeIfAbsent(SavedData.Factory factory, String name) { @@ -194,10 +194,10 @@ public class DimensionDataStorage implements AutoCloseable { return map; } - private static CompletableFuture tryWriteAsync(Path path, CompoundTag compoundTag) { + private static CompletableFuture tryWriteAsync(Path path, CompoundTag tag) { return CompletableFuture.runAsync(() -> { try { - NbtIo.writeCompressed(compoundTag, path); + NbtIo.writeCompressed(tag, path); } catch (IOException var3) { LOGGER.error("Could not save data to {}", path.getFileName(), var3); } diff --git a/net/minecraft/world/level/storage/LevelStorageSource.java b/net/minecraft/world/level/storage/LevelStorageSource.java index 3f738727..152ea8c6 100644 --- a/net/minecraft/world/level/storage/LevelStorageSource.java +++ b/net/minecraft/world/level/storage/LevelStorageSource.java @@ -51,7 +51,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.resources.RegistryOps; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.WorldLoader; +import net.minecraft.server.WorldLoader.PackConfig; import net.minecraft.server.packs.repository.PackRepository; import net.minecraft.util.DirectoryLock; import net.minecraft.util.MemoryReserve; @@ -146,20 +146,20 @@ public class LevelStorageSource { return (WorldDataConfiguration)WorldDataConfiguration.CODEC.parse(dynamic).resultOrPartial(LOGGER::error).orElse(WorldDataConfiguration.DEFAULT); } - public static WorldLoader.PackConfig getPackConfig(Dynamic dynamic, PackRepository packRepository, boolean safeMode) { - return new WorldLoader.PackConfig(packRepository, readDataConfig(dynamic), safeMode, false); + public static PackConfig getPackConfig(Dynamic dynamic, PackRepository packRepository, boolean safeMode) { + return new PackConfig(packRepository, readDataConfig(dynamic), safeMode, false); } public static LevelDataAndDimensions getLevelDataAndDimensions( - Dynamic dynamic, WorldDataConfiguration worldDataConfiguration, Registry registry, HolderLookup.Provider provider + Dynamic levelData, WorldDataConfiguration dataConfiguration, Registry levelStemRegistry, HolderLookup.Provider registries ) { - Dynamic dynamic2 = RegistryOps.injectRegistryContext(dynamic, provider); - Dynamic dynamic3 = dynamic2.get("WorldGenSettings").orElseEmptyMap(); - WorldGenSettings worldGenSettings = WorldGenSettings.CODEC.parse(dynamic3).getOrThrow(); - LevelSettings levelSettings = LevelSettings.parse(dynamic2, worldDataConfiguration); - WorldDimensions.Complete complete = worldGenSettings.dimensions().bake(registry); - Lifecycle lifecycle = complete.lifecycle().add(provider.allRegistriesLifecycle()); - PrimaryLevelData primaryLevelData = PrimaryLevelData.parse(dynamic2, levelSettings, complete.specialWorldProperty(), worldGenSettings.options(), lifecycle); + Dynamic dynamic = RegistryOps.injectRegistryContext(levelData, registries); + Dynamic dynamic2 = dynamic.get("WorldGenSettings").orElseEmptyMap(); + WorldGenSettings worldGenSettings = WorldGenSettings.CODEC.parse(dynamic2).getOrThrow(); + LevelSettings levelSettings = LevelSettings.parse(dynamic, dataConfiguration); + WorldDimensions.Complete complete = worldGenSettings.dimensions().bake(levelStemRegistry); + Lifecycle lifecycle = complete.lifecycle().add(registries.allRegistriesLifecycle()); + PrimaryLevelData primaryLevelData = PrimaryLevelData.parse(dynamic, levelSettings, complete.specialWorldProperty(), worldGenSettings.options(), lifecycle); return new LevelDataAndDimensions(primaryLevelData, complete); } diff --git a/net/minecraft/world/level/storage/loot/BuiltInLootTables.java b/net/minecraft/world/level/storage/loot/BuiltInLootTables.java index 914265cf..7f65de7b 100644 --- a/net/minecraft/world/level/storage/loot/BuiltInLootTables.java +++ b/net/minecraft/world/level/storage/loot/BuiltInLootTables.java @@ -129,9 +129,9 @@ public class BuiltInLootTables { public static final ResourceKey OCEAN_RUIN_WARM_ARCHAEOLOGY = register("archaeology/ocean_ruin_warm"); public static final ResourceKey OCEAN_RUIN_COLD_ARCHAEOLOGY = register("archaeology/ocean_ruin_cold"); - private static void makeDyeKeyMap(EnumMap> enumMap, String string) { + private static void makeDyeKeyMap(EnumMap> output, String name) { for (DyeColor dyeColor : DyeColor.values()) { - enumMap.put(dyeColor, register(string + "/" + dyeColor.getName())); + output.put(dyeColor, register(name + "/" + dyeColor.getName())); } } diff --git a/net/minecraft/world/level/storage/loot/LootContext.java b/net/minecraft/world/level/storage/loot/LootContext.java index 16809f9b..fee83243 100644 --- a/net/minecraft/world/level/storage/loot/LootContext.java +++ b/net/minecraft/world/level/storage/loot/LootContext.java @@ -34,17 +34,17 @@ public class LootContext { this.lootDataResolver = lootDataResolver; } - public boolean hasParameter(ContextKey contextKey) { - return this.params.contextMap().has(contextKey); + public boolean hasParameter(ContextKey parameter) { + return this.params.contextMap().has(parameter); } - public T getParameter(ContextKey contextKey) { - return this.params.contextMap().getOrThrow(contextKey); + public T getParameter(ContextKey parameter) { + return this.params.contextMap().getOrThrow(parameter); } @Nullable - public T getOptionalParameter(ContextKey contextKey) { - return this.params.contextMap().getOptional(contextKey); + public T getOptionalParameter(ContextKey parameter) { + return this.params.contextMap().getOptional(parameter); } /** @@ -153,9 +153,9 @@ public class LootContext { private final String name; private final ContextKey param; - private EntityTarget(final String string2, final ContextKey contextKey) { - this.name = string2; - this.param = contextKey; + private EntityTarget(final String name, final ContextKey param) { + this.name = name; + this.param = param; } public ContextKey getParam() { diff --git a/net/minecraft/world/level/storage/loot/LootParams.java b/net/minecraft/world/level/storage/loot/LootParams.java index d1900ca7..0c1c36c5 100644 --- a/net/minecraft/world/level/storage/loot/LootParams.java +++ b/net/minecraft/world/level/storage/loot/LootParams.java @@ -17,11 +17,11 @@ public class LootParams { private final Map dynamicDrops; private final float luck; - public LootParams(ServerLevel serverLevel, ContextMap contextMap, Map map, float f) { - this.level = serverLevel; - this.params = contextMap; - this.dynamicDrops = map; - this.luck = f; + public LootParams(ServerLevel level, ContextMap params, Map dynamicDrops, float luck) { + this.level = level; + this.params = params; + this.dynamicDrops = dynamicDrops; + this.luck = luck; } public ServerLevel getLevel() { @@ -57,23 +57,23 @@ public class LootParams { return this.level; } - public LootParams.Builder withParameter(ContextKey contextKey, T object) { - this.params.withParameter(contextKey, object); + public LootParams.Builder withParameter(ContextKey paramater, T value) { + this.params.withParameter(paramater, value); return this; } - public LootParams.Builder withOptionalParameter(ContextKey contextKey, @Nullable T object) { - this.params.withOptionalParameter(contextKey, object); + public LootParams.Builder withOptionalParameter(ContextKey parameter, @Nullable T value) { + this.params.withOptionalParameter(parameter, value); return this; } - public T getParameter(ContextKey contextKey) { - return this.params.getParameter(contextKey); + public T getParameter(ContextKey parameter) { + return this.params.getParameter(parameter); } @Nullable - public T getOptionalParameter(ContextKey contextKey) { - return this.params.getOptionalParameter(contextKey); + public T getOptionalParameter(ContextKey parameter) { + return this.params.getOptionalParameter(parameter); } public LootParams.Builder withDynamicDrop(ResourceLocation name, LootParams.DynamicDrop dynamicDrop) { diff --git a/net/minecraft/world/level/storage/loot/LootTable.java b/net/minecraft/world/level/storage/loot/LootTable.java index 19940a84..28d050a5 100644 --- a/net/minecraft/world/level/storage/loot/LootTable.java +++ b/net/minecraft/world/level/storage/loot/LootTable.java @@ -49,12 +49,12 @@ public class LootTable { private final List functions; private final BiFunction compositeFunction; - LootTable(ContextKeySet contextKeySet, Optional optional, List list, List list2) { - this.paramSet = contextKeySet; - this.randomSequence = optional; - this.pools = list; - this.functions = list2; - this.compositeFunction = LootItemFunctions.compose(list2); + LootTable(ContextKeySet paramSet, Optional randomSequence, List pools, List functions) { + this.paramSet = paramSet; + this.randomSequence = randomSequence; + this.pools = pools; + this.functions = functions; + this.compositeFunction = LootItemFunctions.compose(functions); } public static Consumer createStackSplitter(ServerLevel level, Consumer output) { @@ -239,8 +239,8 @@ public class LootTable { return this; } - public LootTable.Builder setParamSet(ContextKeySet contextKeySet) { - this.paramSet = contextKeySet; + public LootTable.Builder setParamSet(ContextKeySet paramSet) { + this.paramSet = paramSet; return this; } diff --git a/net/minecraft/world/level/storage/loot/ValidationContext.java b/net/minecraft/world/level/storage/loot/ValidationContext.java index 4ee1c1bb..7ead59c6 100644 --- a/net/minecraft/world/level/storage/loot/ValidationContext.java +++ b/net/minecraft/world/level/storage/loot/ValidationContext.java @@ -19,19 +19,19 @@ public class ValidationContext { private final Optional resolver; private final Set> visitedElements; - public ValidationContext(ProblemReporter problemReporter, ContextKeySet contextKeySet, HolderGetter.Provider provider) { - this(problemReporter, contextKeySet, Optional.of(provider), Set.of()); + public ValidationContext(ProblemReporter reporter, ContextKeySet contextKeySet, HolderGetter.Provider resolver) { + this(reporter, contextKeySet, Optional.of(resolver), Set.of()); } - public ValidationContext(ProblemReporter problemReporter, ContextKeySet contextKeySet) { - this(problemReporter, contextKeySet, Optional.empty(), Set.of()); + public ValidationContext(ProblemReporter reporter, ContextKeySet contextKeySet) { + this(reporter, contextKeySet, Optional.empty(), Set.of()); } - private ValidationContext(ProblemReporter problemReporter, ContextKeySet contextKeySet, Optional optional, Set> set) { - this.reporter = problemReporter; + private ValidationContext(ProblemReporter reporter, ContextKeySet contextKeySet, Optional resolver, Set> visitedElements) { + this.reporter = reporter; this.contextKeySet = contextKeySet; - this.resolver = optional; - this.visitedElements = set; + this.resolver = resolver; + this.visitedElements = visitedElements; } /** @@ -57,8 +57,8 @@ public class ValidationContext { this.reporter.report(problem); } - public void validateContextUsage(LootContextUser lootContextUser) { - Set> set = lootContextUser.getReferencedContextParams(); + public void validateContextUsage(LootContextUser user) { + Set> set = user.getReferencedContextParams(); Set> set2 = Sets.>difference(set, this.contextKeySet.allowed()); if (!set2.isEmpty()) { this.reporter.report("Parameters " + set2 + " are not provided in this context"); diff --git a/net/minecraft/world/level/storage/loot/functions/CopyNameFunction.java b/net/minecraft/world/level/storage/loot/functions/CopyNameFunction.java index 48e432ae..a66b2a2b 100644 --- a/net/minecraft/world/level/storage/loot/functions/CopyNameFunction.java +++ b/net/minecraft/world/level/storage/loot/functions/CopyNameFunction.java @@ -63,9 +63,9 @@ public class CopyNameFunction extends LootItemConditionalFunction { private final String name; final ContextKey param; - private NameSource(final String string2, final ContextKey contextKey) { - this.name = string2; - this.param = contextKey; + private NameSource(final String name, final ContextKey param) { + this.name = name; + this.param = param; } @Override diff --git a/net/minecraft/world/level/storage/loot/parameters/LootContextParamSets.java b/net/minecraft/world/level/storage/loot/parameters/LootContextParamSets.java index 70815dff..22a40b3a 100644 --- a/net/minecraft/world/level/storage/loot/parameters/LootContextParamSets.java +++ b/net/minecraft/world/level/storage/loot/parameters/LootContextParamSets.java @@ -122,11 +122,11 @@ public class LootContextParamSets { .required(LootContextParams.BLOCK_STATE) ); - private static ContextKeySet register(String string, Consumer consumer) { + private static ContextKeySet register(String name, Consumer constructor) { ContextKeySet.Builder builder = new ContextKeySet.Builder(); - consumer.accept(builder); + constructor.accept(builder); ContextKeySet contextKeySet = builder.build(); - ResourceLocation resourceLocation = ResourceLocation.withDefaultNamespace(string); + ResourceLocation resourceLocation = ResourceLocation.withDefaultNamespace(name); ContextKeySet contextKeySet2 = REGISTRY.put(resourceLocation, contextKeySet); if (contextKeySet2 != null) { throw new IllegalStateException("Loot table parameter set " + resourceLocation + " is already registered"); diff --git a/net/minecraft/world/phys/AABB.java b/net/minecraft/world/phys/AABB.java index 36037a39..8bf2bf62 100644 --- a/net/minecraft/world/phys/AABB.java +++ b/net/minecraft/world/phys/AABB.java @@ -120,17 +120,17 @@ public class AABB { } /** - * Creates a new {@link AxisAlignedBB} that has been contracted by the given amount, with positive changes decreasing max values and negative changes increasing min values. + * Creates a new {@link AABB} that has been contracted by the given amount, with positive changes decreasing max values and negative changes increasing min values. *
* If the amount to contract by is larger than the length of a side, then the side will wrap (still creating a valid AABB - see last sample). * *

Samples:

* * - * - * - * - * + * + * + * + * *
InputResult
new AxisAlignedBB(0, 0, 0, 4, 4, 4).contract(2, 2, 2)
box[0.0, 0.0, 0.0 -> 2.0, 2.0, 2.0]
new AxisAlignedBB(0, 0, 0, 4, 4, 4).contract(-2, -2, -2)
box[2.0, 2.0, 2.0 -> 4.0, 4.0, 4.0]
new AxisAlignedBB(5, 5, 5, 7, 7, 7).contract(0, 1, -1)
box[5.0, 5.0, 6.0 -> 7.0, 6.0, 7.0]
new AxisAlignedBB(-2, -2, -2, 2, 2, 2).contract(4, -4, 0)
box[-8.0, 2.0, -2.0 -> -2.0, 8.0, 2.0]
new AABB(0, 0, 0, 4, 4, 4).contract(2, 2, 2)
box[0.0, 0.0, 0.0 -> 2.0, 2.0, 2.0]
new AABB(0, 0, 0, 4, 4, 4).contract(-2, -2, -2)
box[2.0, 2.0, 2.0 -> 4.0, 4.0, 4.0]
new AABB(5, 5, 5, 7, 7, 7).contract(0, 1, -1)
box[5.0, 5.0, 6.0 -> 7.0, 6.0, 7.0]
new AABB(-2, -2, -2, 2, 2, 2).contract(4, -4, 0)
box[-8.0, 2.0, -2.0 -> -2.0, 8.0, 2.0]
* *

See Also:

@@ -175,14 +175,14 @@ public class AABB { } /** - * Creates a new {@link AxisAlignedBB} that has been expanded by the given amount, with positive changes increasing max values and negative changes decreasing min values. + * Creates a new {@link AABB} that has been expanded by the given amount, with positive changes increasing max values and negative changes decreasing min values. * *

Samples:

* * - *
InputResult
new AxisAlignedBB(0, 0, 0, 1, 1, 1).expand(2, 2, 2)
box[0, 0, 0 -> 3, 3, 3]
- *
new AxisAlignedBB(0, 0, 0, 1, 1, 1).expand(-2, -2, -2)
box[-2, -2, -2 -> 1, 1, 1]
- *
new AxisAlignedBB(5, 5, 5, 7, 7, 7).expand(0, 1, -1)
box[5, 5, 4, 7, 8, 7]
+ *
new AABB(0, 0, 0, 1, 1, 1).expand(2, 2, 2)
box[0, 0, 0 -> 3, 3, 3]
+ *
new AABB(0, 0, 0, 1, 1, 1).expand(-2, -2, -2)
box[-2, -2, -2 -> 1, 1, 1]
+ *
new AABB(5, 5, 5, 7, 7, 7).expand(0, 1, -1)
box[5, 5, 4, 7, 8, 7]
*
* *

See Also:

@@ -223,7 +223,7 @@ public class AABB { } /** - * Creates a new {@link AxisAlignedBB} that has been contracted by the given amount in both directions. Negative values will shrink the AABB instead of expanding it. + * Creates a new {@link AABB} that has been contracted by the given amount in both directions. Negative values will shrink the AABB instead of expanding it. *
* Side lengths will be increased by 2 times the value of the parameters, since both min and max are changed. *
@@ -232,10 +232,10 @@ public class AABB { *

Samples:

* * - * - * - * - * + * + * + * + * *
InputResult
new AxisAlignedBB(0, 0, 0, 1, 1, 1).grow(2, 2, 2)
box[-2.0, -2.0, -2.0 -> 3.0, 3.0, 3.0]
new AxisAlignedBB(0, 0, 0, 6, 6, 6).grow(-2, -2, -2)
box[2.0, 2.0, 2.0 -> 4.0, 4.0, 4.0]
new AxisAlignedBB(5, 5, 5, 7, 7, 7).grow(0, 1, -1)
box[5.0, 4.0, 6.0 -> 7.0, 8.0, 6.0]
new AxisAlignedBB(1, 1, 1, 3, 3, 3).grow(-4, -2, -3)
box[-1.0, 1.0, 0.0 -> 5.0, 3.0, 4.0]
new AABB(0, 0, 0, 1, 1, 1).grow(2, 2, 2)
box[-2.0, -2.0, -2.0 -> 3.0, 3.0, 3.0]
new AABB(0, 0, 0, 6, 6, 6).grow(-2, -2, -2)
box[2.0, 2.0, 2.0 -> 4.0, 4.0, 4.0]
new AABB(5, 5, 5, 7, 7, 7).grow(0, 1, -1)
box[5.0, 4.0, 6.0 -> 7.0, 8.0, 6.0]
new AABB(1, 1, 1, 3, 3, 3).grow(-4, -2, -3)
box[-1.0, 1.0, 0.0 -> 5.0, 3.0, 4.0]
* *

See Also:

@@ -259,7 +259,7 @@ public class AABB { } /** - * Creates a new {@link AxisAlignedBB} that is expanded by the given value in all directions. Equivalent to {@link #grow(double, double, double)} with the given value for all 3 params. Negative values will shrink the AABB. + * Creates a new {@link AABB} that is expanded by the given value in all directions. Equivalent to {@link #grow(double, double, double)} with the given value for all 3 params. Negative values will shrink the AABB. *
* Side lengths will be increased by 2 times the value of the parameter, since both min and max are changed. *
@@ -367,7 +367,7 @@ public class AABB { } /** - * Creates a new {@link AxisAlignedBB} that is expanded by the given value in all directions. Equivalent to {@link #grow(double)} with value set to the negative of the value provided here. Passing a negative value to this method values will grow the AABB. + * Creates a new {@link AABB} that is expanded by the given value in all directions. Equivalent to {@link #grow(double)} with value set to the negative of the value provided here. Passing a negative value to this method values will grow the AABB. *
* Side lengths will be decreased by 2 times the value of the parameter, since both min and max are changed. *
@@ -383,17 +383,17 @@ public class AABB { return clip(this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ, from, to); } - public static Optional clip(double d, double e, double f, double g, double h, double i, Vec3 vec3, Vec3 vec32) { + public static Optional clip(double minX, double minY, double minZ, double maxX, double maxY, double maxZ, Vec3 from, Vec3 to) { double[] ds = new double[]{1.0}; - double j = vec32.x - vec3.x; - double k = vec32.y - vec3.y; - double l = vec32.z - vec3.z; - Direction direction = getDirection(d, e, f, g, h, i, vec3, ds, null, j, k, l); + double d = to.x - from.x; + double e = to.y - from.y; + double f = to.z - from.z; + Direction direction = getDirection(minX, minY, minZ, maxX, maxY, maxZ, from, ds, null, d, e, f); if (direction == null) { return Optional.empty(); } else { - double m = ds[0]; - return Optional.of(vec3.add(m * j, m * k, m * l)); + double g = ds[0]; + return Optional.of(from.add(g * d, g * e, g * f)); } } @@ -424,27 +424,38 @@ public class AABB { @Nullable private static Direction getDirection( - double d, double e, double f, double g, double h, double i, Vec3 vec3, double[] ds, @Nullable Direction direction, double j, double k, double l + double minX, + double minY, + double minZ, + double maxX, + double maxY, + double maxZ, + Vec3 start, + double[] mineDistance, + @Nullable Direction facing, + double deltaX, + double deltaY, + double deltaZ ) { - if (j > 1.0E-7) { - direction = clipPoint(ds, direction, j, k, l, d, e, h, f, i, Direction.WEST, vec3.x, vec3.y, vec3.z); - } else if (j < -1.0E-7) { - direction = clipPoint(ds, direction, j, k, l, g, e, h, f, i, Direction.EAST, vec3.x, vec3.y, vec3.z); + if (deltaX > 1.0E-7) { + facing = clipPoint(mineDistance, facing, deltaX, deltaY, deltaZ, minX, minY, maxY, minZ, maxZ, Direction.WEST, start.x, start.y, start.z); + } else if (deltaX < -1.0E-7) { + facing = clipPoint(mineDistance, facing, deltaX, deltaY, deltaZ, maxX, minY, maxY, minZ, maxZ, Direction.EAST, start.x, start.y, start.z); } - if (k > 1.0E-7) { - direction = clipPoint(ds, direction, k, l, j, e, f, i, d, g, Direction.DOWN, vec3.y, vec3.z, vec3.x); - } else if (k < -1.0E-7) { - direction = clipPoint(ds, direction, k, l, j, h, f, i, d, g, Direction.UP, vec3.y, vec3.z, vec3.x); + if (deltaY > 1.0E-7) { + facing = clipPoint(mineDistance, facing, deltaY, deltaZ, deltaX, minY, minZ, maxZ, minX, maxX, Direction.DOWN, start.y, start.z, start.x); + } else if (deltaY < -1.0E-7) { + facing = clipPoint(mineDistance, facing, deltaY, deltaZ, deltaX, maxY, minZ, maxZ, minX, maxX, Direction.UP, start.y, start.z, start.x); } - if (l > 1.0E-7) { - direction = clipPoint(ds, direction, l, j, k, f, d, g, e, h, Direction.NORTH, vec3.z, vec3.x, vec3.y); - } else if (l < -1.0E-7) { - direction = clipPoint(ds, direction, l, j, k, i, d, g, e, h, Direction.SOUTH, vec3.z, vec3.x, vec3.y); + if (deltaZ > 1.0E-7) { + facing = clipPoint(mineDistance, facing, deltaZ, deltaX, deltaY, minZ, minX, maxX, minY, maxY, Direction.NORTH, start.z, start.x, start.y); + } else if (deltaZ < -1.0E-7) { + facing = clipPoint(mineDistance, facing, deltaZ, deltaX, deltaY, maxZ, minX, maxX, minY, maxY, Direction.SOUTH, start.z, start.x, start.y); } - return direction; + return facing; } @Nullable @@ -475,17 +486,17 @@ public class AABB { } } - public boolean collidedAlongVector(Vec3 vec3, List list) { - Vec3 vec32 = this.getCenter(); - Vec3 vec33 = vec32.add(vec3); + public boolean collidedAlongVector(Vec3 vector, List boxes) { + Vec3 vec3 = this.getCenter(); + Vec3 vec32 = vec3.add(vector); - for (AABB aABB : list) { + for (AABB aABB : boxes) { AABB aABB2 = aABB.inflate(this.getXsize() * 0.5, this.getYsize() * 0.5, this.getZsize() * 0.5); - if (aABB2.contains(vec33) || aABB2.contains(vec32)) { + if (aABB2.contains(vec32) || aABB2.contains(vec3)) { return true; } - if (aABB2.clip(vec32, vec33).isPresent()) { + if (aABB2.clip(vec3, vec32).isPresent()) { return true; } } diff --git a/net/minecraft/world/phys/BlockHitResult.java b/net/minecraft/world/phys/BlockHitResult.java index 29991597..2da693ea 100644 --- a/net/minecraft/world/phys/BlockHitResult.java +++ b/net/minecraft/world/phys/BlockHitResult.java @@ -14,25 +14,25 @@ public class BlockHitResult extends HitResult { /** * Creates a new BlockRayTraceResult marked as a miss. */ - public static BlockHitResult miss(Vec3 location, Direction direction, BlockPos pos) { - return new BlockHitResult(true, location, direction, pos, false, false); + public static BlockHitResult miss(Vec3 location, Direction direction, BlockPos blockPos) { + return new BlockHitResult(true, location, direction, blockPos, false, false); } public BlockHitResult(Vec3 location, Direction direction, BlockPos blockPos, boolean inside) { this(false, location, direction, blockPos, inside, false); } - public BlockHitResult(Vec3 vec3, Direction direction, BlockPos blockPos, boolean bl, boolean bl2) { - this(false, vec3, direction, blockPos, bl, bl2); + public BlockHitResult(Vec3 location, Direction direction, BlockPos blockPos, boolean inside, boolean worldBorderHit) { + this(false, location, direction, blockPos, inside, worldBorderHit); } - private BlockHitResult(boolean bl, Vec3 vec3, Direction direction, BlockPos blockPos, boolean bl2, boolean bl3) { - super(vec3); - this.miss = bl; + private BlockHitResult(boolean miss, Vec3 location, Direction direction, BlockPos blockPos, boolean inside, boolean worldBorderHit) { + super(location); + this.miss = miss; this.direction = direction; this.blockPos = blockPos; - this.inside = bl2; - this.worldBorderHit = bl3; + this.inside = inside; + this.worldBorderHit = worldBorderHit; } /** diff --git a/net/minecraft/world/phys/Vec3.java b/net/minecraft/world/phys/Vec3.java index 12269445..d6c14fb9 100644 --- a/net/minecraft/world/phys/Vec3.java +++ b/net/minecraft/world/phys/Vec3.java @@ -84,8 +84,8 @@ public class Vec3 implements Position { this(vector.x(), vector.y(), vector.z()); } - public Vec3(Vec3i vec3i) { - this(vec3i.getX(), vec3i.getY(), vec3i.getZ()); + public Vec3(Vec3i vector) { + this(vector.getX(), vector.getY(), vector.getZ()); } /** @@ -118,16 +118,16 @@ public class Vec3 implements Position { return this.subtract(vec.x, vec.y, vec.z); } - public Vec3 subtract(double d) { - return this.subtract(d, d, d); + public Vec3 subtract(double amount) { + return this.subtract(amount, amount, amount); } public Vec3 subtract(double x, double y, double z) { return this.add(-x, -y, -z); } - public Vec3 add(double d) { - return this.add(d, d, d); + public Vec3 add(double amount) { + return this.add(amount, amount, amount); } public Vec3 add(Vec3 vec) { @@ -345,7 +345,7 @@ public class Vec3 implements Position { return new Vector3f((float)this.x, (float)this.y, (float)this.z); } - public Vec3 projectedOn(Vec3 vec3) { - return vec3.lengthSqr() == 0.0 ? vec3 : vec3.scale(this.dot(vec3)).scale(1.0 / vec3.lengthSqr()); + public Vec3 projectedOn(Vec3 vector) { + return vector.lengthSqr() == 0.0 ? vector : vector.scale(this.dot(vector)).scale(1.0 / vector.lengthSqr()); } } diff --git a/net/minecraft/world/phys/shapes/CollisionContext.java b/net/minecraft/world/phys/shapes/CollisionContext.java index 2036e7c5..35a6436c 100644 --- a/net/minecraft/world/phys/shapes/CollisionContext.java +++ b/net/minecraft/world/phys/shapes/CollisionContext.java @@ -22,8 +22,8 @@ public interface CollisionContext { }); } - static CollisionContext of(Entity entity, boolean bl) { - return new EntityCollisionContext(entity, bl); + static CollisionContext of(Entity entity, boolean canStandOnFluid) { + return new EntityCollisionContext(entity, canStandOnFluid); } boolean isDescending(); @@ -34,5 +34,5 @@ public interface CollisionContext { boolean canStandOnFluid(FluidState fluid1, FluidState fluid2); - VoxelShape getCollisionShape(BlockState blockState, CollisionGetter collisionGetter, BlockPos blockPos); + VoxelShape getCollisionShape(BlockState state, CollisionGetter collisionGetter, BlockPos pos); } diff --git a/net/minecraft/world/phys/shapes/EntityCollisionContext.java b/net/minecraft/world/phys/shapes/EntityCollisionContext.java index d7bb037e..5420e300 100644 --- a/net/minecraft/world/phys/shapes/EntityCollisionContext.java +++ b/net/minecraft/world/phys/shapes/EntityCollisionContext.java @@ -35,12 +35,12 @@ public class EntityCollisionContext implements CollisionContext { } @Deprecated - protected EntityCollisionContext(Entity entity, boolean bl) { + protected EntityCollisionContext(Entity entity, boolean canStandOnFluid) { this( entity.isDescending(), entity.getY(), entity instanceof LivingEntity ? ((LivingEntity)entity).getMainHandItem() : ItemStack.EMPTY, - bl ? fluidState -> true : (entity instanceof LivingEntity ? ((LivingEntity)entity)::canStandOnFluid : fluidState -> false), + canStandOnFluid ? fluidState -> true : (entity instanceof LivingEntity ? ((LivingEntity)entity)::canStandOnFluid : fluidState -> false), entity ); } @@ -56,8 +56,8 @@ public class EntityCollisionContext implements CollisionContext { } @Override - public VoxelShape getCollisionShape(BlockState blockState, CollisionGetter collisionGetter, BlockPos blockPos) { - return blockState.getCollisionShape(collisionGetter, blockPos, this); + public VoxelShape getCollisionShape(BlockState state, CollisionGetter collisionGetter, BlockPos pos) { + return state.getCollisionShape(collisionGetter, pos, this); } @Override diff --git a/net/minecraft/world/phys/shapes/MinecartCollisionContext.java b/net/minecraft/world/phys/shapes/MinecartCollisionContext.java index 4764c830..adc39311 100644 --- a/net/minecraft/world/phys/shapes/MinecartCollisionContext.java +++ b/net/minecraft/world/phys/shapes/MinecartCollisionContext.java @@ -14,14 +14,14 @@ public class MinecartCollisionContext extends EntityCollisionContext { @Nullable private BlockPos slopeIgnore; - protected MinecartCollisionContext(AbstractMinecart abstractMinecart, boolean bl) { - super(abstractMinecart, bl); - this.setupContext(abstractMinecart); + protected MinecartCollisionContext(AbstractMinecart minecart, boolean canStandOnFluid) { + super(minecart, canStandOnFluid); + this.setupContext(minecart); } - private void setupContext(AbstractMinecart abstractMinecart) { - BlockPos blockPos = abstractMinecart.getCurrentBlockPosOrRailBelow(); - BlockState blockState = abstractMinecart.level().getBlockState(blockPos); + private void setupContext(AbstractMinecart minecart) { + BlockPos blockPos = minecart.getCurrentBlockPosOrRailBelow(); + BlockState blockState = minecart.level().getBlockState(blockPos); boolean bl = BaseRailBlock.isRail(blockState); if (bl) { this.ingoreBelow = blockPos.below(); @@ -39,9 +39,7 @@ public class MinecartCollisionContext extends EntityCollisionContext { } @Override - public VoxelShape getCollisionShape(BlockState blockState, CollisionGetter collisionGetter, BlockPos blockPos) { - return !blockPos.equals(this.ingoreBelow) && !blockPos.equals(this.slopeIgnore) - ? super.getCollisionShape(blockState, collisionGetter, blockPos) - : Shapes.empty(); + public VoxelShape getCollisionShape(BlockState state, CollisionGetter collisionGetter, BlockPos pos) { + return !pos.equals(this.ingoreBelow) && !pos.equals(this.slopeIgnore) ? super.getCollisionShape(state, collisionGetter, pos) : Shapes.empty(); } } diff --git a/net/minecraft/world/phys/shapes/VoxelShape.java b/net/minecraft/world/phys/shapes/VoxelShape.java index 1fd59beb..79ed426b 100644 --- a/net/minecraft/world/phys/shapes/VoxelShape.java +++ b/net/minecraft/world/phys/shapes/VoxelShape.java @@ -13,6 +13,7 @@ import net.minecraft.util.Mth; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; +import net.minecraft.world.phys.shapes.Shapes.DoubleLineConsumer; import org.jetbrains.annotations.Nullable; public abstract class VoxelShape { @@ -72,8 +73,8 @@ public abstract class VoxelShape { return this.shape.isEmpty(); } - public VoxelShape move(Vec3 vec3) { - return this.move(vec3.x, vec3.y, vec3.z); + public VoxelShape move(Vec3 offset) { + return this.move(offset.x, offset.y, offset.z); } public VoxelShape move(double xOffset, double yOffset, double zOffset) { @@ -93,7 +94,7 @@ public abstract class VoxelShape { return voxelShapes[0]; } - public void forAllEdges(Shapes.DoubleLineConsumer action) { + public void forAllEdges(DoubleLineConsumer action) { this.shape .forAllEdges( (i, j, k, l, m, n) -> action.consume( @@ -108,7 +109,7 @@ public abstract class VoxelShape { ); } - public void forAllBoxes(Shapes.DoubleLineConsumer action) { + public void forAllBoxes(DoubleLineConsumer action) { DoubleList doubleList = this.getCoords(Direction.Axis.X); DoubleList doubleList2 = this.getCoords(Direction.Axis.Y); DoubleList doubleList3 = this.getCoords(Direction.Axis.Z); diff --git a/net/minecraft/world/ticks/LevelChunkTicks.java b/net/minecraft/world/ticks/LevelChunkTicks.java index e4afc16f..525200c5 100644 --- a/net/minecraft/world/ticks/LevelChunkTicks.java +++ b/net/minecraft/world/ticks/LevelChunkTicks.java @@ -96,23 +96,23 @@ public class LevelChunkTicks implements SerializableTickContainer, TickCon } @Override - public List> pack(long l) { + public List> pack(long gametime) { List> list = new ArrayList(this.tickQueue.size()); if (this.pendingTicks != null) { list.addAll(this.pendingTicks); } for (ScheduledTick scheduledTick : this.tickQueue) { - list.add(scheduledTick.toSavedTick(l)); + list.add(scheduledTick.toSavedTick(gametime)); } return list; } - public ListTag save(long gameTime, Function idGetter) { + public ListTag save(long gametime, Function idGetter) { ListTag listTag = new ListTag(); - for (SavedTick savedTick : this.pack(gameTime)) { + for (SavedTick savedTick : this.pack(gametime)) { listTag.add(savedTick.save(idGetter)); } diff --git a/net/minecraft/world/ticks/LevelTicks.java b/net/minecraft/world/ticks/LevelTicks.java index 653d784b..44ef1fcc 100644 --- a/net/minecraft/world/ticks/LevelTicks.java +++ b/net/minecraft/world/ticks/LevelTicks.java @@ -46,8 +46,8 @@ public class LevelTicks implements LevelTickAccess { } }; - public LevelTicks(LongPredicate longPredicate) { - this.tickCheck = longPredicate; + public LevelTicks(LongPredicate tickCheck) { + this.tickCheck = tickCheck; } public void addContainer(ChunkPos chunkPos, LevelChunkTicks chunkTicks) { diff --git a/net/minecraft/world/ticks/ProtoChunkTicks.java b/net/minecraft/world/ticks/ProtoChunkTicks.java index 7fa017db..2875caa5 100644 --- a/net/minecraft/world/ticks/ProtoChunkTicks.java +++ b/net/minecraft/world/ticks/ProtoChunkTicks.java @@ -33,7 +33,7 @@ public class ProtoChunkTicks implements SerializableTickContainer, TickCon } @Override - public List> pack(long l) { + public List> pack(long gametime) { return this.ticks; } @@ -41,9 +41,9 @@ public class ProtoChunkTicks implements SerializableTickContainer, TickCon return List.copyOf(this.ticks); } - public static ProtoChunkTicks load(List> list) { + public static ProtoChunkTicks load(List> ticks) { ProtoChunkTicks protoChunkTicks = new ProtoChunkTicks<>(); - list.forEach(protoChunkTicks::schedule); + ticks.forEach(protoChunkTicks::schedule); return protoChunkTicks; } } diff --git a/net/minecraft/world/ticks/SavedTick.java b/net/minecraft/world/ticks/SavedTick.java index de22f6d9..b435d5c9 100644 --- a/net/minecraft/world/ticks/SavedTick.java +++ b/net/minecraft/world/ticks/SavedTick.java @@ -32,13 +32,13 @@ public record SavedTick(T type, BlockPos pos, int delay, TickPriority priorit } }; - public static List> loadTickList(ListTag listTag, Function> function, ChunkPos chunkPos) { - List> list = new ArrayList(listTag.size()); + public static List> loadTickList(ListTag tickList, Function> idParser, ChunkPos chunkPos) { + List> list = new ArrayList(tickList.size()); long l = chunkPos.toLong(); - for (int i = 0; i < listTag.size(); i++) { - CompoundTag compoundTag = listTag.getCompound(i); - loadTick(compoundTag, function).ifPresent(savedTick -> { + for (int i = 0; i < tickList.size(); i++) { + CompoundTag compoundTag = tickList.getCompound(i); + loadTick(compoundTag, idParser).ifPresent(savedTick -> { if (ChunkPos.asLong(savedTick.pos()) == l) { list.add(savedTick); } diff --git a/net/minecraft/world/ticks/ScheduledTick.java b/net/minecraft/world/ticks/ScheduledTick.java index 022e0756..9cdf135b 100644 --- a/net/minecraft/world/ticks/ScheduledTick.java +++ b/net/minecraft/world/ticks/ScheduledTick.java @@ -50,7 +50,7 @@ public record ScheduledTick(T type, BlockPos pos, long triggerTick, TickPrior return new ScheduledTick<>(type, pos, 0L, TickPriority.NORMAL, 0L); } - public SavedTick toSavedTick(long l) { - return new SavedTick<>(this.type, this.pos, (int)(this.triggerTick - l), this.priority); + public SavedTick toSavedTick(long gametime) { + return new SavedTick<>(this.type, this.pos, (int)(this.triggerTick - gametime), this.priority); } } diff --git a/net/minecraft/world/ticks/SerializableTickContainer.java b/net/minecraft/world/ticks/SerializableTickContainer.java index e09840a2..0cd338e5 100644 --- a/net/minecraft/world/ticks/SerializableTickContainer.java +++ b/net/minecraft/world/ticks/SerializableTickContainer.java @@ -3,5 +3,5 @@ package net.minecraft.world.ticks; import java.util.List; public interface SerializableTickContainer { - List> pack(long l); + List> pack(long gametime); } diff --git a/version.json b/version.json index 8bcde73f..ff1c2567 100644 --- a/version.json +++ b/version.json @@ -1,14 +1,14 @@ { - "id": "1.21.2", - "name": "1.21.2", - "world_version": 4080, + "id": "1.21.3", + "name": "1.21.3", + "world_version": 4082, "series_id": "main", "protocol_version": 768, "pack_version": { "resource": 42, "data": 57 }, - "build_time": "2024-10-22T09:55:49+00:00", + "build_time": "2024-10-23T12:25:27+00:00", "java_component": "java-runtime-delta", "java_version": 21, "stable": true,