Skip to content

Instantly share code, notes, and snippets.

@killerjdog51
Created January 25, 2016 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save killerjdog51/958edb50db8ac291dc94 to your computer and use it in GitHub Desktop.
Save killerjdog51/958edb50db8ac291dc94 to your computer and use it in GitHub Desktop.
package com.chocolatemod.worldgen;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import net.minecraft.util.MathHelper;
public class MapGenChocolateMineshaft extends MapGenChocolateStructure
{
private double field_82673_e = 0.004D;
private static final String __OBFID = "CL_00000443";
public MapGenChocolateMineshaft() {}
public String func_143025_a()
{
return "Chocolate Mineshaft";
}
public MapGenChocolateMineshaft(Map p_i2034_1_)
{
Iterator iterator = p_i2034_1_.entrySet().iterator();
while (iterator.hasNext())
{
Entry entry = (Entry)iterator.next();
if (((String)entry.getKey()).equals("chance"))
{
this.field_82673_e = MathHelper.parseDoubleWithDefault((String)entry.getValue(), this.field_82673_e);
}
}
}
protected boolean canSpawnStructureAtCoords(int p_75047_1_, int p_75047_2_)
{
return this.rand.nextDouble() < this.field_82673_e && this.rand.nextInt(80) < Math.max(Math.abs(p_75047_1_), Math.abs(p_75047_2_));
}
protected ChocolateStructureStart getStructureStart(int p_75049_1_, int p_75049_2_)
{
return new StructureChocolateMineshaftStart(this.worldObj, this.rand, p_75049_1_, p_75049_2_);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment