From 31ba0f9fa3fc6c481b90adb82df0cf66117bedef Mon Sep 17 00:00:00 2001 From: Daniel Mendes Date: Fri, 16 Feb 2024 01:02:45 +0000 Subject: [PATCH] Book of Knowledge changes - Reduce MAX_NEEDED_KNOWLEDGE to increase the chance of each research tick being successful; - Reduce SURROUNDINGS_SEARCH_Y to prevent bookshelf stacking to work for chance increasing; - Reduce COGNITIO_TICKS to consume Cognitio faster, in order to partially compensate for the increased research speed; - Cap the maximum knowledge boost from bookshelves to 50, in order to maximize the research chance per tick at 1/10. --- .../common/blocks/tiles/TileKnowledgeBook.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/makeo/gadomancy/common/blocks/tiles/TileKnowledgeBook.java b/src/main/java/makeo/gadomancy/common/blocks/tiles/TileKnowledgeBook.java index 1850ccd..ce767c6 100644 --- a/src/main/java/makeo/gadomancy/common/blocks/tiles/TileKnowledgeBook.java +++ b/src/main/java/makeo/gadomancy/common/blocks/tiles/TileKnowledgeBook.java @@ -48,10 +48,10 @@ public class TileKnowledgeBook extends SynchronizedTileEntity private static final Random rand = new Random(); private static final int LOWEST_AMOUNT = 10; - private static final int COGNITIO_TICKS = 150; - private static final int MAX_NEEDED_KNOWLEDGE = 200; + private static final int COGNITIO_TICKS = 20; + private static final int MAX_NEEDED_KNOWLEDGE = 60; private static final int SURROUNDINGS_SEARCH_XZ = 4; - private static final int SURROUNDINGS_SEARCH_Y = 3; + private static final int SURROUNDINGS_SEARCH_Y = 1; private static final double MULTIPLIER = 4; @Deprecated @@ -125,7 +125,7 @@ public class TileKnowledgeBook extends SynchronizedTileEntity } this.checkSurroundings(); - int chance = Math.max(0, TileKnowledgeBook.MAX_NEEDED_KNOWLEDGE - this.surroundingKnowledge) + 100; + int chance = Math.max(0, TileKnowledgeBook.MAX_NEEDED_KNOWLEDGE - this.surroundingKnowledge); if (TileKnowledgeBook.rand.nextInt(chance) == 0) { this.doResearchProgress(); this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); @@ -190,6 +190,8 @@ public class TileKnowledgeBook extends SynchronizedTileEntity } } } + // Maximum cap for bookshelf boost - 3 layers of bookshelves surrounding the book + if (this.surroundingKnowledge > 50) this.surroundingKnowledge = 50; } private void drainCognitio() {