Lost Earth seeks to add many of the blocks that have been neglected throughout development and some for just decoration (who doesn't like varity?.) It also adds additional generated structures (made from vanilla blocks [so that you can keep them even if you uninstall this mod.]) It also adds mithral ore as an additional fun end-game item you can hunt for and collect.
This Mod currently includes:
New Blocks:
Pungi Sticks - complete
Designed to prevent mobs from taking shelter under your wall's over-hangs. It will damage anything it touches and deals bonus damage when walked across.
Above ground
Under ground
Recipe:
Scaffold - partially complete (doesn't work as ladders yet)
Easy to mass-produce, easy to destroy, and climbable, makes this block great for building high up
Recipe:
Mithral Ore - complete
This ore is scattered through-out all block levels, rare and hard to find, it glows and smelts into mithral ingots.
Thatch - complete
Cheap roofing and flooring material, mobs shouldn't spawn on these.
Day
Night
Night with light shining through the block
Recipes:
Waddle N Dab - complete
Plastered version of thatch. Doesn't let light through.
Comparison with wool, snow, and clay(from left to right)
Recipe:
Shoji Screens - complete
Non-recoverable paper panes that let light through.
Day
Night
Night with light shining through the block
Recipe
Chandeliers - complete
Improved method of lighting large halls.
Close-up
Farther away
Recipe:
New Tools:
Tamper - partially complete (config file needs to be added so users can pick their own road blocks)
Tool that randomly changes grass in a 5x5x1 area into a road block(currently gravel.)
Mithral Ingot - partially complete (no use as of yet)
Smelts into tools and armor that use no durability.
New Structures: TBA
TODO List: TBA
Download: LostEarth.zip (This is a temporary download until I have more time to fix some bugs that are preventing me from releasing some new features.)
Installation:
1. Update your lwjgl to lwjgl-2.8.4
(http://www.minecraft...ls/Update_LWJGL)
2. Install minecraftforge-universal-6.0.1.349
(http://adf.ly/673885...l-6.0.1.349.zip)(or find it at the Minecraft Forge Repository)
3. Run then Close Minecraft
(this should make a mods folder in your .minecraft directory)
4. Put LostEarth into your mods folder
(.minecraft/mods should now have LostEarth.zip inside it)
Credits: Eriottosan - for help with panels in general TechGuy543 - for his tutorial about stairs
Special Thanks to: Subarakis - for his tutorial about custom rendered blocks DMillerW - for his help with the tamper tool
Before you tell me to look in the BlockLadder, BlockVine, EntityLiving, or EntityPlayer files, I have. From what I've been able to figure my block needs a bounding/collision box and to be labelled isLadder. I don't really want to edit the base files but will if there is no other option. I just don't know what to add or change to get it to work.
Here's my code:
package net.minecraft.src;
import java.util.List;
import java.util.Random;
public class BlockScaffold extends BlockContainer
{
public BlockScaffold (int i, int j, Class class1)
{
super (i, j, Material.wood);
this.setCreativeTab(CreativeTabs.tabBlock);
this.setRequiresSelfNotify();
}
public int getRenderType()
{
return mod_LostEarth.modelID2;
}
public boolean renderAsNormalBlock()
{
return false;
}
public boolean isOpaqueCube()
{
return false;
}
public TileEntity getBlockEntity()
{
return new TileEntityScaffold();
}
public TileEntity createNewTileEntity(World var1)
{
return new TileEntityScaffold();
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int j, int k, int m)
{
float var5 = 0.0625F;
return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double)((float)j + var5), (double)k, (double)((float)m + var5), (double)((float)(j + 1) - var5), (double)((float)(k + 1) - var5), (double)((float)(m + 1) - var5));
}
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int j, int k, int m)
{
float var5 = 0.0625F;
return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double)((float)j + var5), (double)k, (double)((float)m + var5), (double)((float)(j + 1) - var5), (double)(k + 1), (double)((float)(m + 1) - var5));
}
@Override
public boolean isLadder(World world, int x, int y, int z)
{
return true;
}
}
Is there a program or anything else that might help me track down what I missed? I've looked at all the tutorials I could find but they tend to stay far away from custom rendered blocks with multiple models. I intend to as well but I need to do this for two of my blocks (yes I intend to handle the second one by myself if I can get this one done.)
Best tutorial I've found after searching for nine hours. I'm having some problems though. My block is invisible (I've tried all the other fixes and have triple checked the coding, but I'm probally missing it somehow), but here's the funny thing. My block displays perfectly in the inventory screen (just not after being placed.)
Just finished. Here's the final code if anybody wants it. It's an item that replaces grass (and only grass) with gravel (20%) and dirt (80%) in a 5x5 square centered on where you click.
public class ItemTamper extends Item
{
Random rand = new Random();
protected ItemTamper (int i)
{
super (i);
this.maxStackSize = 1;
this.setMaxDamage(64);
this.setCreativeTab(CreativeTabs.tabTools);
}
@SideOnly(Side.CLIENT)
public boolean isFull3D()
{
return true;
}
@SideOnly(Side.CLIENT)
public boolean shouldRotateAroundWhenRendering()
{
return true;
}
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer) {
MovingObjectPosition block = getMovingObjectPositionFromPlayer(world, entityplayer, true);
int x = block.blockX;
int y = block.blockY;
int z = block.blockZ;
int blockID1 = world.getBlockId(x-2, y, z-2);
int blockID2 = world.getBlockId(x-2, y, z-1);
int blockID3 = world.getBlockId(x-2, y, z);
int blockID4 = world.getBlockId(x-2, y, z+1);
int blockID5 = world.getBlockId(x-2, y, z+2);
int blockID6 = world.getBlockId(x-1, y, z-2);
int blockID7 = world.getBlockId(x-1, y, z-1);
int blockID8 = world.getBlockId(x-1, y, z);
int blockID9 = world.getBlockId(x-1, y, z+1);
int blockID10 = world.getBlockId(x-1, y, z+2);
int blockID11 = world.getBlockId(x, y, z-2);
int blockID12 = world.getBlockId(x, y, z-1);
int blockID13 = world.getBlockId(x, y, z);
int blockID14 = world.getBlockId(x, y, z+1);
int blockID15 = world.getBlockId(x, y, z+2);
int blockID16 = world.getBlockId(x+1, y, z-2);
int blockID17 = world.getBlockId(x+1, y, z-1);
int blockID18 = world.getBlockId(x+1, y, z);
int blockID19 = world.getBlockId(x+1, y, z+1);
int blockID20 = world.getBlockId(x+1, y, z+2);
int blockID21 = world.getBlockId(x+2, y, z-2);
int blockID22 = world.getBlockId(x+2, y, z-1);
int blockID23 = world.getBlockId(x+2, y, z);
int blockID24 = world.getBlockId(x+2, y, z+1);
int blockID25 = world.getBlockId(x+2, y, z+2);
int q = rand.nextInt(4);
if (blockID1 == Block.grass.blockID)
{
if(q==0)
{
world.setBlock(x-2, y, z-2, Block.gravel.blockID);
}
else
{
world.setBlock(x-2, y, z-2, Block.dirt.blockID);
}
}
if (blockID2 == Block.grass.blockID)
{
if(q==2)
{
world.setBlock(x-2, y, z-1, Block.gravel.blockID);
}
else
{
world.setBlock(x-2, y, z-1, Block.dirt.blockID);
}
}
if (blockID3 == Block.grass.blockID)
{
if(q==1)
{
world.setBlock(x-2, y, z, Block.gravel.blockID);
}
else
{
world.setBlock(x-2, y, z, Block.dirt.blockID);
}
}
if (blockID4 == Block.grass.blockID)
{
if(q==4)
{
world.setBlock(x-2, y, z+1, Block.gravel.blockID);
}
else
{
world.setBlock(x-2, y, z+1, Block.dirt.blockID);
}
}
if (blockID5 == Block.grass.blockID)
{
if(q==3)
{
world.setBlock(x-2, y, z+2, Block.gravel.blockID);
}
else
{
world.setBlock(x-2, y, z+2, Block.dirt.blockID);
}
}
if (blockID6 == Block.grass.blockID)
{
if(q==3)
{
world.setBlock(x-1, y, z-2, Block.gravel.blockID);
}
else
{
world.setBlock(x-1, y, z-2, Block.dirt.blockID);
}
}
if (blockID7 == Block.grass.blockID)
{
if(q==2)
{
world.setBlock(x-1, y, z-1, Block.gravel.blockID);
}
else
{
world.setBlock(x-1, y, z-1, Block.dirt.blockID);
}
}
if (blockID8 == Block.grass.blockID)
{
if(q==1)
{
world.setBlock(x-1, y, z, Block.gravel.blockID);
}
else
{
world.setBlock(x-1, y, z, Block.dirt.blockID);
}
}
if (blockID9 == Block.grass.blockID)
{
if(q==3)
{
world.setBlock(x-1, y, z+1, Block.gravel.blockID);
}
else
{
world.setBlock(x-1, y, z+1, Block.dirt.blockID);
}
}
if (blockID10 == Block.grass.blockID)
{
if(q==4)
{
world.setBlock(x-1, y, z+2, Block.gravel.blockID);
}
else
{
world.setBlock(x-1, y, z+2, Block.dirt.blockID);
}
}
if (blockID11 == Block.grass.blockID)
{
if(q==1)
{
world.setBlock(x, y, z-2, Block.gravel.blockID);
}
else
{
world.setBlock(x, y, z-2, Block.dirt.blockID);
}
}
if (blockID12 == Block.grass.blockID)
{
if(q==0)
{
world.setBlock(x, y, z-1, Block.gravel.blockID);
}
else
{
world.setBlock(x, y, z-1, Block.dirt.blockID);
}
}
if (blockID13 == Block.grass.blockID)
{
if(q==0)
{
world.setBlock(x, y, z, Block.gravel.blockID);
}
else
{
world.setBlock(x, y, z, Block.dirt.blockID);
}
}
if (blockID14 == Block.grass.blockID)
{
if(q==2)
{
world.setBlock(x, y, z+1, Block.gravel.blockID);
}
else
{
world.setBlock(x, y, z+1, Block.dirt.blockID);
}
}
if (blockID15 == Block.grass.blockID)
{
if(q==0)
{
world.setBlock(x, y, z+2, Block.gravel.blockID);
}
else
{
world.setBlock(x, y, z+2, Block.dirt.blockID);
}
}
if (blockID16 == Block.grass.blockID)
{
if(q==3)
{
world.setBlock(x+1, y, z-2, Block.gravel.blockID);
}
else
{
world.setBlock(x+1, y, z-2, Block.dirt.blockID);
}
}
if (blockID17 == Block.grass.blockID)
{
if(q==4)
{
world.setBlock(x+1, y, z-1, Block.gravel.blockID);
}
else
{
world.setBlock(x+1, y, z-1, Block.dirt.blockID);
}
}
if (blockID18 == Block.grass.blockID)
{
if(q==4)
{
world.setBlock(x+1, y, z, Block.gravel.blockID);
}
else
{
world.setBlock(x+1, y, z, Block.dirt.blockID);
}
}
if (blockID19 == Block.grass.blockID)
{
if(q==1)
{
world.setBlock(x+1, y, z+1, Block.gravel.blockID);
}
else
{
world.setBlock(x+1, y, z+1, Block.dirt.blockID);
}
}
if (blockID20 == Block.grass.blockID)
{
if(q==0)
{
world.setBlock(x+1, y, z+2, Block.gravel.blockID);
}
else
{
world.setBlock(x+1, y, z+2, Block.dirt.blockID);
}
}
if (blockID21 == Block.grass.blockID)
{
if(q==1)
{
world.setBlock(x+2, y, z-2, Block.gravel.blockID);
}
else
{
world.setBlock(x+2, y, z-2, Block.dirt.blockID);
}
}
if (blockID22 == Block.grass.blockID)
{
if(q==3)
{
world.setBlock(x+2, y, z-1, Block.gravel.blockID);
}
else
{
world.setBlock(x+2, y, z-1, Block.dirt.blockID);
}
}
if (blockID23 == Block.grass.blockID)
{
if(q==2)
{
world.setBlock(x+2, y, z, Block.gravel.blockID);
}
else
{
world.setBlock(x+2, y, z, Block.dirt.blockID);
}
}
if (blockID24 == Block.grass.blockID)
{
if(q==2)
{
world.setBlock(x+2, y, z+1, Block.gravel.blockID);
}
else
{
world.setBlock(x+2, y, z+1, Block.dirt.blockID);
}
}
if (blockID25 == Block.grass.blockID)
{
if(q==4)
{
world.setBlock(x+2, y, z+2, Block.gravel.blockID);
}
else
{
world.setBlock(x+2, y, z+2, Block.dirt.blockID);
}
}
return itemstack;
}
}
Thanks! I think I got it from here. When I finish I'll put the complete code here, feel free to use it in your builders pack (It'll be a randomized path/road maker).
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
MovingObjectPosition block = this.getMovingObjectPositionFromPlayer(world, player, true);
if (!block == Block.grass) {
return true
}
world.setBlock(block.blockX, block.blockY, block.blockZ, Block.gravel.blockID);
}
Error about not being a boolean command and giving a boolean answer, also giving me an error with the "if(!block==Block.grass). If I replace "return true" with "return stack;" I'm only left with the error for "if(!block==Block.grass).
0
0
0
This Mod currently includes:
New Blocks:
Pungi Sticks - complete
Above ground
Day
Comparison with wool, snow, and clay(from left to right)
Day
Close-up
New Tools:
Tamper - partially complete (config file needs to be added so users can pick their own road blocks)
New Structures: TBA
TODO List: TBA
Download: LostEarth.zip (This is a temporary download until I have more time to fix some bugs that are preventing me from releasing some new features.)
Installation:
1. Update your lwjgl to lwjgl-2.8.4
(http://www.minecraft...ls/Update_LWJGL)
2. Install minecraftforge-universal-6.0.1.349
(http://adf.ly/673885...l-6.0.1.349.zip)(or find it at the Minecraft Forge Repository)
3. Run then Close Minecraft
(this should make a mods folder in your .minecraft directory)
4. Put LostEarth into your mods folder
(.minecraft/mods should now have LostEarth.zip inside it)
Follow us on GitHub @ https://github.com/Ryuugumo/Lost-Earth
Credits:
Eriottosan - for help with panels in general
TechGuy543 - for his tutorial about stairs
Special Thanks to:
Subarakis - for his tutorial about custom rendered blocks
DMillerW - for his help with the tamper tool
0
0
Here's my code:
0
0
0
If this helped, please help me http://www.minecraftforum.net/topic/1523423-tileentity-shows-in-inv-but-not-world/
0
0
0
-Edit- Solved thanks to http://www.minecraftforum.net/topic/1483366-132-subarakis-one-stop-custom-block-tutorial-make-it-with-techne/
0
Edit: Found the problem.
1
package net.minecraft.src;
import java.util.Random;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
public class ItemTamper extends Item
{
Random rand = new Random();
protected ItemTamper (int i)
{
super (i);
this.maxStackSize = 1;
this.setMaxDamage(64);
this.setCreativeTab(CreativeTabs.tabTools);
}
@SideOnly(Side.CLIENT)
public boolean isFull3D()
{
return true;
}
@SideOnly(Side.CLIENT)
public boolean shouldRotateAroundWhenRendering()
{
return true;
}
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer) {
MovingObjectPosition block = getMovingObjectPositionFromPlayer(world, entityplayer, true);
int x = block.blockX;
int y = block.blockY;
int z = block.blockZ;
int blockID1 = world.getBlockId(x-2, y, z-2);
int blockID2 = world.getBlockId(x-2, y, z-1);
int blockID3 = world.getBlockId(x-2, y, z);
int blockID4 = world.getBlockId(x-2, y, z+1);
int blockID5 = world.getBlockId(x-2, y, z+2);
int blockID6 = world.getBlockId(x-1, y, z-2);
int blockID7 = world.getBlockId(x-1, y, z-1);
int blockID8 = world.getBlockId(x-1, y, z);
int blockID9 = world.getBlockId(x-1, y, z+1);
int blockID10 = world.getBlockId(x-1, y, z+2);
int blockID11 = world.getBlockId(x, y, z-2);
int blockID12 = world.getBlockId(x, y, z-1);
int blockID13 = world.getBlockId(x, y, z);
int blockID14 = world.getBlockId(x, y, z+1);
int blockID15 = world.getBlockId(x, y, z+2);
int blockID16 = world.getBlockId(x+1, y, z-2);
int blockID17 = world.getBlockId(x+1, y, z-1);
int blockID18 = world.getBlockId(x+1, y, z);
int blockID19 = world.getBlockId(x+1, y, z+1);
int blockID20 = world.getBlockId(x+1, y, z+2);
int blockID21 = world.getBlockId(x+2, y, z-2);
int blockID22 = world.getBlockId(x+2, y, z-1);
int blockID23 = world.getBlockId(x+2, y, z);
int blockID24 = world.getBlockId(x+2, y, z+1);
int blockID25 = world.getBlockId(x+2, y, z+2);
int q = rand.nextInt(4);
if (blockID1 == Block.grass.blockID)
{
if(q==0)
{
world.setBlock(x-2, y, z-2, Block.gravel.blockID);
}
else
{
world.setBlock(x-2, y, z-2, Block.dirt.blockID);
}
}
if (blockID2 == Block.grass.blockID)
{
if(q==2)
{
world.setBlock(x-2, y, z-1, Block.gravel.blockID);
}
else
{
world.setBlock(x-2, y, z-1, Block.dirt.blockID);
}
}
if (blockID3 == Block.grass.blockID)
{
if(q==1)
{
world.setBlock(x-2, y, z, Block.gravel.blockID);
}
else
{
world.setBlock(x-2, y, z, Block.dirt.blockID);
}
}
if (blockID4 == Block.grass.blockID)
{
if(q==4)
{
world.setBlock(x-2, y, z+1, Block.gravel.blockID);
}
else
{
world.setBlock(x-2, y, z+1, Block.dirt.blockID);
}
}
if (blockID5 == Block.grass.blockID)
{
if(q==3)
{
world.setBlock(x-2, y, z+2, Block.gravel.blockID);
}
else
{
world.setBlock(x-2, y, z+2, Block.dirt.blockID);
}
}
if (blockID6 == Block.grass.blockID)
{
if(q==3)
{
world.setBlock(x-1, y, z-2, Block.gravel.blockID);
}
else
{
world.setBlock(x-1, y, z-2, Block.dirt.blockID);
}
}
if (blockID7 == Block.grass.blockID)
{
if(q==2)
{
world.setBlock(x-1, y, z-1, Block.gravel.blockID);
}
else
{
world.setBlock(x-1, y, z-1, Block.dirt.blockID);
}
}
if (blockID8 == Block.grass.blockID)
{
if(q==1)
{
world.setBlock(x-1, y, z, Block.gravel.blockID);
}
else
{
world.setBlock(x-1, y, z, Block.dirt.blockID);
}
}
if (blockID9 == Block.grass.blockID)
{
if(q==3)
{
world.setBlock(x-1, y, z+1, Block.gravel.blockID);
}
else
{
world.setBlock(x-1, y, z+1, Block.dirt.blockID);
}
}
if (blockID10 == Block.grass.blockID)
{
if(q==4)
{
world.setBlock(x-1, y, z+2, Block.gravel.blockID);
}
else
{
world.setBlock(x-1, y, z+2, Block.dirt.blockID);
}
}
if (blockID11 == Block.grass.blockID)
{
if(q==1)
{
world.setBlock(x, y, z-2, Block.gravel.blockID);
}
else
{
world.setBlock(x, y, z-2, Block.dirt.blockID);
}
}
if (blockID12 == Block.grass.blockID)
{
if(q==0)
{
world.setBlock(x, y, z-1, Block.gravel.blockID);
}
else
{
world.setBlock(x, y, z-1, Block.dirt.blockID);
}
}
if (blockID13 == Block.grass.blockID)
{
if(q==0)
{
world.setBlock(x, y, z, Block.gravel.blockID);
}
else
{
world.setBlock(x, y, z, Block.dirt.blockID);
}
}
if (blockID14 == Block.grass.blockID)
{
if(q==2)
{
world.setBlock(x, y, z+1, Block.gravel.blockID);
}
else
{
world.setBlock(x, y, z+1, Block.dirt.blockID);
}
}
if (blockID15 == Block.grass.blockID)
{
if(q==0)
{
world.setBlock(x, y, z+2, Block.gravel.blockID);
}
else
{
world.setBlock(x, y, z+2, Block.dirt.blockID);
}
}
if (blockID16 == Block.grass.blockID)
{
if(q==3)
{
world.setBlock(x+1, y, z-2, Block.gravel.blockID);
}
else
{
world.setBlock(x+1, y, z-2, Block.dirt.blockID);
}
}
if (blockID17 == Block.grass.blockID)
{
if(q==4)
{
world.setBlock(x+1, y, z-1, Block.gravel.blockID);
}
else
{
world.setBlock(x+1, y, z-1, Block.dirt.blockID);
}
}
if (blockID18 == Block.grass.blockID)
{
if(q==4)
{
world.setBlock(x+1, y, z, Block.gravel.blockID);
}
else
{
world.setBlock(x+1, y, z, Block.dirt.blockID);
}
}
if (blockID19 == Block.grass.blockID)
{
if(q==1)
{
world.setBlock(x+1, y, z+1, Block.gravel.blockID);
}
else
{
world.setBlock(x+1, y, z+1, Block.dirt.blockID);
}
}
if (blockID20 == Block.grass.blockID)
{
if(q==0)
{
world.setBlock(x+1, y, z+2, Block.gravel.blockID);
}
else
{
world.setBlock(x+1, y, z+2, Block.dirt.blockID);
}
}
if (blockID21 == Block.grass.blockID)
{
if(q==1)
{
world.setBlock(x+2, y, z-2, Block.gravel.blockID);
}
else
{
world.setBlock(x+2, y, z-2, Block.dirt.blockID);
}
}
if (blockID22 == Block.grass.blockID)
{
if(q==3)
{
world.setBlock(x+2, y, z-1, Block.gravel.blockID);
}
else
{
world.setBlock(x+2, y, z-1, Block.dirt.blockID);
}
}
if (blockID23 == Block.grass.blockID)
{
if(q==2)
{
world.setBlock(x+2, y, z, Block.gravel.blockID);
}
else
{
world.setBlock(x+2, y, z, Block.dirt.blockID);
}
}
if (blockID24 == Block.grass.blockID)
{
if(q==2)
{
world.setBlock(x+2, y, z+1, Block.gravel.blockID);
}
else
{
world.setBlock(x+2, y, z+1, Block.dirt.blockID);
}
}
if (blockID25 == Block.grass.blockID)
{
if(q==4)
{
world.setBlock(x+2, y, z+2, Block.gravel.blockID);
}
else
{
world.setBlock(x+2, y, z+2, Block.dirt.blockID);
}
}
return itemstack;
}
}
0
0
Error about not being a boolean command and giving a boolean answer, also giving me an error with the "if(!block==Block.grass). If I replace "return true" with "return stack;" I'm only left with the error for "if(!block==Block.grass).