Skip to content

Commit

Permalink
完成 1.19.2 的更新
Browse files Browse the repository at this point in the history
  • Loading branch information
TartaricAcid committed May 6, 2024
1 parent 1d817bd commit 0a6d840
Show file tree
Hide file tree
Showing 27 changed files with 170 additions and 207 deletions.
51 changes: 0 additions & 51 deletions readme.md

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,22 @@
import net.minecraft.resources.ResourceLocation;

public class EntityFairyRenderer extends MobRenderer<EntityFairy, EntityFairyModel> {
private static final ResourceLocation TEXTURE_0 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy_0.png");
private static final ResourceLocation TEXTURE_1 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy_1.png");
private static final ResourceLocation TEXTURE_2 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy_2.png");
private static final ResourceLocation TEXTURE_0 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy.png");
private static final ResourceLocation TEXTURE_1 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_1.png");
private static final ResourceLocation TEXTURE_2 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_2.png");
private static final ResourceLocation TEXTURE_3 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_3.png");
private static final ResourceLocation TEXTURE_4 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_4.png");
private static final ResourceLocation TEXTURE_5 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_5.png");
private static final ResourceLocation TEXTURE_6 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_6.png");
private static final ResourceLocation TEXTURE_7 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_7.png");
private static final ResourceLocation TEXTURE_8 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_8.png");
private static final ResourceLocation TEXTURE_9 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_9.png");
private static final ResourceLocation TEXTURE_10 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_10.png");
private static final ResourceLocation TEXTURE_11 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_11.png");
private static final ResourceLocation TEXTURE_12 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_12.png");
private static final ResourceLocation TEXTURE_13 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_13.png");
private static final ResourceLocation TEXTURE_14 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_14.png");
private static final ResourceLocation TEXTURE_15 = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/entity/maid_fairy/maid_fairy_15.png");

public EntityFairyRenderer(EntityRendererProvider.Context context) {
super(context, new EntityFairyModel(context.bakeLayer(EntityFairyModel.LAYER)), 0.5f);
Expand All @@ -28,13 +41,23 @@ protected void setupRotations(EntityFairy fairy, PoseStack poseStack, float ageI

@Override
public ResourceLocation getTextureLocation(EntityFairy entity) {
switch (entity.getFairyTypeOrdinal()) {
case 1:
return TEXTURE_1;
case 2:
return TEXTURE_2;
default:
return TEXTURE_0;
}
return switch (entity.getFairyTypeOrdinal()) {
case 1 -> TEXTURE_1;
case 2 -> TEXTURE_2;
case 3 -> TEXTURE_3;
case 4 -> TEXTURE_4;
case 5 -> TEXTURE_5;
case 6 -> TEXTURE_6;
case 7 -> TEXTURE_7;
case 8 -> TEXTURE_8;
case 9 -> TEXTURE_9;
case 10 -> TEXTURE_10;
case 11 -> TEXTURE_11;
case 12 -> TEXTURE_12;
case 13 -> TEXTURE_13;
case 14 -> TEXTURE_14;
case 15 -> TEXTURE_15;
default -> TEXTURE_0;
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,18 @@ public enum FairyType {
// 女仆发色
BLACK,
ORANGE,
WHITE
}
WHITE,
YELLOW,
BROWN,
RED,
GREEN,
BLUE,
PINK,
LIME,
CYAN,
PURPLE,
GRAY,
LIGHT_GRAY,
LIGHT_BLUE,
MAGENTA
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.github.tartaricacid.touhoulittlemaid.event.food;

import com.github.tartaricacid.touhoulittlemaid.api.event.MaidAfterEatEvent;
import com.github.tartaricacid.touhoulittlemaid.entity.passive.EntityMaid;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.items.ItemHandlerHelper;
import net.minecraftforge.items.wrapper.CombinedInvWrapper;

@Mod.EventBusSubscriber
public class DefaultEatenEvent {
@SubscribeEvent
public static void onAfterMaidEat(MaidAfterEatEvent event) {
ItemStack foodAfterEat = event.getFoodAfterEat();
if (!foodAfterEat.isEmpty()) {
ItemStack craftingRemainingItem = foodAfterEat.getCraftingRemainingItem();
if (!craftingRemainingItem.isEmpty()) {
EntityMaid maid = event.getMaid();
CombinedInvWrapper availableInv = maid.getAvailableInv(false);
ItemStack result = ItemHandlerHelper.insertItemStacked(availableInv, craftingRemainingItem, false);
// 如果女仆背包满了,掉落在地上
if (!result.isEmpty()) {
ItemEntity itemEntity = new ItemEntity(maid.level, maid.getX(), maid.getY(), maid.getZ(), craftingRemainingItem);
maid.level.addFreshEntity(itemEntity);
}
}
}
}
}

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ displayURL = "https://discord.gg/re4xQtb"
logoFile = "logo.png"
credits = "Verclene, ZUN"
# A text field displayed in the mod UI
authors = "TartaricAcid, Snownee, Succinum, Pajinyi, ZeniCrow, Paulzzh, Yuriscat, Lappland162"
authors = "TartaricAcid, Snownee, Succinum, Pajinyi, CrystalizedSun, ZeniCrow, Paulzzh, Yuriscat, Lappland162"
# The description text for the mod (multi line!) (#mandatory)
description = "A new version of the minecraft mod inspired by the LittleMaidReengaged mod."

Expand Down
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.
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.
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.
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.
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.
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.
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.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 0a6d840

Please sign in to comment.