From 5654c041c55e17028501d6289c8c42e09de3bff7 Mon Sep 17 00:00:00 2001 From: NGnius Date: Thu, 12 Mar 2020 19:29:20 -0400 Subject: [PATCH] Fix LatestBlockID --- GamecraftModdingAPI/Blocks/BlockIdentifiers.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs b/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs index a340bd9..13bafce 100644 --- a/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs +++ b/GamecraftModdingAPI/Blocks/BlockIdentifiers.cs @@ -3,10 +3,13 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Reflection; using Svelto.ECS; using RobocraftX.Common; +using Harmony; + namespace GamecraftModdingAPI.Blocks { /// @@ -39,8 +42,7 @@ namespace GamecraftModdingAPI.Blocks public static uint LatestBlockID { get { - //return CommonExclusiveGroups.CurrentBlockEntityID - 1; //TODO - return 0; + return ((uint) AccessTools.Field(typeof(CommonExclusiveGroups), "_nextBlockEntityID").GetValue(null)) - 1; } } }