Miscellaneous cleanup and commenting
This commit is contained in:
@@ -526,8 +526,7 @@ public class WizardData implements INBTSerializable<NBTTagCompound> {
|
||||
// THIS is why I wrote the list/map <-> NBT methods. Look how neat this is!
|
||||
properties.setTag("allies", WizardryUtilities.listToNBT(this.allies, WizardryUtilities::UUIDtoTagCompound));
|
||||
properties.setTag("allyNames", WizardryUtilities.listToNBT(this.allyNames, NBTTagString::new));
|
||||
properties.setTag("soulboundCreatures",
|
||||
WizardryUtilities.listToNBT(this.soulboundCreatures, WizardryUtilities::UUIDtoTagCompound));
|
||||
properties.setTag("soulboundCreatures", WizardryUtilities.listToNBT(this.soulboundCreatures, WizardryUtilities::UUIDtoTagCompound));
|
||||
|
||||
// Might be worth converting this over to WizardryUtilities.listToNBT.
|
||||
int[] spells = new int[this.spellsDiscovered.size()];
|
||||
|
||||
@@ -277,18 +277,18 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
factories = new HashMap<>();
|
||||
|
||||
factories.put(Type.BLIZZARD, (world, x, y, z) -> new ParticleBlizzard(world, x, y, z));
|
||||
factories.put(Type.DARK_MAGIC, (world, x, y, z) -> new ParticleDarkMagic(world, x, y, z));
|
||||
factories.put(Type.DUST, (world, x, y, z) -> new ParticleDust(world, x, y, z));
|
||||
factories.put(Type.FLASH, (world, x, y, z) -> new ParticleFlash(world, x, y, z));
|
||||
factories.put(Type.ICE, (world, x, y, z) -> new ParticleIce(world, x, y, z));
|
||||
factories.put(Type.LEAF, (world, x, y, z) -> new ParticleLeaf(world, x, y, z));
|
||||
factories.put(Type.MAGIC_BUBBLE, (world, x, y, z) -> new ParticleMagicBubble(world, x, y, z));
|
||||
factories.put(Type.MAGIC_FIRE, (world, x, y, z) -> new ParticleMagicFlame(world, x, y, z));
|
||||
factories.put(Type.PATH, (world, x, y, z) -> new ParticlePath(world, x, y, z));
|
||||
factories.put(Type.SNOW, (world, x, y, z) -> new ParticleSnow(world, x, y, z));
|
||||
factories.put(Type.SPARK, (world, x, y, z) -> new ParticleSpark(world, x, y, z));
|
||||
factories.put(Type.SPARKLE, (world, x, y, z) -> new ParticleSparkle(world, x, y, z));
|
||||
factories.put(Type.BLIZZARD, (world, x, y, z) -> new ParticleBlizzard(world, x, y, z));
|
||||
factories.put(Type.DARK_MAGIC, (world, x, y, z) -> new ParticleDarkMagic(world, x, y, z));
|
||||
factories.put(Type.DUST, (world, x, y, z) -> new ParticleDust(world, x, y, z));
|
||||
factories.put(Type.FLASH, (world, x, y, z) -> new ParticleFlash(world, x, y, z));
|
||||
factories.put(Type.ICE, (world, x, y, z) -> new ParticleIce(world, x, y, z));
|
||||
factories.put(Type.LEAF, (world, x, y, z) -> new ParticleLeaf(world, x, y, z));
|
||||
factories.put(Type.MAGIC_BUBBLE, (world, x, y, z) -> new ParticleMagicBubble(world, x, y, z));
|
||||
factories.put(Type.MAGIC_FIRE, (world, x, y, z) -> new ParticleMagicFlame(world, x, y, z));
|
||||
factories.put(Type.PATH, (world, x, y, z) -> new ParticlePath(world, x, y, z));
|
||||
factories.put(Type.SNOW, (world, x, y, z) -> new ParticleSnow(world, x, y, z));
|
||||
factories.put(Type.SPARK, (world, x, y, z) -> new ParticleSpark(world, x, y, z));
|
||||
factories.put(Type.SPARKLE, (world, x, y, z) -> new ParticleSparkle(world, x, y, z));
|
||||
factories.put(Type.SPARKLE_ROTATING, (world, x, y, z) -> new ParticleRotatingSparkle(world, x, y, z));
|
||||
}
|
||||
|
||||
|
||||
@@ -17,8 +17,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
public class EntityMeteor extends EntityFallingBlock {
|
||||
|
||||
/**
|
||||
* The entity blast multiplier. Only some projectiles cause a blast, which is why this isn't in
|
||||
* EntityMagicProjectile.
|
||||
* The entity blast multiplier.
|
||||
*/
|
||||
public float blastMultiplier;
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
||||
|
||||
this.tasks.addTask(0, new EntityAISwimming(this));
|
||||
// Why would you go to the effort of making the IMerchant interface and then have the AI classes only accept
|
||||
// EntityVillager? N
|
||||
// EntityVillager?
|
||||
this.tasks.addTask(1, new EntityAITradePlayer(this));
|
||||
this.tasks.addTask(1, new EntityAILookAtTradePlayer(this));
|
||||
this.tasks.addTask(4, new EntityAIRestrictOpenDoor(this));
|
||||
|
||||
@@ -60,7 +60,6 @@ public class ItemScroll extends Item {
|
||||
* server side, but the result to then be sent to the client, which means broken discovery system. Simply put, I
|
||||
* can't predict that, and it's not my job to cater for other people's incorrect usage of code, especially when
|
||||
* that might compromise some perfectly reasonable use (think Bibliocraft's 'best guess' book detection). */
|
||||
// TODO: Backport this proxy-based fix.
|
||||
return Wizardry.proxy.getScrollDisplayName(stack);
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import net.minecraft.world.World;
|
||||
* <p>
|
||||
* <code>ParticleBuilder.create(Type.SPARKLE).pos(x, y, z).vel(vx, vy, vz).colour(r, g, b).spawn(world);</code>
|
||||
* @author Electroblob
|
||||
* @since Wizardry 4.2.0
|
||||
* @since Wizardry 4.2
|
||||
*/
|
||||
public final class ParticleBuilder {
|
||||
|
||||
@@ -58,7 +58,7 @@ public final class ParticleBuilder {
|
||||
private Entity entity;
|
||||
|
||||
/** Enum constants representing the different types of particle added by wizardry. As of 4.2.0, this has been moved
|
||||
* from its own file {@code Type} to inside {@link ParticleBuilder}. This allowed its name to be
|
||||
* from its own file {@code WizardryParticleType} to inside {@link ParticleBuilder}. This allowed its name to be
|
||||
* shortened to simply {@code Type}, making most references more concise. References in classes where another
|
||||
* {@code Type} is also used can simply refer to the full name, {@code ParticleBuilder.Type}, which is no more verbose
|
||||
* than before.
|
||||
@@ -87,6 +87,11 @@ public final class ParticleBuilder {
|
||||
|
||||
// Convenience methods
|
||||
|
||||
// These may seem to go against the whole point of this class, but of course they return the ParticleBuilder instance
|
||||
// so anything else can still be chained onto them - centralising commonly-used particle spawning patterns without
|
||||
// losing any of the flexibility of the particle builder. In addition, callers of these methods are still free to
|
||||
// change any of the parameters that were set within them afterwards.
|
||||
|
||||
/**
|
||||
* Starts building a particle of the given type. Static convenience version of
|
||||
* {@link ParticleBuilder#particle(Type)}; makes code more concise.
|
||||
|
||||
@@ -464,7 +464,7 @@ public final class WizardryUtilities {
|
||||
|
||||
/**
|
||||
* Returns a list of the itemstacks in the given player's hotbar and offhand, sorted into the following order: main
|
||||
* hand, offhand, rest of hotbar left-to-right. The returned list is a modifiable copy of part of the player's
|
||||
* hand, offhand, rest of hotbar left-to-right. The returned list is a modifiable shallow copy of part of the player's
|
||||
* inventory stack list; as such, changes to the list are <b>not</b> written through to the player's inventory.
|
||||
* However, the ItemStack instances themselves are not copied, so changes to any of their fields (size, metadata...)
|
||||
* will change those in the player's inventory.
|
||||
@@ -983,7 +983,7 @@ public final class WizardryUtilities {
|
||||
* <p>
|
||||
* <i>As of wizardry 4.1.2, this method now returns <b>true</b> instead of false if the attacker is null. This
|
||||
* is because in the vast majority of cases, it makes more sense this way: if a construct has no caster, it
|
||||
* should affect all entities; if a minion has no caster is should target all entities; etc.</i>
|
||||
* should affect all entities; if a minion has no caster it should target all entities; etc.</i>
|
||||
*/
|
||||
public static boolean isValidTarget(Entity attacker, Entity target){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user