Raw/Cooked Mutton

Also replaced item atlas with TU31's item atlas, and made item ids match java.
This commit is contained in:
piebot 2026-03-15 22:46:02 +03:00
parent 57be5ccb93
commit 0bee09ecea
6 changed files with 47 additions and 17 deletions

View file

@ -471,6 +471,8 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM(Item::beef_raw_Id)
ITEM(Item::chicken_raw_Id)
ITEM(Item::chicken_cooked_Id)
ITEM(Item::mutton_raw_Id)
ITEM(Item::mutton_cooked_Id)
ITEM(Item::rotten_flesh_Id)
ITEM(Item::spiderEye_Id)
ITEM(Item::potato_Id)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View file

@ -522,11 +522,7 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(10, 15, L"dyePowder_orange")
ADD_ICON(11, 0, L"leggingsCloth_overlay")
ADD_ICON(11, 1, L"doorSpruce")
ADD_ICON(11, 2, L"doorBirch")
ADD_ICON(11, 3, L"doorJungle")
ADD_ICON(11, 4, L"doorAcacia")
ADD_ICON(11, 5, L"doorDark")
ADD_ICON(11, 4, L"muttonRaw")
//ADD_ICON(11, 6, L"unused")
ADD_ICON(11, 7, L"minecart_hopper")
ADD_ICON(11, 8, L"hopper")
@ -542,7 +538,7 @@ void PreStitchedTextureMap::loadUVs()
//ADD_ICON(12, 1, L"unused")
//ADD_ICON(12, 2, L"unused")
//ADD_ICON(12, 3, L"unused")
//ADD_ICON(12, 4, L"unused")
ADD_ICON(12, 4, L"muttonCooked")
//ADD_ICON(12, 5, L"unused")
//ADD_ICON(12, 6, L"unused")
ADD_ICON(12, 7, L"minecart_tnt")
@ -555,6 +551,13 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(12, 14, L"frame")
ADD_ICON(12, 15, L"enchantedBook")
ADD_ICON(13, 0, L"doorAcacia")
ADD_ICON(13, 1, L"doorBirch")
ADD_ICON(13, 2, L"doorDark")
ADD_ICON(13, 3, L"doorJungle")
ADD_ICON(13, 4, L"doorSpruce")
ADD_ICON(14, 0, L"skull_skeleton")
ADD_ICON(14, 1, L"skull_wither")
ADD_ICON(14, 2, L"skull_zombie")
@ -869,7 +872,7 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(12, 9, L"carrots_stage_1");
ADD_ICON(12, 10, L"carrots_stage_2");
ADD_ICON(12, 11, L"carrots_stage_3");
//ADD_ICON(12, 12, L"unused");
ADD_ICON(12, 12, L"slime");
ADD_ICON(12, 13, L"water");
ADD_ICON_SIZE(12,14,L"water_flow",2,2);

View file

