mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
pr preparation
This commit is contained in:
parent
42efc46a9f
commit
ea6f1ffff0
@ -11,7 +11,6 @@ import com.hbm.items.special.ItemBookLore.BookLoreType;
|
||||
import com.hbm.items.special.ItemKitCustom;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.world.feature.OilSpot;
|
||||
import com.hbm.world.worldgen.MapGenBunker;
|
||||
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@ -44,11 +43,11 @@ public class ItemWandD extends Item {
|
||||
player.inventoryContainer.detectAndSendChanges();*/
|
||||
|
||||
//use sparingly
|
||||
int k = ((pos.blockX >> 4) << 4) + 8;
|
||||
/*int k = ((pos.blockX >> 4) << 4) + 8;
|
||||
int l = ((pos.blockZ >> 4) << 4) + 8;
|
||||
|
||||
MapGenBunker.Start start = new MapGenBunker.Start(world, world.rand, pos.blockX >> 4, pos.blockZ >> 4);
|
||||
start.generateStructure(world, world.rand, new StructureBoundingBox(k - 124, l - 124, k + 15 + 124, l + 15 + 124));
|
||||
start.generateStructure(world, world.rand, new StructureBoundingBox(k - 124, l - 124, k + 15 + 124, l + 15 + 124));*/
|
||||
//MapGenStronghold.Start startS = new MapGenStronghold.Start(world, world.rand, pos.blockX >> 4, pos.blockZ >> 4);
|
||||
//startS.generateStructure(world, world.rand, new StructureBoundingBox(k - 124, l - 124, k + 15 + 124, l + 15 + 124));
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.lib;
|
||||
|
||||
import com.hbm.world.worldgen.MapGenNTMFeatures;
|
||||
import com.hbm.world.worldgen.NTMWorldGenerator;
|
||||
import com.hbm.world.worldgen.components.BunkerComponents;
|
||||
import com.hbm.world.worldgen.components.CivilianFeatures;
|
||||
import com.hbm.world.worldgen.components.OfficeFeatures;
|
||||
import com.hbm.world.worldgen.components.RuinFeatures;
|
||||
@ -38,6 +37,5 @@ public class HbmWorld {
|
||||
CivilianFeatures.registerComponents();
|
||||
OfficeFeatures.registerComponents();
|
||||
RuinFeatures.registerComponents();
|
||||
BunkerComponents.registerComponents();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,74 +0,0 @@
|
||||
package com.hbm.world.worldgen;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.world.worldgen.components.BunkerComponents;
|
||||
import com.hbm.world.worldgen.components.BunkerComponents.Atrium;
|
||||
import com.hbm.world.worldgen.components.ProceduralComponents.ProceduralComponent;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.structure.MapGenStructure;
|
||||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
import net.minecraft.world.gen.structure.StructureComponent;
|
||||
import net.minecraft.world.gen.structure.StructureStart;
|
||||
|
||||
public class MapGenBunker extends MapGenStructure {
|
||||
|
||||
/** String ID for this MapGen */
|
||||
@Override
|
||||
public String func_143025_a() {
|
||||
return "NTMBunker";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canSpawnStructureAtCoords(int chunkX, int chunkZ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected StructureStart getStructureStart(int chunkX, int chunkZ) {
|
||||
return new Start(this.worldObj, this.rand, chunkX, chunkZ);
|
||||
}
|
||||
|
||||
public static class Start extends StructureStart {
|
||||
|
||||
public Start() { }
|
||||
|
||||
public Start(World world, Random rand, int chunkX, int chunkZ) {
|
||||
super(chunkX, chunkZ);
|
||||
|
||||
BunkerComponents bunker = new BunkerComponents(); //oop is confusing sometimes
|
||||
bunker.prepareComponents();
|
||||
|
||||
Atrium atrium = new Atrium(0, rand, (chunkX << 4) + 8, (chunkZ << 4) + 8);
|
||||
this.components.add(atrium);
|
||||
atrium.buildComponent(bunker, atrium, components, rand);
|
||||
atrium.underwater = false;//rand.nextInt(2) == 0;
|
||||
|
||||
List list = atrium.queuedComponents;
|
||||
while(!list.isEmpty()) {
|
||||
int k = rand.nextInt(list.size());
|
||||
ProceduralComponent component = (ProceduralComponent)list.remove(k);
|
||||
atrium.lastComponent = component;
|
||||
component.buildComponent(bunker, atrium, this.components, rand);
|
||||
}
|
||||
|
||||
if(GeneralConfig.enableDebugMode) {
|
||||
System.out.print("[Debug] StructureStart at " + (chunkX * 16 + 8) + ", idfk lmao, " + (chunkZ * 16 + 8) + "\n[Debug] Components: ");
|
||||
this.components.forEach((component) -> {
|
||||
System.out.print(MapGenStructureIO.func_143036_a((StructureComponent) component) + " ");
|
||||
});
|
||||
|
||||
System.out.print("\n");
|
||||
}
|
||||
|
||||
this.updateBoundingBox();
|
||||
this.markAvailableHeight(world, rand, 10);
|
||||
|
||||
System.out.print(this.boundingBox.minY);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user