-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'architectury-1.18.2' into architectury-1.19.2
# Conflicts: # common/src/main/java/com/unlikepaladin/pfm/config/PaladinFurnitureModConfig.java # common/src/main/java/com/unlikepaladin/pfm/mixin/PFMSaveLoaderMixin.java # common/src/main/java/com/unlikepaladin/pfm/runtime/PFMDataGen.java # forge/src/main/java/com/unlikepaladin/pfm/forge/PaladinFurnitureModForge.java
- Loading branch information
Showing
25 changed files
with
262 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
common/src/main/java/com/unlikepaladin/pfm/client/PathPackRPWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package com.unlikepaladin.pfm.client; | ||
|
||
import net.minecraft.resource.ResourcePack; | ||
import net.minecraft.resource.ResourceType; | ||
import net.minecraft.resource.metadata.PackResourceMetadata; | ||
import net.minecraft.resource.metadata.ResourceMetadataReader; | ||
import net.minecraft.util.Identifier; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.util.Collection; | ||
import java.util.Set; | ||
import java.util.function.Predicate; | ||
import java.util.function.Supplier; | ||
|
||
public class PathPackRPWrapper implements ResourcePack { | ||
private final Supplier<ResourcePack> delegate; | ||
private final PackResourceMetadata packResourceMetadata; | ||
|
||
public PathPackRPWrapper(Supplier<ResourcePack> delegate, PackResourceMetadata packResourceMetadata) { | ||
this.delegate = delegate; | ||
this.packResourceMetadata = packResourceMetadata; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public InputStream openRoot(String fileName) throws IOException { | ||
return null; | ||
} | ||
|
||
@Override | ||
public InputStream open(ResourceType type, Identifier id) throws IOException { | ||
return delegate.get().open(type, id); | ||
} | ||
|
||
@Override | ||
public Collection<Identifier> findResources(ResourceType type, String namespace, String prefix, Predicate<Identifier> allowedPathPredicate) { | ||
return delegate.get().findResources(type, namespace, prefix, allowedPathPredicate); | ||
} | ||
|
||
@Override | ||
public boolean contains(ResourceType type, Identifier id) { | ||
return delegate.get().contains(type, id); | ||
} | ||
|
||
@Override | ||
public Set<String> getNamespaces(ResourceType type) { | ||
return delegate.get().getNamespaces(type); | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public <T> T parseMetadata(ResourceMetadataReader<T> metaReader) throws IOException { | ||
if (metaReader.getKey().equals("pack")) { | ||
return (T) packResourceMetadata; | ||
} | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "PFM-Runtime-RP"; | ||
} | ||
|
||
@Override | ||
public void close() { | ||
delegate.get().close(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...on/src/main/java/com/unlikepaladin/pfm/compat/imm_ptl/client/PFMMirrorEntityRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.unlikepaladin.pfm.compat.imm_ptl.client; | ||
|
||
import com.unlikepaladin.pfm.PaladinFurnitureMod; | ||
import net.minecraft.client.render.VertexConsumerProvider; | ||
import net.minecraft.client.render.entity.EntityRendererFactory; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import qouteall.imm_ptl.core.portal.Portal; | ||
import qouteall.imm_ptl.core.render.PortalEntityRenderer; | ||
|
||
public class PFMMirrorEntityRenderer extends PortalEntityRenderer { | ||
public PFMMirrorEntityRenderer(EntityRendererFactory.Context context) { | ||
super(context); | ||
} | ||
|
||
@Override | ||
public void render(Portal portal, float yaw, float tickDelta, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int light) { | ||
if (PaladinFurnitureMod.getPFMConfig().doImmersivePortalsMirrorsRender()) | ||
super.render(portal, yaw, tickDelta, matrixStack, vertexConsumerProvider, light); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.