Fixed crops; Bumped version
This commit is contained in:
parent
8bdffdb09f
commit
9dc92e5e8a
3 changed files with 14 additions and 6 deletions
|
@ -7,7 +7,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||
loader_version=0.11.6
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0.2
|
||||
mod_version = 1.0.3
|
||||
maven_group = dk.palmoe
|
||||
archives_base_name = immersivexp
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@ import com.google.gson.stream.JsonWriter;
|
|||
import org.apache.commons.io.IOUtils;;
|
||||
|
||||
public class Config {
|
||||
public int logBaseXP = 1;
|
||||
public int logRandXP = 2;
|
||||
public int cropBaseXP = 1;
|
||||
public int cropRandXP = 1;
|
||||
public int logBaseXP = 0;
|
||||
public int logRandXP = 1;
|
||||
public int cropBaseXP = 0;
|
||||
public int cropRandXP = 2;
|
||||
public int berriesBaseXP = 0;
|
||||
public int berriesRandXP = 1;
|
||||
|
||||
|
|
|
@ -16,7 +16,15 @@ public class Events {
|
|||
public static void init() {
|
||||
PlayerBlockBreakEvents.AFTER.register((world, player, pos, state, entity) -> {
|
||||
if (world instanceof ServerWorld) {
|
||||
if (state.getBlock() instanceof CropBlock || state.getBlock() instanceof MelonBlock) {
|
||||
if (state.getBlock() instanceof CropBlock) {
|
||||
int age = state.get(CropBlock.AGE);
|
||||
if (age == 7) {
|
||||
Config config = Config.getInstance();
|
||||
Util.spawnXp((ServerWorld) world, pos, config.cropBaseXP, config.cropRandXP);
|
||||
}
|
||||
}
|
||||
|
||||
if (state.getBlock() instanceof MelonBlock) {
|
||||
Config config = Config.getInstance();
|
||||
Util.spawnXp((ServerWorld) world, pos, config.cropBaseXP, config.cropRandXP);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue