Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/net/earthcomputer/lightningtool/AbstractManipulator.java b/src/net/earthcomputer/lightningtool/AbstractManipulator.java
- index 816edf3..1f863cf 100644
- --- a/src/net/earthcomputer/lightningtool/AbstractManipulator.java
- +++ b/src/net/earthcomputer/lightningtool/AbstractManipulator.java
- @@ -22,7 +22,7 @@ public abstract class AbstractManipulator {
- protected SearchResult bestResult;
- public static final Property<Integer> DISTANCE = Property.create("distance", Integer.MAX_VALUE, Integer.MAX_VALUE,
- - Property.minimize());
- + Property.indifferent());
- protected RNGAdvancer<?> advancer;
- protected RNGAdvancer.ParameterHandler advancerParameterHandler;
- @@ -121,8 +121,10 @@ public abstract class AbstractManipulator {
- });
- }
- - if (result.isIdeal())
- + if (result.isIdeal()) {
- + System.out.println(result);
- stop();
- + }
- });
- long currentTime = System.nanoTime();
- diff --git a/src/net/earthcomputer/lightningtool/FortuneManipulator.java b/src/net/earthcomputer/lightningtool/FortuneManipulator.java
- index 61efda3..5d2b4d8 100644
- --- a/src/net/earthcomputer/lightningtool/FortuneManipulator.java
- +++ b/src/net/earthcomputer/lightningtool/FortuneManipulator.java
- @@ -19,6 +19,11 @@ public class FortuneManipulator extends AbstractManipulator {
- private Property<Integer> dropAmountProperty;
- private Property<Integer> xpDropAmountProperty;
- + private static final Property<Integer> LAPIS_DROP_AMOUNT = Property.create("lapis amount", 32, 4,
- + Property.maximize());
- + private static final Property<Integer> REDSTONE_DROP_AMOUNT = Property.create("redstone amount", 8, 4,
- + Property.maximize());
- +
- public static final RNGAdvancer<?>[] ADVANCERS = { RNGAdvancer.HOPPER };
- @Override
- @@ -59,11 +64,18 @@ public class FortuneManipulator extends AbstractManipulator {
- @Override
- protected SearchResult testRegion(int x, int z) {
- + rand.saveState();
- + int lapisDropped = Ore.LAPIS.quantityDropped(fortuneLevel, rand);
- + rand.restoreState();
- + rand.saveState();
- + int redstoneDropped = Ore.REDSTONE.quantityDropped(fortuneLevel, rand);
- + rand.restoreState();
- int quantityDropped = ore.quantityDropped(fortuneLevel, rand);
- int xpDropped = ore.xpDropped(rand);
- - return createSearchResult().withProperty(dropAmountProperty, quantityDropped).withProperty(xpDropAmountProperty,
- - xpDropped);
- + return createSearchResult().withProperty(LAPIS_DROP_AMOUNT, lapisDropped)
- + .withProperty(REDSTONE_DROP_AMOUNT, redstoneDropped).withProperty(dropAmountProperty, quantityDropped)
- + .withProperty(xpDropAmountProperty, xpDropped);
- }
- @Override
- @@ -90,6 +102,8 @@ public class FortuneManipulator extends AbstractManipulator {
- }
- }
- properties.add(xpDropAmountProperty);
- + properties.add(LAPIS_DROP_AMOUNT);
- + properties.add(REDSTONE_DROP_AMOUNT);
- advancer.addExtraProperties(properties);
- return new SearchResult(properties);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement