mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-17 11:05:06 +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,26 @@
|
||||
package codechicken.microblock;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import codechicken.lib.vec.Cuboid6;
|
||||
|
||||
/**
|
||||
* Wrapper class blocks/tiles/parts wanting to use the micro material system to render part of their models.
|
||||
* <p>
|
||||
* The accessors keep their Scala names because TMultiPart already declares world/x/y/z/getRenderBounds under exactly
|
||||
* these names, which is what implements this interface for every part.
|
||||
*/
|
||||
public interface IMicroMaterialRender {
|
||||
|
||||
/** May be null for inventory rendering. */
|
||||
World world();
|
||||
|
||||
int x();
|
||||
|
||||
int y();
|
||||
|
||||
int z();
|
||||
|
||||
/** Return the bounds of the part for texture mapping side decals like grass. */
|
||||
Cuboid6 getRenderBounds();
|
||||
}
|
||||
Reference in new issue
Block a user