From 6a9a51f3b77fef277d53b6e42b77edc08a272e90 Mon Sep 17 00:00:00 2001 From: gottsch <17928819+gottsch@users.noreply.github.com> Date: Fri, 31 Jan 2020 21:07:09 -0500 Subject: [PATCH] some fixes --- .../generator/ruins/IRuinGenerator.java | 2 + .../generator/ruins/SurfaceRuinGenerator.java | 5 ++ .../treasure2/particle/FogParticle.java | 49 +++++++++++++++++++ .../gen/structure/TemplateGenerator.java | 1 - .../recipes/gravestone3_polished_diorite.json | 2 +- Treasure2-1.12.2/update.json | 4 +- 6 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 Treasure2-1.12.2/src/com/someguyssoftware/treasure2/particle/FogParticle.java diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/IRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/IRuinGenerator.java index cfdf62597..d6300e30b 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/IRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/IRuinGenerator.java @@ -50,9 +50,11 @@ default public TemplateHolder selectTemplate(World world, Random random, ICoords default public void buildOneTimeSpawners(World world, Random random, List 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); diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java index c92875f64..7346cae5a 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/generator/ruins/SurfaceRuinGenerator.java @@ -177,6 +177,11 @@ public GeneratorResult generate(World world, Random rando List spawnerCoords = (List) genResult.getData().getMap().get(GenUtil.getMarkerBlock(StructureMarkers.SPAWNER)); List proximityCoords = (List) 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); diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/particle/FogParticle.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/particle/FogParticle.java new file mode 100644 index 000000000..b1c1e122c --- /dev/null +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/particle/FogParticle.java @@ -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; + } +} + diff --git a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java index 327c35fb2..2a3f54491 100644 --- a/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java +++ b/Treasure2-1.12.2/src/com/someguyssoftware/treasure2/world/gen/structure/TemplateGenerator.java @@ -105,7 +105,6 @@ public GeneratorResult 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); } diff --git a/Treasure2-1.12.2/src/resources/assets/treasure2/recipes/gravestone3_polished_diorite.json b/Treasure2-1.12.2/src/resources/assets/treasure2/recipes/gravestone3_polished_diorite.json index 6facf9ffc..1c1f4bda6 100644 --- a/Treasure2-1.12.2/src/resources/assets/treasure2/recipes/gravestone3_polished_diorite.json +++ b/Treasure2-1.12.2/src/resources/assets/treasure2/recipes/gravestone3_polished_diorite.json @@ -16,7 +16,7 @@ } }, "result": { - "item": "treasure3:gravestone2_polished_diorite", + "item": "treasure2:gravestone3_polished_diorite", "count": 1 } } \ No newline at end of file diff --git a/Treasure2-1.12.2/update.json b/Treasure2-1.12.2/update.json index 0248c500f..6b9c4852a 100644 --- a/Treasure2-1.12.2/update.json +++ b/Treasure2-1.12.2/update.json @@ -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" } }