Skip to content

Instantly share code, notes, and snippets.

@Brian1KB
Created July 6, 2016 19:57
Show Gist options
  • Save Brian1KB/9629d20dfbbfb3423dc765b019865302 to your computer and use it in GitHub Desktop.
Save Brian1KB/9629d20dfbbfb3423dc765b019865302 to your computer and use it in GitHub Desktop.
Falling Block Entity
using MiNET.Entities;
using MiNET.Utils;
using MiNET.Worlds;
namespace LEETGames.Utils
{
public class FallingBlock : Mob
{
public int BlockId { get; set; }
public FallingBlock(Level level, int blockId = 22) : base(EntityType.FallingBlock, level)
{
BlockId = blockId;
}
public override MetadataDictionary GetMetadata()
{
var metadata = base.GetMetadata();
metadata[20] = new MetadataInt(BlockId);
return metadata;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment