mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-18 22:18:09 +00:00
chore: format Minecraft.World
This commit is contained in:
@@ -3,35 +3,34 @@
|
||||
#include "../Blocks/Tile.h"
|
||||
#include "../Headers/net.minecraft.world.entity.h"
|
||||
|
||||
ShearsItem::ShearsItem(int itemId) : Item(itemId)
|
||||
{
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(238);
|
||||
ShearsItem::ShearsItem(int itemId) : Item(itemId) {
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(238);
|
||||
}
|
||||
|
||||
bool ShearsItem::mineBlock(std::shared_ptr<ItemInstance> itemInstance, Level *level, int tile, int x, int y, int z, std::shared_ptr<Mob> owner)
|
||||
{
|
||||
if (tile == Tile::leaves_Id || tile == Tile::web_Id || tile == Tile::tallgrass_Id || tile == Tile::vine_Id || tile == Tile::tripWire_Id)
|
||||
{
|
||||
bool ShearsItem::mineBlock(std::shared_ptr<ItemInstance> itemInstance,
|
||||
Level* level, int tile, int x, int y, int z,
|
||||
std::shared_ptr<Mob> owner) {
|
||||
if (tile == Tile::leaves_Id || tile == Tile::web_Id ||
|
||||
tile == Tile::tallgrass_Id || tile == Tile::vine_Id ||
|
||||
tile == Tile::tripWire_Id) {
|
||||
itemInstance->hurt(1, owner);
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
return Item::mineBlock(itemInstance, level, tile, x, y, z, owner);
|
||||
}
|
||||
|
||||
bool ShearsItem::canDestroySpecial(Tile *tile)
|
||||
{
|
||||
return tile->id == Tile::web_Id || tile->id == Tile::redStoneDust_Id || tile->id == Tile::tripWire_Id;
|
||||
bool ShearsItem::canDestroySpecial(Tile* tile) {
|
||||
return tile->id == Tile::web_Id || tile->id == Tile::redStoneDust_Id ||
|
||||
tile->id == Tile::tripWire_Id;
|
||||
}
|
||||
|
||||
float ShearsItem::getDestroySpeed(std::shared_ptr<ItemInstance> itemInstance, Tile *tile)
|
||||
{
|
||||
if (tile->id == Tile::web_Id || tile->id == Tile::leaves_Id)
|
||||
{
|
||||
float ShearsItem::getDestroySpeed(std::shared_ptr<ItemInstance> itemInstance,
|
||||
Tile* tile) {
|
||||
if (tile->id == Tile::web_Id || tile->id == Tile::leaves_Id) {
|
||||
return 15;
|
||||
}
|
||||
if (tile->id == Tile::cloth_Id)
|
||||
{
|
||||
if (tile->id == Tile::cloth_Id) {
|
||||
return 5;
|
||||
}
|
||||
return Item::getDestroySpeed(itemInstance, tile);
|
||||
|
||||
Reference in New Issue
Block a user