• 0

make a new generator, for example this code, the WorldGenMinable basically has an if material at pint xyz is rock, if so set it to the mineral, you can change this to if it's grass and go from 128 and down.

Copy this into a new java file called WorldGenSurfacePatch.java:
```package net.minecraft.src;

import java.util.Random;

public class WorldGenSurfacePatch extends WorldGenerator
{

public WorldGenSurfacePatch(int i, int j)
{
minableBlockId = i;
numberOfBlocks = j;
groundTypeId = Block.grass.blockID;
}

public WorldGenSurfacePatch(Block i, int j)
{
minableBlockId = i.blockID;
numberOfBlocks = j;
groundTypeId = Block.grass.blockID;
}
public WorldGenSurfacePatch(int l,int i, int j)
{
minableBlockId = i;
numberOfBlocks = j;
groundTypeId = l;
}

public WorldGenSurfacePatch(Block l, Block i, int j)
{
minableBlockId = i.blockID;
numberOfBlocks = j;
groundTypeId = l.blockID;
}

public boolean generate(World world, Random random, int i, int j, int k)
{
float f = random.nextFloat() * 3.141593F;
double d = (float)(i + 8) + (MathHelper.sin(f) * (float)numberOfBlocks) / 8F;
double d1 = (float)(i + 8) - (MathHelper.sin(f) * (float)numberOfBlocks) / 8F;
double d2 = (float)(k + 8) + (MathHelper.cos(f) * (float)numberOfBlocks) / 8F;
double d3 = (float)(k + 8) - (MathHelper.cos(f) * (float)numberOfBlocks) / 8F;
double d4 = j + random.nextInt(3) + 2;
double d5 = j + random.nextInt(3) + 2;
for(int l = 0; l <= numberOfBlocks; l++)
{
double d6 = d + ((d1 - d) * (double)l) / (double)numberOfBlocks;
double d7 = d4 + ((d5 - d4) * (double)l) / (double)numberOfBlocks;
double d8 = d2 + ((d3 - d2) * (double)l) / (double)numberOfBlocks;
double d9 = (random.nextDouble() * (double)numberOfBlocks) / 16D;
double d10 = (double)(MathHelper.sin(((float)l * 3.141593F) / (float)numberOfBlocks) + 1.0F) * d9 + 1.0D;
double d11 = (double)(MathHelper.sin(((float)l * 3.141593F) / (float)numberOfBlocks) + 1.0F) * d9 + 1.0D;
int i1 = MathHelper.floor_double(d6 - d10 / 2D);
int j1 = MathHelper.floor_double(d7 - d11 / 2D);
int k1 = MathHelper.floor_double(d8 - d10 / 2D);
int l1 = MathHelper.floor_double(d6 + d10 / 2D);
int i2 = MathHelper.floor_double(d7 + d11 / 2D);
int j2 = MathHelper.floor_double(d8 + d10 / 2D);
for(int k2 = i1; k2 <= l1; k2++)
{
double d12 = (((double)k2 + 0.5D) - d6) / (d10 / 2D);
if(d12 * d12 >= 1.0D)
{
continue;
}
for(int l2 = j1; l2 <= i2; l2++)
{
double d13 = (((double)l2 + 0.5D) - d7) / (d11 / 2D);
if(d12 * d12 + d13 * d13 >= 1.0D)
{
continue;
}
for(int i3 = k1; i3 <= j2; i3++)
{
double d14 = (((double)i3 + 0.5D) - d8) / (d10 / 2D);
if(d12 * d12 + d13 * d13 + d14 * d14 < 1.0D && world.getBlockId(k2, l2, i3) == groundTypeId && world.findTopSolidBlock(k2, i3) == l2-1)
{
world.setBlock(k2, l2, i3, minableBlockId);
}
}

}

}

}

return true;
}

private int minableBlockId;
private int numberOfBlocks;
private int groundTypeId;
}```

To use it Go add this line to your GenerateSurface() or GenerateNether()

```for(int i3 = 0; i3 < 20; i3++)
{
int j6 = k + rand.nextInt(16);
int k9 = rand.nextInt(128);
int j12 = l + rand.nextInt(16);
(new WorldGenSurfacePatch(Block.grass.blockID, your_mod.your_block.blockID, max_vein_size)).generate(worldObj, rand, j6, k9, j12);
}```

and depending what you call the variables, you may change k and l to chunkX and chunkZ

`new WorldGenSurfacePatch(Block.grass.blockID, your_mod.your_block.blockID, max_vein_size)`

The first argument is what type of block the surface is, it can be grass, sand, gravel, clay, etc, depends what environment you want it to be in, it should only spawn on the top block.
Posted in: Tutorials
• 0

um, strange, I looked at the code for several other modloader mods and they did not have that, plus why would it ONLY be giving an error for the last one and not the ones before it? It obviously did not cause a problem on the previous two blocks.

Also I thought that might have been it and so I put all the setNames and it still gave me same exact error.
Posted in: Tutorials
• 0

well it's not really epic, I only have one main block but I plan on adding a lot to it. I plan on making 50 blocks each coming with tools armor etc. each with their own special purpose, which I already have all 50 planned.
Posted in: Tutorials
• 0

Quote from harrynoob

I know and I said I fixed that. I'll PM you the code so that people don't "steal" it.
Posted in: Tutorials
• 0

Quote from charsmud

Did you try updating Mcp? Also, did you try redownloading mcp? Could I see the full error and teh full code?

I'm not getting an error from MCP, and it is the most recent update. The error is in ModLoader.txt. What I'm confused about is why it says success and then crashes because of that error.

I'll post code later, I'm short on time.
Posted in: Tutorials
• 0

Either that of declare your block as a

`new BlockFlower(145, ModLoader.addOverride("/terrain.png", "/MoreFlowersMod/BlueFlower.png"))`

and then on a different line set all the other parts, new BlockFlower would return a BlockFlower object then setting the rest would return a block, but as seeing you're not assigning that to a variable it would act like just a void. A simpler solution would be to cast the block to type BlockFlower:

`blue =(BlockFlower)new BlockFlower(145, ModLoader.addOverride("/terrain.png", "/MoreFlowersMod/BlueFlower.png")).setHardness(0.0F).setStepSound(Block.soundGrassFootstep).setBlockName("blue");`

I am getting a problem, I compile my code and I get an MPC error saying that the package wljgl.opengl does not exist, I fixed this by just putting a copy of the wljgl.jar into the jar folder of mcp and it compiles. When I run the startclient it says the mod loaded correctly, however the game crashes and then says

`ModLoader: blockCyplice missing nametag`

Can anyone tell me what this means? this happened on the ModLoader.AddName(Block, String).

The thing is I have 1 other block that gets a name added before the one that throws an error, and there is no difference in the two object except one has a light value and one does not, otherwise same class, same declaration, same everything yet that's the only one that throws an error.
Posted in: Tutorials
• 0

posted a message on [CTM][Collection] Vechs' SUPER HOSTILE Series
Quote from Xtremekiwi

So after 2 more hours I finally, FINALLY, F*****G FINALLY found and retrieved the orange wool! The way I found where it is was luck: While digging out into the actual mine in a rare moment of no monsters I saw a small passage. I walled myself in (Take note of these words) and went in. As soon as I saw monsters spawning I realised there must be something here because everywhere else monsters spawned via the darkness. So after some more digging, I found a side passageway that contained some glass near the wall. I got to it (killing a few zombies along the way) and saw a chest with my well-deserved reward: The orange wool! But getting out was a problem because, like I said, I walled myself in and by then a few monsters had spawned. Note that I haven't seen any humans in the mones, so I probably missed a few chests. If anyone can tell me if I missed some chests that would be great. Anyway, after digging into the iron vein I walled myself into I found the tunnel I got to that point via. One run through the tunnel and a spider later I was finally out of there. One night of sleep and I was at the VM, placing the well-deserved orange wool. Okay, which dungeon should I take on next...

The brown wool is in the Vault of Relics which is behind the pig statue in the cathedral of the Suidae.

right before checking this we actually found it, but thank you, we already have the wool...
Posted in: Maps
• 0

posted a message on [CTM][Collection] Vechs' SUPER HOSTILE Series
Quote from Vechs

Sea of Flame II uses the numbered dungeon system.

The numbers correspond to the place on the VM, so, for example, Dungeon 15 has red wool, Dungeon 16 has black wool.

Dungeon 13 contains the brown wool.

I know this, we can not find Dungeon 13, I had an idea that it might be a sub dungeon of dungeon 12 just as #2 was inside #1, but I can't remember where we found the Blue wool either. And we have spent days searching over all the areas again, we found 1-11 and 14-16, but no 12 or 13. We have already been to 12 before, just can't find it again.

ps, I actually got the red wool second. I found the victory monument like within 10 minutes
Posted in: Maps
• 0

posted a message on [CTM][Collection] Vechs' SUPER HOSTILE Series
I'm doing sea of flame in SMP, we have every wool except for Brown, which we can not find. we have spent 5-6 days constantly going through every area, even going carefully through every dungeon we have completed so far. We just can not find it.we even cleared a 50X50 area in the lava out to see if it was hidden like that...
Posted in: Maps
• 0

posted a message on Compact Five Second Delay???
12 repeaters set to 4 ticks and 1 set to 2 ticks
Posted in: Redstone Discussion and Mechanisms
• 0

posted a message on Instant T Flip-Flop
also, sorry to say, it's 1 tick, not 0, of course 1 tick is too fast to be able to tell, but torches take about 1 tick to turn off once they get power and one to turn on once they stop getting power, that's why if you put a 1 or less tick pulse into an and generator it will not turn the output on at all.

Pistons are 0 tick delay, however the power source is not 0 ticks.

But jms_gears1 did make one even smaller, with same amount of delay.

Also your method is affected by the North-South Quirk, so may need to check that out.
Posted in: Redstone Discussion and Mechanisms
• 0

posted a message on How do I make Levers act as Buttons using pistons?

did you read the op? he wants it using pistons.

@Reedim yes, that's the most common way, in fct it can be even more compact (from 3*3 to 3*2):

set the repeater(diode) to how long you want the length of the pulse to be.
Posted in: Redstone Discussion and Mechanisms
• 0

posted a message on Randomizer
A method that is extremely random is to make a non symmetric mine-cart track with a lot of detector rails and two way corners, have these rails attaches to rs nor latches, as the cart goes around the track it will randomly turn off and on the output from the latch. underneath the track put each corner on it's own clock to switch it's direction, making it a lot more random.

Hint, do not put any detector rails near a corner, or it will lose a lot of randomness because the clock below will be overridden.

to get the output only when a button is pressed take the output and attach it to an and gate, and attach the button to that as well, then the button is pressed if the input if on the output will be on, then just make a system to turn an rs nor latch to the correct state. it's elaborate, but it ends up being almost 90% random. the larger and more windy the track makes it more random.
Posted in: Redstone Discussion and Mechanisms
• 0

posted a message on Piston Toggle Button
Quote from xtenext

dangit. i had no idea what a t flip-flop even was.
Well,

the more you know i guess.

I did a forum search, but for "toggle button" :tongue.gif:

I guess while this thread is here, what is the smallest t flip-flop that works in SMP? because the one in the post above me doesn't as far as i can tell.

The one I posted does work, the repeater has to be 3 ticks, or it will not work. the output is a wire or repeater right next to the hole where the torch is, when the block is moved over it the output goes on, when it is uncovered the wire will be off.
Posted in: Redstone Discussion and Mechanisms
• 0

posted a message on Piston Toggle Button
here is another way? maybe look into this, much smaller.

because the piston is only powered from one tick the block gets pushed but stays there because the piston pulled back too fast. when the piston comes back again it will pull the block back and this keeps repeating.
Posted in: Redstone Discussion and Mechanisms