mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 00:56:47 +01:00
Fixed Green Thumb going off when Green Terra is in use.
This commit is contained in:
parent
877bf7905b
commit
c805b17929
@ -169,7 +169,7 @@ public class mcBlockListener implements Listener
|
|||||||
//Wheat && Triple drops
|
//Wheat && Triple drops
|
||||||
if(PP.getGreenTerraMode() && Herbalism.canBeGreenTerra(block))
|
if(PP.getGreenTerraMode() && Herbalism.canBeGreenTerra(block))
|
||||||
{
|
{
|
||||||
Herbalism.herbalismProcCheck(block, player, event, plugin, true);
|
Herbalism.herbalismProcCheck(block, player, event, plugin);
|
||||||
Herbalism.greenTerraWheat(player, block, event, plugin);
|
Herbalism.greenTerraWheat(player, block, event, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,7 +277,7 @@ public class mcBlockListener implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(mcPermissions.getInstance().herbalism(player) && block.getData() != (byte) 5)
|
if(mcPermissions.getInstance().herbalism(player) && block.getData() != (byte) 5)
|
||||||
Herbalism.herbalismProcCheck(block, player, event, plugin, false);
|
Herbalism.herbalismProcCheck(block, player, event, plugin);
|
||||||
|
|
||||||
//Change the byte back when broken
|
//Change the byte back when broken
|
||||||
if(block.getData() == 5 && m.shouldBeWatched(block))
|
if(block.getData() == 5 && m.shouldBeWatched(block))
|
||||||
|
@ -90,8 +90,8 @@ public class Herbalism
|
|||||||
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
is = new ItemStack(mat, 1, (byte)0, (byte)0);
|
||||||
m.mcDropItem(loc, is);
|
m.mcDropItem(loc, is);
|
||||||
|
|
||||||
herbalismProcCheck(block, player, event, plugin, true);
|
herbalismProcCheck(block, player, event, plugin);
|
||||||
herbalismProcCheck(block, player, event, plugin, true);
|
herbalismProcCheck(block, player, event, plugin);
|
||||||
block.setData((byte) 0x03);
|
block.setData((byte) 0x03);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,7 +145,7 @@ public class Herbalism
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void herbalismProcCheck(Block block, Player player, BlockBreakEvent event, mcMMO plugin, boolean isGreenTerra)
|
public static void herbalismProcCheck(Block block, Player player, BlockBreakEvent event, mcMMO plugin)
|
||||||
{
|
{
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
PlayerProfile PP = Users.getProfile(player);
|
||||||
int herbLevel = PP.getSkillLevel(SkillType.HERBALISM);
|
int herbLevel = PP.getSkillLevel(SkillType.HERBALISM);
|
||||||
@ -170,9 +170,11 @@ public class Herbalism
|
|||||||
if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel))
|
if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel))
|
||||||
m.mcDropItem(loc, is);
|
m.mcDropItem(loc, is);
|
||||||
}
|
}
|
||||||
|
|
||||||
//GREEN THUMB
|
//GREEN THUMB
|
||||||
if(!isGreenTerra && (herbLevel > 1500 || (Math.random() * 1500 <= herbLevel)))
|
if(!PP.getGreenTerraMode() && (herbLevel > 1500 || (Math.random() * 1500 <= herbLevel)))
|
||||||
{
|
{
|
||||||
|
System.out.println("DEBUG: GREEN THUMB ACTIVATED");
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
m.mcDropItem(loc, is);
|
m.mcDropItem(loc, is);
|
||||||
//DROP SOME SEEDS
|
//DROP SOME SEEDS
|
||||||
|
Loading…
Reference in New Issue
Block a user