Add lecterns

This commit is contained in:
Electroblob77
2020-04-08 00:16:12 +01:00
parent 938d0df95c
commit c5b5172481
79 changed files with 1534 additions and 211 deletions
@@ -0,0 +1,35 @@
package electroblob.wizardry.util;
import electroblob.wizardry.spell.Spell;
import java.util.Comparator;
/** Interface for things that have a list of spells that can be sorted using {@link SortType}. This allows
* {@link electroblob.wizardry.client.gui.GuiButtonSpellSort GuiButtonSpellSort} to change its appearance based on the
* current sort setting. */
public interface ISpellSortable {
/** Returns the current sort type this {@code ISpellSortable} is set to sort by. */
SortType getSortType();
/** Returns true if this {@code ISpellSortable} is currently set to sort in descending order, false if it is
* set to sort in ascending order. */
boolean isSortDescending();
enum SortType {
TIER("tier", Comparator.naturalOrder()),
ELEMENT("element", Comparator.comparing(Spell::getElement).thenComparing(Spell::getTier)),
ALPHABETICAL("alphabetical", Comparator.comparing(Spell::getUnlocalisedName));
public String name;
public Comparator<? super Spell> comparator;
SortType(String name, Comparator<? super Spell> comparator){
this.name = name;
this.comparator = comparator;
}
}
}
@@ -93,6 +93,8 @@ public final class ParticleBuilder {
public static class Type {
/** 3D-rendered light-beam particle.<p></p><b>Defaults:</b><br>Lifetime: 1 tick<br> Colour: white */
public static final ResourceLocation BEAM = new ResourceLocation(Wizardry.MODID,"beam");
/** Square block face highlight particle.<p></p><b>Defaults:</b><br>Lifetime: 160 ticks<br>Colour: white */
public static final ResourceLocation BLOCK_HIGHLIGHT = new ResourceLocation(Wizardry.MODID,"block_highlight");
/** Helical animated 'buffing' particle.<p></p><b>Defaults:</b><br>Lifetime: 15 ticks
* <br>Velocity: (0, 0.27, 0)<br>Colour: white */
public static final ResourceLocation BUFF = new ResourceLocation(Wizardry.MODID,"buff");