Skip to content

Commit d0541db

Browse files
committed
Fix some comparison checks in block-api module
1 parent a6d8ba7 commit d0541db

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ legacy-fabric-permissions-api-v1.version = 1.1.2
2121
legacy-fabric-registry-sync-api-v1.version = 3.0.1
2222
legacy-fabric-registry-sync-api-v2.version = 1.0.1
2323
legacy-fabric-item-api-v1.version = 1.0.1
24-
legacy-fabric-block-api-v1.version = 1.0.1
24+
legacy-fabric-block-api-v1.version = 1.0.2
2525
legacy-fabric-block-entity-api-v1.version = 1.0.1
2626
legacy-fabric-rendering-api-v1.version = 1.0.1
2727
legacy-fabric-resource-loader-v1.version = 2.3.1

legacy-fabric-block-api-v1/1.12.2/src/main/java/net/legacyfabric/fabric/impl/block/versioned/EarlyInitializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ private static void blockRegistryInit(FabricRegistry<?> holder) {
6363
boolean useNeighbourLight = false;
6464
boolean isStairs = block instanceof StairsBlock;
6565
boolean isSlab = block instanceof SlabBlock;
66-
boolean isMissingTop = block == RegistryHelper.getValue(Item.REGISTRY, new Identifier("farmland"))
67-
|| (checkGrass && block == RegistryHelper.getValue(Item.REGISTRY, new Identifier("grass_path")));
66+
boolean isMissingTop = block == RegistryHelper.getValue(Block.REGISTRY, new Identifier("farmland"))
67+
|| (checkGrass && block == RegistryHelper.getValue(Block.REGISTRY, new Identifier("grass_path")));
6868
boolean isTranslucent = block.translucent;
6969
boolean isNotOpaque = block.opacity == 0;
7070

legacy-fabric-block-api-v1/1.7.10/src/main/java/net/legacyfabric/fabric/impl/block/versioned/EarlyInitializer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import net.minecraft.block.Block;
2121
import net.minecraft.block.SlabBlock;
2222
import net.minecraft.block.material.Material;
23-
import net.minecraft.item.Item;
2423

2524
import net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint;
2625

@@ -47,7 +46,7 @@ private static void blockRegistryInit(FabricRegistry<?> holder) {
4746
boolean useNeighbourLight = false;
4847
boolean isStairs = block.getBlockType() == 10;
4948
boolean isSlab = block instanceof SlabBlock;
50-
boolean isMissingTop = block == RegistryHelper.getValue(Item.REGISTRY, new Identifier("farmland"));
49+
boolean isMissingTop = block == RegistryHelper.getValue(Block.REGISTRY, new Identifier("farmland"));
5150
boolean isTranslucent = block.translucent;
5251
boolean isNotOpaque = block.getOpacity() == 0;
5352

0 commit comments

Comments
 (0)