mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-25 19:33:50 +00:00
BlockFadeEvent
This commit is contained in:
parent
29eeeb8d86
commit
e91e5be732
12 changed files with 162 additions and 1 deletions
|
|
@ -5,6 +5,10 @@
|
|||
#include "net.minecraft.world.food.h"
|
||||
#include "net.minecraft.stats.h"
|
||||
#include "IceTile.h"
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#include "../Minecraft.Server/FourKitBridge.h"
|
||||
#include "Dimension.h"
|
||||
#endif
|
||||
|
||||
IceTile::IceTile(int id) : HalfTransparentTile(id, L"ice", Material::ice, false)
|
||||
{
|
||||
|
|
@ -64,9 +68,17 @@ void IceTile::tick(Level *level, int x, int y, int z, Random *random)
|
|||
{
|
||||
if (level->dimension->ultraWarm)
|
||||
{
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
if (FourKitBridge::FireBlockFade(level->dimension->id, x, y, z, 0, 0))
|
||||
return;
|
||||
#endif
|
||||
level->removeTile(x, y, z);
|
||||
return;
|
||||
}
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
if (FourKitBridge::FireBlockFade(level->dimension->id, x, y, z, Tile::calmWater_Id, 0))
|
||||
return;
|
||||
#endif
|
||||
this->spawnResources(level, x, y, z, level->getData(x, y, z), 0);
|
||||
level->setTileAndUpdate(x, y, z, Tile::calmWater_Id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue