mirror of
https://github.com/GTNewHorizons/BloodArsenal.git
synced 2026-11-23 21:49:47 +00:00
Misc stuffs
This commit is contained in:
1 parent
0b34e0bcf7
commit
3e90ce11bf
60 files changed
+187
-75
No files matched your search
@@ -1,12 +1,11 @@
|
||||
package com.arc.bloodarsenal;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
import com.arc.bloodarsenal.items.ModItems;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
public class BloodArsenalConfig
|
||||
{
|
||||
@@ -15,23 +14,28 @@ public class BloodArsenalConfig
|
||||
// Config Categories
|
||||
public static String potionId = "Potion ID";
|
||||
public static String ritualBlacklist = "Ritual Blacklist";
|
||||
public static String toolSetting = "Tool Settings";
|
||||
public static String blockSettings = "Block Settings";
|
||||
public static String itemSettings = "Item Settings";
|
||||
public static String modSettings = "Mod Settings";
|
||||
public static String lpSettings = "LP Settings";
|
||||
public static String misc = "Miscellaneous";
|
||||
|
||||
// Config Options
|
||||
// Potion ID's
|
||||
public static int vampiricAuraID;
|
||||
public static int bleedingID;
|
||||
public static int swimmingID;
|
||||
public static int vampiricAuraID;
|
||||
|
||||
// Ritual Blacklist
|
||||
public static boolean ritualDisabledMidas;
|
||||
public static boolean ritualDisabledWither;
|
||||
public static boolean ritualDisabledEnchantment;
|
||||
|
||||
// Tool Settings
|
||||
public static boolean diamondToolsAllowed;
|
||||
// Block Settings
|
||||
public static String[] blocksToBeDisabled = {};
|
||||
|
||||
// Item Settings
|
||||
public static String[] itemsToBeDisabled = {};
|
||||
|
||||
//ModSettings
|
||||
public static boolean baublesIntegration;
|
||||
@@ -40,6 +44,10 @@ public class BloodArsenalConfig
|
||||
//LP Settings
|
||||
public static int sigilSwimmingCost;
|
||||
public static int sigilDivinityCost;
|
||||
public static int enderSigilOpenCost;
|
||||
public static int enderSigilTeleportMultiplier;
|
||||
public static int lightningSigilMultiplier;
|
||||
public static int lpMaterializerCost;
|
||||
|
||||
// Miscellaneous
|
||||
public static boolean versionCheckingAllowed;
|
||||
@@ -68,7 +76,7 @@ public class BloodArsenalConfig
|
||||
{
|
||||
config.addCustomCategoryComment(potionId, "Change potion ID's here if you have conflicts");
|
||||
config.addCustomCategoryComment(ritualBlacklist, "Blacklist rituals that you don't want/like");
|
||||
config.addCustomCategoryComment(toolSetting, "Settings for various tools");
|
||||
config.addCustomCategoryComment(itemSettings, "Settings for items");
|
||||
config.addCustomCategoryComment(modSettings, "Toggle mod integration");
|
||||
config.addCustomCategoryComment(lpSettings, "Change the LP costs for things");
|
||||
config.addCustomCategoryComment(misc, "Random stuffs");
|
||||
@@ -79,16 +87,22 @@ public class BloodArsenalConfig
|
||||
|
||||
ritualDisabledWither = config.get(ritualBlacklist, "Ritual of Withering", false).getBoolean(ritualDisabledWither);
|
||||
ritualDisabledMidas = config.get(ritualBlacklist, "Midas Touch", false).getBoolean(ritualDisabledMidas);
|
||||
ritualDisabledEnchantment = config.get(ritualBlacklist, "The Enchantress's Spell", false).getBoolean(ritualDisabledEnchantment);
|
||||
|
||||
diamondToolsAllowed = config.get(toolSetting, "Are Infused Diamond tools allowed", true).getBoolean(diamondToolsAllowed);
|
||||
blocksToBeDisabled = config.getStringList("Disable blocks here", blockSettings, new String[]{""}, "Type in the unlocalized name of the block you want disabled here (separate them using ENTER)");
|
||||
itemsToBeDisabled = config.getStringList("Disable items here", itemSettings, new String[]{""}, "Type in the unlocalized name of the item you want disabled (separate them using ENTER)");
|
||||
|
||||
baublesIntegration = config.get(modSettings, "Enable Baubles integration?", true).getBoolean(baublesIntegration);
|
||||
tinkersIntegration = config.get(modSettings, "Enable TConstruct integration?", true).getBoolean(tinkersIntegration);
|
||||
|
||||
sigilSwimmingCost = config.get(lpSettings, "Sigil of Swimming cost; Default: 150", 150).getInt(sigilSwimmingCost);
|
||||
sigilDivinityCost = config.get(lpSettings, "Sigil of Divinity cost; Default: 1000000", 1000000).getInt(sigilDivinityCost);
|
||||
enderSigilOpenCost = config.get(lpSettings, "Ender Sigil cost (to open the Ender Chest); Default: 200", 200).getInt(enderSigilOpenCost);
|
||||
enderSigilTeleportMultiplier = config.get(lpSettings, "Ender Sigil cost (to teleport (multiplier)); Default: 250", 250).getInt(enderSigilTeleportMultiplier);
|
||||
lightningSigilMultiplier = config.get(lpSettings, "Lightning Sigil cost (multiplier); Default: 1000", 1000).getInt(lightningSigilMultiplier);
|
||||
lpMaterializerCost = config.get(lpSettings, "Converts this number to 100LE (from this (SN) to 100 (LE)); Default: 150", 150).getInt(lpMaterializerCost);
|
||||
|
||||
versionCheckingAllowed = config.get(misc, "Is automagic version checking allowed?", true, "Allows for your version to be checked against the latest version").getBoolean();
|
||||
versionCheckingAllowed = config.get(misc, "Is auto-magic version checking allowed?", true, "Allows for your version to be checked against the latest version").getBoolean();
|
||||
isRedGood = config.get(misc, "Is RED > PURPLE?", false, "Purple is always better than Red. But I won't tell you how to live your life. Even if it is incorrectly.").getBoolean(isRedGood);
|
||||
cakeIsLie = config.get(misc, "The cake is a lie", false, "The cake is a lie").getBoolean(cakeIsLie);
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.client.model.ModelWolf;
|
||||
import net.minecraft.client.renderer.entity.RenderSnowball;
|
||||
import net.minecraft.client.renderer.entity.RenderTNTPrimed;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
@@ -50,7 +51,7 @@ public class ClientProxy extends CommonProxy
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBloodBall.class, new RenderSnowball(ModItems.blood_ball));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBloodHound.class, new RenderEntityBloodHound(new ModelWolf(), new ModelWolf(), 0.5F));
|
||||
|
||||
RenderingRegistry.registerBlockHandler(RenderingRegistry.getNextAvailableRenderId(), new RenderTileLifeInfuser());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.life_infuser), new RenderTileLifeInfuser());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TilePortableAltar.class, new TilePortableAltarRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileLifeInfuser.class, new TileLifeInfuserRenderer());
|
||||
|
||||
@@ -6,6 +6,7 @@ import WayofTime.alchemicalWizardry.common.items.ActivationCrystal;
|
||||
import com.arc.bloodarsenal.tileentity.TileCompactedMRS;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -26,11 +27,17 @@ public class BlockCompactedMRS extends BlockMasterStone
|
||||
{
|
||||
super();
|
||||
setBlockName("compacted_mrs");
|
||||
setBlockTextureName("BloodArsenal:compacted_mrs");
|
||||
setHardness(4.0F);
|
||||
setResistance(7.5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
blockIcon = iconRegister.registerIcon("BloodArsenal:compacted_mrs");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.arc.bloodarsenal.block;
|
||||
|
||||
import com.arc.bloodarsenal.BloodArsenal;
|
||||
import com.arc.bloodarsenal.BloodArsenalConfig;
|
||||
import com.arc.bloodarsenal.items.block.BloodStoneBlock;
|
||||
import com.arc.bloodarsenal.items.block.CompactedMRSBlock;
|
||||
import com.arc.bloodarsenal.items.block.PortableAltarBlock;
|
||||
@@ -9,6 +10,8 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ModBlocks
|
||||
{
|
||||
public static Block blood_stone;
|
||||
@@ -31,6 +34,8 @@ public class ModBlocks
|
||||
public static Block compacted_mrs;
|
||||
public static Block block_burned_string;
|
||||
|
||||
private static ArrayList<String> blocksNotToBeRegistered = new ArrayList();
|
||||
|
||||
public static void init()
|
||||
{
|
||||
blood_stone = registerBlock(new BlockBloodStone(), BloodStoneBlock.class, "blood_stone");
|
||||
@@ -67,19 +72,45 @@ public class ModBlocks
|
||||
{
|
||||
block.setBlockName(unlocalizedName);
|
||||
block.setBlockTextureName(BloodArsenal.MODID + ":" + unlocalizedName);
|
||||
|
||||
if (!(block instanceof BlockBloodCake || block instanceof BlockBurnedString))
|
||||
{
|
||||
block.setCreativeTab(BloodArsenal.BA_TAB);
|
||||
}
|
||||
|
||||
GameRegistry.registerBlock(block, unlocalizedName);
|
||||
blocksNotToBeRegistered.clear();
|
||||
for (String unlocName : BloodArsenalConfig.blocksToBeDisabled)
|
||||
{
|
||||
if (unlocName.equals(unlocalizedName))
|
||||
{
|
||||
blocksNotToBeRegistered.add(unlocName);
|
||||
}
|
||||
}
|
||||
if (!blocksNotToBeRegistered.contains(unlocalizedName))
|
||||
{
|
||||
GameRegistry.registerBlock(block, unlocalizedName);
|
||||
}
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
public static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlockClass, String name)
|
||||
public static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlockClass, String unlocalizedName)
|
||||
{
|
||||
block.setCreativeTab(BloodArsenal.BA_TAB);
|
||||
GameRegistry.registerBlock(block, itemBlockClass, name);
|
||||
|
||||
for (String unlocName : BloodArsenalConfig.blocksToBeDisabled)
|
||||
{
|
||||
System.out.println(unlocName);
|
||||
if (unlocName.equals(unlocalizedName))
|
||||
{
|
||||
blocksNotToBeRegistered.add(unlocName);
|
||||
}
|
||||
}
|
||||
if (!blocksNotToBeRegistered.contains(unlocalizedName))
|
||||
{
|
||||
GameRegistry.registerBlock(block, itemBlockClass, unlocalizedName);
|
||||
}
|
||||
|
||||
return block;
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,35 @@
|
||||
package com.arc.bloodarsenal.gui;
|
||||
|
||||
import com.arc.bloodarsenal.BloodArsenal;
|
||||
import cpw.mods.fml.client.config.GuiConfig;
|
||||
import cpw.mods.fml.client.config.IConfigElement;
|
||||
import cpw.mods.fml.client.config.*;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraftforge.common.config.ConfigCategory;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static com.arc.bloodarsenal.BloodArsenalConfig.*;
|
||||
|
||||
public class ConfigGui extends GuiConfig {
|
||||
|
||||
public ConfigGui(GuiScreen parentScreen) {
|
||||
public class ConfigGui extends GuiConfig
|
||||
{
|
||||
public ConfigGui(GuiScreen parentScreen)
|
||||
{
|
||||
super(parentScreen, getConfigElements(parentScreen), BloodArsenal.MODID, false, false, "BloodArsenal Configuration");
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private static List<IConfigElement> getConfigElements(GuiScreen parent) {
|
||||
private static List<IConfigElement> getConfigElements(GuiScreen parent)
|
||||
{
|
||||
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
|
||||
// Adds sections declared in BloodArsenalConfig. toLowerCase() is used because the configuration class automatically does this, so must we.
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(potionId.toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(ritualBlacklist.toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(toolSetting.toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(blockSettings.toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(itemSettings.toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(modSettings.toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(lpSettings.toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory(misc.toLowerCase())));
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.arc.bloodarsenal.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import com.arc.bloodarsenal.BloodArsenal;
|
||||
import com.arc.bloodarsenal.BloodArsenalConfig;
|
||||
import com.arc.bloodarsenal.block.ModBlocks;
|
||||
import com.arc.bloodarsenal.items.armor.GlassArmor;
|
||||
import com.arc.bloodarsenal.items.armor.VampireCostume;
|
||||
@@ -15,6 +16,8 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemReed;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ModItems
|
||||
{
|
||||
public static Item bound_bow;
|
||||
@@ -77,6 +80,8 @@ public class ModItems
|
||||
public static Item glass_boots;
|
||||
public static Item transparent_orb;
|
||||
|
||||
private static ArrayList<String> itemsNotToBeRegistered = new ArrayList();
|
||||
|
||||
public static void init()
|
||||
{
|
||||
bound_bow = registerItem(new BoundBow(), "bound_bow");
|
||||
@@ -156,7 +161,21 @@ public class ModItems
|
||||
item.setUnlocalizedName(unlocalizedName);
|
||||
item.setTextureName(BloodArsenal.MODID + ":" + unlocalizedName);
|
||||
item.setCreativeTab(BloodArsenal.BA_TAB);
|
||||
GameRegistry.registerItem(item, unlocalizedName);
|
||||
itemsNotToBeRegistered.clear();
|
||||
|
||||
for (String unlocName : BloodArsenalConfig.itemsToBeDisabled)
|
||||
{
|
||||
if (unlocName.equals(unlocalizedName))
|
||||
{
|
||||
itemsNotToBeRegistered.add(unlocName);
|
||||
}
|
||||
}
|
||||
|
||||
if (!itemsNotToBeRegistered.contains(unlocalizedName))
|
||||
{
|
||||
GameRegistry.registerItem(item, unlocalizedName);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
|
||||
public class TransparentOrb extends EnergyBattery
|
||||
{
|
||||
IIcon icons[] = new IIcon[23];
|
||||
IIcon icons[] = new IIcon[45];
|
||||
|
||||
public TransparentOrb(int damage)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.arc.bloodarsenal.items.sigil;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import com.arc.bloodarsenal.BloodArsenalConfig;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -83,7 +84,7 @@ public class SigilEnder extends EnergyItems implements IBindable, ISigil
|
||||
Vec3 vec3 = Vec3.createVectorHelper(ex, wy, zee);
|
||||
double distance = playerPrevPos.distanceTo(vec3);
|
||||
|
||||
if (EnergyItems.getCurrentEssence(itemStack.getTagCompound().getString("ownerName")) >= distance * 200 || player.capabilities.isCreativeMode)
|
||||
if (EnergyItems.getCurrentEssence(itemStack.getTagCompound().getString("ownerName")) >= distance * BloodArsenalConfig.enderSigilTeleportMultiplier || player.capabilities.isCreativeMode)
|
||||
{
|
||||
for (int k = 0; k < 8; ++k)
|
||||
{
|
||||
@@ -92,7 +93,7 @@ public class SigilEnder extends EnergyItems implements IBindable, ISigil
|
||||
}
|
||||
|
||||
player.setPositionAndUpdate(ex, wy, zee);
|
||||
EnergyItems.syphonBatteries(itemStack, player, (int) distance * 250);
|
||||
EnergyItems.syphonBatteries(itemStack, player, (int) distance * BloodArsenalConfig.enderSigilTeleportMultiplier);
|
||||
world.playSoundAtEntity(player, "mob.endermen.portal", 1F, 1F);
|
||||
player.swingItem();
|
||||
player.setVelocity(0.0D, 0.0D, 0.0D);
|
||||
@@ -103,7 +104,7 @@ public class SigilEnder extends EnergyItems implements IBindable, ISigil
|
||||
{
|
||||
player.displayGUIChest(player.getInventoryEnderChest());
|
||||
world.playSoundAtEntity(player, "mob.endermen.portal", 1F, 1F);
|
||||
EnergyItems.syphonBatteries(itemStack, player, 200);
|
||||
EnergyItems.syphonBatteries(itemStack, player, BloodArsenalConfig.enderSigilOpenCost);
|
||||
}
|
||||
|
||||
return itemStack;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.arc.bloodarsenal.items.sigil;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import com.arc.bloodarsenal.BloodArsenalConfig;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -102,20 +103,21 @@ public class SigilLightning extends EnergyItems implements IBindable, ISigil
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
// 8 per lightning bolt
|
||||
case 0:
|
||||
cost = 8000;
|
||||
cost = 8 * BloodArsenalConfig.lightningSigilMultiplier;
|
||||
break;
|
||||
case 1:
|
||||
cost = 32000;
|
||||
cost = 32 * BloodArsenalConfig.lightningSigilMultiplier;
|
||||
break;
|
||||
case 2:
|
||||
cost = 54000;
|
||||
cost = 54 * BloodArsenalConfig.lightningSigilMultiplier;
|
||||
break;
|
||||
case 3:
|
||||
cost = 104000;
|
||||
cost = 104 * BloodArsenalConfig.lightningSigilMultiplier;
|
||||
break;
|
||||
case 4:
|
||||
cost = 168000;
|
||||
cost = 168 * BloodArsenalConfig.lightningSigilMultiplier;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import com.arc.bloodarsenal.BloodArsenal;
|
||||
import com.arc.bloodarsenal.BloodArsenalConfig;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -1,36 +1,74 @@
|
||||
package com.arc.bloodarsenal.renderer.block;
|
||||
|
||||
import com.arc.bloodarsenal.tileentity.TileLifeInfuser;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import com.arc.bloodarsenal.renderer.model.ModelLifeInfuser;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderTileLifeInfuser implements ISimpleBlockRenderingHandler
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderTileLifeInfuser implements IItemRenderer
|
||||
{
|
||||
private ModelLifeInfuser modelLifeInfuser = new ModelLifeInfuser();
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileLifeInfuser(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type){
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper){
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data){
|
||||
|
||||
switch(type){
|
||||
case ENTITY: {
|
||||
render(0.0F, 0.0F, 1.0F, 1.0F);
|
||||
return;
|
||||
}
|
||||
case EQUIPPED: {
|
||||
render(0.5F, -0.5F, 2F, 1.0F);
|
||||
return;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
render(0.7F, -0.7F, 1.9F, 1.0F);
|
||||
return;
|
||||
}
|
||||
case INVENTORY: {
|
||||
render(0.0F, 0.0F, 1.0F, 1.0F);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void render(float x, float y, float z, float scale){
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(-90F, 1F, 0, 0);
|
||||
// GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
// Scale, Translate, Rotate
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(x, y, z);
|
||||
GL11.glRotatef(-90F, 1F, 0, 0);
|
||||
|
||||
ResourceLocation test = new ResourceLocation("bloodarsenal:textures/models/LifeInfuser.png");
|
||||
// Bind texture
|
||||
FMLClientHandler.instance().getClient().getTextureManager().bindTexture(test);
|
||||
|
||||
// Render
|
||||
modelLifeInfuser.render();
|
||||
|
||||
// GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,6 @@ public class TileLifeInfuserRenderer extends TileEntitySpecialRenderer
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
modelLifeInfuser.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
@@ -26,11 +26,15 @@ public class RitualRegistry
|
||||
Rituals.ritualMap.remove("ARC001Wither");
|
||||
Rituals.keyList.remove("ARC001Wither");
|
||||
}
|
||||
|
||||
if (BloodArsenalConfig.ritualDisabledMidas)
|
||||
{
|
||||
Rituals.ritualMap.remove("ARC002Midas");
|
||||
Rituals.keyList.remove("ARC002Midas");
|
||||
}
|
||||
if (BloodArsenalConfig.ritualDisabledEnchantment)
|
||||
{
|
||||
Rituals.ritualMap.remove("ARC003Enchant");
|
||||
Rituals.keyList.remove("ARC003Enchant");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.arc.bloodarsenal.tileentity;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import com.arc.bloodarsenal.BloodArsenalConfig;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -13,11 +13,9 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import org.lwjgl.Sys;
|
||||
|
||||
public class TileLPMaterializer extends TileEntity implements IInventory, IFluidTank, IFluidHandler
|
||||
{
|
||||
@@ -334,9 +332,9 @@ public class TileLPMaterializer extends TileEntity implements IInventory, IFluid
|
||||
super.updateEntity();
|
||||
materialize();
|
||||
|
||||
if (worldObj.getWorldTime() % 50 == 0)
|
||||
if (worldObj.getWorldTime() % 10 == 0)
|
||||
{
|
||||
int syphonMax = 500;
|
||||
int syphonMax = 1000;
|
||||
int fluidOutputted;
|
||||
fluidOutputted = Math.min(syphonMax, this.bufferCapacity - this.fluidOutput.amount);
|
||||
fluidOutputted = Math.min(this.fluid.amount, fluidOutputted);
|
||||
@@ -361,13 +359,13 @@ public class TileLPMaterializer extends TileEntity implements IInventory, IFluid
|
||||
|
||||
if (fluid.amount <= capacity - 100)
|
||||
{
|
||||
if (!SoulNetworkHandler.canSyphonFromOnlyNetwork(orb, 150))
|
||||
if (!SoulNetworkHandler.canSyphonFromOnlyNetwork(orb, BloodArsenalConfig.lpMaterializerCost))
|
||||
{
|
||||
SoulNetworkHandler.causeNauseaToPlayer(orb);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SoulNetworkHandler.syphonFromNetworkWhileInContainer(orb, 150))
|
||||
if (!SoulNetworkHandler.syphonFromNetworkWhileInContainer(orb, BloodArsenalConfig.lpMaterializerCost))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user