Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMC Wand not working w/possible solution #3

Open
mikewk opened this issue Jun 13, 2019 · 3 comments
Open

EMC Wand not working w/possible solution #3

mikewk opened this issue Jun 13, 2019 · 3 comments

Comments

@mikewk
Copy link

mikewk commented Jun 13, 2019

I am playing FTB Builder's Paradise and noticed the EMC Wand doesn't appear to work as intended. When I have blocks in my inventory, it will try to place as many of them as possible, but it never pulls from my EMC. It still shows the highlights as though the wand THINKS it should be able to place many blocks however.

After digging through the code, it appears to me that using the EMC wand shouldn't EVER pull from the player inventory, it should only pull from EMC or nothing. This lead me to the following code starting at line 32 of EMCPlayerShim.java

@OverRide
public boolean useItem(ItemStack itemStack) {

This function does not match the signature of the function it's replacing, which is at line 82 of BasicPlayerShim.java in BetterBuilderWands

public ItemStack useItem(ItemStack itemStack) {

Based on the behavior of the wand pulling from the inventory, I think what is happening is useItem isn't being properly overrode and EMCPlayerShim defaults back to using the BasicPlayerShim useItem function.

Java and MC modding aren't my expertise, but I'm pretty confident that you need to make EMCPlayerShim's useItem function match the signature of BasicPlayerShim and make it either return an ItemStack of the required Items if the EMC is available or return null, instead of returning true or false.

@FusionLord
Copy link
Owner

That is because of an update to BBW, I haven't had time to update EMCBW to use the newer versions.

@mmwatt
Copy link

mmwatt commented Sep 9, 2019

Hi, just curious whether this has been resolved yet? (I'm using FTB Builder's Paradise too have the same problem)

@James103
Copy link

James103 commented Mar 19, 2020

I'm still having the same problem. EMC wand uses actual items instead of EMC.
The mod list follows (I'm using a small custom modpack for testing stuff):
image

And here are the logs:
https://paste.ee/p/eIqwV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants