Cleaned up CraftBukkit comments in NMS.

Added newlines at the end of files
Fixed improper line endings on some files
Matched start - end comments
Added some missing comments for diffs
Fixed syntax on some spots
Minimized some diff
Removed some no longer used files
Added comment on some required files with no changes
Fixed imports of items used once
Added imports for items used more than once
This commit is contained in:
Wesley Wolfe
2012-07-22 01:18:00 -05:00
parent 8b9aad8c2b
commit b00de5f176
126 changed files with 491 additions and 751 deletions

View File

@@ -4,9 +4,12 @@ import java.util.Iterator;
import java.util.List;
// CraftBukkit start
import java.util.ArrayList;
import org.bukkit.block.BlockState;
import org.bukkit.craftbukkit.util.BlockStateListPopulator;
import org.bukkit.event.entity.EntityCreatePortalEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.EntityRegainHealthEvent;
import org.bukkit.Bukkit;
// CraftBukkit end
@@ -339,7 +342,7 @@ public class EntityEnderDragon extends EntityComplex {
this.s = null;
} else if (this.ticksLived % 10 == 0 && this.health < this.t) {
// CraftBukkit start
org.bukkit.event.entity.EntityRegainHealthEvent event = new org.bukkit.event.entity.EntityRegainHealthEvent(this.getBukkitEntity(), 1, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.ENDER_CRYSTAL);
EntityRegainHealthEvent event = new EntityRegainHealthEvent(this.getBukkitEntity(), 1, EntityRegainHealthEvent.RegainReason.ENDER_CRYSTAL);
this.world.getServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
@@ -398,7 +401,7 @@ public class EntityEnderDragon extends EntityComplex {
// CraftBukkit start - throw damage events when the dragon attacks
// The EntityHuman case is handled in EntityHuman, so don't throw it here
if (!(entity instanceof EntityHuman)) {
org.bukkit.event.entity.EntityDamageByEntityEvent damageEvent = new org.bukkit.event.entity.EntityDamageByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), org.bukkit.event.entity.EntityDamageEvent.DamageCause.ENTITY_ATTACK, 10);
EntityDamageByEntityEvent damageEvent = new EntityDamageByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), org.bukkit.event.entity.EntityDamageEvent.DamageCause.ENTITY_ATTACK, 10);
Bukkit.getPluginManager().callEvent(damageEvent);
if (!damageEvent.isCancelled()) {
@@ -460,7 +463,7 @@ public class EntityEnderDragon extends EntityComplex {
boolean flag1 = false;
// CraftBukkit start - create a list to hold all the destroyed blocks
List<org.bukkit.block.Block> destroyedBlocks = new ArrayList<org.bukkit.block.Block>();
List<org.bukkit.block.Block> destroyedBlocks = new java.util.ArrayList<org.bukkit.block.Block>();
org.bukkit.craftbukkit.CraftWorld craftWorld = this.world.getWorld();
// CraftBukkit end
for (int k1 = i; k1 <= l; ++k1) {
@@ -486,7 +489,7 @@ public class EntityEnderDragon extends EntityComplex {
if (flag1) {
// CraftBukkit start - set off an EntityExplodeEvent for the dragon exploding all these blocks
org.bukkit.entity.Entity bukkitEntity = this.getBukkitEntity();
org.bukkit.event.entity.EntityExplodeEvent event = new org.bukkit.event.entity.EntityExplodeEvent(bukkitEntity, bukkitEntity.getLocation(), destroyedBlocks, 0F);
EntityExplodeEvent event = new EntityExplodeEvent(bukkitEntity, bukkitEntity.getLocation(), destroyedBlocks, 0F);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) {
// this flag literally means 'Dragon hit something hard' (Obsidian, White Stone or Bedrock) and will cause the dragon to slow down.
@@ -575,7 +578,7 @@ public class EntityEnderDragon extends EntityComplex {
byte b1 = 4;
// CraftBukkit start - Replace any "this.world" in the following with just "world"!
org.bukkit.craftbukkit.util.BlockStateListPopulator world = new org.bukkit.craftbukkit.util.BlockStateListPopulator(this.world.getWorld());
BlockStateListPopulator world = new BlockStateListPopulator(this.world.getWorld());
for (int k = b0 - 1; k <= b0 + 32; ++k) {
for (int l = i - b1; l <= i + b1; ++l) {
@@ -611,7 +614,7 @@ public class EntityEnderDragon extends EntityComplex {
world.setTypeId(i, b0 + 3, j, Block.BEDROCK.id);
world.setTypeId(i, b0 + 4, j, Block.DRAGON_EGG.id);
org.bukkit.event.entity.EntityCreatePortalEvent event = new org.bukkit.event.entity.EntityCreatePortalEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), java.util.Collections.unmodifiableList(world.getList()), org.bukkit.PortalType.ENDER);
EntityCreatePortalEvent event = new EntityCreatePortalEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), java.util.Collections.unmodifiableList(world.getList()), org.bukkit.PortalType.ENDER);
this.world.getServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {