Jump to content

Recommended Posts

Posted

Hello,

i search a modder (or a mod) for an reversed world anchor for smp.

these special world anchor must keep specific ID's, like machines, unloaded except its owner is near to it. it must also be possible to add or remove player as owner to this anchor and change the size of the unloaded area and the ID's there are unloaded.

Thanks and sorry for my bad english :D

Posted

What...what? So you want it to unload chunks while nobody is near?

That's what Minecraft does, hence the need for World Anchors in the first place. There would be no need to keep chunks loaded with world anchors if the chunks didn't unload automatically.

Posted

@ theprolo: sure minecraft unload chunks but it load it any time when a player is near. I search an mod that only load the chunk of a area like a factory when the owner is in the factory or near to it.

Posted

It's impossible. You're asking for a method to prevent chunks from loading unless a specific player is near. You can't selectively load chunks. It's an all or nothing thing. Even if you could do it, you would have massive holes in the world extending into the void.

Posted

Hrm.

I think the easiest way to do this would be to create a block that outputs a redstone signal based on the online status of a given player.

Block plus tile entity, have the tileentity record the player who placed it into an NBT tag, and randomtick it to check the online status of said player, changing redstone signal state as needed.

No need to mess with a gui or slash commands, just break and replace the block if you need to change who it's bound to. The block could be a simple one, no need for facing or sided textures.

For bonus points you could give it two skins and use the block's metadata to change the skin and light output based on the state.

Posted

I do believe you mean "some to create this mod". Only need it made once.

This looks like a really good first mod for someone looking to start modding. It's pretty much grunt work that touches basic blocks, crafting recipes, tileentites, and a small assortment of useful tidbits.

Posted

I recommend looking at onEnter events instead, less ticks per second. You know, "Soandso entered the world" messages, they have to be triggered somewhere.

Posted

I recommend looking at onEnter events instead, less ticks per second. You know, "Soandso entered the world" messages, they have to be triggered somewhere.

True, it could work. But there's a couple things to consider.

1: Ticking it means a quick sanity check when the block is loaded into the world. Since it would be able to process join/leave events and change state only when the block is loaded.

2: There are a LOT of events: http://www.minecraftforge.net/wiki/Forge_Events If you set the tickrate long enough for the block it could be cheaper CPU wise to tick it than adding more subscribers to the event system.

3: I see an event for an entity joining the world (EntityJoinWorldEvent, which covers ALL entitys: projectiles, tileentitys, mobs, and players), but I don't see a leave event. Forge may not support that sort of tracking yet.

Posted

hmmm maybe its that one way.: it loads off and the player can click it like a button or leaver to turn it on.when the chunk unloads it reset to off state or it scans every 10 minuets that the player is near.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...