Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/twilightforest/world/DefaultOrePlacer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.world.World;

class DefaultOrePlacer implements OrePlacer {

@Override
public boolean placeOre(World world, int x, int y, int z, Block block) {
// Set the block without block updates.
Expand Down
1 change: 1 addition & 0 deletions src/main/java/twilightforest/world/OrePlacer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
import net.minecraft.world.World;

public interface OrePlacer {

boolean placeOre(World world, int x, int y, int z, Block block);
}
17 changes: 9 additions & 8 deletions src/main/java/twilightforest/world/StalactiteOreGen.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
package twilightforest.world;

import com.google.common.collect.ImmutableList;
import net.minecraft.block.Block;
import net.minecraft.world.World;

import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

import net.minecraft.block.Block;
import net.minecraft.world.World;

import com.google.common.collect.ImmutableList;

public class StalactiteOreGen {
private static final List<OrePlacer> orePlacers =
new LinkedList<>(ImmutableList.of(new DefaultOrePlacer()));

private static final List<OrePlacer> orePlacers = new LinkedList<>(ImmutableList.of(new DefaultOrePlacer()));

/**
* Add an ore placing handler that will return true when it determines it
* wants to override the default ore placing behavior.
* Add an ore placing handler that will return true when it determines it wants to override the default ore placing
* behavior.
* <p>
* The OrePlacer must NOT have any side effects if it returns false.
*
Expand Down