Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Solved] creating an area of effect help (block)


danners68
 Share

Recommended Posts

Let me start by saying I'm totally new to Java coding, but I have a willingness to learn

 

I'm currently working on an area protection mod

 

I have the block details mostly in place in the sense that its a block that I can place in the development world but I want to add functionality similar to that of how precious stones used to work in bucket (back when there was only the sponge preventing block break/place/interact)

 

I am basically wondering if:

 

1) It is possible to replicate this effect in forge?

 

2) If Yes could somebody explain in dummy terms how this is done? or alternatively provide an excerpt of code that I could borrow to learn the basics of what I need,

 

I understand this isn't a forum for babysitting Java babies, I just hope I'm not asking too much,

 

 

please don't hurt me

Link to comment
Share on other sites

So you're looking for a block that does what, exactly?  I'm not familiar with Bucket's precious stones block so you'll have to explain ( see panel 2).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Basically I'm trying to create a radius based anti-build/break protection

 

hopefully that helps somewhat

 

Just in case I'm still too obscure, you place down this magic block and your base is protected within the x amount of blocks (for arguments sake we'll say 7)

Link to comment
Share on other sites

You need a TileEntity for this.

 

I've actually done this, see this class which will handle what you want.  It's highly custom though and will allow redstone interactions within the zone (as well as allowing the breaking of some blocks, like webs).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Hi

 

I don't know bucket very well, since I mostly played alone.

 

You need: - define some actions: (place, break, interact) with block,

- manage some registry where you can read and modify such permissions, based on the player, the location (x,y,z) and the action

- change the block to a TE

- register listeners for the above mentioned actions (is there a forge event for activating a block?)

 

Since I am a forge newbie, but I do know programming, I sugestthe best way would be to learn more about java.

 

I'm not sure whether to go with a tree or a table for said registry. Also I have absolutely no plan about identifying the player (UUID I guess?).

 

I hope this reply was understandable for you and may pushes you in the aiming direction.

 

Sincerely -pick

Since English is not my mother tongue, my sentences may are confusing.

 

I'm coding java for a long time now - just MC and forge stop me sometimes.

Link to comment
Share on other sites

That's amazing, Thanks,

 

I'll have a study with that class and see what I can't learn,

 

 

And on that note block I suppose this topic is actually solved.

 

thank you both for your responses, i don't doubt that i'll be back in the future with some other issue of somekind,

Link to comment
Share on other sites

That's amazing, Thanks,

 

I'll have a study with that class and see what I can't learn

 

(I think you mean "can learn" ;))

But that's why that repository is public. :)

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.