- Changed the recipe of the Acceleration rune so that it is a T4 rune.

- Added the Charging rune, which accumulates charge by using the LP from the Blood Altar (1 charge = 1 LP always). If enough charge is stored when crafting, the crafting occurs instantly.
This commit is contained in:
WayofTime 2016-09-22 14:20:05 -04:00
parent dade5f0837
commit ca96afa375
13 changed files with 699 additions and 12 deletions

View file

@ -0,0 +1,15 @@
package WayofTime.bloodmagic.client.render.entity;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraftforge.fml.client.registry.IRenderFactory;
import WayofTime.bloodmagic.entity.mob.EntityCorruptedSpider;
public class CorruptedSpiderRenderFactory implements IRenderFactory<EntityCorruptedSpider>
{
@Override
public Render<? super EntityCorruptedSpider> createRenderFor(RenderManager manager)
{
return new RenderCorruptedSpider(manager);
}
}

View file

@ -0,0 +1,39 @@
package WayofTime.bloodmagic.client.render.entity;
import net.minecraft.client.model.ModelSpider;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.bloodmagic.client.render.entity.layer.LayerCorruptedSpiderEyes;
import WayofTime.bloodmagic.client.render.entity.layer.LayerWill;
import WayofTime.bloodmagic.client.render.model.ModelCorruptedSpider;
import WayofTime.bloodmagic.entity.mob.EntityCorruptedSpider;
@SideOnly(Side.CLIENT)
public class RenderCorruptedSpider extends RenderLiving<EntityCorruptedSpider>
{
private static final ResourceLocation SPIDER_TEXTURES = new ResourceLocation("textures/entity/spider/spider.png");
public RenderCorruptedSpider(RenderManager renderManagerIn)
{
super(renderManagerIn, new ModelSpider(), 1.0F);
this.addLayer(new LayerCorruptedSpiderEyes(this));
this.addLayer(new LayerWill<EntityCorruptedSpider>(this, new ModelCorruptedSpider(1.1f)));
}
protected float getDeathMaxRotation(EntityCorruptedSpider entityLivingBaseIn)
{
return 180.0F;
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called
* unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(EntityCorruptedSpider entity)
{
return SPIDER_TEXTURES;
}
}

View file

@ -0,0 +1,57 @@
package WayofTime.bloodmagic.client.render.entity.layer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.bloodmagic.client.render.entity.RenderCorruptedSpider;
import WayofTime.bloodmagic.entity.mob.EntityCorruptedSpider;
@SideOnly(Side.CLIENT)
public class LayerCorruptedSpiderEyes implements LayerRenderer<EntityCorruptedSpider>
{
private static final ResourceLocation SPIDER_EYES = new ResourceLocation("textures/entity/spider_eyes.png");
private final RenderCorruptedSpider spiderRenderer;
public LayerCorruptedSpiderEyes(RenderCorruptedSpider spiderRendererIn)
{
this.spiderRenderer = spiderRendererIn;
}
public void doRenderLayer(EntityCorruptedSpider entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
this.spiderRenderer.bindTexture(SPIDER_EYES);
GlStateManager.enableBlend();
GlStateManager.disableAlpha();
GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
if (entitylivingbaseIn.isInvisible())
{
GlStateManager.depthMask(false);
} else
{
GlStateManager.depthMask(true);
}
int i = 61680;
int j = i % 65536;
int k = i / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j, (float) k);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.spiderRenderer.getMainModel().render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
j = i % 65536;
k = i / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j, (float) k);
this.spiderRenderer.setLightmap(entitylivingbaseIn, partialTicks);
GlStateManager.disableBlend();
GlStateManager.enableAlpha();
}
public boolean shouldCombineTextures()
{
return false;
}
}