Clean
[esp.git] / src / net / encode / wurmesp / feature / hook / ProjectileCellRenderable.java
1 package net.encode.wurmesp.feature.hook;
2
3 import java.util.logging.Level;
4 import java.util.logging.Logger;
5 import javassist.CannotCompileException;
6 import javassist.ClassPool;
7 import javassist.CtClass;
8 import javassist.CtMethod;
9 import javassist.CtNewMethod;
10 import javassist.NotFoundException;
11 import net.encode.wurmesp.WurmEspMod;
12 import org.gotti.wurmunlimited.modloader.classhooks.HookManager;
13
14 public class ProjectileCellRenderable {
15 public ProjectileCellRenderable() {
16 try {
17 ClassPool classPool = HookManager.getInstance().getClassPool();
18 CtClass ctWurmArrow = classPool.getCtClass("com.wurmonline.client.renderer.cell.ProjectileCellRenderable");
19 CtMethod m = CtNewMethod.make((String)"public void initialize() { return; }", (CtClass)ctWurmArrow);
20 ctWurmArrow.addMethod(m);
21 WurmEspMod.logger.log(Level.INFO, "[WurmEspMod] Added method initialize on ProjectileCellRenderable");
22 }
23 catch (CannotCompileException | NotFoundException ex) {
24 Logger.getLogger(ProjectileCellRenderable.class.getName()).log(Level.SEVERE, null, ex);
25 }
26 }
27 }
28