Skip to content

Commit

Permalink
more polish up
Browse files Browse the repository at this point in the history
  • Loading branch information
Pilzinsel64 committed Apr 6, 2024
1 parent 0acc492 commit b870b30
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ public void preInit(FMLPreInitializationEvent event) {
}

// load "Do your mod setup. Build whatever data structures you care about. Register recipes." (Remove if not needed)
public void init(FMLInitializationEvent event) {
public void init(FMLInitializationEvent event) {}

// postInit "Handle interaction with other mods, complete your setup based on this." (Remove if not needed)
public void postInit(FMLPostInitializationEvent event) {
worldGenOres = new WorldGenOres(oreConfig);
worldGenOredAdditional = new WorldGenOresAdditional(oreConfig);
GameRegistry.registerWorldGenerator(worldGenOres, 0);
GameRegistry.registerWorldGenerator(worldGenOredAdditional, 0);
}

// postInit "Handle interaction with other mods, complete your setup based on this." (Remove if not needed)
public void postInit(FMLPostInitializationEvent event) {}

// register server commands in this event handler (Remove if not needed)
public void serverStarting(FMLServerStartingEvent event) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

public class OreConfigEntry {

public String name;
public boolean enabled;
public boolean isAdditional;

Expand All @@ -18,7 +19,7 @@ public class OreConfigEntry {
public String sourceModName = "minecraft";
public String sourceBlockName = "stone";

public int blocksPerVein;
public int intensity; // Vines per chunk (blocks per chunk for additional)
public int minVeinSize;
public int maxVeinSize;
public int minY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public void generate(Random random, int chunkX, int chunkZ, World world, IChunkP
veinSize,
entry.getSourceBlock());

for (int i = 0; i < entry.blocksPerVein; ++i) {
final int posX = chunkX + random.nextInt(16);
for (int i = 0; i < entry.intensity; ++i) {
final int posX = chunkX * 16 + random.nextInt(16);
final int posY = entry.minY + random.nextInt(entry.maxY - entry.minY);
final int posZ = chunkZ + random.nextInt(16);
final int posZ = chunkZ * 16 + random.nextInt(16);
minable.generate(world, random, posX, posY, posZ);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void generate(Random random, int chunkX, int chunkZ, World world, IChunkP
if (entry.enabled && entry.isAdditional && entry.allowInDimension(world.provider.dimensionId)) {
int y = entry.minY + random.nextInt(entry.maxY - entry.minY);

for (int l = 0; l < entry.blocksPerVein; ++l) {
for (int l = 0; l < entry.intensity; ++l) {
int i1 = x + random.nextInt(8) - random.nextInt(8);
int j1 = y + random.nextInt(4) - random.nextInt(4);
int k1 = z + random.nextInt(8) - random.nextInt(8);
Expand Down

0 comments on commit b870b30

Please sign in to comment.