mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-21 20:42:12 +00:00
- Book of Knowledge - ugh..
This commit is contained in:
1 parent
7f40306d8b
commit
6e02124c07
3 files changed
+13
-3
No files matched your search
@@ -74,6 +74,9 @@ public class BlockKnowledgeBook extends BlockContainer implements IBlockTranspar
|
||||
if(!lower.equals(ConfigBlocks.blockStoneDevice) || metaLower != 1) {
|
||||
breakThisBlock(world, x, y, z);
|
||||
}
|
||||
if(!world.isAirBlock(x, y + 1, z)) {
|
||||
breakThisBlock(world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
public void breakThisBlock(World world, int x, int y, int z) {
|
||||
|
||||
@@ -47,8 +47,8 @@ public class TileKnowledgeBook extends SynchronizedTileEntity implements EntityP
|
||||
|
||||
private static final Random rand = new Random();
|
||||
private static final int LOWEST_AMOUNT = 10;
|
||||
private static final int COGNITIO_TICKS = 300;
|
||||
private static final int MAX_NEEDED_KNOWLEDGE = 100;
|
||||
private static final int COGNITIO_TICKS = 150;
|
||||
private static final int MAX_NEEDED_KNOWLEDGE = 200;
|
||||
private static final int SURROUNDINGS_SEARCH_XZ = 4;
|
||||
private static final int SURROUNDINGS_SEARCH_Y = 3;
|
||||
private static final double MULTIPLIER = 4;
|
||||
@@ -140,6 +140,9 @@ public class TileKnowledgeBook extends SynchronizedTileEntity implements EntityP
|
||||
} else {
|
||||
this.workResearchAspects.aspects.put(a, value);
|
||||
}
|
||||
if(this.workResearchAspects.aspects.isEmpty()) {
|
||||
finishResearch();
|
||||
}
|
||||
}
|
||||
|
||||
private void checkSurroundings() {
|
||||
|
||||
@@ -35,7 +35,11 @@ public class ItemBlockKnowledgeBook extends ItemBlock {
|
||||
Block placedAgainst = world.getBlock(x, y, z);
|
||||
int againstMeta = world.getBlockMetadata(x, y, z);
|
||||
if(placedAgainstDir.equals(ForgeDirection.UP) && placedAgainst.equals(ConfigBlocks.blockStoneDevice) && againstMeta == 1) {
|
||||
return super.onItemUse(stack, player, world, x, y, z, side, hitX, hitY, hitZ);
|
||||
if(world.isAirBlock(x, y + 2, z)) {
|
||||
return super.onItemUse(stack, player, world, x, y, z, side, hitX, hitY, hitZ);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user