refactor: Flattened magic crystal item and spectral dust registries
This commit is contained in:
@@ -40,7 +40,7 @@ public class BlockCrystalOre extends Block {
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState state, Random random, int fortune){
|
||||
return WizardryItems.magic_crystal;
|
||||
return WizardryItems.crystal_magic;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package electroblob.wizardry.block;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.constants.Element;
|
||||
import electroblob.wizardry.item.ItemSpectralDust;
|
||||
import electroblob.wizardry.registry.*;
|
||||
@@ -20,12 +21,14 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Arrays;
|
||||
@@ -110,7 +113,7 @@ public class BlockReceptacle extends BlockTorch implements ITileEntityProvider {
|
||||
|
||||
if(tileEntity instanceof TileEntityReceptacle){
|
||||
Element element = ((TileEntityReceptacle)tileEntity).getElement();
|
||||
if(element != null) drops.add(new ItemStack(WizardryItems.spectral_dust, 1, element.ordinal()));
|
||||
if(element != null) drops.add(new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, "spectral_dust_" + element.name().toLowerCase())), 1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +222,7 @@ public class BlockReceptacle extends BlockTorch implements ITileEntityProvider {
|
||||
|
||||
((TileEntityReceptacle)tileEntity).setElement(null);
|
||||
|
||||
ItemStack dust = new ItemStack(WizardryItems.spectral_dust, 1, currentElement.ordinal());
|
||||
ItemStack dust = new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, "spectral_dust_" + currentElement.name().toLowerCase())));
|
||||
|
||||
if(stack.isEmpty()){
|
||||
player.setHeldItem(hand, dust);
|
||||
|
||||
@@ -78,7 +78,7 @@ public final class WizardryModels {
|
||||
|
||||
// Items
|
||||
|
||||
registerMultiTexturedModel((ItemCrystal)WizardryItems.magic_crystal);
|
||||
//registerMultiTexturedModel((ItemCrystal)WizardryItems.magic_crystal);
|
||||
|
||||
registerWandModel(WizardryItems.magic_wand);
|
||||
registerWandModel(WizardryItems.apprentice_wand);
|
||||
@@ -121,8 +121,6 @@ public final class WizardryModels {
|
||||
registerWandModel(WizardryItems.master_sorcery_wand);
|
||||
registerWandModel(WizardryItems.master_healing_wand);
|
||||
|
||||
registerMultiTexturedModel((ItemSpectralDust)WizardryItems.spectral_dust);
|
||||
|
||||
// Automatic item model registry
|
||||
for(Item item : Item.REGISTRY){
|
||||
if(!registeredItems.contains(item) && item.getRegistryName().getNamespace().equals(Wizardry.MODID)){
|
||||
|
||||
@@ -341,7 +341,7 @@ public class EntityEvilWizard extends EntityMob implements ISpellCaster, IEntity
|
||||
int j = 3 + this.rand.nextInt(3) + this.rand.nextInt(1 + lootingLevel);
|
||||
|
||||
for(int k = 0; k < j; k++){
|
||||
this.dropItem(WizardryItems.magic_crystal, 1);
|
||||
this.dropItem(WizardryItems.crystal_magic, 1);
|
||||
}
|
||||
|
||||
// Evil wizards occasionally drop one of their spells as a spell book, but not magic missile. This isn't in
|
||||
|
||||
@@ -72,7 +72,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
||||
/** The wizard's current customer. */
|
||||
@Nullable
|
||||
private EntityPlayer customer;
|
||||
|
||||
|
||||
private int timeUntilReset;
|
||||
|
||||
/** addDefaultEquipmentAndRecipies is called if this is true */
|
||||
@@ -258,11 +258,11 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
||||
|
||||
@Override
|
||||
public ITextComponent getDisplayName(){
|
||||
|
||||
|
||||
if(this.hasCustomName()){
|
||||
return super.getDisplayName();
|
||||
}
|
||||
|
||||
|
||||
return this.getElement().getWizardName();
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
||||
protected boolean canDespawn(){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected SoundEvent getAmbientSound(){
|
||||
if(Wizardry.tisTheSeason) return WizardrySounds.ENTITY_WIZARD_HOHOHO;
|
||||
@@ -506,7 +506,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
||||
|
||||
// All wizards will buy spell books
|
||||
ItemStack anySpellBook = new ItemStack(WizardryItems.spell_book, 1, OreDictionary.WILDCARD_VALUE);
|
||||
ItemStack crystalStack = new ItemStack(WizardryItems.magic_crystal, 5);
|
||||
ItemStack crystalStack = new ItemStack(WizardryItems.crystal_magic, 5);
|
||||
|
||||
this.trades.add(new MerchantRecipe(anySpellBook, crystalStack));
|
||||
|
||||
@@ -576,7 +576,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
||||
if(itemToSell.isEmpty()) return;
|
||||
|
||||
ItemStack secondItemToBuy = tier == Tier.MASTER ? new ItemStack(WizardryItems.astral_diamond)
|
||||
: new ItemStack(WizardryItems.magic_crystal, tier.ordinal() * 3 + 1 + rand.nextInt(4));
|
||||
: new ItemStack(WizardryItems.crystal_magic, tier.ordinal() * 3 + 1 + rand.nextInt(4));
|
||||
|
||||
merchantrecipelist.add(new MerchantRecipe(this.getRandomPrice(tier), secondItemToBuy, itemToSell));
|
||||
}
|
||||
@@ -884,7 +884,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
||||
/**
|
||||
* Sets the list of blocks that are part of this wizard's tower. If a player breaks any of these blocks, the wizard
|
||||
* will get angry and attack them.
|
||||
*
|
||||
*
|
||||
* @param blocks A Set of BlockPos objects representing the blocks in the tower.
|
||||
*/
|
||||
public void setTowerBlocks(Set<BlockPos> blocks){
|
||||
@@ -916,11 +916,11 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Copied from their respective AI classes
|
||||
|
||||
|
||||
public static class EntityAILookAtTradePlayer extends EntityAIWatchClosest {
|
||||
|
||||
|
||||
private final EntityWizard wizard;
|
||||
|
||||
public EntityAILookAtTradePlayer(EntityWizard wizard){
|
||||
@@ -938,9 +938,9 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class EntityAITradePlayer extends EntityAIBase {
|
||||
|
||||
|
||||
private final EntityWizard wizard;
|
||||
|
||||
public EntityAITradePlayer(EntityWizard wizard){
|
||||
@@ -950,7 +950,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
||||
|
||||
@Override
|
||||
public boolean shouldExecute(){
|
||||
|
||||
|
||||
if(!this.wizard.isEntityAlive()){
|
||||
return false;
|
||||
}else if(this.wizard.isInWater()){
|
||||
@@ -960,7 +960,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
||||
}else if(this.wizard.velocityChanged){
|
||||
return false;
|
||||
}else{
|
||||
|
||||
|
||||
EntityPlayer entityplayer = this.wizard.getCustomer();
|
||||
|
||||
if(entityplayer == null){
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package electroblob.wizardry.integration.jei;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.client.DrawingUtils;
|
||||
import electroblob.wizardry.constants.Constants;
|
||||
import electroblob.wizardry.constants.Element;
|
||||
@@ -11,7 +12,9 @@ import mezz.jei.api.ingredients.VanillaTypes;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -94,9 +97,9 @@ public class ArcaneWorkbenchRecipe implements IRecipeWrapper {
|
||||
int count = MathHelper.ceil((float)mana / Constants.MANA_PER_CRYSTAL);
|
||||
// A stack of crystals will almost certainly be enough mana, but you never know!
|
||||
// Using ItemStack.EMPTY to avoid deprecated method; crystals' stack size is not stack-sensitive so it doesn't matter
|
||||
if(count <= WizardryItems.magic_crystal.getItemStackLimit(ItemStack.EMPTY)){
|
||||
for(int meta = 0; meta < Element.values().length; meta++){
|
||||
crystalStacks.add(new ItemStack(WizardryItems.magic_crystal, count, meta));
|
||||
if(count <= WizardryItems.crystal_magic.getItemStackLimit(ItemStack.EMPTY)){
|
||||
for (Element element : Element.values()) {
|
||||
crystalStacks.add(new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, "crystal_" + element.name().toLowerCase())), count));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -23,6 +23,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -214,7 +215,9 @@ public class ArcaneWorkbenchRecipeCategory implements IRecipeCategory<ArcaneWork
|
||||
List<ArcaneWorkbenchRecipe> recipes = new ArrayList<>();
|
||||
|
||||
List<ItemStack> crystals = new ArrayList<>();
|
||||
for(int meta = 0; meta < Element.values().length; meta++) crystals.add(new ItemStack(WizardryItems.magic_crystal, 1, meta));
|
||||
for (Element element : Element.values()) {
|
||||
crystals.add(new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, "crystal_" + element.name().toLowerCase()))));
|
||||
}
|
||||
List<ItemStack> shard = Collections.singletonList(new ItemStack(WizardryItems.crystal_shard));
|
||||
List<ItemStack> grandCrystal = Collections.singletonList(new ItemStack(WizardryItems.grand_crystal));
|
||||
|
||||
|
||||
+23
-10
@@ -19,6 +19,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -118,7 +119,13 @@ public class ImbuementAltarRecipeCategory implements IRecipeCategory<ImbuementAl
|
||||
List<ImbuementAltarRecipe> recipes = new ArrayList<>();
|
||||
|
||||
NonNullList<ItemStack> variants = NonNullList.create();
|
||||
WizardryItems.spectral_dust.getSubItems(WizardryItems.spectral_dust.getCreativeTab(), variants);
|
||||
variants.add(new ItemStack(WizardryItems.spectral_dust_earth));
|
||||
variants.add(new ItemStack(WizardryItems.spectral_dust_fire));
|
||||
variants.add(new ItemStack(WizardryItems.spectral_dust_healing));
|
||||
variants.add(new ItemStack(WizardryItems.spectral_dust_ice));
|
||||
variants.add(new ItemStack(WizardryItems.spectral_dust_lightning));
|
||||
variants.add(new ItemStack(WizardryItems.spectral_dust_necromancy));
|
||||
variants.add(new ItemStack(WizardryItems.spectral_dust_sorcery));
|
||||
|
||||
List<List<ItemStack>> dusts = new ArrayList<>();
|
||||
// Generate 4 separate lists, each in a different order to make it obvious they can be any element
|
||||
@@ -137,11 +144,12 @@ public class ImbuementAltarRecipeCategory implements IRecipeCategory<ImbuementAl
|
||||
|
||||
List<ImbuementAltarRecipe> recipes = new ArrayList<>();
|
||||
|
||||
ItemStack input = new ItemStack(WizardryItems.magic_crystal);
|
||||
ItemStack input = new ItemStack(WizardryItems.crystal_magic);
|
||||
|
||||
for(int meta = 1; meta < Element.values().length; meta++){
|
||||
List<List<ItemStack>> dusts = Collections.nCopies(4, Collections.singletonList(new ItemStack(WizardryItems.spectral_dust, 1, meta)));
|
||||
ItemStack output = new ItemStack(WizardryItems.magic_crystal, 1, meta);
|
||||
for(Element element : Element.values()){
|
||||
List<List<ItemStack>> dusts = Collections.nCopies(4, Collections.singletonList(new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID,
|
||||
"spectral_dust_" + element.name().toLowerCase())))));
|
||||
ItemStack output = new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, "crystal_" + element.name().toLowerCase())));
|
||||
recipes.add(new ImbuementAltarRecipe(input, dusts, output));
|
||||
}
|
||||
|
||||
@@ -155,10 +163,14 @@ public class ImbuementAltarRecipeCategory implements IRecipeCategory<ImbuementAl
|
||||
|
||||
ItemStack input = new ItemStack(WizardryBlocks.crystal_block);
|
||||
|
||||
for(int meta = 1; meta < Element.values().length; meta++){
|
||||
List<List<ItemStack>> dusts = Collections.nCopies(4, Collections.singletonList(new ItemStack(WizardryItems.spectral_dust, 1, meta)));
|
||||
ItemStack output = new ItemStack(WizardryBlocks.crystal_block, 1, meta);
|
||||
recipes.add(new ImbuementAltarRecipe(input, dusts, output));
|
||||
for(Element element : Element.values()){
|
||||
if(element == Element.MAGIC) continue;
|
||||
|
||||
int meta = element.ordinal();
|
||||
List<List<ItemStack>> dusts = Collections.nCopies(4, Collections.singletonList(new ItemStack(ForgeRegistries.ITEMS.getValue(
|
||||
new ResourceLocation(Wizardry.MODID, "spectral_dust_" + element.name().toLowerCase())))));
|
||||
ItemStack output = new ItemStack(WizardryBlocks.crystal_block, 1, meta);
|
||||
recipes.add(new ImbuementAltarRecipe(input, dusts, output));
|
||||
}
|
||||
|
||||
return recipes;
|
||||
@@ -179,7 +191,8 @@ public class ImbuementAltarRecipeCategory implements IRecipeCategory<ImbuementAl
|
||||
|
||||
if(e == Element.MAGIC) continue;
|
||||
|
||||
List<List<ItemStack>> dusts = Collections.nCopies(4, Collections.singletonList(new ItemStack(WizardryItems.spectral_dust, 1, e.ordinal())));
|
||||
List<List<ItemStack>> dusts = Collections.nCopies(4, Collections.singletonList(new ItemStack(
|
||||
ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, "spectral_dust_" + e.name().toLowerCase())))));
|
||||
ItemStack output = TileEntityImbuementAltar.getImbuementResult(input, new Element[]{e, e, e, e}, false, null, null);
|
||||
|
||||
if(!output.isEmpty()) recipes.add(new ImbuementAltarRecipe(input, dusts, output));
|
||||
|
||||
@@ -66,7 +66,7 @@ public class WizardryJEIPlugin implements IModPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
addItemInfo(registry, WizardryItems.magic_crystal);
|
||||
addItemInfo(registry, WizardryItems.crystal_magic);
|
||||
addItemInfo(registry, WizardryItems.wizard_handbook);
|
||||
addItemInfo(registry, WizardryItems.crystal_shard);
|
||||
addItemInfo(registry, WizardryItems.grand_crystal);
|
||||
|
||||
@@ -92,7 +92,7 @@ public class ContainerArcaneWorkbench extends Container implements ISpellSortabl
|
||||
}
|
||||
|
||||
this.addSlotToContainer(new SlotItemList(tileentity, CRYSTAL_SLOT, 13, 101, 64,
|
||||
WizardryItems.magic_crystal, WizardryItems.crystal_shard, WizardryItems.grand_crystal))
|
||||
WizardryItems.crystal_magic, WizardryItems.crystal_shard, WizardryItems.grand_crystal))
|
||||
.setBackgroundName(EMPTY_SLOT_CRYSTAL.toString());
|
||||
|
||||
this.addSlotToContainer(new SlotWorkbenchItem(tileentity, CENTRE_SLOT, 80, 64, this));
|
||||
|
||||
@@ -11,34 +11,12 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
/** Note that in 1.13, <i>the flattening</i> will make this class redundant, much like ItemCoal, which is probably its
|
||||
* closest analog in vanilla. */
|
||||
public class ItemCrystal extends Item implements IMultiTexturedItem {
|
||||
public class ItemCrystal extends Item {
|
||||
|
||||
public ItemCrystal(){
|
||||
super();
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(WizardryTabs.WIZARDRY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getModelName(ItemStack stack){
|
||||
int metadata = stack.getMetadata();
|
||||
if(metadata >= Element.values().length) metadata = 0;
|
||||
return new ResourceLocation(Wizardry.MODID, "crystal_" + Element.values()[metadata].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTranslationKey(ItemStack stack){
|
||||
return "item." + this.getModelName(stack).toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> items){
|
||||
if(tab == WizardryTabs.WIZARDRY){
|
||||
for(Element element : Element.values()){
|
||||
items.add(new ItemStack(this, 1, element.ordinal()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,39 +1,13 @@
|
||||
package electroblob.wizardry.item;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.constants.Element;
|
||||
import electroblob.wizardry.registry.WizardryTabs;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class ItemSpectralDust extends Item implements IMultiTexturedItem {
|
||||
public class ItemSpectralDust extends Item {
|
||||
|
||||
public ItemSpectralDust(){
|
||||
super();
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(WizardryTabs.WIZARDRY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getModelName(ItemStack stack){
|
||||
int metadata = stack.getMetadata();
|
||||
if(metadata >= Element.values().length) metadata = 0;
|
||||
return new ResourceLocation(Wizardry.MODID, "spectral_dust_" + Element.values()[metadata].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> items){
|
||||
if(tab == WizardryTabs.WIZARDRY){
|
||||
for(Element element : Arrays.copyOfRange(Element.values(), 1, Element.values().length)){
|
||||
items.add(new ItemStack(this, 1, element.ordinal()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,11 +26,13 @@ import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.BannerPattern;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
|
||||
@@ -78,7 +80,14 @@ public final class WizardryItems {
|
||||
// point where all the items were listed, but that's not possible within the current system unless you use an array,
|
||||
// which means you lose the individual fields...
|
||||
|
||||
public static final Item magic_crystal = placeholder();
|
||||
public static final Item crystal_magic = placeholder();
|
||||
public static final Item crystal_earth = placeholder();
|
||||
public static final Item crystal_fire = placeholder();
|
||||
public static final Item crystal_healing = placeholder();
|
||||
public static final Item crystal_ice = placeholder();
|
||||
public static final Item crystal_lightning = placeholder();
|
||||
public static final Item crystal_necromancy = placeholder();
|
||||
public static final Item crystal_sorcery = placeholder();
|
||||
|
||||
public static final Item grand_crystal = placeholder();
|
||||
public static final Item crystal_shard = placeholder();
|
||||
@@ -162,7 +171,13 @@ public final class WizardryItems {
|
||||
public static final Item smoke_bomb = placeholder();
|
||||
public static final Item spark_bomb = placeholder();
|
||||
|
||||
public static final Item spectral_dust = placeholder();
|
||||
public static final Item spectral_dust_earth = placeholder();
|
||||
public static final Item spectral_dust_fire = placeholder();
|
||||
public static final Item spectral_dust_healing = placeholder();
|
||||
public static final Item spectral_dust_ice = placeholder();
|
||||
public static final Item spectral_dust_lightning = placeholder();
|
||||
public static final Item spectral_dust_necromancy = placeholder();
|
||||
public static final Item spectral_dust_sorcery = placeholder();
|
||||
|
||||
public static final Item wizard_hat = placeholder();
|
||||
public static final Item wizard_robe = placeholder();
|
||||
@@ -567,7 +582,14 @@ public final class WizardryItems {
|
||||
|
||||
// Items
|
||||
|
||||
registerItem(registry, "magic_crystal", new ItemCrystal());
|
||||
registerItem(registry, "crystal_magic", new ItemCrystal());
|
||||
registerItem(registry, "crystal_earth", new ItemCrystal());
|
||||
registerItem(registry, "crystal_fire", new ItemCrystal());
|
||||
registerItem(registry, "crystal_healing", new ItemCrystal());
|
||||
registerItem(registry, "crystal_ice", new ItemCrystal());
|
||||
registerItem(registry, "crystal_lightning", new ItemCrystal());
|
||||
registerItem(registry, "crystal_necromancy", new ItemCrystal());
|
||||
registerItem(registry, "crystal_sorcery", new ItemCrystal());
|
||||
|
||||
registerItem(registry, "crystal_shard", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
registerItem(registry, "grand_crystal", new Item().setCreativeTab(WizardryTabs.WIZARDRY));
|
||||
@@ -654,7 +676,13 @@ public final class WizardryItems {
|
||||
registerItem(registry, "smoke_bomb", new ItemSmokeBomb());
|
||||
registerItem(registry, "spark_bomb", new ItemSparkBomb());
|
||||
|
||||
registerItem(registry, "spectral_dust", new ItemSpectralDust());
|
||||
registerItem(registry, "spectral_dust_earth", new ItemSpectralDust());
|
||||
registerItem(registry, "spectral_dust_fire", new ItemSpectralDust());
|
||||
registerItem(registry, "spectral_dust_healing", new ItemSpectralDust());
|
||||
registerItem(registry, "spectral_dust_ice", new ItemSpectralDust());
|
||||
registerItem(registry, "spectral_dust_lightning", new ItemSpectralDust());
|
||||
registerItem(registry, "spectral_dust_necromancy", new ItemSpectralDust());
|
||||
registerItem(registry, "spectral_dust_sorcery", new ItemSpectralDust());
|
||||
|
||||
registerItem(registry, "wizard_hat", new ItemWizardArmour(ArmourClass.WIZARD, EntityEquipmentSlot.HEAD, null), true);
|
||||
registerItem(registry, "wizard_robe", new ItemWizardArmour(ArmourClass.WIZARD, EntityEquipmentSlot.CHEST, null));
|
||||
@@ -991,9 +1019,11 @@ public final class WizardryItems {
|
||||
/** Called from init() in the main mod class to register wizardry's banner patterns. */
|
||||
public static void registerBannerPatterns(){
|
||||
for(Element element : Element.values()){
|
||||
if(element != Element.MAGIC) addBannerPattern("WIZARDRY_" + element.getName().toUpperCase(Locale.ROOT),
|
||||
"wizardry_" + element.getName(), "eb" + element.getName().charAt(0),
|
||||
new ItemStack(WizardryItems.magic_crystal, 1, element.ordinal()));
|
||||
if (element != Element.MAGIC) {
|
||||
addBannerPattern("WIZARDRY_" + element.getName().toUpperCase(Locale.ROOT),
|
||||
"wizardry_" + element.getName(), "eb" + element.getName().charAt(0),
|
||||
new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(Wizardry.MODID, "crystal_" + element.name().toLowerCase()))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public final class WizardryRecipes {
|
||||
|
||||
IForgeRegistry<IRecipe> registry = event.getRegistry();
|
||||
|
||||
FurnaceRecipes.instance().addSmeltingRecipeForBlock(WizardryBlocks.crystal_ore, new ItemStack(WizardryItems.magic_crystal), 0.5f);
|
||||
FurnaceRecipes.instance().addSmeltingRecipeForBlock(WizardryBlocks.crystal_ore, new ItemStack(WizardryItems.crystal_magic), 0.5f);
|
||||
|
||||
// Mana flask recipes
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ public class TileEntityImbuementAltar extends TileEntity implements ITickable {
|
||||
}
|
||||
}
|
||||
|
||||
if((input.getItem() == WizardryItems.magic_crystal || input.getItem() == Item.getItemFromBlock(WizardryBlocks.crystal_block))
|
||||
if((input.getItem() == WizardryItems.crystal_magic || input.getItem() == Item.getItemFromBlock(WizardryBlocks.crystal_block))
|
||||
&& input.getMetadata() == 0){
|
||||
|
||||
if(Arrays.stream(receptacleElements).distinct().count() == 1 && receptacleElements[0] != null){ // All the same element
|
||||
|
||||
@@ -216,6 +216,13 @@ item.ebwizardry\:ethereal_crystalweave.desc_extended=An enchanted fabric that is
|
||||
item.ebwizardry\:magic_silk.name=Magical Silk
|
||||
|
||||
item.ebwizardry\:spectral_dust.name=Spectral Dust
|
||||
item.ebwizardry\:spectral_dust_earth.name=Spectral Dust
|
||||
item.ebwizardry\:spectral_dust_fire.name=Spectral Dust
|
||||
item.ebwizardry\:spectral_dust_healing.name=Spectral Dust
|
||||
item.ebwizardry\:spectral_dust_ice.name=Spectral Dust
|
||||
item.ebwizardry\:spectral_dust_lightning.name=Spectral Dust
|
||||
item.ebwizardry\:spectral_dust_necromancy.name=Spectral Dust
|
||||
item.ebwizardry\:spectral_dust_sorcery.name=Spectral Dust
|
||||
|
||||
item.ebwizardry\:wizard_armour.element_cost_reduction=-%1$s%% %2$s cost
|
||||
item.ebwizardry\:wizard_armour.cooldown_reduction=-%1$s%% Cooldown
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:spectral_dust",
|
||||
"name": "ebwizardry:spectral_dust_earth",
|
||||
"weight": 1,
|
||||
"functions": [
|
||||
{
|
||||
@@ -15,11 +15,7 @@
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_data",
|
||||
"data": 5
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:spectral_dust",
|
||||
"name": "ebwizardry:spectral_dust_fire",
|
||||
"weight": 1,
|
||||
"functions": [
|
||||
{
|
||||
@@ -15,11 +15,7 @@
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_data",
|
||||
"data": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:spectral_dust",
|
||||
"name": "ebwizardry:spectral_dust_healing",
|
||||
"weight": 1,
|
||||
"functions": [
|
||||
{
|
||||
@@ -15,11 +15,7 @@
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_data",
|
||||
"data": 7
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:spectral_dust",
|
||||
"name": "ebwizardry:spectral_dust_ice",
|
||||
"weight": 1,
|
||||
"functions": [
|
||||
{
|
||||
@@ -15,11 +15,7 @@
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_data",
|
||||
"data": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:spectral_dust",
|
||||
"name": "ebwizardry:spectral_dust_lightning",
|
||||
"weight": 1,
|
||||
"functions": [
|
||||
{
|
||||
@@ -15,11 +15,7 @@
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_data",
|
||||
"data": 3
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:spectral_dust",
|
||||
"name": "ebwizardry:spectral_dust_necromancy",
|
||||
"weight": 1,
|
||||
"functions": [
|
||||
{
|
||||
@@ -15,11 +15,7 @@
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_data",
|
||||
"data": 4
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:spectral_dust",
|
||||
"name": "ebwizardry:spectral_dust_sorcery",
|
||||
"weight": 1,
|
||||
"functions": [
|
||||
{
|
||||
@@ -15,11 +15,7 @@
|
||||
"min": 0,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "minecraft:set_data",
|
||||
"data": 6
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -6,17 +6,38 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:magic_crystal",
|
||||
"weight": 1,
|
||||
"functions": [
|
||||
{
|
||||
"function": "set_data",
|
||||
"data": {
|
||||
"min": 1,
|
||||
"max": 7
|
||||
}
|
||||
}
|
||||
]
|
||||
"name": "ebwizardry:crystal_earth",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:crystal_fire",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:crystal_healing",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:crystal_ice",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:crystal_lightning",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:crystal_necromancy",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"type": "item",
|
||||
"name": "ebwizardry:crystal_sorcery",
|
||||
"weight": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user