mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Some tweaks to tracking blocks as unnatural
This commit is contained in:
parent
3fd5cd03ee
commit
0b20fc2c16
@ -1,5 +1,5 @@
|
||||
Version 2.1.146
|
||||
A dupe exploit has been patched
|
||||
Improvements were made to tracking player placed blocks in mcMMO
|
||||
Players no longer lose levels below the level threshold in hardcore mode
|
||||
Hardcore now only applies penalties to levels above threshold
|
||||
|
||||
|
@ -127,10 +127,8 @@ public class BlockListener implements Listener {
|
||||
Block movedBlock;
|
||||
|
||||
for (Block b : event.getBlocks()) {
|
||||
if (BlockUtils.shouldBeWatched(b.getState())) {
|
||||
movedBlock = b.getRelative(direction);
|
||||
mcMMO.getPlaceStore().setTrue(movedBlock);
|
||||
}
|
||||
movedBlock = b.getRelative(direction);
|
||||
mcMMO.getPlaceStore().setTrue(movedBlock);
|
||||
}
|
||||
}
|
||||
|
||||
@ -190,7 +188,6 @@ public class BlockListener implements Listener {
|
||||
if(ExperienceConfig.getInstance().preventStoneLavaFarming())
|
||||
{
|
||||
if(event.getNewState().getType() != Material.OBSIDIAN
|
||||
&& BlockUtils.shouldBeWatched(event.getNewState())
|
||||
&& ExperienceConfig.getInstance().doesBlockGiveSkillXP(PrimarySkillType.MINING, event.getNewState().getBlockData()))
|
||||
{
|
||||
mcMMO.getPlaceStore().setTrue(event.getNewState());
|
||||
@ -208,11 +205,8 @@ public class BlockListener implements Listener {
|
||||
BlockState blockState = event.getBlock().getState();
|
||||
|
||||
/* Check if the blocks placed should be monitored so they do not give out XP in the future */
|
||||
if (BlockUtils.shouldBeWatched(blockState)) {
|
||||
// Don't count de-barking wood
|
||||
// if (!Tag.LOGS.isTagged(event.getBlockReplacedState().getType()) || !Tag.LOGS.isTagged(event.getBlockPlaced().getType()))
|
||||
mcMMO.getPlaceStore().setTrue(blockState);
|
||||
}
|
||||
// if (!Tag.LOGS.isTagged(event.getBlockReplacedState().getType()) || !Tag.LOGS.isTagged(event.getBlockPlaced().getType()))
|
||||
mcMMO.getPlaceStore().setTrue(blockState);
|
||||
|
||||
/* WORLD BLACKLIST CHECK */
|
||||
if(WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld())) {
|
||||
@ -250,9 +244,7 @@ public class BlockListener implements Listener {
|
||||
BlockState blockState = replacedBlockState.getBlock().getState();
|
||||
|
||||
/* Check if the blocks placed should be monitored so they do not give out XP in the future */
|
||||
if (BlockUtils.shouldBeWatched(blockState)) {
|
||||
mcMMO.getPlaceStore().setTrue(blockState);
|
||||
}
|
||||
mcMMO.getPlaceStore().setTrue(blockState);
|
||||
}
|
||||
|
||||
/* WORLD BLACKLIST CHECK */
|
||||
@ -276,9 +268,9 @@ public class BlockListener implements Listener {
|
||||
|
||||
BlockState blockState = event.getBlock().getState();
|
||||
|
||||
if (!BlockUtils.shouldBeWatched(blockState)) {
|
||||
return;
|
||||
}
|
||||
// if (!BlockUtils.shouldBeWatched(blockState)) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
mcMMO.getPlaceStore().setFalse(blockState);
|
||||
}
|
||||
@ -308,9 +300,9 @@ public class BlockListener implements Listener {
|
||||
BlockState blockState = event.getBlock().getState();
|
||||
Location location = blockState.getLocation();
|
||||
|
||||
if (!BlockUtils.shouldBeWatched(blockState)) {
|
||||
return;
|
||||
}
|
||||
// if (!BlockUtils.shouldBeWatched(blockState)) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
/* ALCHEMY - Cancel any brew in progress for that BrewingStand */
|
||||
if (blockState instanceof BrewingStand && Alchemy.brewingStandMap.containsKey(location)) {
|
||||
|
Loading…
Reference in New Issue
Block a user