mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-23 13:39:49 +00:00
refactor: port the marker interfaces to Java
TSlottedPart, IRandomDisplayTick, INeighborTileChange, TRandomUpdateTick, ISidedHollowConnect and IMicroMaterialRender. All six are member- and descriptor-identical to the reference. The seven implementors and mixin tiles were diffed too and are unchanged member for member. Five were already pure abstract interfaces in bytecode, so their conversion has no bytecode consequence; exactly one class leaves the jar, TRandomUpdateTick$class. onWorldJoin cannot become a default: TMultiPart declares it, and a superclass method beats an interface default, so the auto-registration would silently never run. It stays abstract and implementors call TickScheduler.loadRandomTick themselves, as RedstoneTorchPart already did. No bridge was written for TRandomUpdateTick$class. No jar in the pack references TRandomUpdateTick in any form, and the frozen baseline holds exactly the eight helpers the inventory lists. 99 plain-JVM tests and 5 Forge server tests pass.
This commit is contained in:
1 parent
3e68e67599
commit
9db07f8c7c
15 files changed
+189
-107
No files matched your search
@@ -0,0 +1,16 @@
|
||||
package codechicken.multipart;
|
||||
|
||||
/**
|
||||
* Interface for parts that fill a slot based configuration as defined in PartMap. If this is implemented, calling
|
||||
* partMap(slot) on the host tile will return this part if the corresponding bit in the slotMask is set.
|
||||
* <p>
|
||||
* Marker interface for TSlottedTile.
|
||||
* <p>
|
||||
* The Scala trait extended TMultiPart, but a trait extending a class is a bare interface in bytecode, so implementors
|
||||
* must extend TMultiPart themselves.
|
||||
*/
|
||||
public interface TSlottedPart {
|
||||
|
||||
/** A bitmask of slots that this part fills. Slot x is 1<<x. */
|
||||
int getSlotMask();
|
||||
}
|
||||
Reference in new issue
Block a user