Fix part placement (#1365)

This commit is contained in:
Kogepan229 authored and GitHub committed 2026-06-11 02:10:01 +09:00
1 parent 083b1005db
commit 4684cecd4d
2 files changed
+15 -1

No files matched your search

+3
View File
@@ -82,6 +82,9 @@ dependencies {
//Uncomment if you need to test chunkloading and warps/homes
//runtimeOnlyNonPublishable('com.github.GTNewHorizons:ServerUtilities:2.2.32:dev')
//runtimeOnlyNonPublishable('com.github.GTNewHorizons:Backhand:1.8.10:dev')
//runtimeOnlyNonPublishable('com.github.GTNewHorizons:ForgeMultipart:1.7.10:dev') {transitive = false}
}
// deps may transitively add Baubles, so we replace it
+12 -1
View File
@@ -303,10 +303,21 @@ public class PartPlacement {
final Block blkID = world.getBlock(te_x, te_y, te_z);
tile = world.getTileEntity(te_x, te_y, te_z);
if (tile != null && IntegrationRegistry.INSTANCE.isEnabled(IntegrationType.FMP)) {
host = null;
if (tile instanceof IPartHost) {
host = (IPartHost) tile;
}
if (host == null && tile != null && IntegrationRegistry.INSTANCE.isEnabled(IntegrationType.FMP)) {
host = ((IFMP) IntegrationRegistry.INSTANCE.getInstance(IntegrationType.FMP)).getOrCreateHost(tile);
}
if (host == null && tile != null
&& IntegrationRegistry.INSTANCE.isEnabled(IntegrationType.ImmibisMicroblocks)) {
host = ((IImmibisMicroblocks) IntegrationRegistry.INSTANCE
.getInstance(IntegrationType.ImmibisMicroblocks)).getOrCreateHost(player, face, tile);
}
if ((blkID == null || blkID.isReplaceable(world, te_x, te_y, te_z) || host != null)
&& side != ForgeDirection.UNKNOWN) {
return place(