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
@@ -11,7 +11,9 @@ public interface Block extends Handle {
BlockState getState(); BlockState getState();
Block getRelative(BlockFace face); default Block getRelative(BlockFace face) {
return getRelative(face, 1);
}
Block getRelative(BlockFace face, int len); Block getRelative(BlockFace face, int len);
@@ -19,7 +21,9 @@ public interface Block extends Handle {
Location getLocation(); Location getLocation();
BlockType getType(); default BlockType getType() {
return getBlockData().getBlockType();
}
int getX(); int getX();
@@ -30,6 +30,7 @@ public class FabricTree implements Tree {
@Override @Override
public MaterialSet getSpawnable() { public MaterialSet getSpawnable() {
return MaterialSet.get(TerraFabricPlugin.getInstance().getWorldHandle().createBlockData("minecraft:grass_block"), 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"));
} }
} }
@@ -34,11 +34,6 @@ public class FabricBlock implements Block {
return FabricBlockState.newInstance(this); return FabricBlockState.newInstance(this);
} }
@Override
public Block getRelative(BlockFace face) {
return getRelative(face, 1);
}
@Override @Override
public Block getRelative(BlockFace face, int len) { public Block getRelative(BlockFace face, int len) {
BlockPos newPos = delegate.position.add(face.getModX() * len, face.getModY() * len, face.getModZ() * len); BlockPos newPos = delegate.position.add(face.getModX() * len, face.getModY() * len, face.getModZ() * len);
@@ -103,6 +103,11 @@ public class FabricChunkGeneratorWrapper extends ChunkGenerator implements Gener
} }
@Override
public void generateFeatures(ChunkRegion region, StructureAccessor accessor) {
super.generateFeatures(region, accessor);
}
@Override @Override
public void populateNoise(WorldAccess world, StructureAccessor accessor, Chunk chunk) { public void populateNoise(WorldAccess world, StructureAccessor accessor, Chunk chunk) {
FabricSeededWorldAccess worldAccess = new FabricSeededWorldAccess(world, seed, this); FabricSeededWorldAccess worldAccess = new FabricSeededWorldAccess(world, seed, this);