I have looked into the problem, and it is because textplates relies on on_player_built_entity being called when the player actually made the change via the UI. I have updated textplates with an updated version of an api that I've been working on for the AAI mods. This will enable textplates the respond to other mods reviving entities if they implement a custom on_entity_revived event. Please add the following code to the top of the bluebuild control.lua (other mods can also implement this interface to properly support bluebuild reviving entities).
EDIT: The formatting is a bit weird on the portal. I will add the modified control.lua to a post in the thread linked above to make it easier.
control.lua line 0:
-- require("serpent") --For debug only
--[[
CUSTOM EVENTS SENT
on_entity_revived
raise_event implementation: raise_event('on_entity_revived', {entity=LuaEntity, player_index=player.player_index})
on_event implementation: remote.add_interface("mymod", { on_entity_revived = function(data) return myfunction(data.entity, data.player_index) end})
]]--
local function raise_event(event_name, event_data)
local responses = {}
for interface_name, interface_functions in pairs(remote.interfaces) do
if interface_functions[event_name] then
responses[interface_name] = remote.call(interface_name, event_name, event_data)
end
end
return responses
end
-- Find ghosts to place. Then find buildings to destruct.
This code goes in control.lua near line 123:
<pre>
-- game.print("Removing item from inventory.")
raise_event('on_entity_revived', {entity=revive, player_index=builder.index})
if revive.valid then
game.raise_event(defines.events.on_put_item, {position=revive.position, player_index=builder.index, name="on_put_item"})
game.raise_event(defines.events.on_built_entity, {created_entity=revive, player_index=builder.index, tick=game.tick, name="on_built_entity"})
end
builder.remove_item({name=__})
</pre>