Skip to content

Conversation

@lonelyicer
Copy link
Collaborator

No description provided.

@lonelyicer lonelyicer requested review from Copilot and removed request for Copilot June 6, 2025 20:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors usages of PlugEntity to ToiletPlugEntity, renaming related classes, imports, and registry entries to align with the new entity type.

  • Replaced PlugEntity with ToiletPlugEntity across sound, network, rendering, and model code
  • Renamed TPFlySound to TPFlySoundInstance and updated its logic
  • Updated entity registration key and renderer to use TOILET_PLUG

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
TPFlySoundWrapper.java Switched from PlugEntity to ToiletPlugEntity and updated sound instance type
TPFlySoundInstance.java Renamed class, adjusted passenger check to getControllingPassenger()
PlugActionPayload.java Updated vehicle checks and entity spawn/remove calls for ToiletPlugEntity
PSEventBusEvents.java Registered ToiletPlugModel layer instead of PlugModel
ToiletPlugRenderer.java Renamed renderer and model imports to use ToiletPlugEntity
PlugEntity.java (deleted) Removed legacy PlugEntity
ToiletPlugModel.java Renamed model class to ToiletPlugModel
PSEntities.java Changed registration to TOILET_PLUG and updated import
PoopSky.java Registered ToiletPlugRenderer instead of PlugRenderer
Comments suppressed due to low confidence (3)

src/main/java/com/altnoir/poopsky/entity/PSEntities.java:18

  • The registry name in .build("plug") should match the registered key "toilet_plug" to avoid mismatches in serialization and resource lookups.
.sized(0.75F, 0.35F).build("plug"));

src/main/java/com/altnoir/poopsky/sound/TPFlySoundInstance.java:11

  • [nitpick] The field name player is misleading since it holds a ToiletPlugEntity; consider renaming it to plug or entity for clarity.
private final ToiletPlugEntity player;

src/main/java/com/altnoir/poopsky/network/PlugActionPayload.java:38

  • After spawning a new ToiletPlugEntity for a non-creative player, you should remove the item from the player's inventory (e.g., call removeItem(player)) to prevent free spawns.
var entity = PSEntities.TOILET_PLUG.get().create(level);

@lonelyicer lonelyicer merged commit 50c661f into Altnoir:1.21.1-NeoForge Jun 6, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant