Refactored crafting patterns (#4458)
* Deduplicate crafting patterns internals This should save a bit memory for duplicate patterns as well as speed up loading new patterns on reloading chunks. * Encode recipe id in pattern * Use the recipe id directly for looking it up * Slightly refactored how patterns encode whether they are crafting patterns or not. * Renamed PatternHelper. * Added APIs to encode patterns. (#4463) * Removed ICraftingPatternItem. * Renamed isCrafting to isCraftable Co-authored-by: shartte <shartte@users.noreply.github.com>
This commit is contained in:
@@ -10,12 +10,14 @@ import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* To be implemented on blocks that "hide" another block inside, so connected textures can still be accomplished.
|
||||
* To be implemented on blocks that "hide" another block inside, so connected
|
||||
* textures can still be accomplished.
|
||||
*/
|
||||
public interface IFacade {
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getFacade(IBlockReader, BlockPos, Direction, BlockPos)}
|
||||
* @deprecated Use
|
||||
* {@link #getFacade(IBlockReader, BlockPos, Direction, BlockPos)}
|
||||
*/
|
||||
@Nonnull
|
||||
@Deprecated
|
||||
@@ -24,20 +26,18 @@ public interface IFacade {
|
||||
/**
|
||||
* Gets the blockstate this facade appears as.
|
||||
*
|
||||
* @param world
|
||||
* {@link World}
|
||||
* @param pos
|
||||
* The Blocks position
|
||||
* @param side
|
||||
* The side being rendered, NOT the side being connected from.
|
||||
* <p>
|
||||
* This value can be null if no side is specified. Please handle this appropriately.
|
||||
* @param connection
|
||||
* The position of the block being connected to.
|
||||
* @param world {@link World}
|
||||
* @param pos The Blocks position
|
||||
* @param side The side being rendered, NOT the side being connected from.
|
||||
* <p>
|
||||
* This value can be null if no side is specified. Please
|
||||
* handle this appropriately.
|
||||
* @param connection The position of the block being connected to.
|
||||
* @return The blockstate which your block appears as.
|
||||
*/
|
||||
@Nonnull
|
||||
default BlockState getFacade(@Nonnull IBlockReader world, @Nonnull BlockPos pos, @Nullable Direction side, @Nonnull BlockPos connection) {
|
||||
default BlockState getFacade(@Nonnull IBlockReader world, @Nonnull BlockPos pos, @Nullable Direction side,
|
||||
@Nonnull BlockPos connection) {
|
||||
return getFacade(world, pos, side);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user