CraftBook 3

CraftBook 3

139k Downloads

Adding Custom ICs into CircuitCore class

LadyCailinBot opened this issue ยท 9 comments

commented

CRAFTBOOK-2417 - Reported by damadmax

Hi,

i'm currently trying to build a bukkit plugin, that depends and uses craftbook.
Exactly: I want to add a custom IC.

The problem is, there is no public method in the CraftBookPlugin class, that would let me get the CircuitCore Class, where the ICs are registered. Is it possibly to make it public?
Or would it be a better approach to rebuild the CircuitCore in my own plugin?
But that would do the work twice...

thx in advance

commented

Comment by me4502

The method is public, registerIC(stuff); is what you want, which is public.

commented

Comment by damadmax

Thx for your answer.

I got it. Didn't noticed that CircuitCore is singleton^^

commented

Comment by me4502

CircuitCore.inst()

commented

Comment by me4502

If you are adding standard IC's which don't require other plugins or any client mods, you are welcome to PR them to get them in actual craftbook.

commented

Comment by damadmax

my plan is a autominer, which requires some equipment in a chest (pickaxe and/or fuel) to make it not too easy

commented

Comment by me4502

That is actually on out TODO list, so we would be happy to accept it if done well

commented

Comment by damadmax

oh nice. i'll do my best.

commented

Comment by damadmax

Because i'm currently not able to build craftbook correctly for testing, i hope someone else can test and perhaps commit the ICs to git.
BlockMiner.java http://pastebin.com/iH210jUd
BlockMinerST.java http://pastebin.com/xij0n4ww

[edit] fixed some bugs

commented

Comment by damadmax

i got building craftbook to work fine.
i would commit the IC to git but i don't dare. also i don't know which number the ic should get.