181182183184185186187188189
@SuppressWarnings({"unchecked", "rawtypes"}) public EntityController<CommonEntity<T>> getController() { if (isHooked()) { return (EntityController<CommonEntity<T>>) getHandle(NMSEntityHook.class).getController(); } final EntityController controller = new DefaultEntityController(); controller.bind(this); return controller; }
355356357358359360361362363364
// Prepare the hook this.prepareHook(); // If null, resolve to the default type if (controller == null) { controller = new DefaultEntityController(); } getController().bind(null); controller.bind(this); }
1718192021222324
public class NMSEntityHookImpl implements NMSEntityHook { private EntityController<?> controller; public NMSEntityHookImpl(CommonEntity<?> entity) { this.controller = new DefaultEntityController(); this.controller.bind(entity); }