Skip to content

Commit

Permalink
back-up related commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sirolf2009 committed May 3, 2013
1 parent 2e38cc5 commit ad926be
Show file tree
Hide file tree
Showing 155 changed files with 5,461 additions and 806 deletions.
151 changes: 105 additions & 46 deletions common/com/sirolf2009/necromancy/Necromancy.java

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions common/com/sirolf2009/necromancy/block/BlockSkullWall.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.ArrayList;
import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
Expand All @@ -13,7 +12,6 @@
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntitySkull;
import net.minecraft.util.Icon;
import net.minecraft.world.World;

import com.sirolf2009.necromancy.Necromancy;
Expand Down Expand Up @@ -114,13 +112,4 @@ public int idDropped(int par1, Random par2Random, int par3) {
public void registerIcons(IconRegister par1IconRegister) {
par1IconRegister.registerIcon("obsidian");
}

@Override
@SideOnly(Side.CLIENT)
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
*/
public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) {
return Block.cloth.getBlockTextureFromSideAndMetadata(par1, 15);
}
}
4 changes: 2 additions & 2 deletions common/com/sirolf2009/necromancy/client/gui/GuiAltar.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import org.lwjgl.opengl.GL11;

import com.sirolf2009.necromancy.Necromancy;
import com.sirolf2009.necromancy.inventory.ContainerAltar;
import com.sirolf2009.necromancy.lib.Reference;
import com.sirolf2009.necromancy.tileentity.TileEntityAltar;

