Advertisement
Restioson

Untitled

Apr 27th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. //In a for loop looping through an array of entities
  2. //Check if entity extends MapClampedEntity
  3. if (Clampable.class.isAssignableFrom(entity.getClass())) {
  4.  
  5. //Cast entity
  6. Clampable entityClamped = (Clampable) entity;
  7.  
  8. //Clamp entity
  9. entityClamped.clamp();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement