All da commentz
This commit is contained in:
parent
2b749000b6
commit
5983ff4130
|
@ -111,6 +111,7 @@ import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSpawnWard;
|
|||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSummonMeteor;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSupression;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectUnbinding;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectVeilOfEvil;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectWater;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.RitualEffectWellOfSuffering;
|
||||
import WayofTime.alchemicalWizardry.common.spell.simple.HomSpellRegistry;
|
||||
|
@ -160,7 +161,7 @@ import cpw.mods.fml.common.network.NetworkRegistry;
|
|||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.1.1")
|
||||
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.2.0Beta16")
|
||||
//@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = {"BloodAltar", "particle", "SetLifeEssence", "GetLifeEssence", "Ritual", "GetAltarEssence", "TESocket", "TEWritingTable", "CustomParticle", "SetPlayerVel", "SetPlayerPos", "TEPedestal", "TEPlinth", "TETeleposer", "InfiniteLPPath", "TEOrientor"}, packetHandler = PacketHandler.class)
|
||||
|
||||
public class AlchemicalWizardry
|
||||
|
@ -1037,34 +1038,35 @@ public class AlchemicalWizardry
|
|||
|
||||
public static void initRituals()
|
||||
{
|
||||
Rituals.registerRitual("AW001Water", 1, 500, new RitualEffectWater(), "Ritual of the Full Spring", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,30,255,255,0,0.501,0.8,0, 1.5));
|
||||
Rituals.registerRitual("AW002Lava", 1, 10000, new RitualEffectLava(), "Serenade of the Nether", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),255,0,0,255,0,0.501,0.8,0, 1.5));
|
||||
Rituals.registerRitual("AW003GreenGrove", 1, 1000, new RitualEffectGrowth(), "Ritual of the Green Grove", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),244,164,96,255,0,1.0,1.6,0, 1.5));
|
||||
Rituals.registerRitual("AW004Interdiction", 1, 1000, new RitualEffectInterdiction(), "Interdiction Ritual", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,255,255,0,0.501,0.8,0, 1.5));
|
||||
Rituals.registerRitual("AW005Containment", 1, 2000, new RitualEffectContainment(), "Ritual of Containment");
|
||||
Rituals.registerRitual("AW006Binding", 1, 5000, new RitualEffectSoulBound(), "Ritual of Binding", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/TransCircleBinding.png"),193,7,7,255,0,0.501,1.0,0, 2.5));
|
||||
Rituals.registerRitual("AW007Unbinding", 1, 30000, new RitualEffectUnbinding(), "Ritual of Unbinding");
|
||||
Rituals.registerRitual("AW008HighJump", 1, 1000, new RitualEffectJumping(), "Ritual of the High Jump");
|
||||
Rituals.registerRitual("AW009Magnetism", 1, 5000, new RitualEffectMagnetic(), "Ritual of Magnetism");
|
||||
Rituals.registerRitual("AW010Crusher", 1, 2500, new RitualEffectCrushing(), "Ritual of the Crusher");
|
||||
Rituals.registerRitual("AW011Speed", 1, 1000, new RitualEffectLeap(), "Ritual of Speed");
|
||||
Rituals.registerRitual("AW012AnimalGrowth", 1, 10000, new RitualEffectAnimalGrowth(), "Ritual of the Shepherd");
|
||||
Rituals.registerRitual("AW013Suffering", 1, 50000, new RitualEffectWellOfSuffering(), "Well of Suffering", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/TransCircleSuffering.png"),0,0,0,255,0,0.501,0.8,0, 2.5));
|
||||
Rituals.registerRitual("AW014Regen", 1, 25000, new RitualEffectHealing(), "Ritual of Regeneration");
|
||||
Rituals.registerRitual("AW015FeatheredKnife", 1, 50000, new RitualEffectFeatheredKnife(), "Ritual of the Feathered Knife");
|
||||
Rituals.registerRitual("AW016FeatheredEarth", 2, 100000, new RitualEffectFeatheredEarth(), "Ritual of the Feathered Earth");
|
||||
Rituals.registerRitual("AW017Gaia", 2, 1000000, new RitualEffectBiomeChanger(), "Ritual of Gaia's Transformation");
|
||||
Rituals.registerRitual("AW018Condor", 2, 1000000, new RitualEffectFlight(), "Reverence of the Condor");
|
||||
Rituals.registerRitual("AW019FallingTower", 2, 1000000, new RitualEffectSummonMeteor(), "Mark of the Falling Tower");
|
||||
Rituals.registerRitual("AW020BalladOfAlchemy", 1, 20000, new RitualEffectAutoAlchemy(), "Ballad of Alchemy");
|
||||
Rituals.registerRitual("AW021Expulsion", 1, 1000000, new RitualEffectExpulsion(), "Aura of Expulsion");
|
||||
Rituals.registerRitual("AW022Supression", 1, 10000, new RitualEffectSupression(), "Dome of Supression");
|
||||
Rituals.registerRitual("AW023Zephyr", 1, 25000, new RitualEffectItemSuction(),"Call of the Zephyr");
|
||||
Rituals.registerRitual("AW024Harvest", 1, 20000, new RitualEffectHarvest(), "Reap of the Harvest Moon");
|
||||
Rituals.registerRitual("AW025Conduit", 2, 2000000, new RitualEffectLifeConduit(), "Cry of the Eternal Soul");
|
||||
Rituals.registerRitual("AW026Ellipsoid", 1, 25000, new RitualEffectEllipsoid(), "Ellipsoid");
|
||||
Rituals.registerRitual("AW027Evaporation", 1, 20000, new RitualEffectEvaporation(), "Evaporation");
|
||||
Rituals.registerRitual("AW028SpawnWard", 1, 1000, new RitualEffectSpawnWard(), "Ward of Sacrosanctity");
|
||||
Rituals.registerRitual("AW001Water", 1, 500, new RitualEffectWater(), "Ritual of the Full Spring", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,30,255,255,0,0.501,0.8,0, 1.5, false));
|
||||
Rituals.registerRitual("AW002Lava", 1, 10000, new RitualEffectLava(), "Serenade of the Nether", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),255,0,0,255,0,0.501,0.8,0, 1.5, false));
|
||||
Rituals.registerRitual("AW003GreenGrove", 1, 1000, new RitualEffectGrowth(), "Ritual of the Green Grove", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),244,164,96,255,0,1.0,1.6,0, 1.5, false));
|
||||
Rituals.registerRitual("AW004Interdiction", 1, 1000, new RitualEffectInterdiction(), "Interdiction Ritual", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),27,227,206,255,0,0.501,0.8, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW005Containment", 1, 2000, new RitualEffectContainment(), "Ritual of Containment", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),186,21,21,255,0,2.5, 2.5, 0, 2.5, false));
|
||||
Rituals.registerRitual("AW006Binding", 1, 5000, new RitualEffectSoulBound(), "Ritual of Binding", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/TransCircleBinding.png"),193,7,7,255,0,0.501,1.0,0, 2.5, true));
|
||||
Rituals.registerRitual("AW007Unbinding", 1, 30000, new RitualEffectUnbinding(), "Ritual of Unbinding", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),193,7,7,255, 0, 0.5, 0.8, 0, 2.5, false));
|
||||
Rituals.registerRitual("AW008HighJump", 1, 1000, new RitualEffectJumping(), "Ritual of the High Jump", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),10,183,173,255, 0, 0.501, 1.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW009Magnetism", 1, 5000, new RitualEffectMagnetic(), "Ritual of Magnetism", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),126,39,0,255, 0, 0.501, 2.0, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW010Crusher", 1, 2500, new RitualEffectCrushing(), "Ritual of the Crusher", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW011Speed", 1, 1000, new RitualEffectLeap(), "Ritual of Speed", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW012AnimalGrowth", 1, 10000, new RitualEffectAnimalGrowth(), "Ritual of the Shepherd", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW013Suffering", 1, 50000, new RitualEffectWellOfSuffering(), "Well of Suffering", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/TransCircleSuffering.png"),0,0,0,255,0,0.501,0.8,0, 2.5, true));
|
||||
Rituals.registerRitual("AW014Regen", 1, 25000, new RitualEffectHealing(), "Ritual of Regeneration", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW015FeatheredKnife", 1, 50000, new RitualEffectFeatheredKnife(), "Ritual of the Feathered Knife", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW016FeatheredEarth", 2, 100000, new RitualEffectFeatheredEarth(), "Ritual of the Feathered Earth", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW017Gaia", 2, 1000000, new RitualEffectBiomeChanger(), "Ritual of Gaia's Transformation", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW018Condor", 2, 1000000, new RitualEffectFlight(), "Reverence of the Condor", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW019FallingTower", 2, 1000000, new RitualEffectSummonMeteor(), "Mark of the Falling Tower", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW020BalladOfAlchemy", 1, 20000, new RitualEffectAutoAlchemy(), "Ballad of Alchemy", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW021Expulsion", 1, 1000000, new RitualEffectExpulsion(), "Aura of Expulsion", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW022Supression", 1, 10000, new RitualEffectSupression(), "Dome of Supression", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW023Zephyr", 1, 25000, new RitualEffectItemSuction(),"Call of the Zephyr", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW024Harvest", 1, 20000, new RitualEffectHarvest(), "Reap of the Harvest Moon", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW025Conduit", 2, 2000000, new RitualEffectLifeConduit(), "Cry of the Eternal Soul", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW026Ellipsoid", 1, 25000, new RitualEffectEllipsoid(), "Ellipsoid", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW027Evaporation", 1, 20000, new RitualEffectEvaporation(), "Evaporation", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW028SpawnWard", 1, 150000, new RitualEffectSpawnWard(), "Ward of Sacrosanctity", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
Rituals.registerRitual("AW029VeilOfEvil", 1, 150000, new RitualEffectVeilOfEvil(), "Veil of Evil", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"),0,0,0,255, 0, 0.501, 0.501, 0, 1.5, false));
|
||||
//Rituals.registerRitual(1,100,new RitualEffectApiaryOverclock(),"Apiary Overclock"));
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@ import net.minecraftforge.common.config.Configuration;
|
|||
import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold;
|
||||
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
|
@ -86,8 +88,12 @@ public class BloodMagicConfiguration
|
|||
// AlchemicalWizardry.lockdownAltar = config.get("WimpySettings", "LockdownAltarWithRegen", true).getBoolean();
|
||||
AlchemicalWizardry.lockdownAltar = false;
|
||||
|
||||
RenderHelper.xOffset = config.get("ClientSettings", "AlchemyHUDxOffset", 50).getInt();
|
||||
RenderHelper.yOffset = config.get("ClientSettings", "AlchemyHUDyOffset", 2).getInt();
|
||||
Side side = FMLCommonHandler.instance().getSide();
|
||||
if(side == Side.CLIENT)
|
||||
{
|
||||
RenderHelper.xOffset = config.get("ClientSettings", "AlchemyHUDxOffset", 50).getInt();
|
||||
RenderHelper.yOffset = config.get("ClientSettings", "AlchemyHUDyOffset", 2).getInt();
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e)
|
||||
|
|
|
@ -34,6 +34,7 @@ import WayofTime.alchemicalWizardry.common.block.RuneOfSacrifice;
|
|||
import WayofTime.alchemicalWizardry.common.block.RuneOfSelfSacrifice;
|
||||
import WayofTime.alchemicalWizardry.common.block.SpectralBlock;
|
||||
import WayofTime.alchemicalWizardry.common.block.SpeedRune;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemBlockCrystalBelljar;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemBloodRuneBlock;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemSpellEffectBlock;
|
||||
import WayofTime.alchemicalWizardry.common.items.ItemSpellEnhancementBlock;
|
||||
|
@ -163,7 +164,7 @@ public class ModBlocks
|
|||
GameRegistry.registerBlock(ModBlocks.blockBuildingSchematicSaver, "blockSchemSaver");
|
||||
GameRegistry.registerBlock(ModBlocks.blockReagentConduit, "blockReagentConduit");
|
||||
GameRegistry.registerBlock(ModBlocks.blockAlchemicCalcinator, "blockAlchemicCalcinator");
|
||||
GameRegistry.registerBlock(ModBlocks.blockCrystalBelljar, "blockCrystalBelljar");
|
||||
GameRegistry.registerBlock(ModBlocks.blockCrystalBelljar, ItemBlockCrystalBelljar.class, "blockCrystalBelljar");
|
||||
}
|
||||
|
||||
public static void registerBlocksInInit()
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.client;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.client.event.sound.SoundEvent;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.RenderTickEvent;
|
||||
|
@ -11,6 +18,20 @@ public class ClientEventHandler
|
|||
{
|
||||
private Minecraft mcClient = FMLClientHandler.instance().getClient();
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerSoundEvent(SoundEvent event)
|
||||
{
|
||||
if(Minecraft.getMinecraft() != null)
|
||||
{
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if(player != null && player.isPotionActive(AlchemicalWizardry.customPotionDeaf))
|
||||
{
|
||||
event.setResult(Result.DENY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTick(RenderTickEvent event)
|
||||
{
|
||||
|
@ -22,4 +43,16 @@ public class ClientEventHandler
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderLivingPlayerPre(RenderPlayerEvent.Pre event)
|
||||
{
|
||||
GL11.glDisable(2929);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderLivingPlayerPost(RenderPlayerEvent.Post event)
|
||||
{
|
||||
GL11.glEnable(2929);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerCapabilities;
|
||||
|
@ -20,25 +20,19 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraftforge.client.event.sound.SoundEvent;
|
||||
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.RenderTickEvent;
|
||||
|
||||
public class AlchemicalWizardryEventHooks
|
||||
{
|
||||
|
@ -49,20 +43,6 @@ public class AlchemicalWizardryEventHooks
|
|||
public static Map<Integer, List<CoordAndRange>> respawnMap = new HashMap();
|
||||
public static Map<Integer, List<CoordAndRange>> forceSpawnMap = new HashMap();
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerSoundEvent(SoundEvent event)
|
||||
{
|
||||
if(event.isCancelable() && Minecraft.getMinecraft() != null)
|
||||
{
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if(player != null && player.isPotionActive(AlchemicalWizardry.customPotionBoost))
|
||||
{
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onLivingSpawnEvent(CheckSpawn event)
|
||||
{
|
||||
|
@ -111,7 +91,12 @@ public class AlchemicalWizardryEventHooks
|
|||
}
|
||||
}
|
||||
|
||||
String forceSpawnRitual = "AW028SpawnWard";
|
||||
if(event.entityLiving instanceof EntityCreeper)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String forceSpawnRitual = "AW029VeilOfEvil";
|
||||
|
||||
if(forceSpawnMap.containsKey(dimension))
|
||||
{
|
||||
|
|
|
@ -1,11 +1,19 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
|
||||
public class BlockBelljar extends BlockContainer
|
||||
|
@ -19,6 +27,59 @@ public class BlockBelljar extends BlockContainer
|
|||
this.setBlockName("crystalBelljar");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack stack)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile instanceof TEBellJar)
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
if(tag != null)
|
||||
{
|
||||
((TEBellJar) tile).readTankNBTOnPlace(tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void breakBlock(World world, int x, int y, int z, Block par5, int par6)
|
||||
// {
|
||||
// if(world.isRemote)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// TileEntity tile = world.getTileEntity(x, y, z);
|
||||
//
|
||||
// if(tile == null)
|
||||
// {
|
||||
// System.out.println("Tile has been removed already!");
|
||||
// }
|
||||
//
|
||||
// if(tile instanceof TEBellJar)
|
||||
// {
|
||||
// if(((TEBellJar) tile).areTanksEmpty())
|
||||
// {
|
||||
// super.breakBlock(world, x, y, z, par5, par6);
|
||||
// return;
|
||||
// }
|
||||
// System.out.println("Writing...");
|
||||
// ItemStack droppedStack = new ItemStack(ModBlocks.blockCrystalBelljar);
|
||||
// droppedStack.setTagCompound(new NBTTagCompound());
|
||||
//
|
||||
// NBTTagCompound savedTag = droppedStack.getTagCompound();
|
||||
// ((TEBellJar) tile).writeTankNBT(savedTag);
|
||||
//
|
||||
// this.dropBlockAsItem(world, x, y, z, droppedStack);
|
||||
//
|
||||
// world.removeTileEntity(x, y, z);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// super.breakBlock(world, x, y, z, par5, par6);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta)
|
||||
{
|
||||
|
@ -65,4 +126,32 @@ public class BlockBelljar extends BlockContainer
|
|||
}
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player)
|
||||
{
|
||||
this.dropBlockAsItem(world, x, y, z, meta, 0);
|
||||
|
||||
super.onBlockHarvested(world, x, y, z, meta, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
|
||||
{
|
||||
ArrayList<ItemStack> list = new ArrayList();
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile instanceof TEBellJar)
|
||||
{
|
||||
ItemStack drop = new ItemStack(this);
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
((TEBellJar)tile).writeTankNBT(tag);
|
||||
drop.stackTagCompound = tag;
|
||||
|
||||
list.add(drop);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@ package WayofTime.alchemicalWizardry.common.block;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.BlockMobSpawner;
|
||||
|
@ -162,69 +160,33 @@ public class BlockTeleposer extends BlockContainer
|
|||
|
||||
public static boolean swapBlocks(World worldI, World worldF, int xi, int yi, int zi, int xf, int yf, int zf)
|
||||
{
|
||||
//TODO Fix sapling duplication glitch
|
||||
TileEntity tileEntityI = worldI.getTileEntity(xi, yi, zi);
|
||||
TileEntity tileEntityF = worldF.getTileEntity(xf, yf, zf);
|
||||
TileEntity tileI;
|
||||
TileEntity tileF;
|
||||
// ItemStack[] inv1 = new ItemStack[0];
|
||||
// ItemStack[] inv2 = new ItemStack[0];
|
||||
|
||||
NBTTagCompound nbttag1 = new NBTTagCompound();
|
||||
NBTTagCompound nbttag2 = new NBTTagCompound();
|
||||
|
||||
if (tileEntityI != null)
|
||||
{
|
||||
//NBTTagCompound nbttag1 = new NBTTagCompound();
|
||||
// tileEntityI.xCoord=xf;
|
||||
// tileEntityI.yCoord=yf;
|
||||
// tileEntityI.zCoord=zf;
|
||||
tileEntityI.writeToNBT(nbttag1);
|
||||
//tileEntityI.readFromNBT(new NBTTagCompound());
|
||||
}
|
||||
|
||||
// if(tileEntityI instanceof IInventory)
|
||||
// {
|
||||
// int size = ((IInventory)tileEntityI).getSizeInventory();
|
||||
// inv1 = new ItemStack[size];
|
||||
// for(int i=0; i<size; i++)
|
||||
// {
|
||||
// inv1[i] = ((IInventory)tileEntityI).getStackInSlot(i);
|
||||
// ((IInventory)tileEntityI).setInventorySlotContents(i, null);
|
||||
// }
|
||||
// }
|
||||
|
||||
if (tileEntityF != null)
|
||||
{
|
||||
// tileEntityF.xCoord=xi;
|
||||
// tileEntityF.yCoord=yi;
|
||||
// tileEntityF.zCoord=zi;
|
||||
tileEntityF.writeToNBT(nbttag2);
|
||||
}
|
||||
|
||||
// if(tileEntityF instanceof IInventory)
|
||||
// {
|
||||
// int size = ((IInventory)tileEntityF).getSizeInventory();
|
||||
// inv2 = new ItemStack[size];
|
||||
// for(int i=0; i<size; i++)
|
||||
// {
|
||||
// inv2[i] = ((IInventory)tileEntityF).getStackInSlot(i);
|
||||
// ((IInventory)tileEntityF).setInventorySlotContents(i, null);
|
||||
// }
|
||||
// }
|
||||
Block blockI = worldI.getBlock(xi, yi, zi);
|
||||
Block blockF = worldF.getBlock(xf, yf, zf);
|
||||
|
||||
// if(ThaumcraftApi.portableHoleBlackList.contains(idI)||ThaumcraftApi.portableHoleBlackList.contains(idF))
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
if (blockI.equals(Blocks.air) && blockF.equals(Blocks.air))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//if(Block.blocksList[idI] instanceof IPlantable || Block.blocksList[idF] instanceof IPlantable||Block.blocksList[idI] instanceof BlockMobSpawner || Block.blocksList[idF] instanceof BlockMobSpawner)
|
||||
if (blockI instanceof BlockMobSpawner || blockF instanceof BlockMobSpawner)
|
||||
{
|
||||
return false;
|
||||
|
@ -240,9 +202,7 @@ public class BlockTeleposer extends BlockContainer
|
|||
if (finalBlock != null)
|
||||
{
|
||||
TileEntity tileToSet = finalBlock.createTileEntity(worldF, metaF);
|
||||
// tileToSet.xCoord = xf;
|
||||
// tileToSet.yCoord = yf;
|
||||
// tileToSet.zCoord = zf;
|
||||
|
||||
worldF.setTileEntity(xf, yf, zf, tileToSet);
|
||||
}
|
||||
|
||||
|
@ -251,9 +211,7 @@ public class BlockTeleposer extends BlockContainer
|
|||
if (initialBlock != null)
|
||||
{
|
||||
TileEntity tileToSet = initialBlock.createTileEntity(worldI, metaI);
|
||||
// tileToSet.xCoord = xi;
|
||||
// tileToSet.yCoord = yi;
|
||||
// tileToSet.zCoord = zi;
|
||||
|
||||
worldI.setTileEntity(xi, yi, zi, tileToSet);
|
||||
}
|
||||
|
||||
|
@ -262,6 +220,7 @@ public class BlockTeleposer extends BlockContainer
|
|||
// worldI.destroyBlock(xi, yi, zi, false);
|
||||
// worldI.setBlockToAir(xi, yi, zi);
|
||||
// worldF.setBlockToAir(xf, yf, zf);
|
||||
|
||||
worldF.setBlock(xf, yf, zf, initialBlock, metaI, 3);
|
||||
|
||||
if (tileEntityI != null)
|
||||
|
@ -271,6 +230,12 @@ public class BlockTeleposer extends BlockContainer
|
|||
newTileEntityI.xCoord = xf;
|
||||
newTileEntityI.yCoord = yf;
|
||||
newTileEntityI.zCoord = zf;
|
||||
|
||||
// TileEntity tile = worldI.getTileEntity(xf, yf, zf);
|
||||
// if(tile instanceof TileMultipart)
|
||||
// {
|
||||
// TileMultipart.createFromNBT(nbttag1);
|
||||
// }
|
||||
}
|
||||
|
||||
worldI.setBlock(xi, yi, zi, finalBlock, metaF, 3);
|
||||
|
@ -282,40 +247,14 @@ public class BlockTeleposer extends BlockContainer
|
|||
newTileEntityF.xCoord = xi;
|
||||
newTileEntityF.yCoord = yi;
|
||||
newTileEntityF.zCoord = zi;
|
||||
|
||||
TileEntity tile = worldI.getTileEntity(xi, yi, zi);
|
||||
// if(tile instanceof TileMultipart)
|
||||
// {
|
||||
// TileMultipart.createFromNBT(nbttag2);
|
||||
// }
|
||||
}
|
||||
|
||||
// if(finalBlock!=null)
|
||||
// finalBlock.onNeighborBlockChange(worldI, xi, yi, zi, AlchemicalWizardry.blockTeleposer.blockID);
|
||||
// if(initialBlock!=null)
|
||||
// initialBlock.onNeighborBlockChange(worldF, xf, yf, zf, AlchemicalWizardry.blockTeleposer.blockID);
|
||||
// tileI = worldI.getBlockTileEntity(xi, yi, zi);
|
||||
// tileF = worldF.getBlockTileEntity(xf, yf, zf);
|
||||
// if(tileI!=null)
|
||||
// {
|
||||
// tileI.readFromNBT(nbttag2);
|
||||
// }
|
||||
//
|
||||
// if(tileF!=null)
|
||||
// {
|
||||
// tileF.readFromNBT(nbttag1);
|
||||
// }
|
||||
// if(tileI instanceof IInventory && inv2.length>0)
|
||||
// {
|
||||
// for(int i=0;i<((IInventory)tileI).getSizeInventory();i++)
|
||||
// {
|
||||
// ((IInventory)tileI).setInventorySlotContents(i, inv2[i]);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if(tileF instanceof IInventory && inv1.length>0)
|
||||
// {
|
||||
// for(int i=0;i<((IInventory)tileF).getSizeInventory();i++)
|
||||
// {
|
||||
// ((IInventory)tileF).setInventorySlotContents(i, inv1[i]);
|
||||
// }
|
||||
// }
|
||||
// worldI.markBlockForUpdate(xi, yi, zi);
|
||||
// worldF.markBlockForUpdate(xf, yf, zf);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -341,7 +341,6 @@ public class EntityElemental extends EntityDemon
|
|||
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
|
||||
{
|
||||
super.writeEntityToNBT(par1NBTTagCompound);
|
||||
par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -574,30 +573,6 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return this wolf's collar color.
|
||||
*/
|
||||
public int getCollarColor()
|
||||
{
|
||||
return this.dataWatcher.getWatchableObjectByte(20) & 15;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set this wolf's collar color.
|
||||
*/
|
||||
public void setCollarColor(int par1)
|
||||
{
|
||||
this.dataWatcher.updateObject(20, Byte.valueOf((byte) (par1 & 15)));
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used when two same-species animals in 'love mode' breed to generate the new baby animal.
|
||||
*/
|
||||
public EntityWolf spawnBabyAnimal(EntityAgeable par1EntityAgeable)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void func_70918_i(boolean par1)
|
||||
{
|
||||
if (par1)
|
||||
|
@ -654,10 +629,6 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
public EntityAgeable createChild(EntityAgeable par1EntityAgeable)
|
||||
{
|
||||
return this.spawnBabyAnimal(par1EntityAgeable);
|
||||
}
|
||||
|
||||
/**
|
||||
* sets this entity's combat AI.
|
||||
|
|
|
@ -0,0 +1,151 @@
|
|||
package WayofTime.alchemicalWizardry.common.harvest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler;
|
||||
|
||||
public class GenericSeededHarvestHandler implements IHarvestHandler
|
||||
{
|
||||
public Block harvestBlock;
|
||||
public int harvestMeta;
|
||||
public IPlantable harvestSeed;
|
||||
|
||||
public GenericSeededHarvestHandler(String block, int meta, String seed)
|
||||
{
|
||||
harvestBlock = getBlockForString(block);
|
||||
harvestMeta = meta;
|
||||
Item testSeed = getItemForString(seed);
|
||||
if(testSeed instanceof IPlantable)
|
||||
{
|
||||
harvestSeed = (IPlantable)testSeed;
|
||||
}else
|
||||
{
|
||||
harvestSeed = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Block getBlockForString(String str)
|
||||
{
|
||||
String[] parts = str.split(":");
|
||||
String modId = parts[0];
|
||||
String name = parts[1];
|
||||
return GameRegistry.findBlock(modId, name);
|
||||
}
|
||||
|
||||
public static Item getItemForString(String str)
|
||||
{
|
||||
String[] parts = str.split(":");
|
||||
String modId = parts[0];
|
||||
String name = parts[1];
|
||||
return GameRegistry.findItem(modId, name);
|
||||
}
|
||||
|
||||
public boolean canHandleBlock(Block block)
|
||||
{
|
||||
return block == harvestBlock;
|
||||
}
|
||||
|
||||
public int getHarvestMeta(Block block)
|
||||
{
|
||||
return harvestMeta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta)
|
||||
{
|
||||
if(!this.canHandleBlock(block) || meta != this.getHarvestMeta(block))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
IPlantable seed = this.getSeedItem(block);
|
||||
|
||||
if(seed == null)
|
||||
{
|
||||
world.func_147480_a(xCoord, yCoord, zCoord, true);
|
||||
|
||||
return true;
|
||||
}else
|
||||
{
|
||||
int fortune = 0;
|
||||
|
||||
List<ItemStack> list = block.getDrops(world, xCoord, yCoord, zCoord, meta, fortune);
|
||||
boolean foundAndRemovedSeed = false;
|
||||
|
||||
for(ItemStack stack : list)
|
||||
{
|
||||
if(stack == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Item item = stack.getItem();
|
||||
if(item == seed)
|
||||
{
|
||||
int itemSize = stack.stackSize;
|
||||
if(itemSize > 1)
|
||||
{
|
||||
stack.stackSize--;
|
||||
foundAndRemovedSeed = true;
|
||||
break;
|
||||
}else if(itemSize == 1)
|
||||
{
|
||||
list.remove(stack);
|
||||
foundAndRemovedSeed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(foundAndRemovedSeed)
|
||||
{
|
||||
int plantMeta = seed.getPlantMetadata(world, xCoord, yCoord, zCoord);
|
||||
Block plantBlock = seed.getPlant(world, xCoord, yCoord, zCoord);
|
||||
|
||||
world.func_147480_a(xCoord, yCoord, zCoord, false);
|
||||
|
||||
world.setBlock(xCoord, yCoord, zCoord, plantBlock, plantMeta, 3);
|
||||
|
||||
for(ItemStack stack : list)
|
||||
{
|
||||
EntityItem itemEnt = new EntityItem(world, xCoord, yCoord, zCoord, stack);
|
||||
|
||||
world.spawnEntityInWorld(itemEnt);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public IPlantable getSeedItem(Block block)
|
||||
{
|
||||
if(block == Blocks.wheat)
|
||||
{
|
||||
return (IPlantable) Items.wheat_seeds;
|
||||
}
|
||||
if(block == Blocks.carrots)
|
||||
{
|
||||
return (IPlantable) Items.carrot;
|
||||
}
|
||||
if(block == Blocks.potatoes)
|
||||
{
|
||||
return (IPlantable) Items.potato;
|
||||
}
|
||||
if(block == Blocks.nether_wart)
|
||||
{
|
||||
return (IPlantable) Items.nether_wart;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -2,10 +2,12 @@ package WayofTime.alchemicalWizardry.common.items;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -25,6 +27,7 @@ import WayofTime.alchemicalWizardry.ModItems;
|
|||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaArmour;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -38,6 +41,8 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
|
||||
private static final boolean tryComplexRendering = false;
|
||||
|
||||
public BoundArmour(int armorType)
|
||||
{
|
||||
|
@ -46,6 +51,75 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
ModelBiped model1 = null;
|
||||
ModelBiped model2 = null;
|
||||
ModelBiped model = null;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot)
|
||||
{
|
||||
if(tryComplexRendering)
|
||||
{
|
||||
int type = ((ItemArmor)itemStack.getItem()).armorType;
|
||||
if(this.model1 == null)
|
||||
{
|
||||
this.model1 = new ModelOmegaArmour(1.0f, true, true, false, true);
|
||||
}
|
||||
if(this.model2 == null)
|
||||
{
|
||||
this.model2 = new ModelOmegaArmour(0.5f, false, false, true, false);
|
||||
}
|
||||
|
||||
if(type == 1 || type == 3 || type == 0)
|
||||
{
|
||||
this.model = model1;
|
||||
}else
|
||||
{
|
||||
this.model = model2;
|
||||
}
|
||||
|
||||
if(this.model != null)
|
||||
{
|
||||
this.model.bipedHead.showModel = (type == 0);
|
||||
this.model.bipedHeadwear.showModel = (type == 0);
|
||||
this.model.bipedBody.showModel = ((type == 1) || (type == 2));
|
||||
this.model.bipedLeftArm.showModel = (type == 1);
|
||||
this.model.bipedRightArm.showModel = (type == 1);
|
||||
this.model.bipedLeftLeg.showModel = (type == 2 || type == 3);
|
||||
this.model.bipedRightLeg.showModel = (type == 2 || type == 3);
|
||||
this.model.isSneak = entityLiving.isSneaking();
|
||||
|
||||
this.model.isRiding = entityLiving.isRiding();
|
||||
this.model.isChild = entityLiving.isChild();
|
||||
|
||||
this.model.aimedBow = false;
|
||||
this.model.heldItemRight = (entityLiving.getHeldItem() != null ? 1 : 0);
|
||||
|
||||
if ((entityLiving instanceof EntityPlayer))
|
||||
{
|
||||
if (((EntityPlayer)entityLiving).getItemInUseDuration() > 0)
|
||||
{
|
||||
EnumAction enumaction = ((EntityPlayer)entityLiving).getItemInUse().getItemUseAction();
|
||||
if (enumaction == EnumAction.block)
|
||||
{
|
||||
this.model.heldItemRight = 3;
|
||||
} else if (enumaction == EnumAction.bow)
|
||||
{
|
||||
this.model.aimedBow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
|
||||
}else
|
||||
{
|
||||
return super.getArmorModel(entityLiving, itemStack, armorSlot);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
|
@ -227,6 +301,10 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
|
||||
{
|
||||
if(this.tryComplexRendering)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/BloodArmour_WIP.png";
|
||||
}
|
||||
//TODO Make the armour invisible when the player has Invisibility on.
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
|
|
|
@ -130,7 +130,7 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!getActivated(par1ItemStack))
|
||||
if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!getActivated(par1ItemStack))
|
||||
if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (!getActivated(par1ItemStack))
|
||||
if (!getActivated(par1ItemStack) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
@Override
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase)
|
||||
{
|
||||
if (par3EntityLivingBase == null || par2EntityLivingBase == null || par3EntityLivingBase.worldObj.isRemote || !(par3EntityLivingBase.getClass().equals(EntityPlayerMP.class)))
|
||||
if (par3EntityLivingBase == null || par2EntityLivingBase == null || par3EntityLivingBase.worldObj.isRemote || (par3EntityLivingBase instanceof EntityPlayer && SpellHelper.isFakePlayer(par3EntityLivingBase.worldObj, (EntityPlayer) par3EntityLivingBase)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -10,9 +10,8 @@ import net.minecraft.world.World;
|
|||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
|
||||
public class EnergyItems extends Item implements IBindable
|
||||
{
|
||||
|
@ -224,7 +223,7 @@ public class EnergyItems extends Item implements IBindable
|
|||
|
||||
if (item.stackTagCompound.getString("ownerName").equals(""))
|
||||
{
|
||||
item.stackTagCompound.setString("ownerName", SpellHelper.getUsername(player));
|
||||
item.stackTagCompound.setString("ownerName", SoulNetworkHandler.getUsername(player));
|
||||
}
|
||||
|
||||
initializePlayer(player);
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
|
||||
public class ItemBlockCrystalBelljar extends ItemBlock
|
||||
{
|
||||
public ItemBlockCrystalBelljar(Block par1)
|
||||
{
|
||||
super(par1);
|
||||
// this.setUnlocalizedName("itemSpellEnhancementBlock");
|
||||
// setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setMaxStackSize(16);
|
||||
}
|
||||
|
||||
public int getMetadata(int par1)
|
||||
{
|
||||
return par1;
|
||||
}
|
||||
|
||||
public ReagentContainer[] getReagentContainers(ItemStack stack)
|
||||
{
|
||||
if(stack != null && stack.hasTagCompound())
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
int size = tagList.tagCount();
|
||||
ReagentContainer[] tanks = new ReagentContainer[size];
|
||||
|
||||
for(int i=0; i<size; i++)
|
||||
{
|
||||
NBTTagCompound savedTag = tagList.getCompoundTagAt(i);
|
||||
tanks[i] = ReagentContainer.readFromNBT(savedTag);
|
||||
}
|
||||
|
||||
return tanks;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
ReagentContainer[] tanks = this.getReagentContainers(stack);
|
||||
|
||||
if(tanks == null)
|
||||
{
|
||||
list.add("Empty");
|
||||
}else
|
||||
{
|
||||
list.add("Current Contents:");
|
||||
for(int i=0; i<tanks.length; i++)
|
||||
{
|
||||
if(tanks[i] == null || tanks[i].getReagent() == null || tanks[i].getReagent().reagent == null)
|
||||
{
|
||||
list.add("- Empty");
|
||||
}else
|
||||
{
|
||||
ReagentStack reagentStack = tanks[i].getReagent();
|
||||
list.add("- " + reagentStack.reagent.name + ": " + reagentStack.amount + "/" + tanks[i].getCapacity()/1000 + "k AR");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
|
||||
{
|
||||
System.out.println("I am calling placeBlockAt");
|
||||
if(stack.getTagCompound() == null)
|
||||
{
|
||||
System.out.println("I have no NBT.");
|
||||
}
|
||||
if (!world.setBlock(x, y, z, field_150939_a, metadata, 3))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (world.getBlock(x, y, z) == field_150939_a)
|
||||
{
|
||||
field_150939_a.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
field_150939_a.onPostBlockPlaced(world, x, y, z, metadata);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -196,35 +196,21 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator
|
|||
|
||||
Reagent pastReagent = this.getReagent(itemStack);
|
||||
|
||||
boolean goForNext = false;
|
||||
boolean hasFound = false;
|
||||
for(Reagent reagent : reagentList)
|
||||
if(reagentList.size() <= 0)
|
||||
{
|
||||
if(goForNext)
|
||||
{
|
||||
goForNext = false;
|
||||
this.setReagentWithNotification(itemStack, reagent, player);
|
||||
}
|
||||
|
||||
if(reagent == pastReagent)
|
||||
{
|
||||
goForNext = true;
|
||||
hasFound = true;
|
||||
}
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
if(hasFound)
|
||||
int reagentLocation = -1;
|
||||
|
||||
reagentLocation = reagentList.indexOf(pastReagent);
|
||||
|
||||
if(reagentLocation == -1 || reagentLocation+1 >= reagentList.size())
|
||||
{
|
||||
if(goForNext)
|
||||
{
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(0), player);
|
||||
}
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(0), player);
|
||||
}else
|
||||
{
|
||||
if(reagentList.size() >= 1)
|
||||
{
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(0), player);
|
||||
}
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(reagentLocation + 1), player);
|
||||
}
|
||||
}
|
||||
}else
|
||||
|
@ -234,6 +220,11 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator
|
|||
Int3 coords = this.getCoordinates(itemStack);
|
||||
int dimension = this.getDimension(itemStack);
|
||||
|
||||
if(coords == null)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
if(dimension != world.provider.dimensionId || Math.abs(coords.xCoord - x) > maxDistance || Math.abs(coords.yCoord - y) > maxDistance || Math.abs(coords.zCoord - z) > maxDistance)
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Linked container is either too far or is in a different dimension."));
|
||||
|
@ -249,6 +240,11 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator
|
|||
|
||||
Reagent reagent = this.getReagent(itemStack);
|
||||
|
||||
if(reagent == null)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
TEReagentConduit pastRelay = (TEReagentConduit)pastTile;
|
||||
|
||||
if(player.isSneaking())
|
||||
|
|
|
@ -94,6 +94,8 @@ public class DivinationSigil extends Item implements ArmourUpgrade, IReagentMani
|
|||
|
||||
if(!(tile instanceof IReagentHandler))
|
||||
{
|
||||
par3EntityPlayer.addChatMessage(new ChatComponentText("Current Essence: " + EnergyItems.getCurrentEssence(ownerName) + "LP"));
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,12 +10,13 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBloodLightSigil extends EnergyItems
|
||||
public class ItemBloodLightSigil extends EnergyItems implements IHolding
|
||||
{
|
||||
private int tickDelay = 100;
|
||||
|
||||
|
|
|
@ -20,8 +20,9 @@ public class AlchemyCircleRenderer extends MRSRenderer
|
|||
private double zOffset;
|
||||
private double radius;
|
||||
private double initialY;
|
||||
private boolean renderWithoutReagents;
|
||||
|
||||
public AlchemyCircleRenderer(ResourceLocation resource, int red, int green, int blue, int intensity, double xOff, double initialY, double yOff, double zOff, double radius)
|
||||
public AlchemyCircleRenderer(ResourceLocation resource, int red, int green, int blue, int intensity, double xOff, double initialY, double yOff, double zOff, double radius, boolean renderWithoutReagents)
|
||||
{
|
||||
this.resourceLocation = resource;
|
||||
this.colourRed = red;
|
||||
|
@ -33,11 +34,17 @@ public class AlchemyCircleRenderer extends MRSRenderer
|
|||
this.yOffset = yOff;
|
||||
this.zOffset = zOff;
|
||||
this.radius = radius;
|
||||
this.renderWithoutReagents = renderWithoutReagents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderAt(TEMasterStone tile, double x, double y, double z)
|
||||
{
|
||||
if(tile.areTanksEmpty() && !renderWithoutReagents)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
|
|
@ -24,7 +24,9 @@ public class TEAlchemicalCalcinatorItemRenderer implements IItemRenderer
|
|||
|
||||
Block block = ModBlocks.blockAlchemicCalcinator;
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
|
@ -41,7 +43,8 @@ public class TEAlchemicalCalcinatorItemRenderer implements IItemRenderer
|
|||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -60,9 +60,10 @@ public class TEAltarItemRenderer implements IItemRenderer
|
|||
|
||||
private void renderBloodAltar(RenderBlocks render, ItemStack item, float x, float y, float z, float scale)
|
||||
{
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glPushMatrix();
|
||||
// Disable Lighting Calculations
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glTranslatef(x, y, z);
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glRotatef(180f, 0f, 1f, 0f);
|
||||
|
@ -72,7 +73,9 @@ public class TEAltarItemRenderer implements IItemRenderer
|
|||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
modelBloodAltar.renderBloodAltar();
|
||||
// Re-enable Lighting Calculations
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,48 +1,164 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class TEBellJarItemRenderer implements IItemRenderer
|
||||
{
|
||||
ItemRenderer d;
|
||||
private ModelCrystalBelljar modelConduit = new ModelCrystalBelljar();
|
||||
private ResourceLocation mainResource = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png");
|
||||
private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png");
|
||||
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
GL11.glDepthMask(false);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png");
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(mainResource);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
this.modelConduit.renderSpecialItem((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, 0);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
ReagentContainerInfo[] info = TEBellJar.getContainerInfoFromItem(item);
|
||||
if(info.length >= 1 && info[0] != null)
|
||||
{
|
||||
ReagentStack reagentStack = info[0].reagent;
|
||||
int capacity = info[0].capacity;
|
||||
if(reagentStack != null && reagentStack.reagent != null)
|
||||
{
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
this.renderTankContents(translateX, translateY, translateZ, reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), 200 * reagentStack.amount / capacity);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(mainResource);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelConduit.renderSpecialItem((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, 1);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
// GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
// GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDepthMask(true);
|
||||
}
|
||||
|
||||
private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(resourceLocation);
|
||||
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F);
|
||||
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float)MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity);
|
||||
|
||||
GL11.glTranslated(x+0.5, y+0.5, z+0.5);
|
||||
//GL11.glRotatef(30F, 0F, 0F, 1F); //Rotate vertical axis
|
||||
//GL11.glRotatef(tileAltar.getWorldObj().getWorldTime()*2f, 1F, 0F, 0F); //Rotate cylindrically
|
||||
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
double x1 = -4d/16d;
|
||||
double x2 = 4d/16d;
|
||||
double y1 = -6d/16d;
|
||||
double y2 = 4d/16d;
|
||||
double z1 = -4d/16d;
|
||||
double z2 = 4d/16d;
|
||||
|
||||
double resx1 = 0.0d;
|
||||
double resx2 = 0.0d;
|
||||
double resy1 = 1.0d;
|
||||
double resy2 = 1.0d;
|
||||
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2);
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
|
|
|
@ -85,6 +85,25 @@ public class ModelCrystalBelljar extends ModelBase
|
|||
jar5.render(f5);
|
||||
}
|
||||
|
||||
public void renderSpecialItem(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, int part)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
if(part == 0)
|
||||
{
|
||||
woodBottom.render(f5);
|
||||
}else
|
||||
{
|
||||
handle1.render(f5);
|
||||
handle2.render(f5);
|
||||
jar1.render(f5);
|
||||
jar2.render(f5);
|
||||
jar3.render(f5);
|
||||
jar4.render(f5);
|
||||
jar5.render(f5);
|
||||
}
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
|
|
|
@ -0,0 +1,714 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelOmegaArmour extends ModelBiped
|
||||
{
|
||||
// ModelRenderer head;
|
||||
// ModelRenderer body;
|
||||
// ModelRenderer rightarm;
|
||||
// ModelRenderer leftarm;
|
||||
// ModelRenderer rightleg;
|
||||
// ModelRenderer leftleg;
|
||||
ModelRenderer rightArmMain;
|
||||
ModelRenderer rightKnucklePlate;
|
||||
ModelRenderer rightKnuckleBrace;
|
||||
ModelRenderer rightKnuckle1;
|
||||
ModelRenderer rightKnuckle2;
|
||||
ModelRenderer rightKnuckle3;
|
||||
ModelRenderer rightKnuckle4;
|
||||
ModelRenderer rightKnuckle5;
|
||||
ModelRenderer rightKnuckle6;
|
||||
ModelRenderer rightShoulder1;
|
||||
ModelRenderer rightShoulder2;
|
||||
ModelRenderer rightShoulder3;
|
||||
ModelRenderer mainPlate;
|
||||
ModelRenderer chestPlate1;
|
||||
ModelRenderer chestPlate2;
|
||||
ModelRenderer chestPlate3;
|
||||
ModelRenderer chestPlate4;
|
||||
ModelRenderer chestPlate5;
|
||||
ModelRenderer chestPlate6;
|
||||
ModelRenderer belt;
|
||||
ModelRenderer leftArmMain;
|
||||
ModelRenderer leftKnucklePlate;
|
||||
ModelRenderer leftKnuckleBrace;
|
||||
ModelRenderer leftKnuckle1;
|
||||
ModelRenderer leftKnuckle2;
|
||||
ModelRenderer leftKnuckle3;
|
||||
ModelRenderer leftKnuckle4;
|
||||
ModelRenderer leftKnuckle5;
|
||||
ModelRenderer leftKnuckle6;
|
||||
ModelRenderer leftShoulder1;
|
||||
ModelRenderer leftShoulder2;
|
||||
ModelRenderer leftShoulder3;
|
||||
ModelRenderer leftBootBottom;
|
||||
ModelRenderer leftBootPlate;
|
||||
ModelRenderer leftBootBrace;
|
||||
ModelRenderer leftBootWing1;
|
||||
ModelRenderer leftBootWing2;
|
||||
ModelRenderer rightBootBottom;
|
||||
ModelRenderer rightBootPlate;
|
||||
ModelRenderer rightBootBrace;
|
||||
ModelRenderer rightBootWing1;
|
||||
ModelRenderer rightBootWing2;
|
||||
ModelRenderer leftLegSidePlate;
|
||||
ModelRenderer leftLegMain;
|
||||
ModelRenderer leftLegPlate1;
|
||||
ModelRenderer leftLegPlate2;
|
||||
ModelRenderer leftLegPlate3;
|
||||
ModelRenderer leftLegPlate4;
|
||||
ModelRenderer rightLegSidePlate;
|
||||
ModelRenderer rightLegMain;
|
||||
ModelRenderer rightLegPlate1;
|
||||
ModelRenderer rightLegPlate2;
|
||||
ModelRenderer rightLegPlate3;
|
||||
ModelRenderer rightLegPlate4;
|
||||
|
||||
public ModelOmegaArmour(float f, boolean addHelmet, boolean addChestPiece, boolean addLeggings, boolean addBoots)
|
||||
{
|
||||
super(f, 0.0f, 128, 128);
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
|
||||
// boolean addHelmet = true;
|
||||
// boolean addChestPiece = true;
|
||||
// boolean addLeggings = true;
|
||||
// boolean addBoots = true;
|
||||
|
||||
/* Duplicate player model */
|
||||
{
|
||||
// head = new ModelRenderer(this, 0, 0);
|
||||
// head.addBox(-4F, -8F, -4F, 8, 8, 8);
|
||||
// head.setRotationPoint(0F, 0F, 0F);
|
||||
// head.setTextureSize(128, 128);
|
||||
// head.mirror = true;
|
||||
// setRotation(head, 0F, 0F, 0F);
|
||||
// body = new ModelRenderer(this, 16, 16);
|
||||
// body.addBox(-4F, 0F, -2F, 8, 12, 4);
|
||||
// body.setRotationPoint(0F, 0F, 0F);
|
||||
// body.setTextureSize(128, 128);
|
||||
// body.mirror = true;
|
||||
// setRotation(body, 0F, 0F, 0F);
|
||||
// rightarm = new ModelRenderer(this, 40, 16);
|
||||
// rightarm.addBox(-3F, -2F, -2F, 4, 12, 4);
|
||||
// rightarm.setRotationPoint(0F, 0F, 0F);
|
||||
// rightarm.setTextureSize(128, 128);
|
||||
// rightarm.mirror = true;
|
||||
// setRotation(rightarm, 0F, 0F, 0F);
|
||||
// leftarm = new ModelRenderer(this, 40, 16);
|
||||
// leftarm.addBox(-1F, -2F, -2F, 4, 12, 4);
|
||||
// leftarm.setRotationPoint(0F, 0F, 0F);
|
||||
// leftarm.setTextureSize(128, 128);
|
||||
// leftarm.mirror = true;
|
||||
// setRotation(leftarm, 0F, 0F, 0F);
|
||||
// rightleg = new ModelRenderer(this, 0, 16);
|
||||
// rightleg.addBox(-2F, 0F, -2F, 4, 12, 4);
|
||||
// rightleg.setRotationPoint(-2F, 12F, 0F);
|
||||
// rightleg.setTextureSize(128, 128);
|
||||
// rightleg.mirror = true;
|
||||
// setRotation(rightleg, 0F, 0F, 0F);
|
||||
// leftleg = new ModelRenderer(this, 0, 16);
|
||||
// leftleg.addBox(-2F, 0F, -2F, 4, 12, 4);
|
||||
// leftleg.setRotationPoint(2F, 12F, 0F);
|
||||
// leftleg.setTextureSize(128, 128);
|
||||
// leftleg.mirror = true;
|
||||
// setRotation(leftleg, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
/* Right arm */
|
||||
{
|
||||
rightArmMain = new ModelRenderer(this, 0, 33);
|
||||
rightArmMain.mirror = true;
|
||||
rightArmMain.addBox(-3.5F, -2.5F, -2.5F, 5, 11, 5);
|
||||
rightArmMain.setRotationPoint(0F, 0F, 0F);
|
||||
rightArmMain.setTextureSize(128, 128);
|
||||
rightArmMain.mirror = true;
|
||||
setRotation(rightArmMain, 0F, 0F, 0F);
|
||||
|
||||
rightKnucklePlate = new ModelRenderer(this, 0, 50);
|
||||
rightKnucklePlate.addBox(-4F, 4F, -1.5F, 1, 5, 3);
|
||||
rightKnucklePlate.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnucklePlate.setTextureSize(128, 128);
|
||||
rightKnucklePlate.mirror = true;
|
||||
setRotation(rightKnucklePlate, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckleBrace = new ModelRenderer(this, 9, 50);
|
||||
rightKnuckleBrace.mirror = true;
|
||||
rightKnuckleBrace.addBox(-4F, 3F, -3F, 2, 1, 6);
|
||||
rightKnuckleBrace.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckleBrace.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckleBrace, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckle1 = new ModelRenderer(this, 0, 59);
|
||||
rightKnuckle1.mirror = true;
|
||||
rightKnuckle1.addBox(-4F, 7F, -2.5F, 1, 6, 1);
|
||||
rightKnuckle1.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckle1.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckle1, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckle2 = new ModelRenderer(this, 5, 59);
|
||||
rightKnuckle2.mirror = true;
|
||||
rightKnuckle2.addBox(-3F, 11F, -2.5F, 1, 3, 1);
|
||||
rightKnuckle2.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckle2.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckle2, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckle3 = new ModelRenderer(this, 0, 59);
|
||||
rightKnuckle3.mirror = true;
|
||||
rightKnuckle3.addBox(-4.5F, 8F, -0.5F, 1, 6, 1);
|
||||
rightKnuckle3.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckle3.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckle3, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckle4 = new ModelRenderer(this, 5, 59);
|
||||
rightKnuckle4.mirror = true;
|
||||
rightKnuckle4.addBox(-3.5F, 12F, -0.5F, 1, 3, 1);
|
||||
rightKnuckle4.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckle4.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckle4, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckle5 = new ModelRenderer(this, 0, 59);
|
||||
rightKnuckle5.mirror = true;
|
||||
rightKnuckle5.addBox(-4F, 7F, 1.5F, 1, 6, 1);
|
||||
rightKnuckle5.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckle5.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckle5, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckle6 = new ModelRenderer(this, 5, 59);
|
||||
rightKnuckle6.mirror = true;
|
||||
rightKnuckle6.addBox(-3F, 11F, 1.5F, 1, 3, 1);
|
||||
rightKnuckle6.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckle6.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckle6, 0F, 0F, 0F);
|
||||
|
||||
rightShoulder1 = new ModelRenderer(this, 10, 59);
|
||||
rightShoulder1.mirror = true;
|
||||
rightShoulder1.addBox(-5F, -3F, -4F, 1, 4, 8);
|
||||
rightShoulder1.setRotationPoint(0F, 0F, 0F);
|
||||
rightShoulder1.setTextureSize(128, 128);
|
||||
setRotation(rightShoulder1, 0F, 0F, 0.6981317F);
|
||||
|
||||
rightShoulder2 = new ModelRenderer(this, 10, 59);
|
||||
rightShoulder2.mirror = true;
|
||||
rightShoulder2.addBox(-4F, -1.5F, -4F, 1, 4, 8);
|
||||
rightShoulder2.setRotationPoint(0F, 0F, 0F);
|
||||
rightShoulder2.setTextureSize(128, 128);
|
||||
setRotation(rightShoulder2, 0F, 0F, 0.6981317F);
|
||||
|
||||
rightShoulder3 = new ModelRenderer(this, 10, 59);
|
||||
rightShoulder3.mirror = true;
|
||||
rightShoulder3.addBox(-3F, 0F, -4F, 1, 4, 8);
|
||||
rightShoulder3.setRotationPoint(0F, 0F, 0F);
|
||||
rightShoulder3.setTextureSize(128, 128);
|
||||
setRotation(rightShoulder3, 0F, 0F, 0.6981317F);
|
||||
}
|
||||
|
||||
/* Chest piece main body */
|
||||
{
|
||||
mainPlate = new ModelRenderer(this, 31, 33);
|
||||
mainPlate.addBox(-4.5F, -0.5F, -3F, 9, 12, 6);
|
||||
mainPlate.setRotationPoint(0F, 0F, 0F);
|
||||
mainPlate.setTextureSize(128, 128);
|
||||
mainPlate.mirror = true;
|
||||
setRotation(mainPlate, 0F, 0F, 0F);
|
||||
|
||||
chestPlate1 = new ModelRenderer(this, 63, 33);
|
||||
chestPlate1.addBox(-1.5F, 3F, -4.5F, 6, 2, 1);
|
||||
chestPlate1.setRotationPoint(0F, -3F, -1F);
|
||||
chestPlate1.setTextureSize(128, 128);
|
||||
setRotation(chestPlate1, 0.3490659F, 0F, -0.2617994F);
|
||||
|
||||
chestPlate2 = new ModelRenderer(this, 63, 33);
|
||||
chestPlate2.addBox(-1.5F, 3F, -4.5F, 6, 2, 1);
|
||||
chestPlate2.setRotationPoint(0F, -1.5F, -1F);
|
||||
chestPlate2.setTextureSize(128, 128);
|
||||
setRotation(chestPlate2, 0.3490659F, 0F, -0.2617994F);
|
||||
|
||||
chestPlate3 = new ModelRenderer(this, 63, 33);
|
||||
chestPlate3.addBox(-1.5F, 3F, -4.5F, 6, 2, 1);
|
||||
chestPlate3.setRotationPoint(0F, 0F, -1F);
|
||||
chestPlate3.setTextureSize(128, 128);
|
||||
setRotation(chestPlate3, 0.3490659F, 0F, -0.2617994F);
|
||||
|
||||
chestPlate4 = new ModelRenderer(this, 63, 33);
|
||||
chestPlate4.mirror = true;
|
||||
chestPlate4.addBox(-4.5F, 3F, -4.5F, 6, 2, 1);
|
||||
chestPlate4.setRotationPoint(0F, -3F, -1F);
|
||||
chestPlate4.setTextureSize(128, 128);
|
||||
setRotation(chestPlate4, 0.3490659F, 0F, 0.2617994F);
|
||||
|
||||
chestPlate5 = new ModelRenderer(this, 63, 33);
|
||||
chestPlate5.mirror = true;
|
||||
chestPlate5.addBox(-4.5F, 3F, -4.5F, 6, 2, 1);
|
||||
chestPlate5.setRotationPoint(0F, -1.5F, -1F);
|
||||
chestPlate5.setTextureSize(128, 128);
|
||||
setRotation(chestPlate5, 0.3490659F, 0F, 0.2617994F);
|
||||
|
||||
chestPlate6 = new ModelRenderer(this, 63, 33);
|
||||
chestPlate6.mirror = true;
|
||||
chestPlate6.addBox(-4.5F, 3F, -4.5F, 6, 2, 1);
|
||||
chestPlate6.setRotationPoint(0F, 0F, -1F);
|
||||
chestPlate6.setTextureSize(128, 128);
|
||||
setRotation(chestPlate6, 0.3490659F, 0F, 0.2617994F);
|
||||
}
|
||||
|
||||
/* Left arm */
|
||||
{
|
||||
leftArmMain = new ModelRenderer(this, 0, 33);
|
||||
leftArmMain.addBox(-1.5F, -2.533333F, -2.5F, 5, 11, 5);
|
||||
leftArmMain.setRotationPoint(0F, 0F, 0F);
|
||||
leftArmMain.setTextureSize(128, 128);
|
||||
leftArmMain.mirror = true;
|
||||
setRotation(leftArmMain, 0F, 0F, 0F);
|
||||
|
||||
leftKnucklePlate = new ModelRenderer(this, 0, 50);
|
||||
leftKnucklePlate.addBox(3F, 4F, -1.5F, 1, 5, 3);
|
||||
leftKnucklePlate.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnucklePlate.setTextureSize(128, 128);
|
||||
leftKnucklePlate.mirror = true;
|
||||
setRotation(leftKnucklePlate, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckleBrace = new ModelRenderer(this, 9, 50);
|
||||
leftKnuckleBrace.addBox(2F, 3F, -3F, 2, 1, 6);
|
||||
leftKnuckleBrace.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckleBrace.setTextureSize(128, 128);
|
||||
leftKnuckleBrace.mirror = true;
|
||||
setRotation(leftKnuckleBrace, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckle1 = new ModelRenderer(this, 0, 59);
|
||||
leftKnuckle1.addBox(3F, 7F, -2.5F, 1, 6, 1);
|
||||
leftKnuckle1.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckle1.setTextureSize(128, 128);
|
||||
leftKnuckle1.mirror = true;
|
||||
setRotation(leftKnuckle1, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckle2 = new ModelRenderer(this, 5, 59);
|
||||
leftKnuckle2.addBox(2F, 11F, -2.5F, 1, 3, 1);
|
||||
leftKnuckle2.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckle2.setTextureSize(128, 128);
|
||||
leftKnuckle2.mirror = true;
|
||||
setRotation(leftKnuckle2, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckle3 = new ModelRenderer(this, 0, 59);
|
||||
leftKnuckle3.addBox(3.5F, 8F, -0.5F, 1, 6, 1);
|
||||
leftKnuckle3.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckle3.setTextureSize(128, 128);
|
||||
leftKnuckle3.mirror = true;
|
||||
setRotation(leftKnuckle3, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckle4 = new ModelRenderer(this, 5, 59);
|
||||
leftKnuckle4.addBox(2.5F, 12F, -0.5F, 1, 3, 1);
|
||||
leftKnuckle4.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckle4.setTextureSize(128, 128);
|
||||
leftKnuckle4.mirror = true;
|
||||
setRotation(leftKnuckle4, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckle5 = new ModelRenderer(this, 0, 59);
|
||||
leftKnuckle5.addBox(3F, 7F, 1.5F, 1, 6, 1);
|
||||
leftKnuckle5.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckle5.setTextureSize(128, 128);
|
||||
leftKnuckle5.mirror = true;
|
||||
setRotation(leftKnuckle5, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckle6 = new ModelRenderer(this, 5, 59);
|
||||
leftKnuckle6.addBox(2F, 11F, 1.5F, 1, 3, 1);
|
||||
leftKnuckle6.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckle6.setTextureSize(128, 128);
|
||||
leftKnuckle6.mirror = true;
|
||||
setRotation(leftKnuckle6, 0F, 0F, 0F);
|
||||
|
||||
leftShoulder1 = new ModelRenderer(this, 10, 59);
|
||||
leftShoulder1.addBox(4F, -3F, -4F, 1, 4, 8);
|
||||
leftShoulder1.setRotationPoint(0F, 0F, 0F);
|
||||
leftShoulder1.setTextureSize(128, 128);
|
||||
leftShoulder1.mirror = true;
|
||||
setRotation(leftShoulder1, 0F, 0F, -0.6981317F);
|
||||
|
||||
leftShoulder2 = new ModelRenderer(this, 10, 59);
|
||||
leftShoulder2.addBox(3F, -1.5F, -4F, 1, 4, 8);
|
||||
leftShoulder2.setRotationPoint(0F, 0F, 0F);
|
||||
leftShoulder2.setTextureSize(128, 128);
|
||||
leftShoulder2.mirror = true;
|
||||
setRotation(leftShoulder2, 0F, 0F, -0.6981317F);
|
||||
|
||||
leftShoulder3 = new ModelRenderer(this, 10, 59);
|
||||
leftShoulder3.addBox(2F, 0F, -4F, 1, 4, 8);
|
||||
leftShoulder3.setRotationPoint(0F, 0F, 0F);
|
||||
leftShoulder3.setTextureSize(128, 128);
|
||||
leftShoulder3.mirror = true;
|
||||
setRotation(leftShoulder3, 0F, 0F, -0.6981317F);
|
||||
}
|
||||
|
||||
/* Left boot */
|
||||
{
|
||||
leftBootBottom = new ModelRenderer(this, 0, 84);
|
||||
leftBootBottom.addBox(-2.5F, 9.5F, -5.5F, 6, 3, 8);
|
||||
leftBootBottom.setRotationPoint(0F, 0F, 0F);
|
||||
leftBootBottom.setTextureSize(128, 128);
|
||||
leftBootBottom.mirror = true;
|
||||
setRotation(leftBootBottom, 0F, 0F, 0F);
|
||||
|
||||
leftBootPlate = new ModelRenderer(this, 0, 96);
|
||||
leftBootPlate.addBox(-2F, 6F, 6F, 5, 3, 1);
|
||||
leftBootPlate.setRotationPoint(0F, 0F, 0F);
|
||||
leftBootPlate.setTextureSize(128, 128);
|
||||
leftBootPlate.mirror = true;
|
||||
setRotation(leftBootPlate, -1.151917F, 0F, 0F);
|
||||
|
||||
leftBootBrace = new ModelRenderer(this, 0, 72);
|
||||
leftBootBrace.addBox(-2F, 7F, -3F, 5, 3, 6);
|
||||
leftBootBrace.setRotationPoint(0F, 0F, 0F);
|
||||
leftBootBrace.setTextureSize(128, 128);
|
||||
leftBootBrace.mirror = true;
|
||||
setRotation(leftBootBrace, 0F, 0F, 0F);
|
||||
|
||||
leftBootWing1 = new ModelRenderer(this, 13, 96);
|
||||
leftBootWing1.addBox(3F, 7F, -4F, 1, 1, 7);
|
||||
leftBootWing1.setRotationPoint(0F, 0F, 0F);
|
||||
leftBootWing1.setTextureSize(128, 128);
|
||||
leftBootWing1.mirror = true;
|
||||
setRotation(leftBootWing1, 0.2617994F, 0.1745329F, 0F);
|
||||
|
||||
leftBootWing2 = new ModelRenderer(this, 13, 96);
|
||||
leftBootWing2.addBox(3F, 8F, -5F, 1, 1, 7);
|
||||
leftBootWing2.setRotationPoint(0F, 0F, 0F);
|
||||
leftBootWing2.setTextureSize(128, 128);
|
||||
leftBootWing2.mirror = true;
|
||||
setRotation(leftBootWing2, 0.2617994F, 0.1745329F, 0F);
|
||||
}
|
||||
|
||||
|
||||
/* Right boot */
|
||||
{
|
||||
rightBootBottom = new ModelRenderer(this, 0, 84);
|
||||
rightBootBottom.mirror = true;
|
||||
rightBootBottom.addBox(-3.5F, 9.5F, -5.5F, 6, 3, 8);
|
||||
rightBootBottom.setRotationPoint(0F, 0F, 0F);
|
||||
rightBootBottom.setTextureSize(128, 128);
|
||||
setRotation(rightBootBottom, 0F, 0F, 0F);
|
||||
|
||||
rightBootPlate = new ModelRenderer(this, 0, 96);
|
||||
rightBootPlate.mirror = true;
|
||||
rightBootPlate.addBox(-3F, 6F, 6F, 5, 3, 1);
|
||||
rightBootPlate.setRotationPoint(0F, 0F, 0F);
|
||||
rightBootPlate.setTextureSize(128, 128);
|
||||
setRotation(rightBootPlate, -1.151917F, 0F, 0F);
|
||||
|
||||
rightBootBrace = new ModelRenderer(this, 0, 72);
|
||||
rightBootBrace.mirror = true;
|
||||
rightBootBrace.addBox(-3F, 7F, -3F, 5, 3, 6);
|
||||
rightBootBrace.setRotationPoint(0F, 0F, 0F);
|
||||
rightBootBrace.setTextureSize(128, 128);
|
||||
setRotation(rightBootBrace, 0F, 0F, 0F);
|
||||
|
||||
rightBootWing1 = new ModelRenderer(this, 13, 96);
|
||||
rightBootWing1.mirror = true;
|
||||
rightBootWing1.addBox(-4F, 7F, -4F, 1, 1, 7);
|
||||
rightBootWing1.setRotationPoint(0F, 0F, 0F);
|
||||
rightBootWing1.setTextureSize(128, 128);
|
||||
setRotation(rightBootWing1, 0.2617994F, -0.1745329F, 0F);
|
||||
|
||||
rightBootWing2 = new ModelRenderer(this, 13, 96);
|
||||
rightBootWing2.mirror = true;
|
||||
rightBootWing2.addBox(-4F, 8F, -5F, 1, 1, 7);
|
||||
rightBootWing2.setRotationPoint(0F, 0F, 0F);
|
||||
rightBootWing2.setTextureSize(128, 128);
|
||||
setRotation(rightBootWing2, 0.2617994F, -0.1745329F, 0F);
|
||||
}
|
||||
|
||||
/* Main legs */
|
||||
{
|
||||
belt = new ModelRenderer(this, 31, 52);
|
||||
belt.addBox(-5F, 9.5F, -3.5F, 10, 2, 7);
|
||||
belt.setRotationPoint(0F, 0F, 0F);
|
||||
belt.setTextureSize(128, 128);
|
||||
belt.mirror = true;
|
||||
setRotation(belt, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
/* Left leg */
|
||||
{
|
||||
leftLegSidePlate = new ModelRenderer(this, 31, 71);
|
||||
leftLegSidePlate.addBox(-0.5F, 12F, -3F, 1, 6, 6);
|
||||
leftLegSidePlate.setRotationPoint(-2F, -12F, 0F);
|
||||
leftLegSidePlate.setTextureSize(128, 128);
|
||||
leftLegSidePlate.mirror = true;
|
||||
setRotation(leftLegSidePlate, 0F, 0F, -0.3490659F);
|
||||
|
||||
leftLegMain = new ModelRenderer(this, 53, 62);
|
||||
leftLegMain.addBox(-0.5F, 11F, -2.5F, 5, 9, 5);
|
||||
leftLegMain.setRotationPoint(-2F, -12F, 0F);
|
||||
leftLegMain.setTextureSize(128, 128);
|
||||
leftLegMain.mirror = true;
|
||||
setRotation(leftLegMain, 0F, 0F, 0F);
|
||||
|
||||
leftLegPlate1 = new ModelRenderer(this, 46, 71);
|
||||
leftLegPlate1.addBox(-2.5F, 11F, -3F, 2, 6, 1);
|
||||
leftLegPlate1.setRotationPoint(-2F, -12F, 0F);
|
||||
leftLegPlate1.setTextureSize(128, 128);
|
||||
leftLegPlate1.mirror = true;
|
||||
setRotation(leftLegPlate1, 0F, 0F, -0.3490659F);
|
||||
|
||||
leftLegPlate2 = new ModelRenderer(this, 46, 71);
|
||||
leftLegPlate2.addBox(-2.5F, 11F, 2F, 2, 6, 1);
|
||||
leftLegPlate2.setRotationPoint(-2F, -12F, 0F);
|
||||
leftLegPlate2.setTextureSize(128, 128);
|
||||
leftLegPlate2.mirror = true;
|
||||
setRotation(leftLegPlate2, 0F, 0F, -0.3490659F);
|
||||
|
||||
leftLegPlate3 = new ModelRenderer(this, 31, 62);
|
||||
leftLegPlate3.addBox(0F, 11.9F, -1F, 4, 7, 1);
|
||||
leftLegPlate3.setRotationPoint(-2F, -12F, 0F);
|
||||
leftLegPlate3.setTextureSize(128, 128);
|
||||
leftLegPlate3.mirror = true;
|
||||
setRotation(leftLegPlate3, -0.1745329F, 0F, 0F);
|
||||
|
||||
leftLegPlate4 = new ModelRenderer(this, 42, 62);
|
||||
leftLegPlate4.addBox(0F, 11.9F, 0F, 4, 7, 1);
|
||||
leftLegPlate4.setRotationPoint(-2F, -12F, 0F);
|
||||
leftLegPlate4.setTextureSize(128, 128);
|
||||
leftLegPlate4.mirror = true;
|
||||
setRotation(leftLegPlate4, 0.1745329F, 0F, 0F);
|
||||
}
|
||||
|
||||
/* Right leg */
|
||||
{
|
||||
rightLegSidePlate = new ModelRenderer(this, 31, 71);
|
||||
rightLegSidePlate.mirror = true;
|
||||
rightLegSidePlate.addBox(-0.5F, 12F, -3F, 1, 6, 6);
|
||||
rightLegSidePlate.setRotationPoint(2F, -12F, 0F);
|
||||
rightLegSidePlate.setTextureSize(128, 128);
|
||||
setRotation(rightLegSidePlate, 0F, 0F, 0.3490659F);
|
||||
|
||||
rightLegMain = new ModelRenderer(this, 40, 93);
|
||||
rightLegMain.mirror = true;
|
||||
rightLegMain.addBox(-4.5F, 11F, -2.5F, 5, 9, 5);
|
||||
rightLegMain.setRotationPoint(2F, -12F, 0F);
|
||||
rightLegMain.setTextureSize(128, 128);
|
||||
setRotation(rightLegMain, 0F, 0F, 0F);
|
||||
|
||||
rightLegPlate1 = new ModelRenderer(this, 46, 71);
|
||||
rightLegPlate1.mirror = true;
|
||||
rightLegPlate1.addBox(0.5F, 11F, -3F, 2, 6, 1);
|
||||
rightLegPlate1.setRotationPoint(2F, -12F, 0F);
|
||||
rightLegPlate1.setTextureSize(128, 128);
|
||||
setRotation(rightLegPlate1, 0F, 0F, 0.3490659F);
|
||||
|
||||
rightLegPlate2 = new ModelRenderer(this, 46, 71);
|
||||
rightLegPlate2.mirror = true;
|
||||
rightLegPlate2.addBox(0.5F, 11F, 2F, 2, 6, 1);
|
||||
rightLegPlate2.setRotationPoint(2F, -12F, 0F);
|
||||
rightLegPlate2.setTextureSize(128, 128);
|
||||
setRotation(rightLegPlate2, 0F, 0F, 0.3490659F);
|
||||
|
||||
rightLegPlate3 = new ModelRenderer(this, 31, 62);
|
||||
rightLegPlate3.mirror = true;
|
||||
rightLegPlate3.addBox(-4F, 11.9F, -1F, 4, 7, 1);
|
||||
rightLegPlate3.setRotationPoint(2F, -12F, 0F);
|
||||
rightLegPlate3.setTextureSize(128, 128);
|
||||
setRotation(rightLegPlate3, -0.1745329F, 0F, 0F);
|
||||
|
||||
rightLegPlate4 = new ModelRenderer(this, 42, 62);
|
||||
rightLegPlate4.mirror = true;
|
||||
rightLegPlate4.addBox(-4F, 11.9F, 0F, 4, 7, 1);
|
||||
rightLegPlate4.setRotationPoint(2F, -12F, 0F);
|
||||
rightLegPlate4.setTextureSize(128, 128);
|
||||
setRotation(rightLegPlate4, 0.1745329F, 0F, 0F);
|
||||
}
|
||||
|
||||
this.bipedHead.cubeList.clear();
|
||||
this.bipedHeadwear.cubeList.clear();
|
||||
if(addHelmet)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
this.bipedBody.cubeList.clear();
|
||||
if(addChestPiece)
|
||||
{
|
||||
this.bipedBody.addChild(this.chestPlate1);
|
||||
this.bipedBody.addChild(this.chestPlate2);
|
||||
this.bipedBody.addChild(this.chestPlate3);
|
||||
this.bipedBody.addChild(this.chestPlate4);
|
||||
this.bipedBody.addChild(this.chestPlate5);
|
||||
this.bipedBody.addChild(this.chestPlate6);
|
||||
this.bipedBody.addChild(this.mainPlate);
|
||||
}
|
||||
if(addLeggings)
|
||||
{
|
||||
this.bipedBody.addChild(this.belt);
|
||||
}
|
||||
|
||||
this.bipedRightArm.cubeList.clear();
|
||||
if(addChestPiece)
|
||||
{
|
||||
this.bipedRightArm.addChild(rightArmMain);
|
||||
this.bipedRightArm.addChild(this.rightKnucklePlate);
|
||||
this.bipedRightArm.addChild(this.rightKnuckleBrace);
|
||||
this.bipedRightArm.addChild(this.rightKnuckle1);
|
||||
this.bipedRightArm.addChild(this.rightKnuckle2);
|
||||
this.bipedRightArm.addChild(this.rightKnuckle3);
|
||||
this.bipedRightArm.addChild(this.rightKnuckle4);
|
||||
this.bipedRightArm.addChild(this.rightKnuckle5);
|
||||
this.bipedRightArm.addChild(this.rightKnuckle6);
|
||||
this.bipedRightArm.addChild(this.rightArmMain);
|
||||
this.bipedRightArm.addChild(this.rightShoulder1);
|
||||
this.bipedRightArm.addChild(this.rightShoulder2);
|
||||
this.bipedRightArm.addChild(this.rightShoulder3);
|
||||
}
|
||||
|
||||
this.bipedLeftArm.cubeList.clear();
|
||||
if(addChestPiece)
|
||||
{
|
||||
this.bipedLeftArm.addChild(leftArmMain);
|
||||
this.bipedLeftArm.addChild(this.leftKnucklePlate);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckleBrace);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckle1);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckle2);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckle3);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckle4);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckle5);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckle6);
|
||||
this.bipedLeftArm.addChild(this.leftArmMain);
|
||||
this.bipedLeftArm.addChild(this.leftShoulder1);
|
||||
this.bipedLeftArm.addChild(this.leftShoulder2);
|
||||
this.bipedLeftArm.addChild(this.leftShoulder3);
|
||||
}
|
||||
|
||||
this.bipedLeftLeg.cubeList.clear();
|
||||
if(addBoots)
|
||||
{
|
||||
this.bipedLeftLeg.addChild(this.leftBootBottom);
|
||||
this.bipedLeftLeg.addChild(this.leftBootBrace);
|
||||
this.bipedLeftLeg.addChild(this.leftBootPlate);
|
||||
this.bipedLeftLeg.addChild(this.leftBootWing1);
|
||||
this.bipedLeftLeg.addChild(this.leftBootWing2);
|
||||
}
|
||||
if(addLeggings)
|
||||
{
|
||||
this.bipedLeftLeg.addChild(this.leftLegMain);
|
||||
this.bipedLeftLeg.addChild(this.leftLegSidePlate);
|
||||
this.bipedLeftLeg.addChild(this.leftLegPlate1);
|
||||
this.bipedLeftLeg.addChild(this.leftLegPlate2);
|
||||
this.bipedLeftLeg.addChild(this.leftLegPlate3);
|
||||
this.bipedLeftLeg.addChild(this.leftLegPlate4);
|
||||
}
|
||||
|
||||
this.bipedRightLeg.cubeList.clear();
|
||||
if(addBoots)
|
||||
{
|
||||
this.bipedRightLeg.addChild(this.rightBootBottom);
|
||||
this.bipedRightLeg.addChild(this.rightBootBrace);
|
||||
this.bipedRightLeg.addChild(this.rightBootPlate);
|
||||
this.bipedRightLeg.addChild(this.rightBootWing1);
|
||||
this.bipedRightLeg.addChild(this.rightBootWing2);
|
||||
}
|
||||
if(addLeggings)
|
||||
{
|
||||
this.bipedRightLeg.addChild(this.rightLegMain);
|
||||
this.bipedRightLeg.addChild(this.rightLegSidePlate);
|
||||
this.bipedRightLeg.addChild(this.rightLegPlate1);
|
||||
this.bipedRightLeg.addChild(this.rightLegPlate2);
|
||||
this.bipedRightLeg.addChild(this.rightLegPlate3);
|
||||
this.bipedRightLeg.addChild(this.rightLegPlate4);
|
||||
}
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
// super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
|
||||
|
||||
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
||||
this.bipedHead.render(f5);
|
||||
this.bipedBody.render(f5);
|
||||
this.bipedLeftArm.render(f5);
|
||||
this.bipedRightArm.render(f5);
|
||||
this.bipedLeftLeg.render(f5);
|
||||
this.bipedRightLeg.render(f5);
|
||||
|
||||
// head.render(f5);
|
||||
// body.render(f5);
|
||||
// rightarm.render(f5);
|
||||
// leftarm.render(f5);
|
||||
// rightleg.render(f5);
|
||||
// leftleg.render(f5);
|
||||
// rightArmMain.render(f5);
|
||||
// rightKnucklePlate.render(f5);
|
||||
// rightKnuckleBrace.render(f5);
|
||||
// rightKnuckle1.render(f5);
|
||||
// rightKnuckle2.render(f5);
|
||||
// rightKnuckle3.render(f5);
|
||||
// rightKnuckle4.render(f5);
|
||||
// rightKnuckle5.render(f5);
|
||||
// rightKnuckle6.render(f5);
|
||||
// rightShoulder1.render(f5);
|
||||
// rightShoulder2.render(f5);
|
||||
// rightShoulder3.render(f5);
|
||||
// mainPlate.render(f5);
|
||||
// chestPlate1.render(f5);
|
||||
// chestPlate2.render(f5);
|
||||
// chestPlate3.render(f5);
|
||||
// chestPlate4.render(f5);
|
||||
// chestPlate5.render(f5);
|
||||
// chestPlate6.render(f5);
|
||||
// belt.render(f5);
|
||||
// leftArmMain.render(f5);
|
||||
// leftKnucklePlate.render(f5);
|
||||
// leftKnuckleBrace.render(f5);
|
||||
// leftKnuckle1.render(f5);
|
||||
// leftKnuckle2.render(f5);
|
||||
// leftKnuckle3.render(f5);
|
||||
// leftKnuckle4.render(f5);
|
||||
// leftKnuckle5.render(f5);
|
||||
// leftKnuckle6.render(f5);
|
||||
// leftShoulder1.render(f5);
|
||||
// leftShoulder2.render(f5);
|
||||
// leftShoulder3.render(f5);
|
||||
// leftBootBottom.render(f5);
|
||||
// leftBootPlate.render(f5);
|
||||
// leftBootBrace.render(f5);
|
||||
// leftBootWing1.render(f5);
|
||||
// leftBootWing2.render(f5);
|
||||
// rightBootBottom.render(f5);
|
||||
// rightBootPlate.render(f5);
|
||||
// rightBootBrace.render(f5);
|
||||
// rightBootWing1.render(f5);
|
||||
// rightBootWing2.render(f5);
|
||||
//
|
||||
// {
|
||||
// leftLegSidePlate.render(f5);
|
||||
// leftLegMain.render(f5);
|
||||
// leftLegPlate1.render(f5);
|
||||
// leftLegPlate2.render(f5);
|
||||
// leftLegPlate3.render(f5);
|
||||
// leftLegPlate4.render(f5);
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// rightLegSidePlate.render(f5);
|
||||
// rightLegMain.render(f5);
|
||||
// rightLegPlate1.render(f5);
|
||||
// rightLegPlate2.render(f5);
|
||||
// rightLegPlate3.render(f5);
|
||||
// rightLegPlate4.render(f5);
|
||||
// }
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
}
|
|
@ -81,6 +81,8 @@ public class RitualEffectHealing extends RitualEffect
|
|||
SoulNetworkHandler.causeNauseaToPlayer(owner);
|
||||
} else
|
||||
{
|
||||
entityCount = 0;
|
||||
|
||||
boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
|
||||
for(EntityLivingBase livingEntity : list)
|
||||
|
@ -94,7 +96,7 @@ public class RitualEffectHealing extends RitualEffect
|
|||
if (livingEntity.getHealth() + 0.1f < livingEntity.getMaxHealth())
|
||||
{
|
||||
PotionEffect effect = livingEntity.getActivePotionEffect(Potion.regeneration);
|
||||
if(effect != null && effect.getAmplifier() <= potency && effect.getDuration() <= timeDelay)
|
||||
if(effect == null || (effect != null && effect.getAmplifier() <= potency && effect.getDuration() <= timeDelay))
|
||||
{
|
||||
if(!hasVirtus || (this.canDrainReagent(ritualStone, ReagentRegistry.virtusReagent, virtusDrain, false)))
|
||||
{
|
||||
|
|
|
@ -15,14 +15,20 @@ import net.minecraft.server.MinecraftServer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class RitualEffectItemSuction extends RitualEffect
|
||||
{
|
||||
public static final int reductusDrain = 1;
|
||||
|
||||
public static final int timeDelayMin = 10;
|
||||
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
|
@ -60,17 +66,12 @@ public class RitualEffectItemSuction extends RitualEffect
|
|||
|
||||
if (currentEssence < this.getCostPerRefresh()*100)
|
||||
{
|
||||
EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner);
|
||||
|
||||
if (entityOwner == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
|
||||
SoulNetworkHandler.causeNauseaToPlayer(owner);
|
||||
} else
|
||||
{
|
||||
List<EntityItem> itemDropList = SpellHelper.getItemsInRange(world, x+0.5f, y+0.5f, z+0.5f, 10, 10);
|
||||
|
||||
boolean hasReductus = this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
|
||||
int count = 0;
|
||||
|
||||
|
@ -80,53 +81,70 @@ public class RitualEffectItemSuction extends RitualEffect
|
|||
|
||||
for (EntityItem itemEntity : itemDropList)
|
||||
{
|
||||
hasReductus = hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false);
|
||||
if(hasReductus && itemEntity.age < this.timeDelayMin)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
ItemStack item = itemEntity.getEntityItem();
|
||||
ItemStack copyStack = itemEntity.getEntityItem().copy();
|
||||
|
||||
int pastAmount = copyStack.stackSize;
|
||||
|
||||
// for (int n = 0; n < invSize; n++)
|
||||
// {
|
||||
// if (tileEntity.isItemValidForSlot(n, copyStack) && copyStack.stackSize != 0)
|
||||
// {
|
||||
// ItemStack itemStack = tileEntity.getStackInSlot(n);
|
||||
//
|
||||
// if (itemStack == null)
|
||||
// {
|
||||
// tileEntity.setInventorySlotContents(n, item);
|
||||
// copyStack.stackSize = 0;
|
||||
// } else
|
||||
// {
|
||||
// if (itemStack.getItem().equals(copyStack.getItem()) && itemStack.getItemDamage() == copyStack.getItemDamage())
|
||||
// {
|
||||
// int itemSize = itemStack.stackSize;
|
||||
// int copySize = copyStack.stackSize;
|
||||
// int maxSize = itemStack.getMaxStackSize();
|
||||
//
|
||||
// if (copySize + itemSize < maxSize)
|
||||
// {
|
||||
// copyStack.stackSize = 0;
|
||||
// itemStack.stackSize = itemSize + copySize;
|
||||
// tileEntity.setInventorySlotContents(n, itemStack);
|
||||
// } else
|
||||
// {
|
||||
// copyStack.stackSize = itemSize + copySize - maxSize;
|
||||
// itemStack.stackSize = maxSize;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
count++;
|
||||
|
||||
for (int n = 0; n < invSize; n++)
|
||||
{
|
||||
if (tileEntity.isItemValidForSlot(n, copyStack) && copyStack.stackSize != 0)
|
||||
{
|
||||
ItemStack itemStack = tileEntity.getStackInSlot(n);
|
||||
|
||||
if (itemStack == null)
|
||||
{
|
||||
tileEntity.setInventorySlotContents(n, item);
|
||||
copyStack.stackSize = 0;
|
||||
} else
|
||||
{
|
||||
if (itemStack.getItem().equals(copyStack.getItem()) && itemStack.getItemDamage() == copyStack.getItemDamage())
|
||||
{
|
||||
int itemSize = itemStack.stackSize;
|
||||
int copySize = copyStack.stackSize;
|
||||
int maxSize = itemStack.getMaxStackSize();
|
||||
|
||||
if (copySize + itemSize < maxSize)
|
||||
{
|
||||
copyStack.stackSize = 0;
|
||||
itemStack.stackSize = itemSize + copySize;
|
||||
tileEntity.setInventorySlotContents(n, itemStack);
|
||||
} else
|
||||
{
|
||||
copyStack.stackSize = itemSize + copySize - maxSize;
|
||||
itemStack.stackSize = maxSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(copyStack.stackSize<=0)
|
||||
{
|
||||
itemEntity.setDead();
|
||||
}
|
||||
|
||||
if (copyStack.stackSize > 0)
|
||||
ItemStack newStack = SpellHelper.insertStackIntoInventory(copyStack, tileEntity);
|
||||
|
||||
if(newStack != null && newStack.stackSize < pastAmount)
|
||||
{
|
||||
itemEntity.getEntityItem().stackSize = copyStack.stackSize;
|
||||
}
|
||||
count++;
|
||||
if(newStack.stackSize<=0)
|
||||
{
|
||||
itemEntity.setDead();
|
||||
}
|
||||
|
||||
if (newStack.stackSize > 0)
|
||||
{
|
||||
itemEntity.getEntityItem().stackSize = newStack.stackSize;
|
||||
}
|
||||
if(hasReductus)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@ public class RitualEffectJumping extends RitualEffect
|
|||
int y = ritualStone.getYCoord();
|
||||
int z = ritualStone.getZCoord();
|
||||
|
||||
int range = 0;
|
||||
List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x+0.5, y+0.5, z+0.5, range, range);
|
||||
double range = 0.5;
|
||||
List<EntityLivingBase> livingList = SpellHelper.getLivingEntitiesInRange(world, x+0.5, y+1.5, z+0.5, range, range);
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh() * livingList.size())
|
||||
{
|
||||
|
|
|
@ -73,6 +73,10 @@ public class RitualEffectLava extends RitualEffect
|
|||
}else
|
||||
{
|
||||
boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
|
||||
if(!hasSanctus)
|
||||
{
|
||||
return;
|
||||
}
|
||||
TileEntity tile = world.getTileEntity(x, y + 1, z);
|
||||
if(tile instanceof IFluidHandler)
|
||||
{
|
||||
|
|
|
@ -81,8 +81,6 @@ public class RitualEffectLeap extends RitualEffect
|
|||
|
||||
double motionY = hasTerrae ? 0.6 : 1.2;
|
||||
double speed = hasAether ? 6.0 : 3.0;
|
||||
|
||||
|
||||
|
||||
if (!(hasTenebrae || hasSanctus) && livingEntity instanceof EntityPlayer)
|
||||
{
|
||||
|
@ -141,6 +139,15 @@ public class RitualEffectLeap extends RitualEffect
|
|||
break;
|
||||
}
|
||||
|
||||
if(hasTenebrae)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, true);
|
||||
}
|
||||
if(hasSanctus)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
|
||||
}
|
||||
|
||||
livingEntity.fallDistance = 0;
|
||||
flag++;
|
||||
}
|
||||
|
@ -161,14 +168,7 @@ public class RitualEffectLeap extends RitualEffect
|
|||
this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, true);
|
||||
}
|
||||
}
|
||||
if(hasTenebrae)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tenebraeDrain, true);
|
||||
}
|
||||
if(hasSanctus)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (flag > 0)
|
||||
|
|
|
@ -99,30 +99,44 @@ public class RitualEffectSpawnWard extends RitualEffect
|
|||
@Override
|
||||
public int getCostPerRefresh()
|
||||
{
|
||||
|
||||
return 20;
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> animalGrowthRitual = new ArrayList();
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, 2, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(2, 0, 0, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(1, 0, 0, RitualComponent.WATER));
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, -1, RitualComponent.WATER));
|
||||
animalGrowthRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.WATER));
|
||||
animalGrowthRitual.add(new RitualComponent(1, 0, 2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(1, 0, -2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(2, 0, 1, RitualComponent.AIR));
|
||||
animalGrowthRitual.add(new RitualComponent(2, 0, -1, RitualComponent.AIR));
|
||||
animalGrowthRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.AIR));
|
||||
animalGrowthRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.AIR));
|
||||
return animalGrowthRitual;
|
||||
ArrayList<RitualComponent> wardRitualRitual = new ArrayList();
|
||||
|
||||
for(int i=2; i<=4; i++)
|
||||
{
|
||||
if(i <= 3)
|
||||
{
|
||||
wardRitualRitual.add(new RitualComponent(0, 0, i, RitualComponent.AIR));
|
||||
wardRitualRitual.add(new RitualComponent(0, 0, -i, RitualComponent.AIR));
|
||||
wardRitualRitual.add(new RitualComponent(i, 0, 0, RitualComponent.AIR));
|
||||
wardRitualRitual.add(new RitualComponent(-i, 0, 0, RitualComponent.AIR));
|
||||
}
|
||||
|
||||
wardRitualRitual.add(new RitualComponent(i, 0, i, RitualComponent.FIRE));
|
||||
wardRitualRitual.add(new RitualComponent(i, 0, -i, RitualComponent.FIRE));
|
||||
wardRitualRitual.add(new RitualComponent(-i, 0, -i, RitualComponent.FIRE));
|
||||
wardRitualRitual.add(new RitualComponent(-i, 0, i, RitualComponent.FIRE));
|
||||
}
|
||||
|
||||
wardRitualRitual.add(new RitualComponent(0, 0, 5, RitualComponent.DUSK));
|
||||
wardRitualRitual.add(new RitualComponent(0, 0, -5, RitualComponent.DUSK));
|
||||
wardRitualRitual.add(new RitualComponent(5, 0, 0, RitualComponent.DUSK));
|
||||
wardRitualRitual.add(new RitualComponent(-5, 0, 0, RitualComponent.DUSK));
|
||||
|
||||
wardRitualRitual.add(new RitualComponent(6, 0, 5, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(5, 0, 6, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(6, 0, -5, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(-5, 0, 6, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(-6, 0, 5, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(5, 0, -6, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(-6, 0, -5, RitualComponent.WATER));
|
||||
wardRitualRitual.add(new RitualComponent(-5, 0, -6, RitualComponent.WATER));
|
||||
|
||||
return wardRitualRitual;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
|
@ -20,6 +21,9 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
|
|||
|
||||
public class RitualEffectSupression extends RitualEffect
|
||||
{
|
||||
public static final int aquasalusDrain = 15;
|
||||
public static final int aetherDrain = 15;
|
||||
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
|
@ -40,8 +44,12 @@ public class RitualEffectSupression extends RitualEffect
|
|||
int z = ritualStone.getZCoord();
|
||||
|
||||
Block blockish = world.getBlock(x, y-1, z);
|
||||
|
||||
boolean hasAquasalus = this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, false);
|
||||
boolean hasAether = this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, false);
|
||||
|
||||
int costMod = this.getCostModifier(blockish);
|
||||
int radius = this.getRadiusForModifierBlock(blockish);
|
||||
int radius = this.getRadiusForReagents(hasAether, hasAquasalus);
|
||||
int masterRadius = radius;
|
||||
|
||||
int yIndex = (int)(world.getWorldTime() % (2*radius + 1))-radius;
|
||||
|
@ -100,6 +108,17 @@ public class RitualEffectSupression extends RitualEffect
|
|||
data.currentEssence = currentEssence - this.getCostPerRefresh()*costMod;
|
||||
data.markDirty();
|
||||
|
||||
if(world.getWorldTime() % 100 == 0)
|
||||
{
|
||||
if(hasAquasalus)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aquasalusReagent, aquasalusDrain, true);
|
||||
}
|
||||
if(hasAether)
|
||||
{
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.aetherReagent, aetherDrain, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,53 +147,51 @@ public class RitualEffectSupression extends RitualEffect
|
|||
return supressionRitual;
|
||||
}
|
||||
|
||||
public int getRadiusForModifierBlock(Block block)
|
||||
{
|
||||
if(block == null)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
if(block == Blocks.diamond_block)
|
||||
{
|
||||
return 30;
|
||||
}
|
||||
|
||||
if(block == Blocks.gold_block)
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
if(block == Blocks.iron_block)
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
|
||||
return 10;
|
||||
}
|
||||
|
||||
public int getCostModifier(Block block)
|
||||
{
|
||||
if(block == null)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(block == Blocks.diamond_block)
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
if(block == Blocks.gold_block)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
if(block == Blocks.iron_block)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
// if(block == null)
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
//
|
||||
// if(block == Blocks.diamond_block)
|
||||
// {
|
||||
// return 20;
|
||||
// }
|
||||
//
|
||||
// if(block == Blocks.gold_block)
|
||||
// {
|
||||
// return 10;
|
||||
// }
|
||||
//
|
||||
// if(block == Blocks.iron_block)
|
||||
// {
|
||||
// return 5;
|
||||
// }
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int getRadiusForReagents(boolean hasAether, boolean hasAquasalus)
|
||||
{
|
||||
if(hasAether)
|
||||
{
|
||||
if(hasAquasalus)
|
||||
{
|
||||
return 30;
|
||||
}else
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
}else
|
||||
{
|
||||
if(hasAquasalus)
|
||||
{
|
||||
return 15;
|
||||
}else
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,26 +6,29 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class RitualEffectUnbinding extends RitualEffect
|
||||
{
|
||||
public static final int sanctusDrain = 1000;
|
||||
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
|
@ -47,14 +50,7 @@ public class RitualEffectUnbinding extends RitualEffect
|
|||
|
||||
if (currentEssence < this.getCostPerRefresh())
|
||||
{
|
||||
EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner);
|
||||
|
||||
if (entityOwner == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80));
|
||||
SoulNetworkHandler.causeNauseaToPlayer(owner);
|
||||
} else
|
||||
{
|
||||
int d0 = 0;
|
||||
|
@ -62,6 +58,8 @@ public class RitualEffectUnbinding extends RitualEffect
|
|||
List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb);
|
||||
Iterator iterator = list.iterator();
|
||||
EntityItem item;
|
||||
|
||||
boolean drain = false;
|
||||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
|
@ -75,6 +73,24 @@ public class RitualEffectUnbinding extends RitualEffect
|
|||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
|
||||
if(hasSanctus)
|
||||
{
|
||||
if(itemStack.getItem() instanceof IBindable && !EnergyItems.getOwnerName(itemStack).equals(""))
|
||||
{
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z - 5));
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z + 5));
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x - 5, y + 1, z));
|
||||
world.addWeatherEffect(new EntityLightningBolt(world, x + 5, y + 1, z));
|
||||
|
||||
EnergyItems.checkAndSetItemOwner(itemStack, "");
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
|
||||
drain = true;
|
||||
ritualStone.setActive(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (itemStack.getItem() == ModItems.boundHelmet)
|
||||
{
|
||||
|
@ -118,6 +134,7 @@ public class RitualEffectUnbinding extends RitualEffect
|
|||
EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, new ItemStack(ModBlocks.bloodSocket, ritualStone.getVar1()));
|
||||
world.spawnEntityInWorld(newItem);
|
||||
ritualStone.setActive(false);
|
||||
drain = true;
|
||||
break;
|
||||
} else if (ritualStone.getVar1() == -1)
|
||||
{
|
||||
|
@ -144,17 +161,24 @@ public class RitualEffectUnbinding extends RitualEffect
|
|||
EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, new ItemStack(ModItems.sigilOfHolding, 1, 0));
|
||||
world.spawnEntityInWorld(newItem);
|
||||
ritualStone.setActive(false);
|
||||
drain = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (world.rand.nextInt(10) == 0)
|
||||
{
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
data.currentEssence = currentEssence - this.getCostPerRefresh();
|
||||
data.markDirty();
|
||||
if(drain)
|
||||
{
|
||||
data.currentEssence = currentEssence - this.getCostPerRefresh();
|
||||
data.markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
if (world.rand.nextInt(10) == 0)
|
||||
{
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,30 +99,61 @@ public class RitualEffectVeilOfEvil extends RitualEffect
|
|||
@Override
|
||||
public int getCostPerRefresh()
|
||||
{
|
||||
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
ArrayList<RitualComponent> animalGrowthRitual = new ArrayList();
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, 2, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(2, 0, 0, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, -2, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(-2, 0, 0, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, 1, RitualComponent.DUSK));
|
||||
animalGrowthRitual.add(new RitualComponent(1, 0, 0, RitualComponent.WATER));
|
||||
animalGrowthRitual.add(new RitualComponent(0, 0, -1, RitualComponent.WATER));
|
||||
animalGrowthRitual.add(new RitualComponent(-1, 0, 0, RitualComponent.WATER));
|
||||
animalGrowthRitual.add(new RitualComponent(1, 0, 2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(1, 0, -2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.EARTH));
|
||||
animalGrowthRitual.add(new RitualComponent(2, 0, 1, RitualComponent.AIR));
|
||||
animalGrowthRitual.add(new RitualComponent(2, 0, -1, RitualComponent.AIR));
|
||||
animalGrowthRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.AIR));
|
||||
animalGrowthRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.AIR));
|
||||
return animalGrowthRitual;
|
||||
ArrayList<RitualComponent> veilRitual = new ArrayList();
|
||||
|
||||
veilRitual.add(new RitualComponent(1, 0, 2, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(2, 0, 1, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(1, 0, -2, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(-2, 0, 1, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(-1, 0, 2, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(2, 0, -1, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(-1, 0, -2, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(-2, 0, -1, RitualComponent.DUSK));
|
||||
|
||||
veilRitual.add(new RitualComponent(3, 0, 3, RitualComponent.FIRE));
|
||||
veilRitual.add(new RitualComponent(-3, 0, 3, RitualComponent.FIRE));
|
||||
veilRitual.add(new RitualComponent(3, 0, -3, RitualComponent.FIRE));
|
||||
veilRitual.add(new RitualComponent(-3, 0, -3, RitualComponent.FIRE));
|
||||
|
||||
for(int i=0; i<=1; i++)
|
||||
{
|
||||
veilRitual.add(new RitualComponent((4+i), i, 0, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent((4+i), i, -1, RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent((4+i), i, 1, RitualComponent.BLANK));
|
||||
|
||||
veilRitual.add(new RitualComponent(-(4+i), i, 0, RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(-(4+i), i, -1, RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent(-(4+i), i, 1, RitualComponent.BLANK));
|
||||
|
||||
veilRitual.add(new RitualComponent(0, i, (4+i), RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(1, i, (4+i), RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent(-1, i, (4+i), RitualComponent.BLANK));
|
||||
|
||||
veilRitual.add(new RitualComponent(0, i, -(4+i), RitualComponent.DUSK));
|
||||
veilRitual.add(new RitualComponent(1, i, -(4+i), RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent(-1, i, -(4+i), RitualComponent.BLANK));
|
||||
|
||||
veilRitual.add(new RitualComponent(4, i, 5, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(5, i, 4, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(4, i, -5, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(-5, i, 4, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(-4, i, 5, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(5, i, -4, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(-4, i, -5, RitualComponent.EARTH));
|
||||
veilRitual.add(new RitualComponent(-5, i, -4, RitualComponent.EARTH));
|
||||
}
|
||||
|
||||
veilRitual.add(new RitualComponent(5, 1, 5, RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent(-5, 1, 5, RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent(5, 1, -5, RitualComponent.BLANK));
|
||||
veilRitual.add(new RitualComponent(-5, 1, -5, RitualComponent.BLANK));
|
||||
|
||||
return veilRitual;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -97,7 +97,7 @@ public class RitualEffectWater extends RitualEffect
|
|||
|
||||
if(hasReductus && this.canDrainReagent(ritualStone, ReagentRegistry.reductusReagent, reductusDrain, false))
|
||||
{
|
||||
if(entity instanceof EntityPlayer)
|
||||
if(livingEntity instanceof EntityPlayer)
|
||||
{
|
||||
if(drainReductus)
|
||||
{
|
||||
|
@ -138,6 +138,10 @@ public class RitualEffectWater extends RitualEffect
|
|||
}else
|
||||
{
|
||||
boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
|
||||
if(!hasSanctus)
|
||||
{
|
||||
return;
|
||||
}
|
||||
TileEntity tile = world.getTileEntity(x, y + 1, z);
|
||||
if(tile instanceof IFluidHandler)
|
||||
{
|
||||
|
|
|
@ -36,6 +36,11 @@ public class SpellHelper
|
|||
public static Random rand = new Random();
|
||||
public static final double root2 = Math.sqrt(2);
|
||||
|
||||
public static boolean canEntityBeSeen(Entity entity, Entity entity2)
|
||||
{
|
||||
return entity.worldObj.rayTraceBlocks(Vec3.createVectorHelper(entity.posX, entity.posY, entity.posZ), Vec3.createVectorHelper(entity2.posX, entity2.posY, entity2.posZ), false) == null;
|
||||
}
|
||||
|
||||
public static void smeltBlockInWorld(World world, int posX, int posY, int posZ)
|
||||
{
|
||||
FurnaceRecipes recipes = FurnaceRecipes.smelting();
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -606,30 +606,30 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int range = 5;
|
||||
|
||||
for(int i=-range; i<=range; i++)
|
||||
{
|
||||
for(int j=-range; j<=range; j++)
|
||||
{
|
||||
for(int k=-range; k<=range; k++)
|
||||
{
|
||||
Block block = worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k);
|
||||
int meta = worldObj.getBlockMetadata(xCoord + i, yCoord + j, zCoord + k);
|
||||
|
||||
List<ItemStack> list = block.getDrops(worldObj, xCoord + i, yCoord + j, zCoord + k, meta, 1);
|
||||
for(ItemStack stack : list)
|
||||
{
|
||||
String str = stack.getUnlocalizedName();
|
||||
if(str.contains("fallenKanade"))
|
||||
{
|
||||
System.out.println("" + str);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// int range = 5;
|
||||
//
|
||||
// for(int i=-range; i<=range; i++)
|
||||
// {
|
||||
// for(int j=-range; j<=range; j++)
|
||||
// {
|
||||
// for(int k=-range; k<=range; k++)
|
||||
// {
|
||||
// Block block = worldObj.getBlock(xCoord + i, yCoord + j, zCoord + k);
|
||||
// int meta = worldObj.getBlockMetadata(xCoord + i, yCoord + j, zCoord + k);
|
||||
//
|
||||
// List<ItemStack> list = block.getDrops(worldObj, xCoord + i, yCoord + j, zCoord + k, meta, 1);
|
||||
// for(ItemStack stack : list)
|
||||
// {
|
||||
// String str = stack.getUnlocalizedName();
|
||||
// if(str.contains("fallenKanade"))
|
||||
// {
|
||||
// System.out.println("" + str);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//o,o this is always true
|
||||
if (worldTime % 1 == 0)
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
|
||||
public class TEBellJar extends TEReagentConduit
|
||||
|
@ -31,6 +34,69 @@ public class TEBellJar extends TEReagentConduit
|
|||
return 0;
|
||||
}
|
||||
|
||||
public static ReagentContainerInfo[] getContainerInfoFromItem(ItemStack stack)
|
||||
{
|
||||
if(stack != null && stack.getItem() instanceof ItemBlock && ModBlocks.blockCrystalBelljar == ((ItemBlock)stack.getItem()).field_150939_a)
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
if(tag != null)
|
||||
{
|
||||
NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
int size = tagList.tagCount();
|
||||
ReagentContainer[] tanks = new ReagentContainer[size];
|
||||
|
||||
ReagentContainerInfo[] infos = new ReagentContainerInfo[size];
|
||||
|
||||
for(int i=0; i<size; i++)
|
||||
{
|
||||
NBTTagCompound savedTag = tagList.getCompoundTagAt(i);
|
||||
tanks[i] = ReagentContainer.readFromNBT(savedTag);
|
||||
|
||||
if(tanks[i] != null)
|
||||
{
|
||||
infos[i] = tanks[i].getInfo();
|
||||
}
|
||||
}
|
||||
|
||||
return infos;
|
||||
}
|
||||
}
|
||||
|
||||
return new ReagentContainerInfo[0];
|
||||
}
|
||||
|
||||
public void readTankNBTOnPlace(NBTTagCompound tag)
|
||||
{
|
||||
NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
int size = tagList.tagCount();
|
||||
this.tanks = new ReagentContainer[size];
|
||||
|
||||
for(int i=0; i<size; i++)
|
||||
{
|
||||
NBTTagCompound savedTag = tagList.getCompoundTagAt(i);
|
||||
this.tanks[i] = ReagentContainer.readFromNBT(savedTag);
|
||||
}
|
||||
}
|
||||
|
||||
public void writeTankNBT(NBTTagCompound tag)
|
||||
{
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
|
||||
for(int i=0; i<this.tanks.length; i++)
|
||||
{
|
||||
NBTTagCompound savedTag = new NBTTagCompound();
|
||||
if(this.tanks[i] != null)
|
||||
{
|
||||
this.tanks[i].writeToNBT(savedTag);
|
||||
}
|
||||
tagList.appendTag(savedTag);
|
||||
}
|
||||
|
||||
tag.setTag("reagentTanks", tagList);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void readClientNBT(NBTTagCompound tag)
|
||||
// {
|
||||
|
|
|
@ -588,4 +588,17 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
|
|||
{
|
||||
return this.attunedTankMap;
|
||||
}
|
||||
|
||||
public boolean areTanksEmpty()
|
||||
{
|
||||
for(int i=0; i<this.tanks.length; i++)
|
||||
{
|
||||
if(tanks[i] != null && tanks[i].getReagent() != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -8,8 +8,6 @@ import java.util.Map.Entry;
|
|||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
|
@ -20,7 +18,6 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.api.ColourAndCoords;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer;
|
||||
|
@ -30,6 +27,8 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.TileSegmentedReagentHandl
|
|||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityParticleBeam;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TEReagentConduit extends TileSegmentedReagentHandler
|
||||
{
|
||||
|
@ -339,26 +338,33 @@ public class TEReagentConduit extends TileSegmentedReagentHandler
|
|||
return;
|
||||
}
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
World world = mc.theWorld;
|
||||
if(SpellHelper.canPlayerSeeAlchemy(player))
|
||||
{
|
||||
for(ColourAndCoords colourSet : this.destinationList)
|
||||
{
|
||||
if(!(worldObj.getTileEntity(xCoord + colourSet.xCoord, yCoord + colourSet.yCoord, zCoord + colourSet.zCoord) instanceof IReagentHandler))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
EntityParticleBeam beam = new EntityParticleBeam(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5);
|
||||
double velocity = Math.sqrt(Math.pow(colourSet.xCoord, 2) + Math.pow(colourSet.yCoord, 2) + Math.pow(colourSet.zCoord, 2));
|
||||
double wantedVel = 0.3d;
|
||||
beam.setVelocity(wantedVel*colourSet.xCoord/velocity, wantedVel*colourSet.yCoord/velocity, wantedVel*colourSet.zCoord/velocity);
|
||||
beam.setColour(colourSet.colourRed / 255f, colourSet.colourGreen/255f, colourSet.colourBlue/255f);
|
||||
beam.setDestination(xCoord + colourSet.xCoord, yCoord + colourSet.yCoord, zCoord + colourSet.zCoord);
|
||||
worldObj.spawnEntityInWorld(beam);
|
||||
}
|
||||
}
|
||||
this.sendPlayerStuffs();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void sendPlayerStuffs()
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
World world = mc.theWorld;
|
||||
if(SpellHelper.canPlayerSeeAlchemy(player))
|
||||
{
|
||||
for(ColourAndCoords colourSet : this.destinationList)
|
||||
{
|
||||
if(!(worldObj.getTileEntity(xCoord + colourSet.xCoord, yCoord + colourSet.yCoord, zCoord + colourSet.zCoord) instanceof IReagentHandler))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
EntityParticleBeam beam = new EntityParticleBeam(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5);
|
||||
double velocity = Math.sqrt(Math.pow(colourSet.xCoord, 2) + Math.pow(colourSet.yCoord, 2) + Math.pow(colourSet.zCoord, 2));
|
||||
double wantedVel = 0.3d;
|
||||
beam.setVelocity(wantedVel*colourSet.xCoord/velocity, wantedVel*colourSet.yCoord/velocity, wantedVel*colourSet.zCoord/velocity);
|
||||
beam.setColour(colourSet.colourRed / 255f, colourSet.colourGreen/255f, colourSet.colourBlue/255f);
|
||||
beam.setDestination(xCoord + colourSet.xCoord, yCoord + colourSet.yCoord, zCoord + colourSet.zCoord);
|
||||
worldObj.spawnEntityInWorld(beam);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -387,9 +393,17 @@ public class TEReagentConduit extends TileSegmentedReagentHandler
|
|||
if(entry.getValue() != null)
|
||||
{
|
||||
Reagent reagent = entry.getKey();
|
||||
if(reagent == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
List<Int3> coords = entry.getValue();
|
||||
for(Int3 coord : coords)
|
||||
{
|
||||
if(coord == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
list.add(new ColourAndCoords(reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), reagent.getColourIntensity(), coord.xCoord, coord.yCoord, coord.zCoord));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ import codechicken.nei.ItemList;
|
|||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler.CachedRecipe;
|
||||
|
||||
public class NEIAlchemyRecipeHandler extends TemplateRecipeHandler {
|
||||
public class CachedAlchemyRecipe extends CachedRecipe {
|
||||
|
|
|
@ -11,11 +11,9 @@ import net.minecraft.item.crafting.CraftingManager;
|
|||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import codechicken.core.ReflectionManager;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.ShapedRecipeHandler;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect;
|
||||
|
||||
/** Extended from the default recipe handler **/
|
||||
public class NEIBloodOrbShapedHandler extends ShapedRecipeHandler {
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Loading…
Reference in a new issue