Miscellaneous cleanup and commenting
This commit is contained in:
@@ -87,7 +87,13 @@ public class Wizardry {
|
|||||||
/** Static instance of the {@link Settings} object for Wizardry. */
|
/** Static instance of the {@link Settings} object for Wizardry. */
|
||||||
public static final Settings settings = new Settings();
|
public static final Settings settings = new Settings();
|
||||||
|
|
||||||
/** Static instance of the {@link Logger} object for Wizardry. */
|
/** Static instance of the {@link Logger} object for Wizardry.
|
||||||
|
* <p>
|
||||||
|
* Logging conventions for wizardry (only these levels are used currently):
|
||||||
|
* <p>
|
||||||
|
* - <b>ERROR</b>: Anything that threw an exception; may or may not crash the game.<br>
|
||||||
|
* - <b>WARN</b>: Anything that isn't supposed to happen during normal operation, but didn't throw an exception.<br>
|
||||||
|
* - <b>INFO</b>: Anything that might happen during normal mod operation that the user needs to know about. */
|
||||||
public static Logger logger;
|
public static Logger logger;
|
||||||
|
|
||||||
// private static Pattern entityNamePattern;
|
// private static Pattern entityNamePattern;
|
||||||
|
|||||||
@@ -45,10 +45,8 @@ public class BlockSpectral extends BlockContainer {
|
|||||||
return EnumBlockRenderType.MODEL;
|
return EnumBlockRenderType.MODEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apparently it's OK to override this, despite it being deprecated. More
|
// Apparently it's OK to override this, despite it being deprecated. More importantly, it being deprecated is not
|
||||||
// importantly, it being deprecated is not
|
// Forge's doing, rather it is Mojang themselves misusing the @Deprecated annotation to mean 'internal, don't call'.
|
||||||
// Forge's doing, rather it is Mojang themselves misusing the @Deprecated
|
|
||||||
// annotation to mean 'internal, don't call'.
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpaqueCube(IBlockState state){
|
public boolean isOpaqueCube(IBlockState state){
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -79,8 +79,13 @@ public final class WizardryClientEventHandler {
|
|||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onTextureStitchEvent(TextureStitchEvent.Pre event){
|
public static void onTextureStitchEvent(TextureStitchEvent.Pre event){
|
||||||
|
|
||||||
event.getMap().registerSprite(ContainerArcaneWorkbench.EMPTY_SLOT_CRYSTAL);
|
event.getMap().registerSprite(ContainerArcaneWorkbench.EMPTY_SLOT_CRYSTAL);
|
||||||
event.getMap().registerSprite(ContainerArcaneWorkbench.EMPTY_SLOT_UPGRADE);
|
event.getMap().registerSprite(ContainerArcaneWorkbench.EMPTY_SLOT_UPGRADE);
|
||||||
|
|
||||||
|
// for(int i=0; i<7; i++){
|
||||||
|
// event.getMap().registerSprite(new ResourceLocation(Wizardry.MODID, "particle/ice_" + i));
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shift-scrolling to change spells
|
// Shift-scrolling to change spells
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ public class LayerStone implements LayerRenderer<EntityLivingBase> {
|
|||||||
this.model = renderer.getMainModel();
|
this.model = renderer.getMainModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: Does not work with zombie pigmen, I have no idea why.
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doRenderLayer(EntityLivingBase entity, float limbSwing, float limbSwingAmount, float partialTicks,
|
public void doRenderLayer(EntityLivingBase entity, float limbSwing, float limbSwingAmount, float partialTicks,
|
||||||
float ageInTicks, float netHeadYaw, float headPitch, float scale){
|
float ageInTicks, float netHeadYaw, float headPitch, float scale){
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public interface Imbuement {
|
|||||||
// If any imbuements were removed, replaces the enchantments on the book with the new ones, or
|
// If any imbuements were removed, replaces the enchantments on the book with the new ones, or
|
||||||
// deletes the book entirely if there are none left.
|
// deletes the book entirely if there are none left.
|
||||||
if(enchantments.isEmpty()){
|
if(enchantments.isEmpty()){
|
||||||
slot.putStack(ItemStack.EMPTY); // NOTE: Will need changing in 1.11
|
slot.putStack(ItemStack.EMPTY);
|
||||||
Wizardry.logger.info("Deleted enchanted book with illegal enchantments");
|
Wizardry.logger.info("Deleted enchanted book with illegal enchantments");
|
||||||
}else{
|
}else{
|
||||||
EnchantmentHelper.setEnchantments(enchantments, slot.getStack());
|
EnchantmentHelper.setEnchantments(enchantments, slot.getStack());
|
||||||
|
|||||||
@@ -161,12 +161,12 @@ public class EntityWizard extends EntityVillager implements ISpellCaster, IEntit
|
|||||||
|
|
||||||
// ... and is a mob, a summoned creature ...
|
// ... and is a mob, a summoned creature ...
|
||||||
if((entity instanceof IMob || entity instanceof ISummonedCreature
|
if((entity instanceof IMob || entity instanceof ISummonedCreature
|
||||||
// ... or in the whitelist ...
|
// ... or in the whitelist ...
|
||||||
|| Arrays.asList(Wizardry.settings.summonedCreatureTargetsWhitelist)
|
|| Arrays.asList(Wizardry.settings.summonedCreatureTargetsWhitelist)
|
||||||
.contains(EntityList.getEntityString(entity).toLowerCase(Locale.ROOT)))
|
.contains(EntityList.getEntityString(entity).toLowerCase(Locale.ROOT)))
|
||||||
// ... and isn't in the blacklist ...
|
// ... and isn't in the blacklist ...
|
||||||
&& !Arrays.asList(Wizardry.settings.summonedCreatureTargetsBlacklist)
|
&& !Arrays.asList(Wizardry.settings.summonedCreatureTargetsBlacklist)
|
||||||
.contains(EntityList.getEntityString(entity).toLowerCase(Locale.ROOT))){
|
.contains(EntityList.getEntityString(entity).toLowerCase(Locale.ROOT))){
|
||||||
// ... it can be attacked.
|
// ... it can be attacked.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -594,8 +594,7 @@ public class EntityWizard extends EntityVillager implements ISpellCaster, IEntit
|
|||||||
}else if(randomiser < 8){
|
}else if(randomiser < 8){
|
||||||
return new ItemStack(WizardryItems.arcane_tome, 1, 1);
|
return new ItemStack(WizardryItems.arcane_tome, 1, 1);
|
||||||
}else if(randomiser < 10){
|
}else if(randomiser < 10){
|
||||||
EntityEquipmentSlot slot = WizardryUtilities.ARMOUR_SLOTS[rand
|
EntityEquipmentSlot slot = WizardryUtilities.ARMOUR_SLOTS[rand.nextInt(WizardryUtilities.ARMOUR_SLOTS.length)];
|
||||||
.nextInt(WizardryUtilities.ARMOUR_SLOTS.length)];
|
|
||||||
if(this.getElement() != Element.MAGIC && rand.nextInt(4) > 0){
|
if(this.getElement() != Element.MAGIC && rand.nextInt(4) > 0){
|
||||||
// This means it is more likely for armour sold to be of the same element as the wizard if the
|
// This means it is more likely for armour sold to be of the same element as the wizard if the
|
||||||
// wizard has an element.
|
// wizard has an element.
|
||||||
|
|||||||
Reference in New Issue
Block a user