Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gottsch committed Feb 1, 2020
1 parent 6ccd4b9 commit 6a9a51f
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ default public TemplateHolder selectTemplate(World world, Random random, ICoords

default public void buildOneTimeSpawners(World world, Random random, List<ICoords> proximityCoords, Quantity quantity, double d) {
for (ICoords c : proximityCoords) {
Treasure.logger.debug("placing proximity spawner at -> {}", c.toShortString());
world.setBlockState(c.toPos(), TreasureBlocks.PROXIMITY_SPAWNER.getDefaultState());
ProximitySpawnerTileEntity te = (ProximitySpawnerTileEntity) world.getTileEntity(c.toPos());
ResourceLocation r = DungeonHooks.getRandomDungeonMob(random);
Treasure.logger.debug("using mob -> {} for poximity spawner.", r.toString());
te.setMobName(r);
te.setMobNum(new Quantity(1, 2));
te.setProximity(5D);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ public GeneratorResult<TemplateGeneratorData> generate(World world, Random rando
List<ICoords> spawnerCoords = (List<ICoords>) genResult.getData().getMap().get(GenUtil.getMarkerBlock(StructureMarkers.SPAWNER));
List<ICoords> proximityCoords = (List<ICoords>) genResult.getData().getMap().get(GenUtil.getMarkerBlock(StructureMarkers.PROXIMITY_SPAWNER));

if (proximityCoords != null)
Treasure.logger.debug("Proximity spawners size -> {}", proximityCoords.size());
else
Treasure.logger.debug("No proximity spawners found.");

// populate vanilla spawners
buildVanillaSpawners(world, random, spawnerCoords);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package com.someguyssoftware.treasure2.particle;

import net.minecraft.client.particle.Particle;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
//import ovh.corail.tombstone.ConfigTombstone;
//import ovh.corail.tombstone.helper.Helper;
//import ovh.corail.tombstone.particle.TombstoneParticleSprites;

@SideOnly(Side.CLIENT)
public class FogParticle extends Particle {
protected float alpha = 0.08F;

public FogParticle(World world, double x, double y, double z, double mX, double mY, double mZ) {
super(world, x, y, z, mX, mY, mZ);
// TombstoneParticleSprites.SpriteTypes.FAKE_FOG.setTexture(this);
// this.motionX = mX;
// this.motionY = mY;
// this.motionZ = mZ;
// this.field_82339_as = 0.0F;
// func_70541_f(3.0F);
// func_187114_a(80);
// this.field_190017_n = false;
// if (ConfigTombstone.client.enableHalloweenEffect && Helper.isDateAroundHalloween(world))
// func_70538_b(1.0F, 1.0F, 1.0F);
}

public void onUpdate() {
// super.onUpdate();
// int halfMaxAge = this.field_70547_e / 2;
// if (this.field_70546_d >= halfMaxAge) {
// float ratio = (this.field_70546_d - halfMaxAge) / halfMaxAge;
// func_82338_g((1.0F - ratio) * this.alpha);
// } else {
// float ratio = this.field_70546_d / halfMaxAge;
// func_82338_g(ratio * this.alpha);
// }
}

public boolean func_187111_c() {
return true;
}

public int func_70537_b() {
return 1;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public GeneratorResult<TemplateGeneratorData> generate(World world, Random rando
}
else {
decayProcessor.setDecayStartY(Math.abs(offset));
// TODO add the offset position to the decay processor (decay doesn't start to happen until the y = offset is met)
template.addBlocksToWorld(world, spawnCoords.toPos(), decayProcessor, placement, getNullBlock(), Treasure.TEMPLATE_MANAGER.getReplacementMap(), 3);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
},
"result": {
"item": "treasure3:gravestone2_polished_diorite",
"item": "treasure2:gravestone3_polished_diorite",
"count": 1
}
}
4 changes: 2 additions & 2 deletions Treasure2-1.12.2/update.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"1.6.2": "Removed GUI config that was inadvertently added last update.",
"1.6.3": "Removed debugging code that was causing underwater structures to generate too frequently.",
"1.7.0": "Refactored config files into one GUI config.\nAdded Desert Wishing Well block.\nFixed Rarity enum value mappings.\nPersisted ChestRegistry.\nFixed Well generation on podzol/mycelium generating mushroom block instead of mushrooms.\nReconfigured folder locations where logging and resource files go (moved out of /mods folder.)\nUsing GottschCore v1.9.0.\n*Fixed chests not generating in some pits.\n*Fixed world properties not clearing between game world loads.\nFixed loading of ChestRegistry.\n",
"1.8.0": "Added Decay System.\nAdded 8 surface structures.\nAdded SpawnRuins command.\nFixed/enable other spawn commands.\nAdded Spanish translation.\nAdded Russian translation.\nFixed the number of uses a Key has.\nRemoved Lombok library.\nFixed solid base check for Surface/Submerged ruins.\nFixed Wither Tree crash bug.\n",
"1.9.0": "Added Spider Chest.\nAdded recipes for all grave/tombstones.\nFixed config white/black lists on change.\nAll logging config options require mc restart.\nAdded config whitelist for dimensions.\nAdded ability to pass template holder into IRuinGenerators.\nUpdated all SpawnCommands to work from Command blocks.\n"
"1.8.0": "Added Decay System.\nAdded 8 surface structures.\nAdded SpawnRuins command.\nFixed/enable other spawn commands.\nAdded Spanish translation.\nAdded Russian translation.\nFixed the number of uses a Key has.\nRemoved Lombok library.\nFixed solid base check for Surface/Submerged ruins.\nFixed Wither Tree crash bug.\nUsing GottschCore v1.10.0.\n",
"1.9.0": "Added Spider Chest.\nAdded recipes for all grave/tombstones.\nFixed config white/black lists on change.\nAll logging config options require mc restart.\nAdded config whitelist for dimensions.\nAdded ability to pass template holder into IRuinGenerators.\nUpdated all SpawnCommands to work from Command blocks.\nAdding fill blocks for under structures so there isn't any overhang when on cliffs etc.\n'Using GottschCore v1.11.0.\nAdded 2 surface structures.\nFixed *huge* bug with decay processor not picking the correct rule.\n"
}
}

0 comments on commit 6a9a51f

Please sign in to comment.