Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/generated/resources/assets/anvilcraft/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
"advancements.anvilcraft.mining_void.title": "pᴉoʌ ᵷuᴉuᴉW",
"advancements.anvilcraft.networking.description": "ǝꞁod uoᴉssᴉɯsuɐɹʇ ǝɔɐꞁd puɐ ʇɟɐɹƆ",
"advancements.anvilcraft.networking.title": "ᵷuᴉʞɹoʍʇǝN",
"advancements.anvilcraft.new_cycle.description": "ꞁᴉʌuⱯ ᵷuᴉᵷɹoℲ ꞁɐᴉʇsǝꞁǝƆ ǝɥʇ ɯoɹɟ ɹɐǝddɐsᴉp uoᴉʇɐzᴉꞁᴉʌᴉɔ ɐ ssǝuʇᴉM",
"advancements.anvilcraft.new_cycle.title": "ǝꞁɔʎƆ ʍǝN Ɐ",
"advancements.anvilcraft.new_matter.description": "ɹǝʇʇɐɯ ǝʌᴉʇɐᵷǝu ɹo ɹǝʇʇɐɯ ǝsɐɥdᴉʇꞁnɯ 'ɯnᴉuɐɹn ʇɟɐɹɔ oʇ uoᴉsᴉꞁꞁoɔ ꞁᴉʌuɐ ᵷuᴉs∩",
"advancements.anvilcraft.new_matter.title": "ɹǝʇʇɐW ʍǝN",
"advancements.anvilcraft.noble_metal.description": "ꞁǝǝʇs ꞁɐʎoɹ ᵷuᴉʇꞁǝɯS",
Expand Down Expand Up @@ -1099,6 +1101,7 @@
"item.anvilcraft.chocolate_black": "ǝʇɐꞁoɔoɥƆ ʞɹɐᗡ",
"item.anvilcraft.chocolate_white": "ǝʇɐꞁoɔoɥƆ ǝʇᴉɥM",
"item.anvilcraft.circuit_board": "pɹɐoᗺ ʇᴉnɔɹᴉƆ",
"item.anvilcraft.civilization_catalyst": "ʇsʎꞁɐʇɐƆ uoᴉʇɐzᴉꞁᴉʌᴉƆ",
"item.anvilcraft.cocoa_butter": "ɹǝʇʇnᗺ ɐoɔoƆ",
"item.anvilcraft.cocoa_liquor": "ɹonbᴉꞀ ɐoɔoƆ",
"item.anvilcraft.cocoa_powder": "ɹǝpʍoԀ ɐoɔoƆ",
Expand Down Expand Up @@ -1626,6 +1629,9 @@
"screen.anvilcraft.cfa.megastructure.matter_decompressor": "ɹossǝɹdɯoɔǝᗡ ɹǝʇʇɐW",
"screen.anvilcraft.cfa.megastructure.matter_decompressor.description": "ɹǝsɐꞁ ɐɯɯɐᵷ ɥʇᴉʍ pꞁǝᴉɟ ꞁɐuoᴉʇɐʇᴉʌɐɹᵷ ɔᴉʇoxǝ ǝɥʇ ᵷuᴉʇɐʌᴉʇɔɐ ʎq sǝꞁoɥ ʞɔɐꞁq ɟo uozᴉɹoɥ ʇuǝʌǝ ǝɥʇ uᴉɥʇᴉʍ ɹo sɹɐʇs uoɹʇnǝu ɟo ɹoᴉɹǝʇuᴉ ǝɥʇ ɯoɹɟ ɹǝʇʇɐɯ ʇɔɐɹʇxƎ",
"screen.anvilcraft.cfa.megastructure.matter_decompressor.usage": "ɹ§ǝuoNㄥ§\n:sʇɔǝɟɟƎ ǝpᴉS\n———————\nɹ§ǝdʎʇ ʎpoq ꞁɐᴉʇsǝꞁǝɔ uo pǝsɐq ɹǝʇʇɐɯ ᵷuᴉpuodsǝɹɹoɔ sʇndʇnOɟ§\nɹ§[ʇuI ᵷoꞀ]ǝ§\n:sʇndʇnO\n———————\nɹ§(ʎɔuǝᴉɔᴉɟɟǝ ʞɹoʍ ɹǝɥᵷᴉɥ sǝpᴉʌoɹd ꞁǝʌǝꞁ ɥɔɐǝ)ɟ§ɹ§ +⥝˙ʌꞀ ɹǝsɐꞀ ɐɯɯɐ⅁p§\nɹ§[ʇuI ɹsꞀ]ɔ§\n:sǝɹᴉnbǝᴚ",
"screen.anvilcraft.cfa.megastructure.monolith_deployer": "ɹǝʎoꞁdǝᗡ ɥʇᴉꞁouoW",
"screen.anvilcraft.cfa.megastructure.monolith_deployer.description": "uoᴉʇnꞁoʌǝ sʇᴉ ǝʇɐɹǝꞁǝɔɔɐ ʎꞁʇɥᵷᴉꞁs puɐ ʇǝuɐꞁd ǝɥʇ oʇuo sɥʇᴉꞁouoɯ ʇɔǝɾoɹԀ",
"screen.anvilcraft.cfa.megastructure.monolith_deployer.usage": "ɹ§pǝɯnsuoɔ sᴉ ɹǝʎoꞁdǝp ǝɥ⟘ɟ§\nɹ§ɹɐǝddɐsᴉp oʇ ǝɔuɐɥ% c0ϛ ɐ puɐ ʇǝuɐꞁd puɐꞁǝʇsɐʍ ɐ ǝɯoɔǝq oʇ ǝɔuɐɥ% c0ϛ ɐ ǝʌɐɥ suoᴉʇɐzᴉꞁᴉʌᴉɔ ǝʌᴉʇᴉɯᴉɹd ᵷuᴉʇsᴉxƎɟ§\nɹ§sǝɔɹnosǝɹ ꞁɐɔᴉᵷoꞁoᴉq ɥʇᴉʍ ʇǝuɐꞁd ɐ uo uoᴉʇɐzᴉꞁᴉʌᴉɔ ǝʌᴉʇᴉɯᴉɹd ɐ sǝʇɐǝɹƆɟ§\n:spuoɔǝs 0⥝ ɹǝʇɟɐ sʇɔǝɟɟƎ\n———————\nɹ§uoᴉʇɐzᴉꞁᴉʌᴉɔ ǝʌᴉʇᴉɯᴉɹd ɐ ɹo 'sǝɔɹnosǝɹ ɯǝʇᴉ ꞁɐɔᴉᵷoꞁoᴉq ɟo sǝdʎʇ Ɛ ʇsɐǝꞁ ʇɐ ɥʇᴉʍ ʇǝuɐꞁd ʎʞɔoᴚɟ§\n:sǝɹᴉnbǝᴚ",
"screen.anvilcraft.cfa.megastructure.penrose_sphere": "ǝɹǝɥdS ǝsoɹuǝԀ",
"screen.anvilcraft.cfa.megastructure.penrose_sphere.description": "ʎᵷɹǝuǝ ɹǝsɐꞁ ǝɔuɐɥuǝ oʇ ǝꞁoɥ ʞɔɐꞁq ɐ ɟo uoᴉʇɐʇoɹ pǝǝds-ɥᵷᴉɥ ǝɥʇ ʎq pǝʇɐɹǝuǝᵷ ǝɹǝɥdsoᵷɹǝ ǝɥʇ ǝzᴉꞁᴉʇ∩",
"screen.anvilcraft.cfa.megastructure.penrose_sphere.usage": "ɹ§ǝuoNㄥ§\n:sʇɔǝɟɟƎ ǝpᴉS\n———————\nɹ§(ǝpᴉs ǝɯɐs ǝɥʇ uo ʇnduᴉ ǝɥʇ ǝʇᴉsoddo sᴉ ǝɔɐɟɹǝʇuᴉ ʇndʇno)ɟ§ɹ§ =˙ʌꞀ ɹǝsɐꞀ ɐɯɯɐ⅁p§\nɹ§[ʇuI ɹsꞀ]ɔ§\n:sʇndʇnO\n———————\nɹ§(ⱯℲƆ ǝɥʇ ɟo ɹǝʇuǝɔ ǝpᴉs ǝɥʇ uo ǝq ʇouuɐɔ)ɟ§ɹ§ +⥝˙ʌꞀ ɹǝsɐꞀɔ§\nɹ§[ʇuI ɹsꞀ]ɔ§\n:sǝɹᴉnbǝᴚ",
Expand Down
6 changes: 6 additions & 0 deletions src/generated/resources/assets/anvilcraft/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
"advancements.anvilcraft.mining_void.title": "Mining void",
"advancements.anvilcraft.networking.description": "Craft and place transmission pole",
"advancements.anvilcraft.networking.title": "Networking",
"advancements.anvilcraft.new_cycle.description": "Witness a civilization disappear from the Celestial Forging Anvil",
"advancements.anvilcraft.new_cycle.title": "A New Cycle",
"advancements.anvilcraft.new_matter.description": "Using anvil collision to craft uranium, multiphase matter or negative matter",
"advancements.anvilcraft.new_matter.title": "New Matter",
"advancements.anvilcraft.noble_metal.description": "Smelting royal steel",
Expand Down Expand Up @@ -1099,6 +1101,7 @@
"item.anvilcraft.chocolate_black": "Dark Chocolate",
"item.anvilcraft.chocolate_white": "White Chocolate",
"item.anvilcraft.circuit_board": "Circuit Board",
"item.anvilcraft.civilization_catalyst": "Civilization Catalyst",
"item.anvilcraft.cocoa_butter": "Cocoa Butter",
"item.anvilcraft.cocoa_liquor": "Cocoa Liquor",
"item.anvilcraft.cocoa_powder": "Cocoa Powder",
Expand Down Expand Up @@ -1626,6 +1629,9 @@
"screen.anvilcraft.cfa.megastructure.matter_decompressor": "Matter Decompressor",
"screen.anvilcraft.cfa.megastructure.matter_decompressor.description": "Extract matter from the interior of neutron stars or within the event horizon of black holes by activating the exotic gravitational field with gamma laser",
"screen.anvilcraft.cfa.megastructure.matter_decompressor.usage": "Requires:\n§c[Lsr Int]§r\n§dGamma Laser Lv.1+ §r§f(each level provides higher work efficiency)§r\n———————\nOutputs:\n§e[Log Int]§r\n§fOutputs corresponding matter based on celestial body type§r\n———————\nSide Effects:\n§7None§r",
"screen.anvilcraft.cfa.megastructure.monolith_deployer": "Monolith Deployer",
"screen.anvilcraft.cfa.megastructure.monolith_deployer.description": "Project monoliths onto the planet and slightly accelerate its evolution",
"screen.anvilcraft.cfa.megastructure.monolith_deployer.usage": "Requires:\n§fRocky planet with at least 3 types of biological item resources, or a primitive civilization§r\n———————\nEffects after 10 seconds:\n§fCreates a primitive civilization on a planet with biological resources§r\n§fExisting primitive civilizations have a 50% chance to become a wasteland planet and a 50% chance to disappear§r\n§fThe deployer is consumed§r",
"screen.anvilcraft.cfa.megastructure.penrose_sphere": "Penrose Sphere",
"screen.anvilcraft.cfa.megastructure.penrose_sphere.description": "Utilize the ergosphere generated by the high-speed rotation of a black hole to enhance laser energy",
"screen.anvilcraft.cfa.megastructure.penrose_sphere.usage": "Requires:\n§c[Lsr Int]§r\n§cLaser Lv.1+ §r§f(cannot be on the side center of the CFA)§r\n———————\nOutputs:\n§c[Lsr Int]§r\n§dGamma Laser Lv.= §r§f(output interface is opposite the input on the same side)§r\n———————\nSide Effects:\n§7None§r",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "anvilcraft:item/civilization_catalyst"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"parent": "anvilcraft:anvilcraft/the_start",
"criteria": {
"new_cycle": {
"trigger": "minecraft:impossible"
}
},
"display": {
"description": {
"translate": "advancements.anvilcraft.new_cycle.description"
},
"frame": "challenge",
"hidden": true,
"icon": {
"count": 1,
"id": "anvilcraft:civilization_catalyst"
},
"title": {
"translate": "advancements.anvilcraft.new_cycle.title"
}
},
"requirements": [
[
"new_cycle"
]
],
"rewards": {
"experience": 1395
},
"sends_telemetry_event": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_the_recipe": {
"conditions": {
"recipe": "anvilcraft:charger_charging/magnet_block_from_ferrite_core_magnet_block"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"anvilcraft:charger_charging/magnet_block_from_ferrite_core_magnet_block"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_corrupted_beacon": {
"conditions": {
"items": [
{
"items": "anvilcraft:corrupted_beacon"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_legacy_essence": {
"conditions": {
"items": [
{
"items": "anvilcraft:legacy_essence"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_monolith": {
"conditions": {
"items": [
{
"items": "anvilcraft:monolith"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "anvilcraft:civilization_catalyst"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_monolith",
"has_legacy_essence",
"has_corrupted_beacon"
]
],
"rewards": {
"recipes": [
"anvilcraft:civilization_catalyst"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_magnet_block": {
"conditions": {
"items": [
{
"items": "anvilcraft:magnet_block"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "anvilcraft:hollow_magnet_block_from_magnet_block"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_magnet_block"
]
],
"rewards": {
"recipes": [
"anvilcraft:hollow_magnet_block_from_magnet_block"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_hollow_magnet_block": {
"conditions": {
"items": [
{
"items": "anvilcraft:hollow_magnet_block"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "anvilcraft:magnet_block_from_hollow_magnet_block"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_hollow_magnet_block"
]
],
"rewards": {
"recipes": [
"anvilcraft:magnet_block_from_hollow_magnet_block"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "anvilcraft:charger_charging",
"ingredient": {
"item": "anvilcraft:ferrite_core_magnet_block"
},
"power": -4,
"result": {
"count": 1,
"id": "anvilcraft:magnet_block"
},
"time": 40
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"B": {
"item": "anvilcraft:corrupted_beacon"
},
"E": {
"item": "anvilcraft:legacy_essence"
},
"M": {
"item": "anvilcraft:monolith"
}
},
"pattern": [
"MEM",
"MBM",
"MEM"
],
"result": {
"count": 4,
"id": "anvilcraft:civilization_catalyst"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"category": "redstone",
"key": {
"A": {
"item": "anvilcraft:magnet_block"
}
},
"pattern": [
"AAA",
"A A",
"AAA"
],
"result": {
"count": 9,
"id": "anvilcraft:hollow_magnet_block"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"category": "redstone",
"key": {
"A": {
"item": "anvilcraft:hollow_magnet_block"
}
},
"pattern": [
"AAA",
"AAA",
"AAA"
],
"result": {
"count": 8,
"id": "anvilcraft:magnet_block"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,25 @@ public void addToSearchHistory(CelestialBodyData data, @Nullable PlanetaryResour
this.searchHistoryController.add(data, resources);
}

/** Applies a monolith outcome and invalidates its previous resource snapshot in search history. */
public void completeMonolithDeployment(@Nullable PlanetaryResourceSet resources) {
if (this.level == null || this.level.isClientSide() || this.celestialBodyData == null) return;
CelestialBodyData body = this.celestialBodyData;
this.clearMegastructure();
this.searchHistoryController.remove(body);
this.planetaryResourceSet = resources;
if (resources == null) {
this.celestialBodyData = null;
this.stellarMass = 0;
this.locked = false;
this.removeGravitySource();
} else {
this.addToSearchHistory(body, resources);
}
this.setChanged();
this.level.sendBlockUpdated(this.worldPosition, this.getBlockState(), this.getBlockState(), Block.UPDATE_CLIENTS);
}

public void clearSearchHistory() {
this.searchHistoryController.clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import dev.dubhe.anvilcraft.block.entity.megastructure.IMegastructureHandler;
import dev.dubhe.anvilcraft.block.entity.megastructure.MagnetarCoilHandler;
import dev.dubhe.anvilcraft.block.entity.megastructure.MatterDecompressorHandler;
import dev.dubhe.anvilcraft.block.entity.megastructure.MonolithDeployerHandler;
import dev.dubhe.anvilcraft.block.entity.megastructure.PenroseSphereHandler;
import dev.dubhe.anvilcraft.block.entity.megastructure.TempleHandler;
import dev.dubhe.anvilcraft.block.entity.megastructure.WormholeStabilizerHandler;
Expand Down Expand Up @@ -78,6 +79,7 @@ private void registerLegacyHandlers() {
this.registerLegacy(new WormholeStabilizerHandler());
this.registerLegacy(new EcoStationHandler());
this.registerLegacy(new TempleHandler());
this.registerLegacy(new MonolithDeployerHandler());
this.registerLegacy(new AcceleratorHandler());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ public void add(
this.resetBrowsing();
}

/** Removes stale versions of a transformed or vanished body without discarding other discoveries. */
public void remove(CelestialBodyData body) {
CompoundTag identity = body.toTag();
this.entries.removeIf(entry -> entry.body().toTag().equals(identity));
this.resetBrowsing();
}

public boolean hasPrevious() {
return this.entries.size() > 1 && this.browseIndex < this.entries.size();
}
Expand Down
Loading
Loading