mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 05:02:30 +00:00
Fix #2710
This commit is contained in:
1 parent
99e8d6a70c
commit
c3a7cc5c27
2 files changed
+10
-7
No files matched your search
@@ -10,7 +10,9 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.subtile.functional;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockStone;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.state.pattern.BlockStateMatcher;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -105,10 +107,9 @@ public class SubTileOrechid extends SubTileFunctional {
|
||||
private BlockPos getCoordsToPut() {
|
||||
List<BlockPos> possibleCoords = new ArrayList<>();
|
||||
|
||||
Block source = getSourceBlock();
|
||||
for(BlockPos pos : BlockPos.getAllInBox(getPos().add(-RANGE, -RANGE_Y, -RANGE), getPos().add(RANGE, RANGE_Y, RANGE))) {
|
||||
IBlockState state = supertile.getWorld().getBlockState(pos);
|
||||
if(state.getBlock().isReplaceableOreGen(state, supertile.getWorld(), pos, BlockStateMatcher.forBlock(source)))
|
||||
if(state.getBlock().isReplaceableOreGen(state, supertile.getWorld(), pos, getReplaceMatcher()))
|
||||
possibleCoords.add(pos);
|
||||
}
|
||||
|
||||
@@ -125,8 +126,8 @@ public class SubTileOrechid extends SubTileFunctional {
|
||||
return BotaniaAPI.oreWeights;
|
||||
}
|
||||
|
||||
public Block getSourceBlock() {
|
||||
return Blocks.STONE;
|
||||
public Predicate<IBlockState> getReplaceMatcher() {
|
||||
return state -> state.getBlock() == Blocks.STONE && state.getValue(BlockStone.VARIANT) == BlockStone.EnumType.STONE;
|
||||
}
|
||||
|
||||
public int getCost() {
|
||||
|
||||
+5
-3
@@ -10,7 +10,9 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.subtile.functional;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
@@ -24,7 +26,7 @@ public class SubTileOrechidIgnem extends SubTileOrechid {
|
||||
|
||||
@Override
|
||||
public boolean canOperate() {
|
||||
return supertile.getWorld().provider.doesWaterVaporize();
|
||||
return supertile.getWorld().provider.isNether();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -33,8 +35,8 @@ public class SubTileOrechidIgnem extends SubTileOrechid {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getSourceBlock() {
|
||||
return Blocks.NETHERRACK;
|
||||
public Predicate<IBlockState> getReplaceMatcher() {
|
||||
return state -> state.getBlock() == Blocks.NETHERRACK;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user