Initial commit (Forge 1291).
This commit is contained in:
@ -0,0 +1,21 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java
|
||||
@@ -92,7 +92,17 @@
|
||||
double d1 = (1.25D * (double)l + random.nextDouble()) * this.field_82671_h * (double)l;
|
||||
int j1 = (int)Math.round(Math.cos(d0) * d1);
|
||||
int k1 = (int)Math.round(Math.sin(d0) * d1);
|
||||
- ChunkPosition chunkposition = this.worldObj.getWorldChunkManager().findBiomePosition((j1 << 4) + 8, (k1 << 4) + 8, 112, this.field_151546_e, random);
|
||||
+ // Cauldron start - catch invalid positions
|
||||
+ ChunkPosition chunkposition = null;
|
||||
+ try
|
||||
+ {
|
||||
+ chunkposition = this.worldObj.getWorldChunkManager().findBiomePosition((j1 << 4) + 8, (k1 << 4) + 8, 112, this.field_151546_e, random);
|
||||
+ }
|
||||
+ catch (ArrayIndexOutOfBoundsException e)
|
||||
+ {
|
||||
+ // ignore
|
||||
+ }
|
||||
+ // Cauldron end
|
||||
|
||||
if (chunkposition != null)
|
||||
{
|
@ -0,0 +1,21 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java
|
||||
@@ -239,8 +239,17 @@
|
||||
{
|
||||
if (this.field_143029_e == null)
|
||||
{
|
||||
- this.field_143029_e = (MapGenStructureData)p_143027_1_.perWorldStorage.loadData(MapGenStructureData.class, this.func_143025_a());
|
||||
+ // Spigot Start
|
||||
+ if (p_143027_1_.getSpigotConfig().saveStructureInfo && !this.func_143025_a().equals("Mineshaft")) // Cauldron
|
||||
+ {
|
||||
+ this.field_143029_e = (MapGenStructureData) p_143027_1_.loadItemData(MapGenStructureData.class, this.func_143025_a());
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ this.field_143029_e = new MapGenStructureData(this.func_143025_a());
|
||||
+ }
|
||||
|
||||
+ // Spigot End
|
||||
if (this.field_143029_e == null)
|
||||
{
|
||||
this.field_143029_e = new MapGenStructureData(this.func_143025_a());
|
@ -0,0 +1,12 @@
|
||||
--- ../src-base/minecraft/net/minecraft/world/gen/structure/StructureStart.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/structure/StructureStart.java
|
||||
@@ -41,7 +41,8 @@
|
||||
{
|
||||
StructureComponent structurecomponent = (StructureComponent)iterator.next();
|
||||
|
||||
- if (structurecomponent.getBoundingBox().intersectsWith(p_75068_3_) && !structurecomponent.addComponentParts(p_75068_1_, p_75068_2_, p_75068_3_))
|
||||
+ // Cauldron - validate structurecomponent
|
||||
+ if ((structurecomponent == null || structurecomponent.getBoundingBox() == null) || (structurecomponent.getBoundingBox().intersectsWith(p_75068_3_) && !structurecomponent.addComponentParts(p_75068_1_, p_75068_2_, p_75068_3_)))
|
||||
{
|
||||
iterator.remove();
|
||||
}
|
Reference in New Issue
Block a user