Skip to content

Commit

Permalink
Fix Smeltery
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander committed Feb 16, 2014
1 parent 5d4e38c commit 9afbf80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 26 deletions.
33 changes: 8 additions & 25 deletions src/main/java/tconstruct/worldgen/village/ComponentSmeltery.java
Expand Up @@ -9,27 +9,27 @@
import net.minecraft.world.gen.structure.StructureBoundingBox;
import net.minecraft.world.gen.structure.StructureComponent;
import net.minecraft.world.gen.structure.StructureVillagePieces;
import tconstruct.TConstruct;
import net.minecraft.world.gen.structure.StructureVillagePieces.Start;
import tconstruct.common.TRepo;

public class ComponentSmeltery extends StructureVillagePieces.Village
public class ComponentSmeltery extends StructureVillagePieces.House1
{
private int averageGroundLevel = -1;

public ComponentSmeltery()
{
}

public ComponentSmeltery(StructureVillagePieces.Start par1ComponentVillageStartPiece, int par2, Random par3Random, StructureBoundingBox par4StructureBoundingBox, int par5)
public ComponentSmeltery(Start villagePiece, int par2, Random par3Random, StructureBoundingBox par4StructureBoundingBox, int par5)
{
super(par1ComponentVillageStartPiece, par2);
super();
this.coordBaseMode = par5;
this.boundingBox = par4StructureBoundingBox;
}

public static ComponentSmeltery func_74898_a (StructureVillagePieces.Start villagePiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5)
public static ComponentSmeltery buildComponent (Start villagePiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5)
{
StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, 9, 3, 7, p4);
StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, 7, 6, 7, p4);
return canVillageGoDeeper(structureboundingbox) && StructureComponent.findIntersecting(pieces, structureboundingbox) == null ? new ComponentSmeltery(villagePiece, p5, random,
structureboundingbox, p4) : null;
}
Expand Down Expand Up @@ -88,27 +88,10 @@ public boolean addComponentParts (World world, Random random, StructureBoundingB
this.func_151554_b(world, Blocks.stonebrick, 0, i1, -1, l, sbb);
}
}
return true;
}

int remapDirection (int direction)
{
TConstruct.logger.info("Direction: " + direction);
switch (direction)
{
case 0:
return 2;
case 1:
return 3;
case 2:
return 1;
case 3:
return 0;
}
TConstruct.logger.error("This shouldn't happen (remapDirection in tconstruct.worldgen.village.ComponentSmeltery)");
return -1;
return true;
}

protected void fillWithMetaBlocks (World par1World, StructureBoundingBox par2StructureBoundingBox, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, Block placeBlockID,
int placeBlockMeta, Block replaceBlockID, int replaceBlockMeta, boolean alwaysReplace)
{
Expand Down
Expand Up @@ -24,7 +24,7 @@ public Class<?> getComponentClass ()
@Override
public Object buildComponent (PieceWeight villagePiece, Start startPiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5)
{
return ComponentSmeltery.func_74898_a(startPiece, pieces, random, p1, p2, p3, p4, p5);
return ComponentSmeltery.buildComponent(startPiece, pieces, random, p1, p2, p3, p4, p5);
}

}

0 comments on commit 9afbf80

Please sign in to comment.