mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 15:03:03 +00:00
Some Pylon work, rendering weird, waiting for Rorax to get my a better model.
This commit is contained in:
1 parent
13dcb3a993
commit
7ebf2ccfa5
13 files changed
+210
-18
No files matched your search
@@ -34,10 +34,12 @@ import vazkii.botania.client.render.block.RenderSpreader;
|
||||
import vazkii.botania.client.render.item.RenderLens;
|
||||
import vazkii.botania.client.render.tile.RenderTileAltar;
|
||||
import vazkii.botania.client.render.tile.RenderTilePool;
|
||||
import vazkii.botania.client.render.tile.RenderTilePylon;
|
||||
import vazkii.botania.client.render.tile.RenderTileRuneAltar;
|
||||
import vazkii.botania.client.render.tile.RenderTileSpreader;
|
||||
import vazkii.botania.common.block.tile.TileAltar;
|
||||
import vazkii.botania.common.block.tile.TilePool;
|
||||
import vazkii.botania.common.block.tile.TilePylon;
|
||||
import vazkii.botania.common.block.tile.TileRuneAltar;
|
||||
import vazkii.botania.common.block.tile.TileSpreader;
|
||||
import vazkii.botania.common.core.handler.ManaNetworkHandler;
|
||||
@@ -82,6 +84,7 @@ public class ClientProxy extends CommonProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileSpreader.class, new RenderTileSpreader());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TilePool.class, new RenderTilePool());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileRuneAltar.class, new RenderTileRuneAltar());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TilePylon.class, new RenderTilePylon());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,5 +17,6 @@ public final class LibRenderIDs {
|
||||
public static int idSpecialFlower = -1;
|
||||
public static int idSpreader = -1;
|
||||
public static int idPool = -1;
|
||||
public static int idPylon = -1;
|
||||
|
||||
}
|
||||
@@ -39,6 +39,7 @@ public final class LibResources {
|
||||
public static final String MODEL_ALTAR = PREFIX_MODEL + "altar.png";
|
||||
public static final String MODEL_SPREADER = PREFIX_MODEL + "spreader.png";
|
||||
public static final String MODEL_POOL = PREFIX_MODEL + "pool.png";
|
||||
public static final String MODEL_PYLON = PREFIX_MODEL + "pylon.png";
|
||||
|
||||
public static final String MISC_PARTICLES = PREFIX_MISC + "particles.png";
|
||||
public static final String MISC_WISP_LARGE = PREFIX_MISC + "wispLarge.png";
|
||||
|
||||
@@ -40,82 +40,82 @@ public class ModelPylon extends ModelBase {
|
||||
crystal1 = new ModelRenderer(this, 0, 0);
|
||||
crystal1.addBox(-1.5F, -7F, -1F, 3, 7, 2);
|
||||
crystal1.setRotationPoint(0F, 23F, 0F);
|
||||
crystal1.setTextureSize(64, 32);
|
||||
crystal1.setTextureSize(256, 128);
|
||||
setRotation(crystal1, 0.1396263F, -0.418879F, 0F);
|
||||
crystal2 = new ModelRenderer(this, 0, 0);
|
||||
crystal2.addBox(-1.5F, -7F, -1F, 3, 7, 2);
|
||||
crystal2.setRotationPoint(0F, 23F, 0F);
|
||||
crystal2.setTextureSize(64, 32);
|
||||
crystal2.setTextureSize(256, 128);
|
||||
setRotation(crystal2, -0.1396263F, 0.418879F, 0F);
|
||||
crystal3 = new ModelRenderer(this, 0, 0);
|
||||
crystal3.addBox(-1.5F, -7F, -1F, 3, 7, 2);
|
||||
crystal3.setRotationPoint(0F, 23F, 0F);
|
||||
crystal3.setTextureSize(64, 32);
|
||||
crystal3.setTextureSize(256, 128);
|
||||
setRotation(crystal3, 0.1396263F, 0.418879F, 0F);
|
||||
crystal4 = new ModelRenderer(this, 0, 0);
|
||||
crystal4.addBox(-1.5F, -7F, -1F, 3, 7, 2);
|
||||
crystal4.setRotationPoint(0F, 23F, 0F);
|
||||
crystal4.setTextureSize(64, 32);
|
||||
crystal4.setTextureSize(256, 128);
|
||||
setRotation(crystal4, -0.1396263F, -0.418879F, 0F);
|
||||
crystal5 = new ModelRenderer(this, 0, 0);
|
||||
crystal5.addBox(-1.5F, 0F, -1F, 3, 7, 2);
|
||||
crystal5.setRotationPoint(0F, 10F, 0F);
|
||||
crystal5.setTextureSize(64, 32);
|
||||
crystal5.setTextureSize(256, 128);
|
||||
setRotation(crystal5, 0.1396263F, 0.418879F, 0F);
|
||||
crystal6 = new ModelRenderer(this, 0, 0);
|
||||
crystal6.addBox(-1.5F, 0F, -1F, 3, 7, 2);
|
||||
crystal6.setRotationPoint(0F, 10F, 0F);
|
||||
crystal6.setTextureSize(64, 32);
|
||||
crystal6.setTextureSize(256, 128);
|
||||
setRotation(crystal6, 0.1396263F, -0.418879F, 0F);
|
||||
crystal7 = new ModelRenderer(this, 0, 0);
|
||||
crystal7.addBox(-1.5F, 0F, -1F, 3, 7, 2);
|
||||
crystal7.setRotationPoint(0F, 10F, 0F);
|
||||
crystal7.setTextureSize(64, 32);
|
||||
crystal7.setTextureSize(256, 128);
|
||||
setRotation(crystal7, -0.1396263F, -0.418879F, 0F);
|
||||
crystal8 = new ModelRenderer(this, 0, 0);
|
||||
crystal8.addBox(-1.5F, 0F, -1F, 3, 7, 2);
|
||||
crystal8.setRotationPoint(0F, 10F, 0F);
|
||||
crystal8.setTextureSize(64, 32);
|
||||
crystal8.setTextureSize(256, 128);
|
||||
setRotation(crystal8, -0.1396263F, 0.418879F, 0F);
|
||||
outside1 = new ModelRenderer(this, 17, 0);
|
||||
outside1.addBox(0F, -4F, -1.5F, 1, 8, 3);
|
||||
outside1.setRotationPoint(4F, 18F, 0F);
|
||||
outside1.setTextureSize(64, 32);
|
||||
outside1.setTextureSize(256, 128);
|
||||
setRotation(outside1, 0F, 0F, 0.1396263F);
|
||||
outside2 = new ModelRenderer(this, 17, 0);
|
||||
outside2.addBox(-1F, -4F, -1.5F, 1, 8, 3);
|
||||
outside2.setRotationPoint(-4F, 18F, 0F);
|
||||
outside2.setTextureSize(64, 32);
|
||||
outside2.setTextureSize(256, 128);
|
||||
setRotation(outside2, 0F, 0F, -0.1396263F);
|
||||
outside3 = new ModelRenderer(this, 26, 0);
|
||||
outside3.addBox(-1.5F, -3F, -1F, 3, 6, 1);
|
||||
outside3.setRotationPoint(0F, 18F, -4F);
|
||||
outside3.setTextureSize(64, 32);
|
||||
outside3.setTextureSize(256, 128);
|
||||
setRotation(outside3, 0.0698132F, 0F, 0F);
|
||||
outside4 = new ModelRenderer(this, 26, 0);
|
||||
outside4.addBox(-1.5F, -3F, 0F, 3, 6, 1);
|
||||
outside4.setRotationPoint(0F, 18F, 4F);
|
||||
outside4.setTextureSize(64, 32);
|
||||
outside4.setTextureSize(256, 128);
|
||||
setRotation(outside4, -0.0698132F, 0F, 0F);
|
||||
outside5 = new ModelRenderer(this, 27, 0);
|
||||
outside5.addBox(0F, 0F, -4F, 1, 2, 8);
|
||||
outside5.setRotationPoint(3F, 18F, 0F);
|
||||
outside5.setTextureSize(64, 32);
|
||||
outside5.setTextureSize(256, 128);
|
||||
setRotation(outside5, 0F, 0F, 0F);
|
||||
outside6 = new ModelRenderer(this, 27, 0);
|
||||
outside6.addBox(-1F, -1F, -4F, 1, 2, 8);
|
||||
outside6.setRotationPoint(-3F, 19F, 0F);
|
||||
outside6.setTextureSize(64, 32);
|
||||
outside6.setTextureSize(256, 128);
|
||||
setRotation(outside6, 0F, 0F, 0F);
|
||||
outside7 = new ModelRenderer(this, 17, 12);
|
||||
outside7.addBox(-3F, -1F, 0F, 6, 2, 1);
|
||||
outside7.setRotationPoint(0F, 19F, 3F);
|
||||
outside7.setTextureSize(64, 32);
|
||||
outside7.setTextureSize(256, 128);
|
||||
setRotation(outside7, 0F, 0F, 0F);
|
||||
outside8 = new ModelRenderer(this, 17, 12);
|
||||
outside8.addBox(-3F, -1F, -1F, 6, 2, 1);
|
||||
outside8.setRotationPoint(0F, 19F, -3F);
|
||||
outside8.setTextureSize(64, 32);
|
||||
outside8.setTextureSize(256, 128);
|
||||
setRotation(outside8, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Feb 18, 2014, 10:20:06 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.render.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.common.block.tile.TilePylon;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
|
||||
public class RenderPylon implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.6F, -0.5F);
|
||||
GL11.glScalef(0.9F, 0.9F, 0.9F);
|
||||
TileEntityRenderer.instance.renderTileEntityAt(new TilePylon(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return LibRenderIDs.idPylon;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Feb 18, 2014, 10:18:36 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.render.tile;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.client.model.ModelPylon;
|
||||
|
||||
public class RenderTilePylon extends TileEntitySpecialRenderer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(LibResources.MODEL_POOL);
|
||||
ModelPylon model = new ModelPylon();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float pticks) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
|
||||
GL11.glTranslated(d0 + 0.5, d1 + 2.0, d2 + 0.5);
|
||||
GL11.glScalef(1F, -1.5F, -1F);
|
||||
model.renderCrystal();
|
||||
model.renderRing();
|
||||
GL11.glScalef(1F, -1.5F, -1F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Feb 18, 2014, 10:13:02 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.common.block.tile.TilePylon;
|
||||
import vazkii.botania.common.lib.LibBlockIDs;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
public class BlockPylon extends BlockModContainer {
|
||||
|
||||
public BlockPylon() {
|
||||
super(LibBlockIDs.idPylon, Material.iron);
|
||||
setHardness(5.5F);
|
||||
setStepSound(soundStoneFootstep);
|
||||
setUnlocalizedName(LibBlockNames.PYLON);
|
||||
|
||||
float f = 1F / 16F * 2F;
|
||||
setBlockBounds(f, 0F, f, 1F - f, 1F / 16F * 20F, 1F - f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return Block.blockDiamond.getIcon(par1, par2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return LibRenderIDs.idPylon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world) {
|
||||
return new TilePylon();
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import vazkii.botania.common.block.subtile.generating.SubTileDaybloom;
|
||||
import vazkii.botania.common.block.subtile.generating.SubTileEndoflame;
|
||||
import vazkii.botania.common.block.tile.TileAltar;
|
||||
import vazkii.botania.common.block.tile.TilePool;
|
||||
import vazkii.botania.common.block.tile.TilePylon;
|
||||
import vazkii.botania.common.block.tile.TileRuneAltar;
|
||||
import vazkii.botania.common.block.tile.TileSpecialFlower;
|
||||
import vazkii.botania.common.block.tile.TileSpreader;
|
||||
@@ -41,6 +42,7 @@ public final class ModBlocks {
|
||||
public static Block pool;
|
||||
public static Block runeAltar;
|
||||
public static Block unstableBlock;
|
||||
public static Block pylon;
|
||||
|
||||
public static void init() {
|
||||
flower = new BlockModFlower();
|
||||
@@ -52,6 +54,7 @@ public final class ModBlocks {
|
||||
pool = new BlockPool();
|
||||
runeAltar = new BlockRuneAltar();
|
||||
unstableBlock = new BlockUnstable();
|
||||
pylon = new BlockPylon();
|
||||
|
||||
for(int i = 0; i < 16; i++)
|
||||
OreDictionary.registerOre(LibOreDict.FLOWER[i], new ItemStack(flower.blockID, 1, i));
|
||||
@@ -68,6 +71,7 @@ public final class ModBlocks {
|
||||
GameRegistry.registerTileEntity(TileSpreader.class, LibBlockNames.SPREADER);
|
||||
GameRegistry.registerTileEntity(TilePool.class, LibBlockNames.POOL);
|
||||
GameRegistry.registerTileEntity(TileRuneAltar.class, LibBlockNames.RUNE_ALTAR);
|
||||
GameRegistry.registerTileEntity(TilePylon.class, LibBlockNames.PYLON);
|
||||
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_PUREDAISY, SubTilePureDaisy.class);
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Feb 18, 2014, 10:15:50 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.block.tile;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TilePylon extends TileEntity {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -54,13 +54,12 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addBlock(ModBlocks.livingwood);
|
||||
addBlock(ModBlocks.altar);
|
||||
addBlock(ModBlocks.runeAltar);
|
||||
addBlock(ModBlocks.pylon);
|
||||
addBlock(ModBlocks.unstableBlock);
|
||||
|
||||
addBlock(ModBlocks.spreader);
|
||||
addItem(ModItems.lens);
|
||||
addBlock(ModBlocks.pool);
|
||||
|
||||
addBlock(ModBlocks.specialFlower);
|
||||
}
|
||||
|
||||
private void addItem(Item item) {
|
||||
|
||||
@@ -45,6 +45,7 @@ public final class ConfigHandler {
|
||||
LibBlockIDs.idPool = loadBlock(LibBlockNames.POOL, LibBlockIDs.idPool);
|
||||
LibBlockIDs.idRuneAltar = loadBlock(LibBlockNames.RUNE_ALTAR, LibBlockIDs.idRuneAltar);
|
||||
LibBlockIDs.idUnstableBlock = loadBlock(LibBlockNames.UNSTABLE_BLOCK, LibBlockIDs.idUnstableBlock);
|
||||
LibBlockIDs.idPylon = loadBlock(LibBlockNames.PYLON, LibBlockIDs.idPylon);
|
||||
|
||||
// Item IDs
|
||||
LibItemIDs.idLexicon = loadItem(LibItemNames.LEXICON, LibItemIDs.idLexicon);
|
||||
|
||||
@@ -22,5 +22,6 @@ public final class LibBlockIDs {
|
||||
public static int idPool = 1961;
|
||||
public static int idRuneAltar = 1962;
|
||||
public static int idUnstableBlock = 1963;
|
||||
public static int idPylon = 1964;
|
||||
|
||||
}
|
||||
@@ -24,6 +24,7 @@ public final class LibBlockNames {
|
||||
public static final String POOL = LibResources.PREFIX_MOD + "pool";
|
||||
public static final String RUNE_ALTAR = LibResources.PREFIX_MOD + "runeAltar";
|
||||
public static final String UNSTABLE_BLOCK = LibResources.PREFIX_MOD + "unstableBlock";
|
||||
public static final String PYLON = LibResources.PREFIX_MOD + "pylon";
|
||||
|
||||
public static final String SPECIAL_FLOWER_PREFIX = FLOWER + ".";
|
||||
|
||||
|
||||
Reference in new issue
Block a user