Skip to content

Commit

Permalink
Add two new paintings (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugman76 authored May 6, 2024
2 parents 097df55 + cf313d3 commit 319f698
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/java/fr/hugman/promenade/Promenade.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import fr.hugman.promenade.entity.PromenadeEntityTypes;
import fr.hugman.promenade.entity.ai.brain.sensor.PromenadeSensorTypes;
import fr.hugman.promenade.entity.data.PromenadeTrackedData;
import fr.hugman.promenade.entity.decoration.painting.PromenadePaintingVariants;
import fr.hugman.promenade.item.PromenadeItems;
import fr.hugman.promenade.registry.PromenadeRegistries;
import fr.hugman.promenade.sound.PromenadeSoundEvents;
Expand Down Expand Up @@ -50,6 +51,8 @@ public void onInitialize() {
PromenadeBiomes.appendWorldGen();
PromenadePlacedFeatures.appendWorldGen();
PromenadeEntityTypes.appendWorldGen();

PromenadePaintingVariants.register();
}

public static Identifier id(String path) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package fr.hugman.promenade.entity.decoration.painting;

import fr.hugman.promenade.Promenade;
import net.minecraft.entity.decoration.painting.PaintingVariant;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;

public class PromenadePaintingVariantKeys {
public static final RegistryKey<PaintingVariant> OPTIMISM = of("optimism");
public static final RegistryKey<PaintingVariant> NURTURE = of("nurture");


private static RegistryKey<PaintingVariant> of(String path) {
return RegistryKey.of(RegistryKeys.PAINTING_VARIANT, Promenade.id(path));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package fr.hugman.promenade.entity.decoration.painting;

import net.minecraft.entity.decoration.painting.PaintingVariant;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;

public class PromenadePaintingVariants {
public static void register() {
Registry.register(Registries.PAINTING_VARIANT, PromenadePaintingVariantKeys.OPTIMISM, new PaintingVariant(32, 32));
Registry.register(Registries.PAINTING_VARIANT, PromenadePaintingVariantKeys.NURTURE, new PaintingVariant(32, 32));
}
}
6 changes: 5 additions & 1 deletion src/main/resources/assets/promenade/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,9 @@
"text.autoconfig.promenade.option.animals.capybaras_weight": "Spawning weight of Capybaras",
"text.autoconfig.promenade.option.animals.ducks_weight": "Spawning weight of Ducks",
"text.autoconfig.promenade.option.monsters.lush_creepers_weight": "Spawning weight of Lush Creepers",
"text.autoconfig.promenade.option.monsters.sunkens_weight": "Spawning weight of Sunkens"
"text.autoconfig.promenade.option.monsters.sunkens_weight": "Spawning weight of Sunkens",
"painting.promenade.optimism.title": "Optimism",
"painting.promenade.optimism.author": "Hugman",
"painting.promenade.nurture.title": "Nurture",
"painting.promenade.nurture.author": "Hugman"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"promenade:optimism",
"promenade:nurture"
]
}

0 comments on commit 319f698

Please sign in to comment.