Torchmaster

Torchmaster

64M Downloads

Compatibility with Carry On

GStefanowich opened this issue ยท 5 comments

commented

Using

  • Minecraft 1.20.1
  • Neoforge 47.1.101
  • Carry On 2.1.2.7 (Modrinth)
  • TorchMaster 20.1.5

Not sure if this is better solved from the side of CarryOn or TorchMaster.

CarryOn pickups destroy the mob entity, and spawn a new mob entity upon being placed. The Dread lamp will prevent mobs from being placed back down because it voids them

commented

It never even occured to me that someone might want to move the torch using carry on - I mean, why would you? Destroying and placing the torch or lamp work just as fine and provide the intended behavior.

I'm actually not sure what exactly I should be doing differently. At the moment, the torch and lamp are registering themselves with their respective Registry via the Block::onPlace method.

public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean moving) {
super.onPlace(state, world, pos, oldState, moving);
world.getCapability(ModCaps.TEB_REGISTRY)
.ifPresent(reg ->
{
reg.registerLight(this.keyFactory.apply(pos), this.lightFactory.apply(pos));
});
}

Neither the Mega Torch nor the Dread Lamp are a Tile Entity - they are Plain Blocks. If Carry On calls Block::onRemove on pick up and Block::onPlace on place down, the registration logic should work.

This whole thing willl most likely change with 1.21 as I'm in the process of moving to a multi modloader solution which requires a major rewrite of the mod. But in the meantime, I'm not sure what else I could do to get this to work from my side.

commented

Fixed in Version 20.1.6
I've added the missing event as an intentional spawn event - I hope this doesnt break other mods in the process, but time will tell.

The update should be available on modrinth and the github release section. For some reason, curseforge is taking longer again.

commented

That's fantastic, I'm glad that it was a simpler fix. Greatly appreciated

commented

It never even occured to me that someone might want to move the torch using carry on

You misunderstand me,

CarryOn pickups destroy the mob entity

If you pick up a passive mob with CarryOn, and place it near a Dread Lamp, the dread lamp deletes the mob.

commented

oh, I'm sorry. That makes more sense.
This might be somewhat simple to fix from my side. It seems Forge introduced a new event type which Torchmaster didn't handle properly. I'll try to provide a fix.