Nex minibosses WIP
parent
85ab078658
commit
0973a7c328
@ -0,0 +1,51 @@
|
|||||||
|
package com.zivilon.cinder_loe.blocks;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.LoECreativeTabs;
|
||||||
|
import com.zivilon.cinder_loe.tileentity.TileEntityNexIceCrystal;
|
||||||
|
import com.zivilon.cinder_loe.util.Utilities;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class NexIceCrystal extends Block {
|
||||||
|
|
||||||
|
public NexIceCrystal() {
|
||||||
|
super(Material.ice); // Choose the appropriate material
|
||||||
|
// Set other properties like hardness, resistance, name, etc.
|
||||||
|
setCreativeTab(LoECreativeTabs.tabDecoLoE);
|
||||||
|
setHardness(100.0F);
|
||||||
|
setResistance(100.0F);
|
||||||
|
setBlockTextureName(Utilities.toSnakeCase("lotr:nexIceCrystal"));
|
||||||
|
setBlockName("lotr:NexIceCrystal");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasTileEntity(int metadata) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createTileEntity(World world, int metadata) {
|
||||||
|
return new TileEntityNexIceCrystal();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRenderType() {
|
||||||
|
return -1; // Custom render ID
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOpaqueCube() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean renderAsNormalBlock() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
package com.zivilon.cinder_loe.client.model;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelBase;
|
||||||
|
import net.minecraft.client.model.ModelRenderer;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IceCrystal - cleric_red
|
||||||
|
* Created using Tabula 4.1.1
|
||||||
|
*/
|
||||||
|
public class ModelNexIceCrystal extends ModelBase {
|
||||||
|
public ModelRenderer shape16;
|
||||||
|
public ModelRenderer back;
|
||||||
|
public ModelRenderer front;
|
||||||
|
public ModelRenderer left;
|
||||||
|
public ModelRenderer right;
|
||||||
|
public ModelRenderer bottomfront;
|
||||||
|
public ModelRenderer bottomback;
|
||||||
|
|
||||||
|
public ModelNexIceCrystal() {
|
||||||
|
this.textureWidth = 64;
|
||||||
|
this.textureHeight = 32;
|
||||||
|
this.right = new ModelRenderer(this, 0, 2);
|
||||||
|
this.right.setRotationPoint(2.9F, 12.6F, 3.2F);
|
||||||
|
this.right.addBox(0.0F, 0.0F, 0.0F, 0, 9, 5, 0.0F);
|
||||||
|
this.setRotateAngle(right, 0.0F, 3.141592653589793F, 0.0F);
|
||||||
|
this.bottomfront = new ModelRenderer(this, 14, 0);
|
||||||
|
this.bottomfront.setRotationPoint(-3.0F, 17.3F, -2.66F);
|
||||||
|
this.bottomfront.addBox(0.0F, 0.0F, 0.0F, 6, 6, 1, 0.0F);
|
||||||
|
this.setRotateAngle(bottomfront, 0.5009094953223726F, 0.0F, 0.0F);
|
||||||
|
this.bottomback = new ModelRenderer(this, 14, 0);
|
||||||
|
this.bottomback.setRotationPoint(-3.0F, 16.3F, 3.1F);
|
||||||
|
this.bottomback.addBox(0.0F, 0.0F, 0.0F, 6, 6, 1, 0.0F);
|
||||||
|
this.setRotateAngle(bottomback, -0.5009094953223726F, 0.0F, 0.0F);
|
||||||
|
this.back = new ModelRenderer(this, 0, 0);
|
||||||
|
this.back.setRotationPoint(-3.0F, 12.0F, 0.2F);
|
||||||
|
this.back.addBox(0.0F, 0.0F, 0.0F, 6, 6, 1, 0.0F);
|
||||||
|
this.setRotateAngle(back, 0.5009094953223726F, 0.0F, 0.0F);
|
||||||
|
this.front = new ModelRenderer(this, 0, 0);
|
||||||
|
this.front.setRotationPoint(-3.0F, 12.0F, 0.2F);
|
||||||
|
this.front.addBox(0.0F, 0.0F, 0.0F, 6, 6, 1, 0.0F);
|
||||||
|
this.setRotateAngle(front, -0.5009094953223726F, 0.0F, 0.0F);
|
||||||
|
this.shape16 = new ModelRenderer(this, 31, 0);
|
||||||
|
this.shape16.setRotationPoint(0.0F, 7.0F, -8.0F);
|
||||||
|
this.shape16.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F);
|
||||||
|
this.setRotateAngle(shape16, 0.4553564018453205F, 0.0F, 0.0F);
|
||||||
|
this.left = new ModelRenderer(this, 0, 2);
|
||||||
|
this.left.setRotationPoint(-2.9F, 12.6F, -1.9F);
|
||||||
|
this.left.addBox(0.0F, 0.0F, 0.0F, 0, 9, 5, 0.0F);
|
||||||
|
this.shape16.addChild(this.right);
|
||||||
|
this.shape16.addChild(this.bottomfront);
|
||||||
|
this.shape16.addChild(this.bottomback);
|
||||||
|
this.shape16.addChild(this.back);
|
||||||
|
this.shape16.addChild(this.front);
|
||||||
|
this.shape16.addChild(this.left);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||||
|
this.shape16.render(f5);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a helper function from Tabula to set the rotation of model parts
|
||||||
|
*/
|
||||||
|
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||||
|
modelRenderer.rotateAngleX = x;
|
||||||
|
modelRenderer.rotateAngleY = y;
|
||||||
|
modelRenderer.rotateAngleZ = z;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package com.zivilon.cinder_loe.client.render;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.entity.NexShadow;
|
||||||
|
import com.zivilon.cinder_loe.entity.NexIce;
|
||||||
|
import com.zivilon.cinder_loe.entity.NexFire;
|
||||||
|
import com.zivilon.cinder_loe.entity.NexToxin;
|
||||||
|
|
||||||
|
import lotr.client.model.LOTRModelHuman;
|
||||||
|
import lotr.client.render.entity.LOTRRenderBiped;
|
||||||
|
import net.minecraft.client.model.ModelBiped;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
public class RenderNexMiniboss extends LOTRRenderBiped {
|
||||||
|
public static ResourceLocation SHADOW_TEXTURE = new ResourceLocation("cinder_loe:mob/nex/shadow.png");
|
||||||
|
public static ResourceLocation FIRE_TEXTURE = new ResourceLocation("cinder_loe:mob/nex/fire.png");
|
||||||
|
public static ResourceLocation ICE_TEXTURE = new ResourceLocation("cinder_loe:mob/nex/ice.png");
|
||||||
|
public static ResourceLocation TOXIN_TEXTURE = new ResourceLocation("cinder_loe:mob/nex/toxin.png");
|
||||||
|
|
||||||
|
public RenderNexMiniboss() {
|
||||||
|
super(new LOTRModelHuman(), 0.0F);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ResourceLocation getEntityTexture(Entity entity) {
|
||||||
|
if (entity instanceof NexToxin) {
|
||||||
|
return TOXIN_TEXTURE;
|
||||||
|
} else if (entity instanceof NexFire) {
|
||||||
|
return FIRE_TEXTURE;
|
||||||
|
} else if (entity instanceof NexIce) {
|
||||||
|
return ICE_TEXTURE;
|
||||||
|
} else {
|
||||||
|
return SHADOW_TEXTURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void preRenderCallback(EntityLivingBase entity, float partialTickTime) {
|
||||||
|
super.preRenderCallback(entity, partialTickTime);
|
||||||
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F); // Apply 50% transparency
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void renderModel(EntityLivingBase entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
|
||||||
|
super.renderModel(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
|
||||||
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
package com.zivilon.cinder_loe.client.render.block;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.client.model.ModelNexIceCrystal;
|
||||||
|
import com.zivilon.cinder_loe.tileentity.TileEntityNexIceCrystal;
|
||||||
|
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||||
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
public class RenderNexIceCrystal extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler {
|
||||||
|
public static final int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
private static final ResourceLocation texture = new ResourceLocation("lotr:textures/blocks/nex_ice_crystal.png");
|
||||||
|
private final ModelNexIceCrystal model = new ModelNexIceCrystal();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) {
|
||||||
|
if (tileEntity instanceof TileEntityNexIceCrystal) {
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F); // Center the model
|
||||||
|
GL11.glScalef(0.5F, 0.5F, 0.5F); // Scale down the model
|
||||||
|
this.bindTexture(texture);
|
||||||
|
this.model.render(null, 0, 0, 0, 0, 0, 0.0625F);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||||
|
if (modelId == renderID) {
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslatef(-0.5F, -0.5F, -0.5F); // Center the model in inventory
|
||||||
|
GL11.glScalef(0.5F, 0.5F, 0.5F); // Scale down the model
|
||||||
|
this.bindTexture(texture);
|
||||||
|
this.model.render(null, 0, 0, 0, 0, 0, 0.0625F);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||||
|
if (modelId == renderID) {
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslatef(x + 0.5F, y + 0.5F, z + 0.5F); // Center the model in the world
|
||||||
|
GL11.glScalef(0.5F, 0.5F, 0.5F); // Scale down the model
|
||||||
|
this.bindTexture(texture);
|
||||||
|
this.model.render(null, 0, 0, 0, 0, 0, 0.0625F);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldRender3DInInventory(int modelId) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRenderId() {
|
||||||
|
return renderID;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class NexFire extends NexShadow {
|
||||||
|
public String entity_name = "§4Naira";
|
||||||
|
|
||||||
|
public NexFire(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNPCName() {
|
||||||
|
return entity_name;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getNPCFormattedName(String npcName, String entityName) {
|
||||||
|
return entity_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSpeechBank(EntityPlayer entityplayer) {
|
||||||
|
return "nex/fire";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class NexIce extends NexShadow {
|
||||||
|
public String entity_name = "§bNinquë";
|
||||||
|
|
||||||
|
public NexIce(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNPCName() {
|
||||||
|
return entity_name;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getNPCFormattedName(String npcName, String entityName) {
|
||||||
|
return entity_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSpeechBank(EntityPlayer entityplayer) {
|
||||||
|
return "nex/ice";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class NexToxin extends NexShadow {
|
||||||
|
public String entity_name = "§2Hloirë";
|
||||||
|
|
||||||
|
public NexToxin(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getNPCName() {
|
||||||
|
return entity_name;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String getNPCFormattedName(String npcName, String entityName) {
|
||||||
|
return entity_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSpeechBank(EntityPlayer entityplayer) {
|
||||||
|
return "nex/toxin";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package com.zivilon.cinder_loe.tileentity;
|
||||||
|
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
|
public class TileEntityNexIceCrystal extends TileEntity {
|
||||||
|
// Add any data or logic specific to the tile entity here
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
Loading…
Reference in New Issue