BlockFadeEvent

This commit is contained in:
sylvessa 2026-04-19 08:41:54 -05:00
parent 29eeeb8d86
commit e91e5be732
12 changed files with 162 additions and 1 deletions

View file

@ -4,6 +4,10 @@
#include "net.minecraft.h"
#include "net.minecraft.world.h"
#include "FarmTile.h"
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
#include "../Minecraft.Server/FourKitBridge.h"
#include "Dimension.h"
#endif
FarmTile::FarmTile(int id) : Tile(id, Material::dirt,isSolidRender())
@ -70,6 +74,10 @@ void FarmTile::tick(Level *level, int x, int y, int z, Random *random)
{
if (!isUnderCrops(level, x, y, z))
{
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
if (FourKitBridge::FireBlockFade(level->dimension->id, x, y, z, Tile::dirt_Id, 0))
return;
#endif
level->setTileAndUpdate(x, y, z, Tile::dirt_Id);
}
}