mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-19 12:53:53 +00:00
BlockFadeEvent
This commit is contained in:
parent
29eeeb8d86
commit
e91e5be732
12 changed files with 162 additions and 1 deletions
|
|
@ -4,6 +4,11 @@
|
|||
#include "net.minecraft.world.item.h"
|
||||
#include "SnowTile.h"
|
||||
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#include "../Minecraft.Server/FourKitBridge.h"
|
||||
#include "Dimension.h"
|
||||
#endif
|
||||
|
||||
SnowTile::SnowTile(int id) : Tile(id, Material::snow)
|
||||
{
|
||||
setTicking(true);
|
||||
|
|
@ -23,7 +28,11 @@ int SnowTile::getResourceCount(Random *random)
|
|||
void SnowTile::tick(Level *level, int x, int y, int z, Random *random)
|
||||
{
|
||||
if (level->getBrightness(LightLayer::Block, x, y, z) > 11)
|
||||
{
|
||||
{
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
if (FourKitBridge::FireBlockFade(level->dimension->id, x, y, z, 0, 0))
|
||||
return;
|
||||
#endif
|
||||
this->spawnResources(level, x, y, z, level->getData(x, y, z), 0);
|
||||
level->removeTile(x, y, z);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue