mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Fixed minor Green Terra bugs on Stone Brick
This commit is contained in:
@ -103,7 +103,7 @@ public class BlastMining {
|
||||
while (iterator.hasNext()) {
|
||||
Block temp = iterator.next();
|
||||
|
||||
if (BlockChecks.isOre(temp.getType())) {
|
||||
if (BlockChecks.isOre(temp)) {
|
||||
ores.add(temp);
|
||||
}
|
||||
else {
|
||||
|
@ -42,7 +42,6 @@ public class Herbalism {
|
||||
}
|
||||
else if (hasSeeds && !block.getType().equals(Material.WHEAT)) {
|
||||
inventory.removeItem(new ItemStack(Material.SEEDS));
|
||||
player.updateInventory();
|
||||
greenTerraConvert(player, block);
|
||||
}
|
||||
}
|
||||
@ -51,13 +50,13 @@ public class Herbalism {
|
||||
Material type = block.getType();
|
||||
|
||||
if (Misc.blockBreakSimulate(block, player, false)) {
|
||||
if (Config.getInstance().getHerbalismGreenThumbSmoothbrickToMossy() && type.equals(Material.SMOOTH_BRICK)) {
|
||||
block.setData((byte) 0x1); //Set type of the brick to mossy
|
||||
if (Config.getInstance().getHerbalismGreenThumbSmoothbrickToMossy() && type == Material.SMOOTH_BRICK && block.getData() == 0) {
|
||||
block.setTypeIdAndData(block.getTypeId(), (byte) 1, false); //Set type of the brick to mossy, force the client update
|
||||
}
|
||||
else if (Config.getInstance().getHerbalismGreenThumbDirtToGrass() && type.equals(Material.DIRT)) {
|
||||
else if (Config.getInstance().getHerbalismGreenThumbDirtToGrass() && type == Material.DIRT) {
|
||||
block.setType(Material.GRASS);
|
||||
}
|
||||
else if (Config.getInstance().getHerbalismGreenThumbCobbleToMossy() && type.equals(Material.COBBLESTONE)) {
|
||||
else if (Config.getInstance().getHerbalismGreenThumbCobbleToMossy() && type == Material.COBBLESTONE) {
|
||||
block.setType(Material.MOSSY_COBBLESTONE);
|
||||
}
|
||||
}
|
||||
@ -299,7 +298,6 @@ public class Herbalism {
|
||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new GreenThumbTimer(block, PP), 1);
|
||||
|
||||
inventory.removeItem(new ItemStack(Material.SEEDS));
|
||||
player.updateInventory();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ public class Mining {
|
||||
|
||||
miningXP(player, block);
|
||||
|
||||
if (BlockChecks.canBeSuperBroken(block.getType())) {
|
||||
if (BlockChecks.canBeSuperBroken(block)) {
|
||||
final int MAX_BONUS_LEVEL = 1000;
|
||||
|
||||
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.MINING);
|
||||
|
@ -189,24 +189,24 @@ public class WoodCutting {
|
||||
Block yPositive = currentBlock.getRelative(0, 1, 0);
|
||||
|
||||
if (!mcMMO.placeStore.isTrue(currentBlock)) {
|
||||
if (!isTooAggressive(currentBlock, xPositive) && BlockChecks.treeFellerCompatible(xPositive.getType()) && !toBeFelled.contains(xPositive)) {
|
||||
if (!isTooAggressive(currentBlock, xPositive) && BlockChecks.treeFellerCompatible(xPositive) && !toBeFelled.contains(xPositive)) {
|
||||
processTreeFelling(xPositive, toBeFelled);
|
||||
}
|
||||
|
||||
if (!isTooAggressive(currentBlock, xNegative) && BlockChecks.treeFellerCompatible(xNegative.getType()) && !toBeFelled.contains(xNegative)) {
|
||||
if (!isTooAggressive(currentBlock, xNegative) && BlockChecks.treeFellerCompatible(xNegative) && !toBeFelled.contains(xNegative)) {
|
||||
processTreeFelling(xNegative, toBeFelled);
|
||||
}
|
||||
|
||||
if (!isTooAggressive(currentBlock, zPositive) && BlockChecks.treeFellerCompatible(zPositive.getType()) && !toBeFelled.contains(zPositive)) {
|
||||
if (!isTooAggressive(currentBlock, zPositive) && BlockChecks.treeFellerCompatible(zPositive) && !toBeFelled.contains(zPositive)) {
|
||||
processTreeFelling(zPositive, toBeFelled);
|
||||
}
|
||||
|
||||
if (!isTooAggressive(currentBlock, zNegative) && BlockChecks.treeFellerCompatible(zNegative.getType()) && !toBeFelled.contains(zNegative)) {
|
||||
if (!isTooAggressive(currentBlock, zNegative) && BlockChecks.treeFellerCompatible(zNegative) && !toBeFelled.contains(zNegative)) {
|
||||
processTreeFelling(zNegative, toBeFelled);
|
||||
}
|
||||
}
|
||||
|
||||
if (BlockChecks.treeFellerCompatible(yPositive.getType())) {
|
||||
if (BlockChecks.treeFellerCompatible(yPositive)) {
|
||||
if(!mcMMO.placeStore.isTrue(currentBlock) && !toBeFelled.contains(yPositive)) {
|
||||
processTreeFelling(yPositive, toBeFelled);
|
||||
}
|
||||
|
Reference in New Issue
Block a user