Skip to content

Commit

Permalink
added auto-smelt and fixed crash
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarstonConnell committed Jan 12, 2024
1 parent f53d201 commit be0ee23
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 54 deletions.
78 changes: 39 additions & 39 deletions MODIFIERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,32 @@ These effects are applied when breaking blocks.
**id:** `attracting` | **crafting:** `minecraft:iron_block`

**Decription:** Upon breaking a block (allowed by tool type), all items at that block's position will teleport to you.
### Melting
**id:** `melting` | **crafting:** `minecraft:magma_cream`
### Explosive
**id:** `explode` | **crafting:** `minecraft:tnt`

**Decription:** Items dropped by blocks broken with this tool will be smelted.
**Decription:** Upon breaking a block (allowed by tool type), the current block position will explode causing damage to surrounding blocks.
### Learning
**id:** `learning` | **crafting:** `minecraft:book`

**Decription:** After breaking 10 blocks as allowed by this tool, gain 3 experience points.
### Melting
**id:** `melting` | **crafting:** `minecraft:magma_cream`

**Decription:** Items dropped by blocks broken with this tool will be smelted.
### Veiny
**id:** `veiny` | **crafting:** `minecraft:diamond_pickaxe`

**Decription:** Breaking any block while crouching will cause all blocks of the same type adjacent to it to break up to 5 in each direction.
### Explosive
**id:** `explode` | **crafting:** `minecraft:tnt`

**Decription:** Upon breaking a block (allowed by tool type), the current block position will explode causing damage to surrounding blocks.
## Holders
These effects are applied when holding the tool.
### Rainy
**id:** `rainy` | **crafting:** `minecraft:cauldron`
### Appley
**id:** `absorption` | **crafting:** `minecraft:golden_apple`

**Decription:** While holding the tool in the rain, mine faster!
**Decription:** While holding the tool, get the absorption effect.
### Detecting
**id:** `detecting` | **crafting:** `minecraft:spyglass`

**Decription:** While holding the tool, ores around you will glow.
### Tomb Raider
**id:** `spawner` | **crafting:** `minecraft:mossy_cobblestone`

Expand All @@ -36,18 +40,14 @@ These effects are applied when holding the tool.
**id:** `filling` | **crafting:** `minecraft:cake`

**Decription:** While holding the tool, get the saturation effect.
### Rainy
**id:** `rainy` | **crafting:** `minecraft:cauldron`

**Decription:** While holding the tool in the rain, mine faster!
### Hasty
**id:** `hasty` | **crafting:** `minecraft:sugar`

**Decription:** While holding the tool, get the Haste effect.
### Detecting
**id:** `detecting` | **crafting:** `minecraft:spyglass`

**Decription:** While holding the tool, ores around you will glow.
### Appley
**id:** `absorption` | **crafting:** `minecraft:golden_apple`

**Decription:** While holding the tool, get the absorption effect.
## Users
These effects are applied when right clicking.
### Fire Starter
Expand All @@ -58,16 +58,24 @@ These effects are applied when right clicking.
**id:** `flame_thrower` | **crafting:** `minecraft:fire_charge`

**Decription:** Right clicking throws a fire ball.
### Heartha's Grace
**id:** `dirt_place` | **crafting:** `minecraft:dirt`

**Decription:** Right clicking on the top of a block with the tool in hand will place a dirt block and use 1 durability points.
### Spelunking
**id:** `torch_place` | **crafting:** `minecraft:glowstone`

**Decription:** Right clicking on the top of a block with the tool in hand will place a torch and use 10 durability points.
### Heartha's Grace
**id:** `dirt_place` | **crafting:** `minecraft:dirt`

**Decription:** Right clicking on the top of a block with the tool in hand will place a dirt block and use 1 durability points.
## Hurters
These effects are applied when hurting enemies.
### Poisonous
**id:** `poison` | **crafting:** `minecraft:poisonous_potato`

**Decription:** When attacking with tool, apply the poison effect to the target.
### Flaming
**id:** `flaming` | **crafting:** `minecraft:blaze_rod`

**Decription:** Sets enemy on fire for 2 seconds.
### Dexterous
**id:** `combo` | **crafting:** `minecraft:chorus_fruit`

Expand All @@ -76,27 +84,19 @@ These effects are applied when hurting enemies.
**id:** `necrotic` | **crafting:** `minecraft:wither_skeleton_skull`

**Decription:** Heals 10% of damage dealt to target.
### Withering
**id:** `wither` | **crafting:** `minecraft:wither_rose`

**Decription:** When attacking with tool, apply the wither effect to the target.
### Critical
**id:** `critical` | **crafting:** `minecraft:ghast_tear`
### Charged
**id:** `charged` | **crafting:** `minecraft:lightning_rod`

**Decription:** Always critically strikes enemy.
**Decription:** After 7 seconds, hitting and enemy will summon a lightning bolt and empty the charge meter.
### Blinding
**id:** `blinding` | **crafting:** `minecraft:carrot`

**Decription:** When attacking with tool, apply the blindness effect to the target.
### Poisonous
**id:** `poison` | **crafting:** `minecraft:poisonous_potato`

**Decription:** When attacking with tool, apply the poison effect to the target.
### Flaming
**id:** `flaming` | **crafting:** `minecraft:blaze_rod`
### Critical
**id:** `critical` | **crafting:** `minecraft:ghast_tear`

**Decription:** Sets enemy on fire for 2 seconds.
### Charged
**id:** `charged` | **crafting:** `minecraft:lightning_rod`
**Decription:** Always critically strikes enemy.
### Withering
**id:** `wither` | **crafting:** `minecraft:wither_rose`

**Decription:** After 7 seconds, hitting and enemy will summon a lightning bolt and empty the charge meter.
**Decription:** When attacking with tool, apply the wither effect to the target.
31 changes: 16 additions & 15 deletions src/main/java/dev/marston/randomloot/GenWiki.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,25 @@ private static void writeModifiers(FileWriter f) throws IOException {

public static void genWiki() {

try {
String isProd = System.getenv("RL_PROD").strip();

if (isProd.contains("false")) {
RandomLootMod.LOGGER.info("Creating wiki...");

try {
FileWriter wikiWriter = new FileWriter("../MODIFIERS.md");
writeModifiers(wikiWriter);
wikiWriter.close();
} catch (IOException e) {
e.printStackTrace();
}
}
} catch (Exception e) {
String isProdEnv = System.getenv("RL_PROD");
if (isProdEnv == null) {
return;
}

String isProd = isProdEnv.strip();

if (isProd.contains("false")) {
RandomLootMod.LOGGER.info("Creating wiki...");

try {
FileWriter wikiWriter = new FileWriter("../MODIFIERS.md");
writeModifiers(wikiWriter);
wikiWriter.close();
} catch (IOException e) {
e.printStackTrace();
}
}

}

public static String readRecipe(String trait) throws FileNotFoundException {
Expand Down

0 comments on commit be0ee23

Please sign in to comment.