@ -257,6 +257,8 @@ Item* Item::door_jungle = nullptr;
Item* Item::door_acacia = nullptr;
Item* Item::door_dark = nullptr;
Item* Item::mutton_raw = nullptr;
Item* Item::mutton_cooked = nullptr;
void Item::staticCtor()
{
@ -500,11 +502,15 @@ void Item::staticCtor()
Item::horseArmorDiamond = (new Item(163)) ->setIconName(L"diamond_horse_armor")->setMaxStackSize(1)->setDescriptionId(IDS_ITEM_DIAMOND_HORSE_ARMOR)->setUseDescriptionId(IDS_DESC_DIAMOND_HORSE_ARMOR);
Item::lead = (new LeashItem(164)) ->setBaseItemTypeAndMaterial(eBaseItemType_pockettool, eMaterial_undefined)->setIconName(L"lead")->setDescriptionId(IDS_ITEM_LEAD)->setUseDescriptionId(IDS_DESC_LEAD);
Item::nameTag = (new NameTagItem(165)) ->setIconName(L"name_tag")->setDescriptionId(IDS_ITEM_NAME_TAG)->setUseDescriptionId(IDS_DESC_NAME_TAG);
Item::door_spruce = (new DoorItem(166, Material::wood, L"doorSpruce"))->setBaseItemTypeAndMaterial(eBaseItemType_door, eMaterial_wood)->setIconName(L"doorSpruce")->setDescriptionId(IDS_ITEM_DOOR_SPRUCE)->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
Item::door_birch = (new DoorItem(167, Material::wood, L"doorBirch"))->setBaseItemTypeAndMaterial(eBaseItemType_door, eMaterial_wood)->setIconName(L"doorBirch")->setDescriptionId(IDS_ITEM_DOOR_BIRCH)->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
Item::door_jungle = (new DoorItem(168, Material::wood, L"doorJungle"))->setBaseItemTypeAndMaterial(eBaseItemType_door, eMaterial_wood)->setIconName(L"doorJungle")->setDescriptionId(IDS_ITEM_DOOR_JUNGLE)->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
Item::door_acacia = (new DoorItem(169, Material::wood, L"doorAcacia"))->setBaseItemTypeAndMaterial(eBaseItemType_door, eMaterial_wood)->setIconName(L"doorAcacia")->setDescriptionId(IDS_ITEM_DOOR_ACACIA)->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
Item::door_dark = (new DoorItem(170, Material::wood, L"doorDark"))->setBaseItemTypeAndMaterial(eBaseItemType_door, eMaterial_wood)->setIconName(L"doorDark")->setDescriptionId(IDS_ITEM_DOOR_DARK)->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
Item::mutton_raw = (new FoodItem(167, 2, FoodConstants::FOOD_SATURATION_LOW, true))->setIconName(L"muttonRaw")->setDescriptionId(IDS_ITEM_BEEF_RAW)->setUseDescriptionId(IDS_DESC_BEEF_RAW);
Item::mutton_cooked = (new FoodItem(168, 8, FoodConstants::FOOD_SATURATION_NORMAL, true))->setIconName(L"muttonCooked")->setDescriptionId(IDS_ITEM_BEEF_COOKED)->setUseDescriptionId(IDS_DESC_BEEF_COOKED);
Item::door_spruce = (new DoorItem(171, Material::wood, L"doorSpruce"))->setBaseItemTypeAndMaterial(eBaseItemType_door, eMaterial_wood)->setIconName(L"doorSpruce")->setDescriptionId(IDS_ITEM_DOOR_SPRUCE)->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
Item::door_birch = (new DoorItem(172, Material::wood, L"doorBirch"))->setBaseItemTypeAndMaterial(eBaseItemType_door, eMaterial_wood)->setIconName(L"doorBirch")->setDescriptionId(IDS_ITEM_DOOR_BIRCH)->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
Item::door_jungle = (new DoorItem(173, Material::wood, L"doorJungle"))->setBaseItemTypeAndMaterial(eBaseItemType_door, eMaterial_wood)->setIconName(L"doorJungle")->setDescriptionId(IDS_ITEM_DOOR_JUNGLE)->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
Item::door_acacia = (new DoorItem(174, Material::wood, L"doorAcacia"))->setBaseItemTypeAndMaterial(eBaseItemType_door, eMaterial_wood)->setIconName(L"doorAcacia")->setDescriptionId(IDS_ITEM_DOOR_ACACIA)->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
Item::door_dark = (new DoorItem(175, Material::wood, L"doorDark"))->setBaseItemTypeAndMaterial(eBaseItemType_door, eMaterial_wood)->setIconName(L"doorDark")->setDescriptionId(IDS_ITEM_DOOR_DARK)->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
}

View file

@ -423,6 +423,8 @@ public:
static Item* door_acacia;
static Item* door_dark;
static Item* mutton_raw;
static Item* mutton_cooked;
static const int shovel_iron_Id = 256;
static const int pickAxe_iron_Id = 257;
@ -629,12 +631,15 @@ public:
static const int lead_Id = 420;
static const int nameTag_Id = 421;
static const int mutton_raw_Id = 423;
static const int mutton_cooked_Id = 424;
// TU25
static const int door_spruce_Id = 422;
static const int door_birch_Id = 423;
static const int door_jungle_Id = 424;
static const int door_acacia_Id = 425;
static const int door_dark_Id = 426;
static const int door_spruce_Id = 427;
static const int door_birch_Id = 428;
static const int door_jungle_Id = 429;
static const int door_acacia_Id = 430;
static const int door_dark_Id = 431;
public:
const int id;

View file

@ -110,6 +110,20 @@ void Sheep::dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel)
// killing a non-sheared sheep will drop a single block of cloth
spawnAtLocation(std::make_shared<ItemInstance>(Tile::wool_Id, 1, getColor()), 0.0f);
}
int count = random->nextInt(2) + 1 + random->nextInt(1 + playerBonusLevel);
for (int i = 0; i < count; i++)
{
if (isOnFire())
{
spawnAtLocation(Item::mutton_cooked_Id, 1);
}
else
{
spawnAtLocation(Item::mutton_raw_Id, 1);
}
}
}
int Sheep::getDeathLoot()