Change meteor compass to target chest (#332)
This commit is contained in:
@@ -23,6 +23,7 @@ import appeng.api.AEApi;
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
import appeng.api.definitions.IBlocks;
|
||||
import appeng.api.definitions.IMaterials;
|
||||
import appeng.block.storage.BlockSkyChest;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.worlddata.WorldData;
|
||||
@@ -192,7 +193,8 @@ public final class MeteoritePlacer {
|
||||
this.skyStoneDefinition.maybeBlock().ifPresent(block -> this.placeMeteoriteSkyStone(w, x, y, z, block));
|
||||
|
||||
if (AEConfig.instance().isFeatureEnabled(AEFeature.SPAWN_PRESSES_IN_METEORITES)) {
|
||||
this.skyChestDefinition.maybeBlock().ifPresent(block -> this.putter.put(w, x, y, z, block));
|
||||
this.skyChestDefinition.maybeBlock().ifPresent(block -> this.putter.put(w, x, y, z,
|
||||
block.getDefaultState().withProperty(BlockSkyChest.NATURAL, true)));
|
||||
|
||||
final TileEntity te = w.getTileEntity(x, y, z);
|
||||
final InventoryAdaptor ap = InventoryAdaptor.getAdaptor(te, EnumFacing.UP);
|
||||
|
||||
@@ -42,7 +42,7 @@ public class FalloutCopy extends Fallout {
|
||||
public void getRandomFall(final IMeteoriteWorld w, final int x, final int y, final int z) {
|
||||
final double a = Math.random();
|
||||
if (a > SPECIFIED_BLOCK_THRESHOLD) {
|
||||
this.putter.put(w, x, y, z, this.block, 3);
|
||||
this.putter.put(w, x, y, z, this.block);
|
||||
} else {
|
||||
this.getOther(w, x, y, z, a);
|
||||
}
|
||||
@@ -56,11 +56,11 @@ public class FalloutCopy extends Fallout {
|
||||
public void getRandomInset(final IMeteoriteWorld w, final int x, final int y, final int z) {
|
||||
final double a = Math.random();
|
||||
if (a > SPECIFIED_BLOCK_THRESHOLD) {
|
||||
this.putter.put(w, x, y, z, this.block, 3);
|
||||
this.putter.put(w, x, y, z, this.block);
|
||||
} else if (a > AIR_BLOCK_THRESHOLD) {
|
||||
this.putter.put(w, x, y, z, Platform.AIR_BLOCK);
|
||||
} else {
|
||||
this.getOther(w, x, y, z, a - BLOCK_THRESHOLD_STEP);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class MeteoriteBlockPutter {
|
||||
return true;
|
||||
}
|
||||
|
||||
void put(final IMeteoriteWorld w, final int i, final int j, final int k, final IBlockState state, final int meta) {
|
||||
public void put(final IMeteoriteWorld w, final int i, final int j, final int k, final IBlockState state) {
|
||||
if (w.getBlock(i, j, k) == Blocks.BEDROCK) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user