Drowned Transformation will no longer enabled XP on mob spawners, Kelp will now count the whole block for XP

This commit is contained in:
nossr50 2019-03-13 13:27:16 -07:00
parent 7296deb149
commit bb46b2a6ac
4 changed files with 19 additions and 2 deletions

View File

@ -7,6 +7,10 @@ Key:
! Change ! Change
- Removal - Removal
Version 2.1.16
Breaking Kelp should now count the whole plant for XP
Spawned Mobs that are not supposed to award XP will no longer reward XP once transformed (ie: drowned)
Version 2.1.15 Version 2.1.15
Fixed a bug where a max rank of Fuel Efficiency would cause its benefits to be lost Fixed a bug where a max rank of Fuel Efficiency would cause its benefits to be lost

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.nossr50.mcMMO</groupId> <groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId> <artifactId>mcMMO</artifactId>
<version>2.1.15</version> <version>2.1.16</version>
<name>mcMMO</name> <name>mcMMO</name>
<url>https://github.com/mcMMO-Dev/mcMMO</url> <url>https://github.com/mcMMO-Dev/mcMMO</url>
<scm> <scm>

View File

@ -54,6 +54,19 @@ public class EntityListener implements Listener {
this.plugin = plugin; this.plugin = plugin;
} }
@EventHandler(priority = EventPriority.MONITOR)
public void onEntityTransform(EntityTransformEvent event)
{
//Transfer metadata keys from mob-spawned mobs to new mobs
if(event.getEntity().getMetadata(mcMMO.entityMetadataKey) == null || event.getEntity().getMetadata(mcMMO.entityMetadataKey).size() <= 0)
{
for(Entity entity : event.getTransformedEntities())
{
entity.setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
}
}
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onEntityTargetEntity(EntityTargetLivingEntityEvent event) public void onEntityTargetEntity(EntityTargetLivingEntityEvent event)
{ {

View File

@ -126,7 +126,7 @@ public class HerbalismManager extends SkillManager {
public void herbalismBlockCheck(BlockState blockState) { public void herbalismBlockCheck(BlockState blockState) {
Player player = getPlayer(); Player player = getPlayer();
Material material = blockState.getType(); Material material = blockState.getType();
boolean oneBlockPlant = !(material == Material.CACTUS || material == Material.CHORUS_PLANT || material == Material.SUGAR_CANE); boolean oneBlockPlant = !(material == Material.CACTUS || material == Material.CHORUS_PLANT || material == Material.SUGAR_CANE || material == Material.KELP_PLANT);
// Prevents placing and immediately breaking blocks for exp // Prevents placing and immediately breaking blocks for exp
if (oneBlockPlant && mcMMO.getPlaceStore().isTrue(blockState)) { if (oneBlockPlant && mcMMO.getPlaceStore().isTrue(blockState)) {