Changed splashes author retrieving & added item textures for spawn eggs

This commit is contained in:
Wolren 2024-04-30 22:34:43 +02:00
parent 2f7a3de19a
commit ef8722ce0a
14 changed files with 73 additions and 25 deletions

View File

@ -1,6 +0,0 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "joymod:item/thigh_high_fox_spawn_egg"
}
}

View File

@ -13,6 +13,7 @@ import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.LivingEntityFeatureRendererRegistrationCallback;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.block.entity.BlockEntityRendererFactories;
import net.minecraft.util.Identifier;

View File

@ -1,12 +1,26 @@
package gay.pridecraft.joymod.config;
import eu.midnightdust.lib.config.MidnightConfig;
import net.minecraft.block.entity.BeehiveBlockEntity;
public class Config extends MidnightConfig {
@Entry(category = "spawn", name = "Enable Mob Spawning")
public static boolean mobSpawning = true;
@Comment(category = "spawn") public static Comment spacer0;
@Entry(category = "spawn", name = "Enable Pride Axolotl Spawning")
public static boolean axolotlNaturalSpawn = true;
@Entry(category = "spawn", name = "Pride Axolotl Weight", min = 0)
public static int axolotlWeight = 10;
@Entry(category = "spawn", name = "Pride Axolotl Group Size", min = 0)
public static int axolotlMinGroupSize = 4;
@Entry(category = "spawn", name = "Pride Axolotl Group Size", min = 0)
public static int axolotlMaxGroupSize = 6;
@Comment(category = "spawn") public static Comment spacer1;
@Entry(category = "spawn", name = "Enable Thigh High Fox Spawning")
public static boolean foxNaturalSpawn = true;
@ -20,5 +34,14 @@ public class Config extends MidnightConfig {
@Entry(category = "spawn", name = "Thigh High Fox Maximum Group Size", min = 0)
public static int foxMaxGroupSize = 4;
@Comment(category = "spawn") public static Comment spacer1;
@Comment(category = "spawn") public static Comment spacer2;
@Entry(category = "spawn", name = "Pride Frog Weight", min = 0)
public static int frogWeight = 10;
@Entry(category = "spawn", name = "Pride Frog Group Size", min = 0)
public static int frogMinGroupSize = 2;
@Entry(category = "spawn", name = "Pride Frog Group Size", min = 0)
public static int frogMaxGroupSize = 5;
}

View File

@ -4,9 +4,11 @@ import gay.pridecraft.joymod.block.ModBlocks;
import gay.pridecraft.joymod.item.ModItems;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider;
import net.minecraft.block.Blocks;
import net.minecraft.data.client.BlockStateModelGenerator;
import net.minecraft.data.client.ItemModelGenerator;
import net.minecraft.data.client.Models;
import net.minecraft.item.Item;
public class ModModelProvider extends FabricModelProvider {
public ModModelProvider(FabricDataOutput output) {
@ -39,6 +41,5 @@ public class ModModelProvider extends FabricModelProvider {
itemModelGenerator.register(ModItems.PRIDE_ELYTRA, Models.GENERATED);
itemModelGenerator.register(ModItems.PRIDE_BRUSH, Models.GENERATED);
itemModelGenerator.register(ModItems.PRIDE_SLIME_BALL, Models.GENERATED);
itemModelGenerator.register(ModItems.THIGH_HIGH_FOX_SPAWN_EGG, Models.GENERATED);
}
}

View File

@ -20,16 +20,15 @@ public class ModItems {
new Item(new FabricItemSettings().maxCount(1)));
public static final Item PRIDE_BRUSH = registerItem("pride_brush", new BrushItem(new FabricItemSettings()));
public static final Item PRIDE_SLIME_BALL = registerItem("pride_slime_ball", new Item(new FabricItemSettings()));
public static final Item THIGH_HIGH_FOX_SPAWN_EGG = registerItem("thigh_high_fox_spawn_egg", new RainbowSpawnEggItem(ModEntities.THIGH_HIGH_FOX, 0xFFFFFF, 0xFF69B4, new FabricItemSettings()));
public static final Item PRIDE_BII_SPAWN_EGG = registerItem("pride_bii_spawn_egg", new RainbowSpawnEggItem(ModEntities.PRIDE_BII, 0xFFFFFF, 0xFF69B4, new FabricItemSettings()));
public static final Item PRIDE_AXOLOTL_SPAWN_EGG = registerItem("pride_axolotl_spawn_egg", new RainbowSpawnEggItem(ModEntities.PRIDE_AXOLOTL, 0xFFFFFF, 0xFF69B4, new FabricItemSettings()));
public static final Item PRIDE_FROG_SPAWN_EGG = registerItem("pride_frog_spawn_egg", new RainbowSpawnEggItem(ModEntities.PRIDE_FROG, 0xFFFFFF, 0xFF69B4, new FabricItemSettings()));
public static final Item PRIDE_SLIME_SPAWN_EGG = registerItem("pride_slime_spawn_egg", new RainbowSpawnEggItem(ModEntities.PRIDE_SLIME, 0xFFFFFF, 0xFF69B4, new FabricItemSettings()));
public static final Item PRIDE_SNIFFER_SPAWN_EGG = registerItem("pride_sniffer_spawn_egg", new RainbowSpawnEggItem(ModEntities.PRIDE_SNIFFER, 0xFFFFFF, 0xFF69B4, new FabricItemSettings()));
public static final Item THIGH_HIGH_FOX_SPAWN_EGG = registerItem("thigh_high_fox_spawn_egg", new RainbowSpawnEggItem(ModEntities.THIGH_HIGH_FOX, 14005919, 0xff80bf, new FabricItemSettings()));
public static final Item PRIDE_BII_SPAWN_EGG = registerItem("pride_bii_spawn_egg", new RainbowSpawnEggItem(ModEntities.PRIDE_BII, 15582019, 0xFF69B4, new FabricItemSettings()));
public static final Item PRIDE_AXOLOTL_SPAWN_EGG = registerItem("pride_axolotl_spawn_egg", new RainbowSpawnEggItem(ModEntities.PRIDE_AXOLOTL, 16499171, 0xff80bf, new FabricItemSettings()));
public static final Item PRIDE_FROG_SPAWN_EGG = registerItem("pride_frog_spawn_egg", new RainbowSpawnEggItem(ModEntities.PRIDE_FROG, 13661252, 0xff80bf, new FabricItemSettings()));
public static final Item PRIDE_SLIME_SPAWN_EGG = registerItem("pride_slime_spawn_egg", new RainbowSpawnEggItem(ModEntities.PRIDE_SLIME, 5349438, 0xff80bf, new FabricItemSettings()));
public static final Item PRIDE_SNIFFER_SPAWN_EGG = registerItem("pride_sniffer_spawn_egg", new RainbowSpawnEggItem(ModEntities.PRIDE_SNIFFER, 8855049, 0xff80bf, new FabricItemSettings()));
private static Item registerItem(String name, Item item) {
return Registry.register(Registries.ITEM, new Identifier(JoyMod.MOD_ID, name), item);
}
public static void registerModItems() {

View File

@ -1,11 +1,12 @@
package gay.pridecraft.joymod.mixin;
import gay.pridecraft.joymod.JoyMod;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.resource.SplashTextResourceSupplier;
import org.spongepowered.asm.mixin.Mixin;
import net.minecraft.resource.ResourceManager;
import net.minecraft.util.profiler.Profiler;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@ -14,19 +15,25 @@ import java.util.List;
@Mixin(SplashTextResourceSupplier.class)
public class SplashTextResourceSupplierMixin {
@Unique
private static final List<String> AUTHORS = List.of("Wolren", "Blurryface", "Sake", "Ampflower", "Pridecraft Studios", "UnlikePaladin"); //Honestly Wolren should be first as they did... literally all the mod apart from textures
@Inject(method = "prepare*", at = @At("RETURN"), cancellable = true)
private void onPrepare(ResourceManager resourceManager, Profiler profiler, CallbackInfoReturnable<List<String>> cir) {
List<String> splashes = cir.getReturnValue();
for (String author : AUTHORS) {
splashes.add("Made by " + author + "!");
}
FabricLoader
.getInstance()
.getModContainer(JoyMod.MOD_ID)
.ifPresent(modContainer ->
modContainer
.getMetadata()
.getAuthors()
.forEach(author ->
splashes.add("Made by " + author.getName() + "!")
)
);
cir.setReturnValue(splashes);
}
}
//Thanks for helping us so much Wolren, we couldn't have made any of this without you.
// Answer: Thanks, hope more people will be interested in working on it once we get the first release ;)

View File

@ -0,0 +1,7 @@
{
"parent": "minecraft:item/template_bed",
"textures": {
"layer0": "joymod:block/ace_bed",
"particle": "minecraft:block/oak_planks"
}
}

View File

@ -0,0 +1,3 @@
{
"parent": "item/template_spawn_egg"
}

View File

@ -0,0 +1,3 @@
{
"parent": "item/template_spawn_egg"
}

View File

@ -0,0 +1,3 @@
{
"parent": "item/template_spawn_egg"
}

View File

@ -0,0 +1,3 @@
{
"parent": "item/template_spawn_egg"
}

View File

@ -0,0 +1,3 @@
{
"parent": "item/template_spawn_egg"
}

View File

@ -0,0 +1,3 @@
{
"parent": "item/template_spawn_egg"
}

View File

@ -5,9 +5,7 @@
"name": "JoyMod",
"description": "This is an LGBT pride-themed Fabric mod made by Pridecraft Studios.",
"authors": [
"Blurryface",
"Wolren",
"UnlikePaladin"
"Wolren", "Blurryface", "Sake", "Ampflower", "Pridecraft Studios", "UnlikePaladin"
],
"contact": {
"homepage": "https://pridecraft.gay/",