-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
23 changed files
with
782 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This is the github for the necromancy mod. | ||
|
||
The Necromancy mod is all about necromancy. Also known as the art of reanimation. using this mod, you can reanimate slain foes and use your minions to rule the world! (of minecraftia). | ||
|
||
MC forums thread http://www.minecraftforum.net/topic/1571429-162-the-necromancy-mod-14-necro-api-12/ | ||
Wiki http://necromancyminecraft.wikia.com/wiki/Main_Page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 53 additions & 51 deletions
104
common/com/sirolf2009/necromancy/block/BlockScentBurner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,53 @@ | ||
package com.sirolf2009.necromancy.block; | ||
|
||
import net.minecraft.block.BlockContainer; | ||
import net.minecraft.block.material.Material; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.world.World; | ||
|
||
import com.sirolf2009.necromancy.Necromancy; | ||
import com.sirolf2009.necromancy.tileentity.TileEntitySewing; | ||
|
||
public class BlockScentBurner extends BlockContainer { | ||
|
||
public static int guiID = 2; | ||
|
||
public BlockScentBurner(int par1) { | ||
super(par1, Material.wood); | ||
} | ||
|
||
@Override | ||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { | ||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z); | ||
if (tileEntity == null || player.isSneaking()) | ||
return false; | ||
else { | ||
player.openGui(Necromancy.Instance, guiID, world, x, y, z); | ||
return true; | ||
} | ||
} | ||
|
||
@Override | ||
public int getRenderType() { | ||
return -1; | ||
} | ||
|
||
@Override | ||
public boolean renderAsNormalBlock() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isOpaqueCube() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public TileEntity createNewTileEntity(World var1) { | ||
return new TileEntitySewing(); | ||
} | ||
|
||
} | ||
package com.sirolf2009.necromancy.block; | ||
|
||
import net.minecraft.block.BlockContainer; | ||
import net.minecraft.block.material.Material; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.world.World; | ||
|
||
import com.sirolf2009.necromancy.Necromancy; | ||
import com.sirolf2009.necromancy.tileentity.TileEntityScentBurner; | ||
import com.sirolf2009.necromancy.tileentity.TileEntitySewing; | ||
|
||
public class BlockScentBurner extends BlockContainer { | ||
|
||
public static int guiID = 2; | ||
|
||
public BlockScentBurner(int par1) { | ||
super(par1, Material.wood); | ||
setCreativeTab(Necromancy.tabNecromancy); | ||
} | ||
|
||
@Override | ||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { | ||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z); | ||
if (tileEntity == null || player.isSneaking()) | ||
return false; | ||
else { | ||
player.openGui(Necromancy.Instance, guiID, world, x, y, z); | ||
return true; | ||
} | ||
} | ||
|
||
@Override | ||
public int getRenderType() { | ||
return -1; | ||
} | ||
|
||
@Override | ||
public boolean renderAsNormalBlock() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isOpaqueCube() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public TileEntity createNewTileEntity(World var1) { | ||
return new TileEntityScentBurner(); | ||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
common/com/sirolf2009/necromancy/client/gui/GuiScentBurner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.sirolf2009.necromancy.client.gui; | ||
|
||
import net.minecraft.client.gui.inventory.GuiContainer; | ||
import net.minecraft.entity.player.InventoryPlayer; | ||
import net.minecraft.util.ResourceLocation; | ||
|
||
import org.lwjgl.opengl.GL11; | ||
|
||
import com.sirolf2009.necromancy.client.renderer.tileentity.TileEntityScentBurnerRenderer; | ||
import com.sirolf2009.necromancy.core.proxy.ClientProxy; | ||
import com.sirolf2009.necromancy.inventory.ContainerScentBurner; | ||
import com.sirolf2009.necromancy.inventory.ContainerSewing; | ||
import com.sirolf2009.necromancy.lib.ReferenceNecromancy; | ||
import com.sirolf2009.necromancy.tileentity.TileEntityScentBurner; | ||
import com.sirolf2009.necromancy.tileentity.TileEntitySewing; | ||
|
||
public class GuiScentBurner extends GuiContainer { | ||
|
||
public GuiScentBurner(InventoryPlayer par1InventoryPlayer, TileEntityScentBurner par2TileEntitySewing) { | ||
super(new ContainerScentBurner(par1InventoryPlayer, par2TileEntitySewing)); | ||
} | ||
|
||
@Override | ||
protected void drawGuiContainerForegroundLayer(int par1, int par2) { | ||
fontRenderer.drawString("String", 88, 72, 1); | ||
} | ||
|
||
@Override | ||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { | ||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); | ||
ClientProxy.bindTexture(ReferenceNecromancy.TEXTURES_GUI_SCENTBURNER); | ||
int var5 = (width - xSize) / 2; | ||
int var6 = (height - ySize) / 2; | ||
drawTexturedModalRect(var5, var6, 0, 0, xSize, ySize); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
142 changes: 142 additions & 0 deletions
142
common/com/sirolf2009/necromancy/client/model/ModelScentBurner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
package com.sirolf2009.necromancy.client.model; | ||
|
||
import org.lwjgl.opengl.GL11; | ||
|
||
import net.minecraft.client.model.ModelBase; | ||
import net.minecraft.client.model.ModelRenderer; | ||
import net.minecraft.entity.Entity; | ||
|
||
public class ModelScentBurner extends ModelBase { | ||
|
||
ModelRenderer ropeFrontLeft; | ||
ModelRenderer base; | ||
ModelRenderer burner; | ||
ModelRenderer legFrontRight; | ||
ModelRenderer armFrontRight; | ||
ModelRenderer armFrontLeft; | ||
ModelRenderer armBackLeft; | ||
ModelRenderer legFrontLeft; | ||
ModelRenderer legBackRight; | ||
ModelRenderer legBackLeft; | ||
ModelRenderer armBackRight; | ||
ModelRenderer ropeFrontRight; | ||
ModelRenderer ropeBackLeft; | ||
ModelRenderer ropeBackRight; | ||
|
||
public ModelScentBurner() { | ||
textureWidth = 64; | ||
textureHeight = 32; | ||
ropeFrontLeft = new ModelRenderer(this, 32, 0); | ||
ropeFrontLeft.addBox(-0.5F, 0F, -0.5F, 1, 4, 1); | ||
ropeFrontLeft.setRotationPoint(-3.5F, 14.5F, -3.5F); | ||
ropeFrontLeft.setTextureSize(64, 32); | ||
ropeFrontLeft.mirror = true; | ||
setRotation(ropeFrontLeft, 0F, 2.356194F, 1.134464F); | ||
base = new ModelRenderer(this, 0, 0); | ||
base.addBox(0F, 0F, 0F, 8, 1, 8); | ||
base.setRotationPoint(-4F, 22F, -4F); | ||
base.setTextureSize(64, 32); | ||
base.mirror = true; | ||
setRotation(base, 0F, 0F, 0F); | ||
burner = new ModelRenderer(this, 24, 9); | ||
burner.addBox(0F, 0F, 0F, 2, 2, 2); | ||
burner.setRotationPoint(-1F, 16F, -1F); | ||
burner.setTextureSize(64, 32); | ||
burner.mirror = true; | ||
setRotation(burner, 0F, 0F, 0F); | ||
legFrontRight = new ModelRenderer(this, 0, 12); | ||
legFrontRight.addBox(0F, 0F, 0F, 2, 1, 2); | ||
legFrontRight.setRotationPoint(3F, 23F, -5F); | ||
legFrontRight.setTextureSize(64, 32); | ||
legFrontRight.mirror = true; | ||
setRotation(legFrontRight, 0F, 0F, 0F); | ||
armFrontRight = new ModelRenderer(this, 12, 9); | ||
armFrontRight.addBox(0F, 0F, 0F, 1, 8, 1); | ||
armFrontRight.setRotationPoint(3F, 14F, -4F); | ||
armFrontRight.setTextureSize(64, 32); | ||
armFrontRight.mirror = true; | ||
setRotation(armFrontRight, 0F, 0F, 0F); | ||
armFrontLeft = new ModelRenderer(this, 8, 9); | ||
armFrontLeft.addBox(0F, 0F, 0F, 1, 8, 1); | ||
armFrontLeft.setRotationPoint(-4F, 14F, -4F); | ||
armFrontLeft.setTextureSize(64, 32); | ||
armFrontLeft.mirror = true; | ||
setRotation(armFrontLeft, 0F, 0F, 0F); | ||
armBackLeft = new ModelRenderer(this, 16, 9); | ||
armBackLeft.addBox(0F, 0F, 0F, 1, 8, 1); | ||
armBackLeft.setRotationPoint(-4F, 14F, 3F); | ||
armBackLeft.setTextureSize(64, 32); | ||
armBackLeft.mirror = true; | ||
setRotation(armBackLeft, 0F, 0F, 0F); | ||
legFrontLeft = new ModelRenderer(this, 0, 9); | ||
legFrontLeft.addBox(0F, 0F, 0F, 2, 1, 2); | ||
legFrontLeft.setRotationPoint(-5F, 23F, -5F); | ||
legFrontLeft.setTextureSize(64, 32); | ||
legFrontLeft.mirror = true; | ||
setRotation(legFrontLeft, 0F, 0F, 0F); | ||
legBackRight = new ModelRenderer(this, 0, 18); | ||
legBackRight.addBox(0F, 0F, 0F, 2, 1, 2); | ||
legBackRight.setRotationPoint(3F, 23F, 3F); | ||
legBackRight.setTextureSize(64, 32); | ||
legBackRight.mirror = true; | ||
setRotation(legBackRight, 0F, 0F, 0F); | ||
legBackLeft = new ModelRenderer(this, 0, 15); | ||
legBackLeft.addBox(0F, 0F, 0F, 2, 1, 2); | ||
legBackLeft.setRotationPoint(-5F, 23F, 3F); | ||
legBackLeft.setTextureSize(64, 32); | ||
legBackLeft.mirror = true; | ||
setRotation(legBackLeft, 0F, 0F, 0F); | ||
armBackRight = new ModelRenderer(this, 20, 9); | ||
armBackRight.addBox(0F, 0F, 0F, 1, 8, 1); | ||
armBackRight.setRotationPoint(3F, 14F, 3F); | ||
armBackRight.setTextureSize(64, 32); | ||
armBackRight.mirror = true; | ||
setRotation(armBackRight, 0F, 0F, 0F); | ||
ropeFrontRight = new ModelRenderer(this, 36, 0); | ||
ropeFrontRight.addBox(-0.5F, 0F, -0.5F, 1, 4, 1); | ||
ropeFrontRight.setRotationPoint(3.5F, 14.5F, -3.5F); | ||
ropeFrontRight.setTextureSize(64, 32); | ||
ropeFrontRight.mirror = true; | ||
setRotation(ropeFrontRight, 0F, 0.7853982F, 1.134464F); | ||
ropeBackLeft = new ModelRenderer(this, 40, 0); | ||
ropeBackLeft.addBox(-0.5F, 0F, -0.5F, 1, 4, 1); | ||
ropeBackLeft.setRotationPoint(-3.5F, 14.5F, 3.5F); | ||
ropeBackLeft.setTextureSize(64, 32); | ||
ropeBackLeft.mirror = true; | ||
setRotation(ropeBackLeft, 0F, -2.356194F, 1.134464F); | ||
ropeBackRight = new ModelRenderer(this, 44, 0); | ||
ropeBackRight.addBox(-0.5F, 0F, -0.5F, 1, 4, 1); | ||
ropeBackRight.setRotationPoint(3.5F, 14.5F, 3.5F); | ||
ropeBackRight.setTextureSize(64, 32); | ||
ropeBackRight.mirror = true; | ||
setRotation(ropeBackRight, 0F, -0.7853982F, 1.134464F); | ||
} | ||
|
||
public void render() { | ||
float f5 = 0.0625F; | ||
base.render(f5); | ||
burner.render(f5); | ||
legFrontRight.render(f5); | ||
armFrontRight.render(f5); | ||
armFrontLeft.render(f5); | ||
armBackLeft.render(f5); | ||
legFrontLeft.render(f5); | ||
legBackRight.render(f5); | ||
legBackLeft.render(f5); | ||
armBackRight.render(f5); | ||
GL11.glPushMatrix(); | ||
ropeFrontRight.render(f5); | ||
setRotation(ropeFrontRight, 1F, 0.0F, 2F); | ||
ropeBackLeft.render(f5); | ||
ropeBackRight.render(f5); | ||
ropeFrontLeft.render(f5); | ||
GL11.glPopMatrix(); | ||
} | ||
|
||
private void setRotation(ModelRenderer model, float x, float y, float z) { | ||
model.rotateAngleX = x; | ||
model.rotateAngleY = y; | ||
model.rotateAngleZ = z; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.