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

Unable to use generics peripherals #501

Closed
Naheulf opened this issue Jul 18, 2020 · 1 comment
Closed

Unable to use generics peripherals #501

Naheulf opened this issue Jul 18, 2020 · 1 comment
Labels
area-Minecraft This affects CC's Minecraft-specific content. bug A problem or unexpected behaviour with the mod. version-1.15.x Bugs affecting the Forge 1.15.x version.

Comments

@Naheulf
Copy link
Contributor

Naheulf commented Jul 18, 2020

Description of the Issue

Unable to use the new generics peripherals. Even with vanilla stuff.

Steps to Reproduce the Issue

  1. Create a new world (or use a existing one)
  2. Close the world
  3. Open /serverconfig/computercraft-server.toml
  4. Turn "generic_peripherals" to true
  5. Save change
  6. Run the world
  7. Place a computer or a turtle
  8. Place a chest or furnace above the computer
  9. Try to wrap/use the chest/furnace as peripheral

Expected Behavior

The chest should appear as generic inventory peripheral.

Actual Behavior

Do nothing. As if there air/dirt block.

  • peripheral.names() doesn't list this tile entity.
  • peripheral.wrap("top") return nil
  • no event was fired when the chest/furnace is placed or removed

Debug Information

@Naheulf Naheulf added the bug A problem or unexpected behaviour with the mod. label Jul 18, 2020
@SquidDev SquidDev added area-Minecraft This affects CC's Minecraft-specific content. version-1.15.x Bugs affecting the Forge 1.15.x version. labels Jul 19, 2020
@SquidDev
Copy link
Member

SquidDev commented Jul 19, 2020

Well, that's very odd. It works perfectly in development but not at all in actual Forge.

Edit/update: I haven't attached a proper debugger yet, so my analysis is pretty limited. Taking a look through visual VM, it looks like the ServiceLoader isn't picking up anything.

I'm assuming there's some fun class-loading issues here, though I didn't think that in-dev and production Forge's classloading was too different. I'll have another look inside and IDE :).

Edit 2: Ahh, this is probably McModLauncher/modlauncher#39 - I guess we need to move to a non-ServiceLoader solution.

I think the cleanest thing to do here is a register(Stream<Class<?>>) method, and then use Forge's annotation magic instead - should allow us to avoid a hard Forge dependency within the core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Minecraft This affects CC's Minecraft-specific content. bug A problem or unexpected behaviour with the mod. version-1.15.x Bugs affecting the Forge 1.15.x version.
Projects
None yet
Development

No branches or pull requests

2 participants