Added blood lamp reagent, sigil effects, and the blood lamp array.
This commit is contained in:
parent
9839dccd04
commit
27d63d5df3
|
@ -1,3 +1,8 @@
|
|||
------------------------------------------------------
|
||||
Version 2.0.0-15
|
||||
------------------------------------------------------
|
||||
- Added blood lamp sigil array texture and reagent. Made it so the blood lamp sigil will place the light when right clicking on a block.
|
||||
|
||||
------------------------------------------------------
|
||||
Version 2.0.0-14
|
||||
------------------------------------------------------
|
||||
|
|
|
@ -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.projectile.EntityBloodLight;
|
||||
|
||||
public class BloodLightRenderFactory implements IRenderFactory<EntityBloodLight>
|
||||
{
|
||||
@Override
|
||||
public Render<? super EntityBloodLight> createRenderFor(RenderManager manager)
|
||||
{
|
||||
return new RenderEntityBloodLight(manager);
|
||||
}
|
||||
}
|
|
@ -1,50 +1,41 @@
|
|||
package WayofTime.bloodmagic.client.render.entity;
|
||||
|
||||
import WayofTime.bloodmagic.entity.projectile.EntityBloodLight;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.entity.projectile.EntityBloodLight;
|
||||
import WayofTime.bloodmagic.item.ItemComponent;
|
||||
|
||||
public class RenderEntityBloodLight extends Render<EntityBloodLight>
|
||||
{
|
||||
public RenderEntityBloodLight(RenderManager renderManager)
|
||||
private final RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
|
||||
public RenderEntityBloodLight(RenderManager renderManagerIn)
|
||||
{
|
||||
super(renderManager);
|
||||
this.shadowSize = 0.0F;
|
||||
super(renderManagerIn);
|
||||
}
|
||||
|
||||
public void renderEntityAt(EntityBloodLight entity, double x, double y, double z, float fq, float pticks)
|
||||
public void doRender(EntityBloodLight entity, double x, double y, double z, float entityYaw, float partialTicks)
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x, y, z);
|
||||
GlStateManager.translate((float) x, (float) y, (float) z);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.scale(0.1F, 0.1F, 0.1F);
|
||||
this.bindTexture(this.getEntityTexture(entity));
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
GlStateManager.rotate(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
tessellator.getWorldRenderer().begin(7, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
|
||||
tessellator.getWorldRenderer().pos(-0.5D, -0.25D, 0.0D).tex(0D, 1D).normal(0F, 1F, 0F).endVertex();
|
||||
tessellator.getWorldRenderer().pos(0.5D, -0.25D, 0.0D).tex(1D, 1D).normal(0F, 1F, 0F).endVertex();
|
||||
tessellator.getWorldRenderer().pos(0.5D, 0.75D, 0.0D).tex(1D, 0D).normal(0F, 1F, 0F).endVertex();
|
||||
tessellator.getWorldRenderer().pos(-0.5D, 0.75D, 0.0D).tex(0D, 1D).normal(0F, 1F, 0F).endVertex();
|
||||
tessellator.draw();
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
this.bindTexture(TextureMap.locationBlocksTexture);
|
||||
this.renderItem.renderItem(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT), ItemCameraTransforms.TransformType.GROUND);
|
||||
GlStateManager.disableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
super.doRender(entity, x, y, z, entityYaw, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(EntityBloodLight entityBloodLight, double d, double d1, double d2, float f, float f1)
|
||||
{
|
||||
renderEntityAt(entityBloodLight, d, d1, d2, f, f1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(EntityBloodLight entityBloodLight)
|
||||
protected ResourceLocation getEntityTexture(EntityBloodLight entity)
|
||||
{
|
||||
return TextureMap.locationBlocksTexture;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.bloodmagic.client.render.entity;
|
||||
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
|
@ -8,10 +7,10 @@ import net.minecraft.client.renderer.entity.Render;
|
|||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.entity.projectile.EntitySoulSnare;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
|
||||
public class RenderEntitySoulSnare extends Render<EntitySoulSnare>
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@ public class ItemComponent extends Item
|
|||
public static final String REAGENT_BINDING = "reagentBinding";
|
||||
public static final String REAGENT_SUPPRESSION = "reagentSuppression";
|
||||
public static final String COMPONENT_FRAME_PART = "frameParts";
|
||||
public static final String REAGENT_BLOODLIGHT = "reagentBloodLight";
|
||||
|
||||
public ItemComponent()
|
||||
{
|
||||
|
@ -55,6 +56,7 @@ public class ItemComponent extends Item
|
|||
names.add(8, REAGENT_BINDING);
|
||||
names.add(9, REAGENT_SUPPRESSION);
|
||||
names.add(10, COMPONENT_FRAME_PART);
|
||||
names.add(11, REAGENT_BLOODLIGHT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemSigilBloodLight extends ItemSigilBase
|
||||
|
@ -23,7 +24,22 @@ public class ItemSigilBloodLight extends ItemSigilBase
|
|||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
|
||||
{
|
||||
if (BindableHelper.checkAndSetItemOwner(stack, player) && ItemBindable.syphonNetwork(stack, player, getLPUsed() * 5) && !world.isRemote)
|
||||
world.spawnEntityInWorld(new EntityBloodLight(world, player));
|
||||
{
|
||||
MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
|
||||
if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
BlockPos blockPos = mop.getBlockPos().offset(mop.sideHit);
|
||||
|
||||
if (world.isAirBlock(blockPos))
|
||||
{
|
||||
world.setBlockState(blockPos, ModBlocks.bloodLight.getDefaultState());
|
||||
}
|
||||
} else
|
||||
{
|
||||
world.spawnEntityInWorld(new EntityBloodLight(world, player));
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
|
|
@ -11,8 +11,10 @@ import WayofTime.bloodmagic.client.mesh.ItemSentientSwordMeshDefinition;
|
|||
import WayofTime.bloodmagic.client.render.RenderAlchemyArray;
|
||||
import WayofTime.bloodmagic.client.render.RenderAltar;
|
||||
import WayofTime.bloodmagic.client.render.RenderItemRoutingNode;
|
||||
import WayofTime.bloodmagic.client.render.entity.BloodLightRenderFactory;
|
||||
import WayofTime.bloodmagic.client.render.entity.SentientArrowRenderFactory;
|
||||
import WayofTime.bloodmagic.client.render.entity.SoulSnareRenderFactory;
|
||||
import WayofTime.bloodmagic.entity.projectile.EntityBloodLight;
|
||||
import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow;
|
||||
import WayofTime.bloodmagic.entity.projectile.EntitySoulSnare;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
|
@ -58,6 +60,7 @@ public class ClientProxy extends CommonProxy
|
|||
{
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySoulSnare.class, new SoulSnareRenderFactory());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySentientArrow.class, new SentientArrowRenderFactory());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBloodLight.class, new BloodLightRenderFactory());
|
||||
ShaderHelper.init();
|
||||
}
|
||||
|
||||
|
|
|
@ -147,6 +147,7 @@ public class ModRecipes
|
|||
AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AFFINITY), new ItemStack(ModItems.slate, 1, 2), new ItemStack(ModItems.sigilElementalAffinity), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/ElementalAffinitySigil.png"));
|
||||
AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SIGHT), new ItemStack(ModItems.slate, 1, 1), new ItemStack(ModItems.sigilSeer), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SightSigil.png"));
|
||||
AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION), new ItemStack(ModItems.slate, 1, 3), new ItemStack(ModItems.sigilSuppression), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SuppressionSigil.png"));
|
||||
AlchemyArrayRecipeRegistry.registerCraftingRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT), new ItemStack(ModItems.slate, 1, 2), new ItemStack(ModItems.sigilBloodLight), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/LightSigil.png"));
|
||||
}
|
||||
|
||||
public static void addCompressionHandlers()
|
||||
|
@ -179,6 +180,7 @@ public class ModRecipes
|
|||
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AFFINITY), 300, 30, ModItems.sigilWater, ModItems.sigilAir, ModItems.sigilLava, Blocks.obsidian);
|
||||
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION), 500, 50, ModBlocks.teleposer, Items.water_bucket, Items.lava_bucket, Items.blaze_rod);
|
||||
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), 400, 10, "dustGlowstone", "dustRedstone", "nuggetGold", Items.gunpowder);
|
||||
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BLOODLIGHT), 300, 10, "glowstone", Blocks.torch, "dustRedstone", "dustRedstone");
|
||||
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.sentientArmourGem), 240, 150, Items.diamond_chestplate, new ItemStack(ModItems.soulGem, 1, 1), Blocks.iron_block, Blocks.obsidian);
|
||||
|
||||
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 400, 10, "blockGlass", "stone", new ItemStack(ModItems.slate));
|
||||
|
|
|
@ -77,6 +77,7 @@ item.BloodMagic.baseComponent.reagentSight.name=Sight Reagent
|
|||
item.BloodMagic.baseComponent.reagentBinding.name=Binding Reagent
|
||||
item.BloodMagic.baseComponent.reagentSuppression.name=Suppression Reagent
|
||||
item.BloodMagic.baseComponent.frameParts.name=Frame Parts
|
||||
item.BloodMagic.baseComponent.reagentBloodLight.name=Blood Lamp Reagent
|
||||
|
||||
item.BloodMagic.monsterSoul.base.name=Demonic Will
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent":"bloodmagic:item/ItemModelBase",
|
||||
"textures": {
|
||||
"layer0":"bloodmagic:items/ReagentBloodLight"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
Loading…
Reference in a new issue