public class GuiAltar extends GuiContainer {
Expand All @@ -25,7 +25,7 @@ protected void drawGuiContainerForegroundLayer() {
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(Necromancy.rscPath + "/gui/altarGui.png");
mc.renderEngine.bindTexture(Reference.LOC_RESOURCES_TEXTURES_GUIS + "/altarGui.png");
int var5 = (width - xSize) / 2;
int var6 = (height - ySize) / 2;
drawTexturedModalRect(var5, var6, 0, 0, xSize, ySize);
Expand Down
4 changes: 2 additions & 2 deletions common/com/sirolf2009/necromancy/client/gui/GuiSewing.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import org.lwjgl.opengl.GL11;

import com.sirolf2009.necromancy.Necromancy;
import com.sirolf2009.necromancy.inventory.ContainerSewing;
import com.sirolf2009.necromancy.lib.Reference;
import com.sirolf2009.necromancy.tileentity.TileEntitySewing;

public class GuiSewing extends GuiContainer {
Expand All @@ -23,7 +23,7 @@ protected void drawGuiContainerForegroundLayer() {
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(Necromancy.rscPath + "/gui/Sewing.png");
mc.renderEngine.bindTexture(Reference.LOC_RESOURCES_TEXTURES_GUIS + "/Sewing.png");
int var5 = (width - xSize) / 2;
int var6 = (height - ySize) / 2;
drawTexturedModalRect(var5, var6, 0, 0, xSize, ySize);
Expand Down
48 changes: 24 additions & 24 deletions common/com/sirolf2009/necromancy/client/model/ModelIsaacHead.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
public class ModelIsaacHead extends ModelBase {
// fields
ModelRenderer neck4;
ModelRenderer Neck3;
ModelRenderer Neck2;
ModelRenderer neck3;
ModelRenderer neck2;
ModelRenderer head;
ModelRenderer Neck1;
ModelRenderer neck1;

public ModelIsaacHead() {
textureWidth = 64;
Expand All @@ -22,41 +22,41 @@ public ModelIsaacHead() {
neck4.setTextureSize(64, 32);
neck4.mirror = true;
setRotation(neck4, 0F, 0F, 0F);
Neck3 = new ModelRenderer(this, 0, 0);
Neck3.addBox(0F, 0F, 0F, 1, 1, 1);
Neck3.setRotationPoint(0F, 2F, 1F);
Neck3.setTextureSize(64, 32);
Neck3.mirror = true;
setRotation(Neck3, 0F, 0F, 0F);
Neck2 = new ModelRenderer(this, 0, 0);
Neck2.addBox(0F, 0F, 0F, 1, 1, 1);
Neck2.setRotationPoint(0F, 2F, 0F);
Neck2.setTextureSize(64, 32);
Neck2.mirror = true;
setRotation(Neck2, 0F, 0F, 0F);
neck3 = new ModelRenderer(this, 0, 0);
neck3.addBox(0F, 0F, 0F, 1, 1, 1);
neck3.setRotationPoint(0F, 2F, 1F);
neck3.setTextureSize(64, 32);
neck3.mirror = true;
setRotation(neck3, 0F, 0F, 0F);
neck2 = new ModelRenderer(this, 0, 0);
neck2.addBox(0F, 0F, 0F, 1, 1, 1);
neck2.setRotationPoint(0F, 2F, 0F);
neck2.setTextureSize(64, 32);
neck2.mirror = true;
setRotation(neck2, 0F, 0F, 0F);
head = new ModelRenderer(this, 0, 0);
head.addBox(-4F, -8F, -4F, 10, 9, 8);
head.setRotationPoint(0F, 1F, 0F);
head.setTextureSize(64, 32);
head.mirror = true;
setRotation(head, 0F, 0F, 0F);
Neck1 = new ModelRenderer(this, 0, 0);
Neck1.addBox(0F, 0F, 0F, 1, 1, 1);
Neck1.setRotationPoint(1F, 2F, -1F);
Neck1.setTextureSize(64, 32);
Neck1.mirror = true;
setRotation(Neck1, 0F, 0F, 0F);
neck1 = new ModelRenderer(this, 0, 0);
neck1.addBox(0F, 0F, 0F, 1, 1, 1);
neck1.setRotationPoint(1F, 2F, -1F);
neck1.setTextureSize(64, 32);
neck1.mirror = true;
setRotation(neck1, 0F, 0F, 0F);
}

@Override
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);
neck4.render(f5);
Neck3.render(f5);
Neck2.render(f5);
neck3.render(f5);
neck2.render(f5);
head.render(f5);
Neck1.render(f5);
neck1.render(f5);
}

private void setRotation(ModelRenderer model, float x, float y, float z) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,76 +1,31 @@
package com.sirolf2009.necromancy.client.model;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

public class ModelIsaacSevered extends ModelBase {
public class ModelIsaacSevered extends ModelIsaacNormal {
// fields
ModelRenderer neck;
ModelRenderer body;
ModelRenderer rightarm;
ModelRenderer leftarm;
ModelRenderer rightleg;
ModelRenderer leftleg;

public ModelIsaacSevered() {
textureWidth = 64;
textureHeight = 32;

super();
neck = new ModelRenderer(this, 0, 0);
neck.addBox(0F, 0F, 0F, 2, 1, 2);
neck.setRotationPoint(-1F, 1F, -1F);
neck.setTextureSize(64, 32);
neck.mirror = true;
setRotation(neck, 0F, 0F, 0F);
body = new ModelRenderer(this, 16, 16);
body.addBox(-4F, 0F, -2F, 8, 12, 4);
body.setRotationPoint(0F, 2F, 0F);
body.setTextureSize(64, 32);
body.mirror = true;
setRotation(body, 0F, 0F, 0F);
rightarm = new ModelRenderer(this, 40, 16);
rightarm.addBox(-3F, -2F, -2F, 3, 11, 3);
rightarm.setRotationPoint(-4F, 4F, 1F);
rightarm.setTextureSize(64, 32);
rightarm.mirror = true;
setRotation(rightarm, 0F, 0F, 0F);
leftarm = new ModelRenderer(this, 40, 16);
leftarm.addBox(-1F, -2F, -2F, 3, 11, 3);
leftarm.setRotationPoint(5F, 4F, 1F);
leftarm.setTextureSize(64, 32);
leftarm.mirror = true;
setRotation(leftarm, 0F, 0F, 0F);
rightleg = new ModelRenderer(this, 0, 16);
rightleg.addBox(-2F, 0F, -2F, 4, 10, 3);
rightleg.setRotationPoint(-2F, 14F, 1F);
rightleg.setTextureSize(64, 32);
rightleg.mirror = true;
setRotation(rightleg, 0F, 0F, 0F);
leftleg = new ModelRenderer(this, 0, 16);
leftleg.addBox(-2F, 0F, -2F, 4, 10, 3);
leftleg.setRotationPoint(2F, 14F, 1F);
leftleg.setTextureSize(64, 32);
leftleg.mirror = true;
setRotation(leftleg, 0F, 0F, 0F);
}

@Override
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);
// super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
neck.render(f5);
body.render(f5);
rightarm.render(f5);
leftarm.render(f5);
rightleg.render(f5);
leftleg.render(f5);
}

private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
bipedBody.render(f5);
bipedRightArm.render(f5);
bipedLeftArm.render(f5);
bipedRightLeg.render(f5);
bipedLeftLeg.render(f5);
}

@Override
Expand Down
14 changes: 14 additions & 0 deletions common/com/sirolf2009/necromancy/client/model/ModelMinion.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,20 @@ public void render(Entity par1Entity, float par2, float par3, float par4, float
if (legs != null) {
GL11.glPushMatrix();
bindTexByPart(parts[4]);
NecroEntityBase mob = NecroEntityRegistry.registeredEntities.get(legs[0].name);
mob.preRender(minion, legs, "legs", this);
for (BodyPart part : legs) {
part.render(par7);
}
mob.postRender(minion, legs, "legs", this);
GL11.glPopMatrix();
}
if (torso != null) {
bindTexByPart(parts[1]);
if (torso[0] != null) {
GL11.glTranslatef(torsoPos[0] / 16, torsoPos[1] / 16, torsoPos[2] / 16);
NecroEntityBase mob = NecroEntityRegistry.registeredEntities.get(torso[0].name);
mob.preRender(minion, torso, "torso", this);
for (BodyPart part : torso) {
part.render(par7);
}
Expand All @@ -58,24 +62,31 @@ public void render(Entity par1Entity, float par2, float par3, float par4, float
part.render(par7);
}
}
mob.postRender(minion, torso, "torso", this);
}
}
if (armLeft != null) {
GL11.glPushMatrix();
bindTexByPart(parts[2]);
GL11.glTranslatef(armLeftPos[0] / 16, armLeftPos[1] / 16, armLeftPos[2] / 16);
NecroEntityBase mob = NecroEntityRegistry.registeredEntities.get(armLeft[0].name);
mob.preRender(minion, armLeft, "armLeft", this);
for (BodyPart part : armLeft) {
part.render(par7);
}
mob.postRender(minion, armLeft, "armLeft", this);
GL11.glPopMatrix();
}
if (armRight != null) {
GL11.glPushMatrix();
GL11.glTranslatef(armRightPos[0] / 16, armRightPos[1] / 16, armRightPos[2] / 16);
bindTexByPart(parts[3]);
NecroEntityBase mob = NecroEntityRegistry.registeredEntities.get(armLeft[0].name);
mob.preRender(minion, armLeft, "armLeft", this);
for (BodyPart part : armRight) {
part.render(par7);
}
mob.postRender(minion, armRight, "armRight", this);
GL11.glPopMatrix();
}
if (head != null) {
Expand All @@ -88,9 +99,12 @@ public void render(Entity par1Entity, float par2, float par3, float par4, float
santahat.render(par7 + 0.001F);
}
bindTexByPart(parts[0]);
NecroEntityBase mob = NecroEntityRegistry.registeredEntities.get(head[0].name);
mob.preRender(minion, head, "head", this);
for (BodyPart part : head) {
part.render(par7);
}
mob.postRender(minion, head, "head", this);
GL11.glPopMatrix();
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.sirolf2009.necromancy.client.model;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;

import com.sirolf2009.necromancy.lib.Reference;

import cpw.mods.fml.client.FMLClientHandler;

public class ModelScytheSpecial extends ModelBase {
// fields
ModelRenderer HandleMiddle;
ModelRenderer HandleBottom;
ModelRenderer HandleTop;
ModelRenderer Joint;
ModelRenderer Blade;
ModelRenderer BladeBaseRight;
ModelRenderer BladeBaseLeft;

private IModelCustom modelTutBox;

public ModelScytheSpecial() {
modelTutBox = AdvancedModelLoader.loadModel("/mods/necromancy/models/scythe.obj");
}

public void render() {
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Reference.LOC_RESOURCES_TEXTURES_MODELS + "/SwordMetal.jpg");
modelTutBox.renderPart("Blade_Blade_Material");
FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/necromancy/models/cloth.jpg");
modelTutBox.renderPart("Joint2_Joint2_Material");
modelTutBox.renderPart("Joint1_Joint1_Material");
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Reference.LOC_RESOURCES_TEXTURES_MODELS + "/GunTex.jpg");
modelTutBox.renderPart("Handle_Handle_Material");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

import org.lwjgl.opengl.GL11;

import com.sirolf2009.necromancy.Necromancy;
import com.sirolf2009.necromancy.client.model.ModelNecronomicon;
import com.sirolf2009.necromancy.core.proxy.ClientProxy;
import com.sirolf2009.necromancy.item.ItemNecronomicon;
import com.sirolf2009.necromancy.lib.Reference;

import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.relauncher.Side;
Expand Down Expand Up @@ -70,7 +70,7 @@ private void renderNecronomiconInteractive(float posX, float posY, float posZ, f
GL11.glRotatef(rotY, 0, 1, 0);
GL11.glRotatef(rotZ, 0, 0, 1);
GL11.glScalef(scale, scale, scale);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Necromancy.rscPath + "/model/necronomicon.png");
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Reference.LOC_RESOURCES_TEXTURES_MODELS + "/necronomicon.png");
book.page = 0;
// GL11.glRotatef((float)(book.page/(book.page+1)), 0, -1, 0);
modelInteractive.render(null, 1, 0, 0, (float) (book.page * 1.6), 1, 1);
Expand All @@ -97,7 +97,7 @@ private void renderNecronomiconStatic(float posX, float posY, float posZ, float
GL11.glRotatef(rotY, 0, 1, 0);
GL11.glRotatef(rotZ, 0, 0, 1);
GL11.glScalef(scale, scale, scale);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Necromancy.rscPath + "/model/necronomicon.png");
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Reference.LOC_RESOURCES_TEXTURES_MODELS + "/necronomicon.png");
modelStatic.render(null, 0, 0, 0, 0f, 1, 1);
GL11.glPopMatrix();// end
}
Expand Down
Loading

0 comments on commit ad926be

Please sign in to comment.