fix mushrooms on fabric

This commit is contained in:
dfsek
2021-03-14 16:30:27 -07:00
parent b3868bd750
commit 6ab8cd5b5b
4 changed files with 13 additions and 8 deletions

View File

@@ -11,7 +11,9 @@ public interface Block extends Handle {
BlockState getState();
Block getRelative(BlockFace face);
default Block getRelative(BlockFace face) {
return getRelative(face, 1);
}
Block getRelative(BlockFace face, int len);
@@ -19,7 +21,9 @@ public interface Block extends Handle {
Location getLocation();
BlockType getType();
default BlockType getType() {
return getBlockData().getBlockType();
}
int getX();

View File

@@ -30,6 +30,7 @@ public class FabricTree implements Tree {
@Override
public MaterialSet getSpawnable() {
return MaterialSet.get(TerraFabricPlugin.getInstance().getWorldHandle().createBlockData("minecraft:grass_block"),
TerraFabricPlugin.getInstance().getWorldHandle().createBlockData("minecraft:podzol"));
TerraFabricPlugin.getInstance().getWorldHandle().createBlockData("minecraft:podzol"),
TerraFabricPlugin.getInstance().getWorldHandle().createBlockData("minecraft:mycelium"));
}
}

View File

@@ -34,11 +34,6 @@ public class FabricBlock implements Block {
return FabricBlockState.newInstance(this);
}
@Override
public Block getRelative(BlockFace face) {
return getRelative(face, 1);
}
@Override
public Block getRelative(BlockFace face, int len) {
BlockPos newPos = delegate.position.add(face.getModX() * len, face.getModY() * len, face.getModZ() * len);

View File

@@ -103,6 +103,11 @@ public class FabricChunkGeneratorWrapper extends ChunkGenerator implements Gener
}
@Override
public void generateFeatures(ChunkRegion region, StructureAccessor accessor) {
super.generateFeatures(region, accessor);
}
@Override
public void populateNoise(WorldAccess world, StructureAccessor accessor, Chunk chunk) {
FabricSeededWorldAccess worldAccess = new FabricSeededWorldAccess(world, seed, this);