Merge pull request #534 from Arcaratus/1.8-Rewrite
Teleposers and refractoring
This commit is contained in:
commit
0bb6e1eb36
|
@ -2,6 +2,7 @@ package WayofTime.bloodmagic;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
import WayofTime.bloodmagic.client.gui.GuiHandler;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
@ -11,11 +12,8 @@ import net.minecraftforge.fml.common.SidedProxy;
|
||||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||||
import net.minecraftforge.oredict.RecipeSorter;
|
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||||
import net.minecraftforge.oredict.RecipeSorter.Category;
|
|
||||||
import WayofTime.bloodmagic.api.Constants;
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
import WayofTime.bloodmagic.api.recipe.ShapedBloodOrbRecipe;
|
|
||||||
import WayofTime.bloodmagic.api.recipe.ShapelessBloodOrbRecipe;
|
|
||||||
import WayofTime.bloodmagic.api.util.helper.LogHelper;
|
import WayofTime.bloodmagic.api.util.helper.LogHelper;
|
||||||
import WayofTime.bloodmagic.network.BloodMagicPacketHandler;
|
import WayofTime.bloodmagic.network.BloodMagicPacketHandler;
|
||||||
import WayofTime.bloodmagic.proxy.CommonProxy;
|
import WayofTime.bloodmagic.proxy.CommonProxy;
|
||||||
|
@ -28,11 +26,10 @@ import WayofTime.bloodmagic.registry.ModRecipes;
|
||||||
import WayofTime.bloodmagic.registry.ModRituals;
|
import WayofTime.bloodmagic.registry.ModRituals;
|
||||||
import WayofTime.bloodmagic.util.handler.EventHandler;
|
import WayofTime.bloodmagic.util.handler.EventHandler;
|
||||||
|
|
||||||
@Mod(modid = Constants.Mod.MODID, name = Constants.Mod.NAME, version = Constants.Mod.VERSION, dependencies = Constants.Mod.DEPEND, acceptedMinecraftVersions = "[1.8.8,1.8.9]", guiFactory = "WayofTime.bloodmagic.client.gui.ConfigGuiFactory")
|
@Mod(modid = Constants.Mod.MODID, name = Constants.Mod.NAME, version = Constants.Mod.VERSION, dependencies = Constants.Mod.DEPEND, acceptedMinecraftVersions = "[1.8.8,1.8.9]", guiFactory = "WayofTime.bloodmagic.client.gui.config.ConfigGuiFactory")
|
||||||
@Getter
|
@Getter
|
||||||
public class BloodMagic
|
public class BloodMagic
|
||||||
{
|
{
|
||||||
|
|
||||||
@SidedProxy(serverSide = "WayofTime.bloodmagic.proxy.CommonProxy", clientSide = "WayofTime.bloodmagic.proxy.ClientProxy")
|
@SidedProxy(serverSide = "WayofTime.bloodmagic.proxy.CommonProxy", clientSide = "WayofTime.bloodmagic.proxy.ClientProxy")
|
||||||
public static CommonProxy proxy;
|
public static CommonProxy proxy;
|
||||||
|
|
||||||
|
@ -77,6 +74,7 @@ public class BloodMagic
|
||||||
ModRituals.initImperfectRituals();
|
ModRituals.initImperfectRituals();
|
||||||
ModCompatibility.registerModCompat();
|
ModCompatibility.registerModCompat();
|
||||||
ConfigHandler.checkRituals();
|
ConfigHandler.checkRituals();
|
||||||
|
NetworkRegistry.INSTANCE.registerGuiHandler(BloodMagic.instance, new GuiHandler());
|
||||||
|
|
||||||
proxy.init();
|
proxy.init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ import java.util.List;
|
||||||
|
|
||||||
public class ConfigHandler
|
public class ConfigHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
private static Configuration config;
|
private static Configuration config;
|
||||||
|
|
|
@ -13,7 +13,6 @@ import WayofTime.bloodmagic.client.render.alchemyArray.BindingAlchemyCircleRende
|
||||||
|
|
||||||
public class AlchemyArrayEffectBinding extends AlchemyArrayEffect
|
public class AlchemyArrayEffectBinding extends AlchemyArrayEffect
|
||||||
{
|
{
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public final ItemStack outputStack;
|
public final ItemStack outputStack;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@ import com.google.common.base.Strings;
|
||||||
|
|
||||||
public class BloodAltar
|
public class BloodAltar
|
||||||
{
|
{
|
||||||
|
|
||||||
private TileAltar tileAltar;
|
private TileAltar tileAltar;
|
||||||
private int internalCounter = 0;
|
private int internalCounter = 0;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraftforge.fml.common.registry.GameData;
|
||||||
@EqualsAndHashCode
|
@EqualsAndHashCode
|
||||||
public class BlockStack
|
public class BlockStack
|
||||||
{
|
{
|
||||||
|
|
||||||
private final Block block;
|
private final Block block;
|
||||||
private final int meta;
|
private final int meta;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
public class BloodMagicAPI
|
public class BloodMagicAPI
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final String ORB = "ItemBloodOrb";
|
public static final String ORB = "ItemBloodOrb";
|
||||||
public static final String SCRIBE = "ItemInscriptionTool";
|
public static final String SCRIBE = "ItemInscriptionTool";
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,8 @@ import java.util.Locale;
|
||||||
|
|
||||||
public class Constants
|
public class Constants
|
||||||
{
|
{
|
||||||
|
|
||||||
public static class NBT
|
public static class NBT
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final String OWNER_UUID = "ownerUUID";
|
public static final String OWNER_UUID = "ownerUUID";
|
||||||
public static final String USES = "uses";
|
public static final String USES = "uses";
|
||||||
public static final String UNUSABLE = "unusable";
|
public static final String UNUSABLE = "unusable";
|
||||||
|
@ -62,11 +60,12 @@ public class Constants
|
||||||
public static final String TICKS_REMAINING = "ticksRemaining";
|
public static final String TICKS_REMAINING = "ticksRemaining";
|
||||||
public static final String CONTAINED_BLOCK_NAME = "containedBlockName";
|
public static final String CONTAINED_BLOCK_NAME = "containedBlockName";
|
||||||
public static final String CONTAINED_BLOCK_META = "containedBlockMeta";
|
public static final String CONTAINED_BLOCK_META = "containedBlockMeta";
|
||||||
|
|
||||||
|
public static final String PREVIOUS_INPUT = "previousInput";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Mod
|
public static class Mod
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final String MODID = "BloodMagic";
|
public static final String MODID = "BloodMagic";
|
||||||
public static final String DOMAIN = MODID.toLowerCase(Locale.ENGLISH) + ":";
|
public static final String DOMAIN = MODID.toLowerCase(Locale.ENGLISH) + ":";
|
||||||
public static final String NAME = "Blood Magic: Alchemical Wizardry";
|
public static final String NAME = "Blood Magic: Alchemical Wizardry";
|
||||||
|
@ -74,6 +73,11 @@ public class Constants
|
||||||
public static final String DEPEND = "";
|
public static final String DEPEND = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final class Gui
|
||||||
|
{
|
||||||
|
public static final int TELEPOSER_GUI = 0;
|
||||||
|
}
|
||||||
|
|
||||||
public static class Compat
|
public static class Compat
|
||||||
{
|
{
|
||||||
public static final String JEI_CATEGORY_ALTAR = Mod.MODID + ":altar";
|
public static final String JEI_CATEGORY_ALTAR = Mod.MODID + ":altar";
|
||||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraft.util.IChatComponent;
|
||||||
|
|
||||||
public class DamageSourceBloodMagic extends DamageSource
|
public class DamageSourceBloodMagic extends DamageSource
|
||||||
{
|
{
|
||||||
|
|
||||||
public DamageSourceBloodMagic()
|
public DamageSourceBloodMagic()
|
||||||
{
|
{
|
||||||
super("bloodMagic");
|
super("bloodMagic");
|
||||||
|
|
|
@ -12,7 +12,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
@EqualsAndHashCode
|
@EqualsAndHashCode
|
||||||
public class ItemStackWrapper
|
public class ItemStackWrapper
|
||||||
{
|
{
|
||||||
|
|
||||||
public final Item item;
|
public final Item item;
|
||||||
public final int stackSize;
|
public final int stackSize;
|
||||||
public final int meta;
|
public final int meta;
|
||||||
|
|
|
@ -4,7 +4,5 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
public abstract class AlchemyArrayEffect
|
public abstract class AlchemyArrayEffect
|
||||||
{
|
{
|
||||||
|
|
||||||
public abstract boolean update(TileEntity tile, int ticksActive);
|
public abstract boolean update(TileEntity tile, int ticksActive);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraft.util.BlockPos;
|
||||||
|
|
||||||
public class AlchemyArrayEffectCrafting extends AlchemyArrayEffect
|
public class AlchemyArrayEffectCrafting extends AlchemyArrayEffect
|
||||||
{
|
{
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public final ItemStack outputStack;
|
public final ItemStack outputStack;
|
||||||
public int tickLimit;
|
public int tickLimit;
|
||||||
|
|
|
@ -11,7 +11,6 @@ import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class AlchemyCircleRenderer
|
public class AlchemyCircleRenderer
|
||||||
{
|
{
|
||||||
|
|
||||||
public float offsetFromFace = -0.9f;
|
public float offsetFromFace = -0.9f;
|
||||||
public final ResourceLocation arrayResource;
|
public final ResourceLocation arrayResource;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.util.BlockPos;
|
||||||
@Getter
|
@Getter
|
||||||
public class AltarComponent
|
public class AltarComponent
|
||||||
{
|
{
|
||||||
|
|
||||||
private BlockPos offset;
|
private BlockPos offset;
|
||||||
private boolean upgradeSlot;
|
private boolean upgradeSlot;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ import lombok.NoArgsConstructor;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class AltarUpgrade
|
public class AltarUpgrade
|
||||||
{
|
{
|
||||||
|
|
||||||
private int speedCount;
|
private int speedCount;
|
||||||
private int efficiencyCount;
|
private int efficiencyCount;
|
||||||
private int sacrificeCount;
|
private int sacrificeCount;
|
||||||
|
|
|
@ -2,6 +2,5 @@ package WayofTime.bloodmagic.api.altar;
|
||||||
|
|
||||||
public enum EnumAltarComponent
|
public enum EnumAltarComponent
|
||||||
{
|
{
|
||||||
|
|
||||||
GLOWSTONE, BLOODSTONE, BEACON, BLOODRUNE, CRYSTAL, NOTAIR
|
GLOWSTONE, BLOODSTONE, BEACON, BLOODRUNE, CRYSTAL, NOTAIR
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,5 @@ package WayofTime.bloodmagic.api.altar;
|
||||||
|
|
||||||
public interface IAltarComponent
|
public interface IAltarComponent
|
||||||
{
|
{
|
||||||
|
|
||||||
EnumAltarComponent getType(int meta);
|
EnumAltarComponent getType(int meta);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ package WayofTime.bloodmagic.api.altar;
|
||||||
|
|
||||||
public interface IBloodAltar
|
public interface IBloodAltar
|
||||||
{
|
{
|
||||||
|
|
||||||
int getCapacity();
|
int getCapacity();
|
||||||
|
|
||||||
int getCurrentBlood();
|
int getCurrentBlood();
|
||||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public abstract class CompressionHandler
|
public abstract class CompressionHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called to look at the inventory and syphons the required stack. Returns
|
* Called to look at the inventory and syphons the required stack. Returns
|
||||||
* resultant stack if successful, and null if not.
|
* resultant stack if successful, and null if not.
|
||||||
|
|
|
@ -14,7 +14,6 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public class CompressionRegistry
|
public class CompressionRegistry
|
||||||
{
|
{
|
||||||
|
|
||||||
public static List<CompressionHandler> compressionRegistry = new ArrayList<CompressionHandler>();
|
public static List<CompressionHandler> compressionRegistry = new ArrayList<CompressionHandler>();
|
||||||
public static Map<ItemStack, Integer> thresholdMap = new HashMap<ItemStack, Integer>();
|
public static Map<ItemStack, Integer> thresholdMap = new HashMap<ItemStack, Integer>();
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import net.minecraftforge.fml.common.eventhandler.Event;
|
||||||
|
|
||||||
public class AddToNetworkEvent extends Event
|
public class AddToNetworkEvent extends Event
|
||||||
{
|
{
|
||||||
|
|
||||||
public String ownerNetwork;
|
public String ownerNetwork;
|
||||||
public int addedAmount;
|
public int addedAmount;
|
||||||
public int maximum;
|
public int maximum;
|
||||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraftforge.fml.common.eventhandler.Event;
|
||||||
|
|
||||||
public class BoundToolEvent extends Event
|
public class BoundToolEvent extends Event
|
||||||
{
|
{
|
||||||
|
|
||||||
public EntityPlayer player;
|
public EntityPlayer player;
|
||||||
|
|
||||||
public BoundToolEvent(EntityPlayer player)
|
public BoundToolEvent(EntityPlayer player)
|
||||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraftforge.fml.common.eventhandler.Event;
|
||||||
@Cancelable
|
@Cancelable
|
||||||
public class ItemBindEvent extends Event
|
public class ItemBindEvent extends Event
|
||||||
{
|
{
|
||||||
|
|
||||||
public final EntityPlayer player;
|
public final EntityPlayer player;
|
||||||
public String key;
|
public String key;
|
||||||
public ItemStack itemStack;
|
public ItemStack itemStack;
|
||||||
|
|
|
@ -14,7 +14,6 @@ import net.minecraftforge.fml.common.eventhandler.Event;
|
||||||
|
|
||||||
public class RitualEvent extends Event
|
public class RitualEvent extends Event
|
||||||
{
|
{
|
||||||
|
|
||||||
public final IMasterRitualStone mrs;
|
public final IMasterRitualStone mrs;
|
||||||
public final String ownerName;
|
public final String ownerName;
|
||||||
public final Ritual ritual;
|
public final Ritual ritual;
|
||||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraftforge.fml.common.eventhandler.Event;
|
||||||
|
|
||||||
public class SoulNetworkEvent extends Event
|
public class SoulNetworkEvent extends Event
|
||||||
{
|
{
|
||||||
|
|
||||||
public final String ownerName;
|
public final String ownerName;
|
||||||
public int syphon;
|
public int syphon;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
package WayofTime.bloodmagic.api.event;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||||
|
|
||||||
|
/** Fired when a teleposer attempts to transpose two blocks. Use this to perform special cleanup or compensation,
|
||||||
|
or cancel it entirely to prevent the transposition. */
|
||||||
|
@Cancelable
|
||||||
|
public class TeleposeEvent extends Event
|
||||||
|
{
|
||||||
|
public final World initalWorld;
|
||||||
|
public final BlockPos initialBlockPos;
|
||||||
|
|
||||||
|
public final Block initialBlock;
|
||||||
|
public final int initialMetadata;
|
||||||
|
|
||||||
|
public final World finalWorld;
|
||||||
|
public final BlockPos finalBlockPos;
|
||||||
|
|
||||||
|
public final Block finalBlock;
|
||||||
|
public final int finalMetadata;
|
||||||
|
|
||||||
|
public TeleposeEvent(World initialWorld, BlockPos initialBlockPos, Block initialBlock, int initialMetadata, World finalWorld, BlockPos finalBlockPos, Block finalBlock, int finalMetadata)
|
||||||
|
{
|
||||||
|
this.initalWorld = initialWorld;
|
||||||
|
this.initialBlockPos = initialBlockPos;
|
||||||
|
this.initialBlock = initialBlock;
|
||||||
|
this.initialMetadata = initialMetadata;
|
||||||
|
|
||||||
|
this.finalWorld = finalWorld;
|
||||||
|
this.finalBlockPos = finalBlockPos;
|
||||||
|
this.finalBlock = finalBlock;
|
||||||
|
this.finalMetadata = finalMetadata;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TileEntity getInitialTile()
|
||||||
|
{
|
||||||
|
return initalWorld.getTileEntity(initialBlockPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TileEntity getFinalTile()
|
||||||
|
{
|
||||||
|
return finalWorld.getTileEntity(finalBlockPos);
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,7 +8,6 @@ import net.minecraft.item.ItemStack;
|
||||||
*/
|
*/
|
||||||
public interface IBindable
|
public interface IBindable
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the player attempts to bind the item.
|
* Called when the player attempts to bind the item.
|
||||||
*
|
*
|
||||||
|
|
|
@ -11,7 +11,6 @@ import com.google.common.collect.Multimap;
|
||||||
|
|
||||||
public abstract class LivingArmourUpgrade
|
public abstract class LivingArmourUpgrade
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Upgrade level 0 is the first upgrade. Upgrade goes from 0 to getMaxTier()
|
* Upgrade level 0 is the first upgrade. Upgrade goes from 0 to getMaxTier()
|
||||||
* - 1.
|
* - 1.
|
||||||
|
|
|
@ -7,7 +7,6 @@ import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||||
|
|
||||||
public abstract class StatTracker
|
public abstract class StatTracker
|
||||||
{
|
{
|
||||||
|
|
||||||
private boolean isDirty = false;
|
private boolean isDirty = false;
|
||||||
|
|
||||||
public abstract String getUniqueIdentifier();
|
public abstract String getUniqueIdentifier();
|
||||||
|
|
|
@ -13,7 +13,6 @@ import WayofTime.bloodmagic.api.registry.OrbRegistry;
|
||||||
*/
|
*/
|
||||||
public class BloodOrb
|
public class BloodOrb
|
||||||
{
|
{
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private int tier;
|
private int tier;
|
||||||
private int capacity;
|
private int capacity;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package WayofTime.bloodmagic.api.orb;
|
||||||
|
|
||||||
public interface IBloodOrb
|
public interface IBloodOrb
|
||||||
{
|
{
|
||||||
|
|
||||||
BloodOrb getOrb(int meta);
|
BloodOrb getOrb(int meta);
|
||||||
|
|
||||||
int getMaxEssence(int meta);
|
int getMaxEssence(int meta);
|
||||||
|
|
|
@ -19,7 +19,6 @@ import com.google.common.collect.HashBiMap;
|
||||||
|
|
||||||
public class AlchemyArrayRecipeRegistry
|
public class AlchemyArrayRecipeRegistry
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final AlchemyCircleRenderer defaultRenderer = new AlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SightSigil.png"));
|
public static final AlchemyCircleRenderer defaultRenderer = new AlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SightSigil.png"));
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|
|
@ -12,7 +12,6 @@ import java.util.Map;
|
||||||
|
|
||||||
public class ImperfectRitualRegistry
|
public class ImperfectRitualRegistry
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final Map<ImperfectRitual, Boolean> enabledRituals = new HashMap<ImperfectRitual, Boolean>();
|
public static final Map<ImperfectRitual, Boolean> enabledRituals = new HashMap<ImperfectRitual, Boolean>();
|
||||||
private static final BiMap<String, ImperfectRitual> registry = HashBiMap.create();
|
private static final BiMap<String, ImperfectRitual> registry = HashBiMap.create();
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public class OrbRegistry
|
public class OrbRegistry
|
||||||
{
|
{
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private static List<BloodOrb> orbs = new ArrayList<BloodOrb>();
|
private static List<BloodOrb> orbs = new ArrayList<BloodOrb>();
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ import com.google.common.collect.HashBiMap;
|
||||||
|
|
||||||
public class RitualRegistry
|
public class RitualRegistry
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final Map<Ritual, Boolean> enabledRituals = new HashMap<Ritual, Boolean>();
|
public static final Map<Ritual, Boolean> enabledRituals = new HashMap<Ritual, Boolean>();
|
||||||
private static final BiMap<String, Ritual> registry = HashBiMap.create();
|
private static final BiMap<String, Ritual> registry = HashBiMap.create();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,7 +8,6 @@ import java.util.Locale;
|
||||||
|
|
||||||
public enum EnumRuneType implements IStringSerializable
|
public enum EnumRuneType implements IStringSerializable
|
||||||
{
|
{
|
||||||
|
|
||||||
BLANK, WATER, FIRE, EARTH, AIR, DUSK, DAWN;
|
BLANK, WATER, FIRE, EARTH, AIR, DUSK, DAWN;
|
||||||
|
|
||||||
public static EnumRuneType byMetadata(int meta)
|
public static EnumRuneType byMetadata(int meta)
|
||||||
|
|
|
@ -13,7 +13,6 @@ import net.minecraft.world.World;
|
||||||
*/
|
*/
|
||||||
public interface IMasterRitualStone
|
public interface IMasterRitualStone
|
||||||
{
|
{
|
||||||
|
|
||||||
String getOwner();
|
String getOwner();
|
||||||
|
|
||||||
boolean activateRitual(ItemStack activationCrystal, EntityPlayer activator, Ritual ritual);
|
boolean activateRitual(ItemStack activationCrystal, EntityPlayer activator, Ritual ritual);
|
||||||
|
|
|
@ -10,7 +10,6 @@ import net.minecraft.world.World;
|
||||||
*/
|
*/
|
||||||
public interface IRitualStone
|
public interface IRitualStone
|
||||||
{
|
{
|
||||||
|
|
||||||
boolean isRuneType(World world, BlockPos pos, EnumRuneType runeType);
|
boolean isRuneType(World world, BlockPos pos, EnumRuneType runeType);
|
||||||
|
|
||||||
interface Tile
|
interface Tile
|
||||||
|
|
|
@ -23,7 +23,6 @@ import net.minecraft.world.World;
|
||||||
@ToString
|
@ToString
|
||||||
public abstract class Ritual
|
public abstract class Ritual
|
||||||
{
|
{
|
||||||
|
|
||||||
public final ArrayList<RitualComponent> ritualComponents = new ArrayList<RitualComponent>();
|
public final ArrayList<RitualComponent> ritualComponents = new ArrayList<RitualComponent>();
|
||||||
private final String name;
|
private final String name;
|
||||||
private final int crystalLevel;
|
private final int crystalLevel;
|
||||||
|
|
|
@ -13,7 +13,6 @@ import net.minecraft.util.EnumFacing;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class RitualComponent
|
public class RitualComponent
|
||||||
{
|
{
|
||||||
|
|
||||||
private final BlockPos offset;
|
private final BlockPos offset;
|
||||||
private final EnumRuneType runeType;
|
private final EnumRuneType runeType;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public abstract class RitualRenderer
|
public abstract class RitualRenderer
|
||||||
{
|
{
|
||||||
|
|
||||||
public abstract void renderAt(IMasterRitualStone masterRitualStone, double x, double y, double z);
|
public abstract void renderAt(IMasterRitualStone masterRitualStone, double x, double y, double z);
|
||||||
|
|
||||||
protected void bindTexture(ResourceLocation resourceLocation)
|
protected void bindTexture(ResourceLocation resourceLocation)
|
||||||
|
|
|
@ -12,7 +12,6 @@ import java.util.UUID;
|
||||||
|
|
||||||
public class BindableHelper
|
public class BindableHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bind an item to a player. Handles checking if the player was an
|
* Bind an item to a player. Handles checking if the player was an
|
||||||
* instanceof {@link net.minecraftforge.common.util.FakePlayer} or other
|
* instanceof {@link net.minecraftforge.common.util.FakePlayer} or other
|
||||||
|
|
|
@ -6,7 +6,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
|
||||||
public class IncenseHelper
|
public class IncenseHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
public static float getCurrentIncense(EntityPlayer player)
|
public static float getCurrentIncense(EntityPlayer player)
|
||||||
{
|
{
|
||||||
NBTTagCompound data = player.getEntityData();
|
NBTTagCompound data = player.getEntityData();
|
||||||
|
|
|
@ -6,7 +6,6 @@ import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class LogHelper
|
public class LogHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
private Logger logger;
|
private Logger logger;
|
||||||
|
|
||||||
public LogHelper(String logger)
|
public LogHelper(String logger)
|
||||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
|
||||||
public class NBTHelper
|
public class NBTHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
public static ItemStack checkNBT(ItemStack stack)
|
public static ItemStack checkNBT(ItemStack stack)
|
||||||
{
|
{
|
||||||
if (stack.getTagCompound() == null)
|
if (stack.getTagCompound() == null)
|
||||||
|
|
|
@ -20,7 +20,6 @@ import java.util.UUID;
|
||||||
|
|
||||||
public class NetworkHelper
|
public class NetworkHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
// Get
|
// Get
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,7 +15,6 @@ import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class PlayerHelper
|
public class PlayerHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final Pattern FAKE_PLAYER_PATTERN = Pattern.compile("^(?:\\[.*\\])|(?:ComputerCraft)$");
|
private static final Pattern FAKE_PLAYER_PATTERN = Pattern.compile("^(?:\\[.*\\])|(?:ComputerCraft)$");
|
||||||
|
|
||||||
public static String getUsernameFromPlayer(EntityPlayer player)
|
public static String getUsernameFromPlayer(EntityPlayer player)
|
||||||
|
|
|
@ -21,7 +21,6 @@ import WayofTime.bloodmagic.api.ritual.imperfect.ImperfectRitual;
|
||||||
|
|
||||||
public class RitualHelper
|
public class RitualHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
public static boolean canCrystalActivate(Ritual ritual, int crystalLevel)
|
public static boolean canCrystalActivate(Ritual ritual, int crystalLevel)
|
||||||
{
|
{
|
||||||
return ritual.getCrystalLevel() <= crystalLevel && RitualRegistry.ritualEnabled(ritual);
|
return ritual.getCrystalLevel() <= crystalLevel && RitualRegistry.ritualEnabled(ritual);
|
||||||
|
|
|
@ -22,7 +22,6 @@ import WayofTime.bloodmagic.util.Utils;
|
||||||
|
|
||||||
public class BlockAlchemyArray extends BlockContainer
|
public class BlockAlchemyArray extends BlockContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockAlchemyArray()
|
public BlockAlchemyArray()
|
||||||
{
|
{
|
||||||
super(Material.cloth);
|
super(Material.cloth);
|
||||||
|
|
|
@ -18,7 +18,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockAltar extends BlockContainer
|
public class BlockAltar extends BlockContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockAltar()
|
public BlockAltar()
|
||||||
{
|
{
|
||||||
super(Material.rock);
|
super(Material.rock);
|
||||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.block.material.Material;
|
||||||
|
|
||||||
public class BlockBloodStoneBrick extends BlockString
|
public class BlockBloodStoneBrick extends BlockString
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final String[] names = { "normal", "large" };
|
public static final String[] names = { "normal", "large" };
|
||||||
|
|
||||||
public BlockBloodStoneBrick()
|
public BlockBloodStoneBrick()
|
||||||
|
|
|
@ -17,7 +17,6 @@ import java.awt.*;
|
||||||
|
|
||||||
public class BlockLifeEssence extends BlockFluidClassic
|
public class BlockLifeEssence extends BlockFluidClassic
|
||||||
{
|
{
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private static Fluid lifeEssence = new FluidLifeEssence();
|
private static Fluid lifeEssence = new FluidLifeEssence();
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockPedestal extends BlockStringContainer
|
public class BlockPedestal extends BlockStringContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
public static String[] names = { "pedestal", "plinth" };
|
public static String[] names = { "pedestal", "plinth" };
|
||||||
|
|
||||||
public BlockPedestal()
|
public BlockPedestal()
|
||||||
|
|
|
@ -19,7 +19,6 @@ import java.util.Random;
|
||||||
|
|
||||||
public class BlockPhantom extends BlockContainer
|
public class BlockPhantom extends BlockContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockPhantom()
|
public BlockPhantom()
|
||||||
{
|
{
|
||||||
super(Material.cloth);
|
super(Material.cloth);
|
||||||
|
|
|
@ -22,7 +22,6 @@ import WayofTime.bloodmagic.tile.TileMasterRitualStone;
|
||||||
|
|
||||||
public class BlockRitualController extends BlockStringContainer
|
public class BlockRitualController extends BlockStringContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final String[] names = { "master", "imperfect" };
|
public static final String[] names = { "master", "imperfect" };
|
||||||
|
|
||||||
public BlockRitualController()
|
public BlockRitualController()
|
||||||
|
|
|
@ -11,7 +11,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockRitualStone extends BlockString implements IRitualStone
|
public class BlockRitualStone extends BlockString implements IRitualStone
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final String[] names = { "blank", "water", "fire", "earth", "air", "dusk", "dawn" };
|
public static final String[] names = { "blank", "water", "fire", "earth", "air", "dusk", "dawn" };
|
||||||
|
|
||||||
public BlockRitualStone()
|
public BlockRitualStone()
|
||||||
|
|
|
@ -12,7 +12,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockSoulForge extends Block
|
public class BlockSoulForge extends Block
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockSoulForge()
|
public BlockSoulForge()
|
||||||
{
|
{
|
||||||
super(Material.iron);
|
super(Material.iron);
|
||||||
|
|
|
@ -20,7 +20,6 @@ import java.util.Random;
|
||||||
|
|
||||||
public class BlockSpectral extends BlockContainer
|
public class BlockSpectral extends BlockContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockSpectral()
|
public BlockSpectral()
|
||||||
{
|
{
|
||||||
super(Material.cloth);
|
super(Material.cloth);
|
||||||
|
|
|
@ -4,10 +4,12 @@ import WayofTime.bloodmagic.BloodMagic;
|
||||||
import WayofTime.bloodmagic.api.Constants;
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
import WayofTime.bloodmagic.api.util.helper.BindableHelper;
|
import WayofTime.bloodmagic.api.util.helper.BindableHelper;
|
||||||
import WayofTime.bloodmagic.item.ItemTelepositionFocus;
|
import WayofTime.bloodmagic.item.ItemTelepositionFocus;
|
||||||
|
import WayofTime.bloodmagic.tile.TileTeleposer;
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.InventoryHelper;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
|
@ -16,7 +18,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockTeleposer extends BlockContainer
|
public class BlockTeleposer extends BlockContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockTeleposer()
|
public BlockTeleposer()
|
||||||
{
|
{
|
||||||
super(Material.rock);
|
super(Material.rock);
|
||||||
|
@ -41,19 +42,30 @@ public class BlockTeleposer extends BlockContainer
|
||||||
if (playerItem != null && playerItem.getItem() instanceof ItemTelepositionFocus)
|
if (playerItem != null && playerItem.getItem() instanceof ItemTelepositionFocus)
|
||||||
{
|
{
|
||||||
BindableHelper.checkAndSetItemOwner(playerItem, player);
|
BindableHelper.checkAndSetItemOwner(playerItem, player);
|
||||||
|
|
||||||
((ItemTelepositionFocus) playerItem.getItem()).setBlockPos(playerItem, world, pos);
|
((ItemTelepositionFocus) playerItem.getItem()).setBlockPos(playerItem, world, pos);
|
||||||
return true;
|
}
|
||||||
|
else if (world.getTileEntity(pos) instanceof TileTeleposer)
|
||||||
|
{
|
||||||
|
player.openGui(BloodMagic.instance, Constants.Gui.TELEPOSER_GUI, world, pos.getX(), pos.getY(), pos.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
// player.openGui(AlchemicalWizardry.instance, 1, world, pos.getX(),
|
|
||||||
// pos.getY(), pos.getZ());
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
|
||||||
|
{
|
||||||
|
if (worldIn.getTileEntity(pos) != null && worldIn.getTileEntity(pos) instanceof TileTeleposer)
|
||||||
|
{
|
||||||
|
InventoryHelper.dropInventoryItems(worldIn, pos, (TileTeleposer) worldIn.getTileEntity(pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
super.breakBlock(worldIn, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World worldIn, int meta)
|
public TileEntity createNewTileEntity(World worldIn, int meta)
|
||||||
{
|
{
|
||||||
return null;
|
return new TileTeleposer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,6 @@ import java.util.List;
|
||||||
@Getter
|
@Getter
|
||||||
public class BlockInteger extends Block
|
public class BlockInteger extends Block
|
||||||
{
|
{
|
||||||
|
|
||||||
private final int maxMeta;
|
private final int maxMeta;
|
||||||
private final PropertyInteger metaProp;
|
private final PropertyInteger metaProp;
|
||||||
private final IUnlistedProperty unlistedMetaProp;
|
private final IUnlistedProperty unlistedMetaProp;
|
||||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public abstract class BlockIntegerContainer extends BlockInteger implements ITileEntityProvider
|
public abstract class BlockIntegerContainer extends BlockInteger implements ITileEntityProvider
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockIntegerContainer(Material material, int maxMeta, String propName)
|
public BlockIntegerContainer(Material material, int maxMeta, String propName)
|
||||||
{
|
{
|
||||||
super(material, maxMeta, propName);
|
super(material, maxMeta, propName);
|
||||||
|
|
|
@ -38,7 +38,6 @@ import java.util.List;
|
||||||
@Getter
|
@Getter
|
||||||
public class BlockString extends Block
|
public class BlockString extends Block
|
||||||
{
|
{
|
||||||
|
|
||||||
private final int maxMeta;
|
private final int maxMeta;
|
||||||
private final List<String> values;
|
private final List<String> values;
|
||||||
private final PropertyString stringProp;
|
private final PropertyString stringProp;
|
||||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public abstract class BlockStringContainer extends BlockString implements ITileEntityProvider
|
public abstract class BlockStringContainer extends BlockString implements ITileEntityProvider
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockStringContainer(Material material, String[] values, String propName)
|
public BlockStringContainer(Material material, String[] values, String propName)
|
||||||
{
|
{
|
||||||
super(material, values, propName);
|
super(material, values, propName);
|
||||||
|
|
|
@ -10,7 +10,6 @@ import java.util.HashSet;
|
||||||
|
|
||||||
public class PropertyString extends PropertyHelper
|
public class PropertyString extends PropertyHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
private final ImmutableSet allowedValues;
|
private final ImmutableSet allowedValues;
|
||||||
|
|
||||||
protected PropertyString(String name, String[] values)
|
protected PropertyString(String name, String[] values)
|
||||||
|
|
|
@ -4,7 +4,6 @@ import net.minecraftforge.common.property.IUnlistedProperty;
|
||||||
|
|
||||||
public class UnlistedPropertyInteger implements IUnlistedProperty<Integer>
|
public class UnlistedPropertyInteger implements IUnlistedProperty<Integer>
|
||||||
{
|
{
|
||||||
|
|
||||||
private int maxMeta;
|
private int maxMeta;
|
||||||
private String propName;
|
private String propName;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ import java.util.List;
|
||||||
|
|
||||||
public class UnlistedPropertyString implements IUnlistedProperty<String>
|
public class UnlistedPropertyString implements IUnlistedProperty<String>
|
||||||
{
|
{
|
||||||
|
|
||||||
private List values;
|
private List values;
|
||||||
private String propName;
|
private String propName;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
package WayofTime.bloodmagic.client.gui;
|
||||||
|
|
||||||
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
|
import WayofTime.bloodmagic.tile.TileTeleposer;
|
||||||
|
import WayofTime.bloodmagic.tile.container.ContainerTeleposer;
|
||||||
|
import net.minecraft.client.multiplayer.WorldClient;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.util.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fml.common.network.IGuiHandler;
|
||||||
|
|
||||||
|
public class GuiHandler implements IGuiHandler
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
|
||||||
|
{
|
||||||
|
BlockPos pos = new BlockPos(x, y, z);
|
||||||
|
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case Constants.Gui.TELEPOSER_GUI:
|
||||||
|
return new ContainerTeleposer(player.inventory, (TileTeleposer) world.getTileEntity(pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
|
||||||
|
{
|
||||||
|
if (world instanceof WorldClient)
|
||||||
|
{
|
||||||
|
BlockPos pos = new BlockPos(x, y, z);
|
||||||
|
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case Constants.Gui.TELEPOSER_GUI:
|
||||||
|
return new GuiTeleposer(player.inventory, (TileTeleposer) world.getTileEntity(pos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package WayofTime.bloodmagic.client.gui;
|
||||||
|
|
||||||
|
import WayofTime.bloodmagic.api.Constants;
|
||||||
|
import WayofTime.bloodmagic.tile.container.ContainerTeleposer;
|
||||||
|
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||||
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public class GuiTeleposer extends GuiContainer
|
||||||
|
{
|
||||||
|
public GuiTeleposer(InventoryPlayer playerInventory, IInventory tileTeleposer)
|
||||||
|
{
|
||||||
|
super(new ContainerTeleposer(playerInventory, tileTeleposer));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
|
||||||
|
{
|
||||||
|
this.fontRendererObj.drawString(TextHelper.localize("tile.BloodMagic.teleposer.name"), 64, 23, 4210752);
|
||||||
|
this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, 47, 4210752);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
|
||||||
|
{
|
||||||
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
ResourceLocation teleposerGuiTextures = new ResourceLocation(Constants.Mod.MODID + ":textures/gui/teleposer.png");
|
||||||
|
this.mc.getTextureManager().bindTexture(teleposerGuiTextures);
|
||||||
|
int i = (this.width - this.xSize) / 2;
|
||||||
|
int j = (this.height - this.ySize) / 2;
|
||||||
|
this.drawTexturedModalRect(i, j + 18, 0, 0, this.xSize, this.ySize);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package WayofTime.bloodmagic.client.gui;
|
package WayofTime.bloodmagic.client.gui.config;
|
||||||
|
|
||||||
import WayofTime.bloodmagic.ConfigHandler;
|
import WayofTime.bloodmagic.ConfigHandler;
|
||||||
import WayofTime.bloodmagic.api.Constants;
|
import WayofTime.bloodmagic.api.Constants;
|
|
@ -1,4 +1,4 @@
|
||||||
package WayofTime.bloodmagic.client.gui;
|
package WayofTime.bloodmagic.client.gui.config;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
|
@ -12,7 +12,6 @@ import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer;
|
||||||
|
|
||||||
public class BindingAlchemyCircleRenderer extends AlchemyCircleRenderer
|
public class BindingAlchemyCircleRenderer extends AlchemyCircleRenderer
|
||||||
{
|
{
|
||||||
|
|
||||||
public float offsetFromFace = -0.9f;
|
public float offsetFromFace = -0.9f;
|
||||||
public final ResourceLocation arrayResource;
|
public final ResourceLocation arrayResource;
|
||||||
public final ResourceLocation[] arraysResources;
|
public final ResourceLocation[] arraysResources;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package WayofTime.bloodmagic.render;
|
package WayofTime.bloodmagic.client.render.entity;
|
||||||
|
|
||||||
import WayofTime.bloodmagic.entity.projectile.EntityBloodLight;
|
import WayofTime.bloodmagic.entity.projectile.EntityBloodLight;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
|
@ -7,12 +7,10 @@ import net.minecraft.client.renderer.entity.Render;
|
||||||
import net.minecraft.client.renderer.entity.RenderManager;
|
import net.minecraft.client.renderer.entity.RenderManager;
|
||||||
import net.minecraft.client.renderer.texture.TextureMap;
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class RenderEntityBloodLight extends Render<EntityBloodLight>
|
public class RenderEntityBloodLight extends Render<EntityBloodLight>
|
||||||
{
|
{
|
||||||
|
|
||||||
public RenderEntityBloodLight(RenderManager renderManager)
|
public RenderEntityBloodLight(RenderManager renderManager)
|
||||||
{
|
{
|
||||||
super(renderManager);
|
super(renderManager);
|
|
@ -5,7 +5,6 @@ package WayofTime.bloodmagic.compat;
|
||||||
*/
|
*/
|
||||||
public interface ICompatibility
|
public interface ICompatibility
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called after the given {@code modid} has been verified as loaded.
|
* Called after the given {@code modid} has been verified as loaded.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,7 +10,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class AdvancedCompressionHandler extends CompressionHandler
|
public class AdvancedCompressionHandler extends CompressionHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack compressInventory(ItemStack[] inv, World world)
|
public ItemStack compressInventory(ItemStack[] inv, World world)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BaseCompressionHandler extends CompressionHandler
|
public class BaseCompressionHandler extends CompressionHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
private final ItemStack required;
|
private final ItemStack required;
|
||||||
private final ItemStack result;
|
private final ItemStack result;
|
||||||
private final int leftover;
|
private final int leftover;
|
||||||
|
|
|
@ -15,7 +15,6 @@ import java.util.List;
|
||||||
|
|
||||||
public class StorageBlockCraftingManager
|
public class StorageBlockCraftingManager
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final StorageBlockCraftingManager instance = new StorageBlockCraftingManager();
|
private static final StorageBlockCraftingManager instance = new StorageBlockCraftingManager();
|
||||||
private List recipes = new LinkedList();
|
private List recipes = new LinkedList();
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ import java.util.*;
|
||||||
|
|
||||||
public class StorageBlockCraftingRecipeAssimilator
|
public class StorageBlockCraftingRecipeAssimilator
|
||||||
{
|
{
|
||||||
|
|
||||||
public List<IRecipe> getPackingRecipes()
|
public List<IRecipe> getPackingRecipes()
|
||||||
{
|
{
|
||||||
// grab all recipes potentially suitable for packing or unpacking
|
// grab all recipes potentially suitable for packing or unpacking
|
||||||
|
|
|
@ -15,7 +15,6 @@ import net.minecraftforge.fml.common.registry.IThrowableEntity;
|
||||||
|
|
||||||
public class EntityBloodLight extends EntityThrowable implements IThrowableEntity, IEntityAdditionalSpawnData
|
public class EntityBloodLight extends EntityThrowable implements IThrowableEntity, IEntityAdditionalSpawnData
|
||||||
{
|
{
|
||||||
|
|
||||||
public EntityLivingBase shootingEntity;
|
public EntityLivingBase shootingEntity;
|
||||||
protected int ticksInAir = 0;
|
protected int ticksInAir = 0;
|
||||||
protected int maxTicksInAir = 600;
|
protected int maxTicksInAir = 600;
|
||||||
|
|
|
@ -13,7 +13,6 @@ import java.util.List;
|
||||||
|
|
||||||
public class ItemActivationCrystal extends ItemBindable
|
public class ItemActivationCrystal extends ItemBindable
|
||||||
{
|
{
|
||||||
|
|
||||||
public static String[] names = { "weak", "awakened", "creative" };
|
public static String[] names = { "weak", "awakened", "creative" };
|
||||||
|
|
||||||
public ItemActivationCrystal()
|
public ItemActivationCrystal()
|
||||||
|
|
|
@ -21,7 +21,6 @@ import java.util.List;
|
||||||
|
|
||||||
public class ItemBloodOrb extends ItemBindable implements IBloodOrb, IBindable
|
public class ItemBloodOrb extends ItemBindable implements IBloodOrb, IBindable
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemBloodOrb()
|
public ItemBloodOrb()
|
||||||
{
|
{
|
||||||
setUnlocalizedName(Constants.Mod.MODID + ".orb.");
|
setUnlocalizedName(Constants.Mod.MODID + ".orb.");
|
||||||
|
|
|
@ -12,7 +12,6 @@ import java.util.List;
|
||||||
|
|
||||||
public class ItemBloodShard extends Item
|
public class ItemBloodShard extends Item
|
||||||
{
|
{
|
||||||
|
|
||||||
public String[] names = { "weak", "demon" };
|
public String[] names = { "weak", "demon" };
|
||||||
|
|
||||||
public ItemBloodShard()
|
public ItemBloodShard()
|
||||||
|
|
|
@ -21,7 +21,6 @@ import java.util.Set;
|
||||||
|
|
||||||
public class ItemBoundAxe extends ItemBoundTool
|
public class ItemBoundAxe extends ItemBoundTool
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.planks, Blocks.bookshelf, Blocks.log, Blocks.log2, Blocks.chest, Blocks.pumpkin, Blocks.lit_pumpkin, Blocks.melon_block, Blocks.ladder);
|
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.planks, Blocks.bookshelf, Blocks.log, Blocks.log2, Blocks.chest, Blocks.pumpkin, Blocks.lit_pumpkin, Blocks.melon_block, Blocks.ladder);
|
||||||
|
|
||||||
public ItemBoundAxe()
|
public ItemBoundAxe()
|
||||||
|
|
|
@ -22,7 +22,6 @@ import java.util.Set;
|
||||||
|
|
||||||
public class ItemBoundPickaxe extends ItemBoundTool
|
public class ItemBoundPickaxe extends ItemBoundTool
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.activator_rail, Blocks.coal_ore, Blocks.cobblestone, Blocks.detector_rail, Blocks.diamond_block, Blocks.diamond_ore, Blocks.double_stone_slab, Blocks.golden_rail, Blocks.gold_block, Blocks.gold_ore, Blocks.ice, Blocks.iron_block, Blocks.iron_ore, Blocks.lapis_block, Blocks.lapis_ore, Blocks.lit_redstone_ore, Blocks.mossy_cobblestone, Blocks.netherrack, Blocks.packed_ice, Blocks.rail, Blocks.redstone_ore, Blocks.sandstone, Blocks.red_sandstone, Blocks.stone, Blocks.stone_slab);
|
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.activator_rail, Blocks.coal_ore, Blocks.cobblestone, Blocks.detector_rail, Blocks.diamond_block, Blocks.diamond_ore, Blocks.double_stone_slab, Blocks.golden_rail, Blocks.gold_block, Blocks.gold_ore, Blocks.ice, Blocks.iron_block, Blocks.iron_ore, Blocks.lapis_block, Blocks.lapis_ore, Blocks.lit_redstone_ore, Blocks.mossy_cobblestone, Blocks.netherrack, Blocks.packed_ice, Blocks.rail, Blocks.redstone_ore, Blocks.sandstone, Blocks.red_sandstone, Blocks.stone, Blocks.stone_slab);
|
||||||
|
|
||||||
public ItemBoundPickaxe()
|
public ItemBoundPickaxe()
|
||||||
|
|
|
@ -19,7 +19,6 @@ import java.util.Set;
|
||||||
|
|
||||||
public class ItemBoundShovel extends ItemBoundTool
|
public class ItemBoundShovel extends ItemBoundTool
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.clay, Blocks.dirt, Blocks.farmland, Blocks.grass, Blocks.gravel, Blocks.mycelium, Blocks.sand, Blocks.snow, Blocks.snow_layer, Blocks.soul_sand);
|
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.clay, Blocks.dirt, Blocks.farmland, Blocks.grass, Blocks.gravel, Blocks.mycelium, Blocks.sand, Blocks.snow, Blocks.snow_layer, Blocks.soul_sand);
|
||||||
|
|
||||||
public ItemBoundShovel()
|
public ItemBoundShovel()
|
||||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraft.item.ItemBucket;
|
||||||
|
|
||||||
public class ItemBucketEssence extends ItemBucket
|
public class ItemBucketEssence extends ItemBucket
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemBucketEssence()
|
public ItemBucketEssence()
|
||||||
{
|
{
|
||||||
super(ModBlocks.lifeEssence);
|
super(ModBlocks.lifeEssence);
|
||||||
|
|
|
@ -15,7 +15,6 @@ import WayofTime.bloodmagic.api.Constants;
|
||||||
|
|
||||||
public class ItemComponent extends Item
|
public class ItemComponent extends Item
|
||||||
{
|
{
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private static ArrayList<String> names = new ArrayList<String>();
|
private static ArrayList<String> names = new ArrayList<String>();
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class ItemDaggerOfSacrifice extends Item
|
public class ItemDaggerOfSacrifice extends Item
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemDaggerOfSacrifice()
|
public ItemDaggerOfSacrifice()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -21,7 +21,6 @@ import java.util.List;
|
||||||
// TODO - NBT based damage
|
// TODO - NBT based damage
|
||||||
public class ItemInscriptionTool extends ItemBindable
|
public class ItemInscriptionTool extends ItemBindable
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemInscriptionTool()
|
public ItemInscriptionTool()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -15,7 +15,6 @@ import java.util.List;
|
||||||
|
|
||||||
public class ItemSlate extends Item
|
public class ItemSlate extends Item
|
||||||
{
|
{
|
||||||
|
|
||||||
public String[] names = { "blank", "reinforced", "imbued", "demonic", "ethereal" };
|
public String[] names = { "blank", "reinforced", "imbued", "demonic", "ethereal" };
|
||||||
|
|
||||||
public ItemSlate()
|
public ItemSlate()
|
||||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemLivingArmour extends ItemArmor
|
public class ItemLivingArmour extends ItemArmor
|
||||||
{
|
{
|
||||||
|
|
||||||
public static String[] names = { "helmet", "chest", "legs", "boots" };
|
public static String[] names = { "helmet", "chest", "legs", "boots" };
|
||||||
|
|
||||||
public ItemLivingArmour(int armorType)
|
public ItemLivingArmour(int armorType)
|
||||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemBlockBloodRune extends ItemBlock
|
public class ItemBlockBloodRune extends ItemBlock
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemBlockBloodRune(Block block)
|
public ItemBlockBloodRune(Block block)
|
||||||
{
|
{
|
||||||
super(block);
|
super(block);
|
||||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemBlockBloodStoneBrick extends ItemBlock
|
public class ItemBlockBloodStoneBrick extends ItemBlock
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemBlockBloodStoneBrick(Block block)
|
public ItemBlockBloodStoneBrick(Block block)
|
||||||
{
|
{
|
||||||
super(block);
|
super(block);
|
||||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemBlockCrystal extends ItemBlock
|
public class ItemBlockCrystal extends ItemBlock
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemBlockCrystal(Block block)
|
public ItemBlockCrystal(Block block)
|
||||||
{
|
{
|
||||||
super(block);
|
super(block);
|
||||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemBlockPedestal extends ItemBlock
|
public class ItemBlockPedestal extends ItemBlock
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemBlockPedestal(Block block)
|
public ItemBlockPedestal(Block block)
|
||||||
{
|
{
|
||||||
super(block);
|
super(block);
|
||||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemBlockRitualController extends ItemBlock
|
public class ItemBlockRitualController extends ItemBlock
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemBlockRitualController(Block block)
|
public ItemBlockRitualController(Block block)
|
||||||
{
|
{
|
||||||
super(block);
|
super(block);
|
||||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemBlockRitualStone extends ItemBlock
|
public class ItemBlockRitualStone extends ItemBlock
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemBlockRitualStone(Block block)
|
public ItemBlockRitualStone(Block block)
|
||||||
{
|
{
|
||||||
super(block);
|
super(block);
|
||||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class ItemSigilAir extends ItemSigilBase
|
public class ItemSigilAir extends ItemSigilBase
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemSigilAir()
|
public ItemSigilAir()
|
||||||
{
|
{
|
||||||
super("air", 50);
|
super("air", 50);
|
||||||
|
|
|
@ -20,7 +20,6 @@ import java.util.List;
|
||||||
@Getter
|
@Getter
|
||||||
public class ItemSigilBase extends ItemBindable implements ISigil
|
public class ItemSigilBase extends ItemBindable implements ISigil
|
||||||
{
|
{
|
||||||
|
|
||||||
protected final String tooltipBase;
|
protected final String tooltipBase;
|
||||||
private final String name;
|
private final String name;
|
||||||
private boolean toggleable;
|
private boolean toggleable;
|
||||||
|
|
|
@ -12,7 +12,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class ItemSigilBloodLight extends ItemSigilBase
|
public class ItemSigilBloodLight extends ItemSigilBase
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemSigilBloodLight()
|
public ItemSigilBloodLight()
|
||||||
{
|
{
|
||||||
super("bloodLight", 10);
|
super("bloodLight", 10);
|
||||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class ItemSigilCompression extends ItemSigilToggleable
|
public class ItemSigilCompression extends ItemSigilToggleable
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemSigilCompression()
|
public ItemSigilCompression()
|
||||||
{
|
{
|
||||||
super("compression", 200);
|
super("compression", 200);
|
||||||
|
|
|
@ -16,7 +16,6 @@ import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||||
|
|
||||||
public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
||||||
{
|
{
|
||||||
|
|
||||||
public ItemSigilDivination()
|
public ItemSigilDivination()
|
||||||
{
|
{
|
||||||
super("divination");
|
super("divination");
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue