@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { RIDER_PITCH_DELTA.set(this, 0.0); RIDER_YAW_DELTA.set(this, 0.0); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } if (this.vehicle != null) { this.vehicle.passenger = null; } this.vehicle = entity; entity.passenger = this; } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { RIDER_PITCH_DELTA.set(this, 0.0); RIDER_YAW_DELTA.set(this, 0.0); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } if (this.vehicle != null) { this.vehicle.passenger = null; } this.vehicle = entity; entity.passenger = this; }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { RIDER_PITCH_DELTA.set(this, 0.0); RIDER_YAW_DELTA.set(this, 0.0); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } if (this.vehicle != null) { this.vehicle.passenger = null; } this.vehicle = entity; entity.passenger = this; } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { RIDER_PITCH_DELTA.set(this, 0.0); RIDER_YAW_DELTA.set(this, 0.0); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } if (this.vehicle != null) { this.vehicle.passenger = null; } this.vehicle = entity; entity.passenger = this; } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { RIDER_PITCH_DELTA.set(this, 0.0); RIDER_YAW_DELTA.set(this, 0.0); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } if (this.vehicle != null) { this.vehicle.passenger = null; } this.vehicle = entity; entity.passenger = this; }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { RIDER_PITCH_DELTA.set(this, 0.0); RIDER_YAW_DELTA.set(this, 0.0); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } if (this.vehicle != null) { this.vehicle.passenger = null; } this.vehicle = entity; entity.passenger = this; }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.bz() != null) { Entity oldVehicle = super.bz(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.getVehicle() != null) { Entity oldVehicle = super.getVehicle(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.bJ() != null) { Entity oldVehicle = super.bJ(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.by() != null) { Entity oldVehicle = super.by(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.getVehicle() != null) { Entity oldVehicle = super.getVehicle(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.bB() != null) { Entity oldVehicle = super.bB(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.bJ() != null) { Entity oldVehicle = super.bJ(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.getVehicle() != null) { Entity oldVehicle = super.getVehicle(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.bz() != null) { Entity oldVehicle = super.bz(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.bB() != null) { Entity oldVehicle = super.bB(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.bB() != null) { Entity oldVehicle = super.bB(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.getVehicle() != null) { Entity oldVehicle = super.getVehicle(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } } }
@Override public void setPassengerOfNMS(NMSEntityBase vehicleBase) { if (vehicleBase == null || !(vehicleBase instanceof Entity)) { // It should never dismount return; } Entity entity = (Entity) vehicleBase; try { if (super.bB() != null) { Entity oldVehicle = super.bB(); VEHICLE_FIELD.set(this, null); oldVehicle.passengers.remove(this); } VEHICLE_FIELD.set(this, entity); entity.passengers.clear(); entity.passengers.add(this); } catch (Exception ex) { ConsoleLogger.logDebugException(ex); } } }
public EntityNMSArmorStand(World world, HologramLine parentPiece) { super(world); setInvisible(true); setSmall(true); setArms(false); setGravity(true); setBasePlate(true); try { SET_MARKER_METHOD.invoke(this, true); } catch (Exception e) { ConsoleLogger.logDebugException(e); // It will still work, but the offset will be wrong. } this.parentPiece = parentPiece; try { DISABLED_SLOTS_FIELD.set(this, Integer.MAX_VALUE); } catch (Exception e) { // There's still the overridden method. } forceSetBoundingBox(new NullBoundingBox()); }