chore: format Minecraft.World

This commit is contained in:
Tropical
2026-03-13 17:06:56 -05:00
parent bd6284025d
commit 33d0737d1d
1511 changed files with 108661 additions and 115521 deletions

View File

@@ -6,18 +6,18 @@
#include "SnowballItem.h"
#include "../Util/SoundTypes.h"
SnowballItem::SnowballItem(int id) : Item(id)
{
this->maxStackSize = 16;
}
SnowballItem::SnowballItem(int id) : Item(id) { this->maxStackSize = 16; }
std::shared_ptr<ItemInstance> SnowballItem::use(std::shared_ptr<ItemInstance> instance, Level *level, std::shared_ptr<Player> player)
{
if (!player->abilities.instabuild)
{
instance->count--;
}
level->playSound((std::shared_ptr<Entity> ) player, eSoundType_RANDOM_BOW, 0.5f, 0.4f / (random->nextFloat() * 0.4f + 0.8f));
if (!level->isClientSide) level->addEntity( std::shared_ptr<Snowball>( new Snowball(level, player) ) );
std::shared_ptr<ItemInstance> SnowballItem::use(
std::shared_ptr<ItemInstance> instance, Level* level,
std::shared_ptr<Player> player) {
if (!player->abilities.instabuild) {
instance->count--;
}
level->playSound((std::shared_ptr<Entity>)player, eSoundType_RANDOM_BOW,
0.5f, 0.4f / (random->nextFloat() * 0.4f + 0.8f));
if (!level->isClientSide)
level->addEntity(
std::shared_ptr<Snowball>(new Snowball(level, player)));
return instance;
}