Modified pets so they don't make different sounds anymore :toot:
This commit is contained in:
parent
6712ad427b
commit
d19d661c7d
@ -71,7 +71,7 @@ public class UtilEnt
|
||||
net.minecraft.server.v1_8_R3.Entity nmsEntity = ((CraftEntity) entity).getHandle();
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
nmsEntity.c(tag);
|
||||
tag.setByte("Silent", (byte) 1);
|
||||
tag.setByte("Silent", (byte) ((silence) ? 1 : 0));
|
||||
nmsEntity.f(tag);
|
||||
// Not working right now
|
||||
//((CraftEntity)entity).getHandle().setSilent(silence);
|
||||
|
@ -8,7 +8,6 @@ import java.util.Map.Entry;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
import net.minecraft.server.v1_8_R3.NBTTagCompound;
|
||||
import net.minecraft.server.v1_8_R3.NavigationAbstract;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -19,7 +18,6 @@ import org.bukkit.SkullType;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPigZombie;
|
||||
import org.bukkit.entity.Ageable;
|
||||
import org.bukkit.entity.Blaze;
|
||||
@ -53,8 +51,8 @@ import mineplex.core.account.event.ClientWebResponseEvent;
|
||||
import mineplex.core.blockrestore.BlockRestore;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.shape.ShapeWings;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.skin.SkinData;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
@ -70,7 +68,6 @@ import mineplex.core.disguise.disguises.DisguiseGuardian;
|
||||
import mineplex.core.disguise.disguises.DisguiseWither;
|
||||
import mineplex.core.disguise.disguises.DisguiseZombie;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.events.AddConditionEvent;
|
||||
import mineplex.core.inventory.InventoryManager;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.pet.repository.PetRepository;
|
||||
@ -316,10 +313,6 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
}
|
||||
else if (pet instanceof Blaze)
|
||||
{
|
||||
|
||||
AddConditionEvent event = new AddConditionEvent("Pet", pet, pet, AddConditionEvent.CoreConditionType.SILENCE, 0, -1, true, Material.SNOW_BALL, (byte) 0, false, false);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
|
||||
DisguiseZombie disguiseZombie = new DisguiseZombie(pet);
|
||||
disguiseZombie.setBaby(true);
|
||||
disguiseZombie.setHelmet(new ItemStack(Material.SKULL_ITEM, 1, (short) SkullType.WITHER.ordinal()));
|
||||
@ -335,6 +328,7 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
_disguiseManager.disguise(disguiseZombie);
|
||||
FlyingPetManager flyingPetManager = new FlyingPetManager(player, pet);
|
||||
_flyingPets.put(pet, flyingPetManager);
|
||||
UtilEnt.silence(pet, true);
|
||||
}
|
||||
else if (petType.equals(PetType.GINGERBREAD_MAN))
|
||||
{
|
||||
@ -345,18 +339,13 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
||||
zombie.getEquipment().setLeggings(ItemStackFactory.Instance.createColoredLeatherArmor(2, Color.fromRGB(203, 122, 56)));
|
||||
zombie.getEquipment().setBoots(ItemStackFactory.Instance.createColoredLeatherArmor(3, Color.fromRGB(203, 122, 56)));
|
||||
|
||||
UtilEnt.silence(zombie, true);
|
||||
|
||||
if (Get(player).getPets().get(entityType) != null && Get(player).getPets().get(entityType).length() > 0)
|
||||
{
|
||||
zombie.setCustomName(Get(player).getPets().get(entityType));
|
||||
zombie.setCustomNameVisible(true);
|
||||
}
|
||||
|
||||
// Makes it silent
|
||||
net.minecraft.server.v1_8_R3.Entity nmsEntity = ((CraftEntity) zombie).getHandle();
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
nmsEntity.c(tag);
|
||||
tag.setByte("Silent", (byte) 1);
|
||||
nmsEntity.f(tag);
|
||||
}
|
||||
|
||||
_activePetOwnerTypes.put(player.getName(), petType);
|
||||
|
Loading…
Reference in New Issue
Block a user