Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class KillSpit extends JavaPlugin {
- @Override
- public void onLoad() {
- try {
- MinecraftKey key = IRegistry.ENTITY_TYPE.getKey(EntityTypes.LLAMA_SPIT);
- Field aZ = EntityTypes.class.getDeclaredField("aZ");
- aZ.setAccessible(true);
- aZ.set(EntityTypes.LLAMA_SPIT, (EntityTypes.b) CustomSpit::new);
- IRegistry.ENTITY_TYPE.a(IRegistry.ENTITY_TYPE.a(EntityTypes.LLAMA_SPIT), key, EntityTypes.LLAMA_SPIT);
- getLogger().warning("REPLACED LLAMA SPIT!");
- } catch (IllegalAccessException | NoSuchFieldException e) {
- getLogger().severe("COULD NOT REPLACE LLAMA SPIT!");
- e.printStackTrace();
- }
- }
- public static class CustomSpit extends EntityLlamaSpit {
- public CustomSpit(EntityTypes<? extends EntityLlamaSpit> entitytypes, World world) {
- super(entitytypes, world);
- }
- public CustomSpit(World world, EntityLlama entityllama) {
- super(world, entityllama);
- }
- @Override
- public void tick() {
- die();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement