Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
a253cff
gradle 26.1
PTOM76 Mar 24, 2026
5cd6a8d
[cp] feat: add utility methods for converting BlockPos to Vector3i an…
PTOM76 Mar 24, 2026
ee79634
[cp] feat: add EntityWrapper and ItemEntityWrapper classes with utili…
PTOM76 Mar 24, 2026
3560fbd
[cp] feat: add Blocks, Items
PTOM76 Mar 24, 2026
89cf1b6
[cp] feat: update Block and Item wrappers for GRASS and CHAIN to use …
PTOM76 Mar 24, 2026
a1ce1a3
[cp] fix: invert condition in teleport method to ensure entity is onl…
PTOM76 Mar 24, 2026
e7a748b
port to 26.1
PTOM76 Mar 25, 2026
f03cc40
port to 26.1
PTOM76 Mar 25, 2026
fe4855a
use mojmap
PTOM76 Mar 25, 2026
26246c9
port to 26.1
PTOM76 Mar 25, 2026
e33c34e
port to 26.1-2
PTOM76 Mar 25, 2026
1d45f3c
port to 26.1-3
PTOM76 Mar 25, 2026
a6582c1
port to 26.1-4
PTOM76 Mar 25, 2026
0e426c1
port to 26.1-5
PTOM76 Mar 25, 2026
a79b223
update shadow plugin version and modify version property in processRe…
PTOM76 Mar 25, 2026
b01f1db
update shadowJar configuration to include relocated snakeyaml dependency
PTOM76 Mar 25, 2026
7c9ea10
update fabric.mod.json and mixin configurations for compatibility wit…
PTOM76 Mar 25, 2026
9e1aee2
rename injection method from getRenderType to getRenderShape for comp…
PTOM76 Mar 25, 2026
1f6c2b1
fix parameter order in onTick method for consistency
PTOM76 Mar 25, 2026
4e2e7fa
add payload registration methods and update render context handling
PTOM76 Mar 25, 2026
af63bac
update compatdatapacks76 and legacyitemmodels versions for Minecraft …
PTOM76 Mar 25, 2026
64e7203
bump compatdatapacks76 version to 1.0.15.261 for Minecraft 26 compati…
PTOM76 Mar 25, 2026
4a61e2c
refactor SimpleHandledScreen: clean up background rendering and updat…
PTOM76 Mar 25, 2026
793b417
fix: ExampleGuiBlock
PTOM76 Mar 25, 2026
9fbbebd
feat: add CurseForge and Modrinth integration for project publishing
PTOM76 Mar 25, 2026
c0e8c3b
fix: update version number format in build.gradle for Modrinth integr…
PTOM76 Mar 25, 2026
184e577
fix: update versioning format in build.gradle for Minecraft 26 compat…
PTOM76 Mar 25, 2026
d892673
fix: update player entity handling in CompatibleSlot for consistency
PTOM76 Mar 25, 2026
b45121f
fix: improve player entity handling in CompatibleSlot for item pickup
PTOM76 Mar 26, 2026
d003290
fix: streamline payload type registration in client and server networ…
PTOM76 Mar 26, 2026
3837a53
chore: add littleobffallback
PTOM76 Mar 26, 2026
fb1b72f
add Player API
PTOM76 Mar 26, 2026
c80d89f
gradle
PTOM76 Mar 26, 2026
64d6ba6
fix playyer
PTOM76 Mar 26, 2026
7b8e775
bump version 3.5.3
PTOM76 Mar 31, 2026
bf43100
fix: update cloth-config-fabric version and adjust dependencies
PTOM76 Mar 31, 2026
9dcf7ab
fix: improve menu handling and add crafting remainder check
PTOM76 Apr 1, 2026
70191b0
feat: add cursor stack handling methods in ScreenHandlerUtil and Simp…
PTOM76 Apr 1, 2026
70e4f9c
fix: update littleobffallback dependency handling and adjust crafting…
PTOM76 Apr 3, 2026
03a000b
fix: update compatdatapacks76 version to 1.0.16.261
PTOM76 Apr 3, 2026
418bde3
fix: update compatdatapacks76 version to 1.0.17.261
PTOM76 Apr 3, 2026
a8698e3
fix: update compatdatapacks76 version to 1.0.16.261-SNAPSHOT and adju…
PTOM76 Apr 3, 2026
b81c418
fix: update sound event variants for chicken, cow, and pig entities
PTOM76 Apr 3, 2026
5497220
fix: update littleobffallback version to 0.0.3.261-SNAPSHOT
PTOM76 Apr 3, 2026
cacba97
fix: update fabric loader and API versions to 0.18.6 and 0.145.1+26.1…
PTOM76 Apr 3, 2026
a01f485
fix: enhance item group handling in registry and settings
PTOM76 Apr 3, 2026
9f2be9d
fix: refactor item group handling to use list for item IDs in registry
PTOM76 Apr 3, 2026
ef2f44d
fix: update littleobffallback version to 0.0.4.261-SNAPSHOT
PTOM76 Apr 3, 2026
2348a50
fix: update littleobffallback version to 0.0.5.261-SNAPSHOT
PTOM76 Apr 3, 2026
a983d5e
fix: update littleobffallback version to 0.0.7.261-SNAPSHOT
PTOM76 Apr 3, 2026
0ee6a68
fix: update littleobffallback version to 0.0.9.261-SNAPSHOT and refac…
PTOM76 Apr 3, 2026
e937bc9
fix: update littleobffallback version to 0.1.0.261-SNAPSHOT
PTOM76 Apr 3, 2026
20e2036
fix: update littleobffallback version to 0.1.1.261-SNAPSHOT
PTOM76 Apr 3, 2026
03ad80f
fix: update littleobffallback version to 0.1.6.261-SNAPSHOT
PTOM76 Apr 3, 2026
03e6ef6
fix: update littleobffallback version to 0.1.7.261-SNAPSHOT and refac…
PTOM76 Apr 3, 2026
4501d03
fix: update littleobffallback version to 0.1.8.261-SNAPSHOT
PTOM76 Apr 4, 2026
b1d6b2b
fix: update littleobffallback version to 0.2.0.261-SNAPSHOT
PTOM76 Apr 4, 2026
dd37b01
fix: update littleobffallback version to 0.2.1.261-SNAPSHOT
PTOM76 Apr 4, 2026
c5cc876
[cp] chore: bump version 3.6.0
PTOM76 Apr 4, 2026
581647f
fix: update littleobffallback version to 0.2.2.261-SNAPSHOT
PTOM76 Apr 4, 2026
b56000f
fix: update littleobffallback version to 0.2.4.261-SNAPSHOT
PTOM76 Apr 4, 2026
71b6fe1
fix: update littleobffallback version to 0.2.5.261-SNAPSHOT
PTOM76 Apr 4, 2026
5a8d6a8
fix: update littleobffallback version to 0.2.5.261-SNAPSHOT
PTOM76 Apr 4, 2026
9567904
feat: add new utility classes and methods for block and item handling
PTOM76 Apr 4, 2026
bc1d0d2
feat: introduce BlockHalfProperty and StairShapeProperty with compati…
PTOM76 Apr 5, 2026
52b10f1
[cp] changelog
PTOM76 Apr 5, 2026
c68e3c0
feat: add block and entity type registration methods to MidohraRegistry
PTOM76 Apr 5, 2026
b143ee4
fix: update littleobffallback version to 0.3.2 and increment mod vers…
PTOM76 Apr 5, 2026
f440332
fix: increment mod version to 3.6.2 in info.properties
PTOM76 Apr 5, 2026
dea8098
chore: update mod version to 3.6.3 in info.properties
PTOM76 Apr 5, 2026
75fe7d7
feat: enhance entity and item interactions with new utility methods
PTOM76 Apr 5, 2026
cce8fbb
fix: update mod version to 3.6.3-fix.1 in info.properties
PTOM76 Apr 5, 2026
194163f
feat: update build.gradle to enhance jar and shadowJar tasks for bett…
PTOM76 Apr 5, 2026
0ecfbcb
fix: update littleobffallback version to 0.3.3.261-SNAPSHOT and incre…
PTOM76 Apr 6, 2026
58b6a6d
fix: improve registry methods to return proper data types for DataCom…
PTOM76 Apr 6, 2026
712340b
fix: update littleobffallback version to 0.3.4.261-SNAPSHOT and incre…
PTOM76 Apr 8, 2026
5bc9f5d
feat: add compat APIs
PTOM76 Apr 10, 2026
f9e5e4e
bump version 3.6.4
PTOM76 Apr 10, 2026
e50304b
feat: enhance Midohra API with new entity interface and utility methods
PTOM76 Apr 11, 2026
40a2c88
gradle
PTOM76 Apr 11, 2026
185ee20
refactor: remove unused imports in ServerWorld.java
PTOM76 Apr 11, 2026
90b09b6
chore: update littleobffallback version to 0.3.5.261-SNAPSHOT
PTOM76 Apr 11, 2026
1928b92
use arch loom
PTOM76 Apr 11, 2026
0844886
gradle
PTOM76 Apr 11, 2026
42b0435
neoforge
PTOM76 Apr 11, 2026
9802ab2
neoforge
PTOM76 Apr 11, 2026
3f55b59
littleobffallback_version 0.3.6.261-SNAPSHOT
PTOM76 Apr 11, 2026
53fa4c8
bump littleobffallback_version to 0.3.7.261-SNAPSHOT
PTOM76 Apr 11, 2026
59545e8
bump version 3.6.5
PTOM76 Apr 11, 2026
9df2f67
feat: add wrappers for various projectile entities and enhance entity…
PTOM76 Apr 11, 2026
a3c86bd
littleobffallback_version=0.3.7.261-SNAPSHOT
PTOM76 Apr 11, 2026
1d5946c
bump littleobffallback_version to 0.3.8.261-SNAPSHOT
PTOM76 Apr 11, 2026
3322bfb
fix: update littleobffallback version to 0.3.9.261-SNAPSHOT
PTOM76 Apr 12, 2026
16b84bf
fix: update getYaw and getPitch methods to use view rotation
PTOM76 Apr 12, 2026
4bd048e
fix: increment mod version to 3.6.5-fix.5 and update changelog
PTOM76 Apr 12, 2026
635ab00
fix: update littleobffallback version to 0.4.1.261-SNAPSHOT
PTOM76 Apr 12, 2026
4655690
fix: update getPitch method to use view rotation
PTOM76 Apr 17, 2026
fa6b237
fix: refactor builder methods to use ExpectPlatform annotation and im…
PTOM76 Apr 17, 2026
25af015
fix: update fluid and event handling classes to use new imports and a…
PTOM76 Apr 18, 2026
8c5641b
fix: refactor registry client methods to use ExpectPlatform annotatio…
PTOM76 Apr 18, 2026
9d867ff
fix: implement ClientTickEventRegistry for NeoForge and add event reg…
PTOM76 Apr 18, 2026
1552ea9
fix: refactor command registration to use ExpectPlatform annotation a…
PTOM76 Apr 18, 2026
f5f12fa
fix: refactor AttackEntityEventRegistry to use ExpectPlatform annotat…
PTOM76 Apr 18, 2026
e19df23
fix: refactor event registration to use ExpectPlatform annotation and…
PTOM76 Apr 18, 2026
4859b4e
fix: refactor AttackEntityEventRegistry and LivingHurtEventRegistry t…
PTOM76 Apr 18, 2026
bddf65c
remove extra
PTOM76 Apr 18, 2026
ea962e8
fix: refactor FluidStorageUtil to use ExpectPlatform annotation and u…
PTOM76 Apr 18, 2026
06560b4
fix: refactor ArchRegistryClient to use CompatRegistryClient for part…
PTOM76 Apr 18, 2026
d7380f3
feat: implement CreativeModeTab event registration and refactor netwo…
PTOM76 Apr 18, 2026
6d25e76
update compatdatapacks76
PTOM76 Apr 19, 2026
7ac311c
refactor: update method names and imports for consistency with Fabric…
PTOM76 Apr 19, 2026
477e553
gradle
PTOM76 Apr 19, 2026
9cac7b4
gradle
PTOM76 Apr 19, 2026
890d812
gradle
PTOM76 Apr 19, 2026
a779961
fix
PTOM76 Apr 19, 2026
6dc0f99
fix
PTOM76 Apr 19, 2026
1acdfdf
info
PTOM76 Apr 19, 2026
aa4a618
[cp] bump version 3.6.6
PTOM76 Apr 19, 2026
30bcdf8
add support for Supplier wrappers in Typed*Wrapper classes and enhanc…
PTOM76 Apr 19, 2026
9554326
[cp] add setDisplayName method to CreativeTabBuilder for improved tex…
PTOM76 Apr 19, 2026
01ea628
[cp] add constructors and utility methods to enhance compatibility an…
PTOM76 Apr 19, 2026
a810368
[cp] add InventoryWrapper class and integrate it into Player for enha…
PTOM76 Apr 19, 2026
48db651
refactor InventoryWrapper to use Container instead of Inventory for i…
PTOM76 Apr 19, 2026
45ad322
[cp] replace InventoryWrapper with CompatPlayerInventory in getInvent…
PTOM76 Apr 19, 2026
4ff0eb7
remove arch api
PTOM76 Apr 19, 2026
342229e
fix wrapper
PTOM76 Apr 19, 2026
9af95d0
refactor PlatformUtil and PlatformUtilImpl for improved platform dete…
PTOM76 Apr 19, 2026
1ea9296
gradle
PTOM76 Apr 19, 2026
b8fe33a
update dependencies in build.gradle and gradle.properties for improve…
PTOM76 Apr 19, 2026
27684d5
refactor registry methods for improved structure and platform compati…
PTOM76 Apr 19, 2026
efa2707
refactor registry methods for improved structure and consistency
PTOM76 Apr 19, 2026
841c15b
refactor registry implementation to use a pending entry structure for…
PTOM76 Apr 19, 2026
36ce79d
comment out unused payload registration code in ClientPlayNetworkingI…
PTOM76 Apr 19, 2026
97cc943
comment out unused register method in ClientPlayNetworkingImpl
PTOM76 Apr 19, 2026
a319ef8
fix: use equals method for tab key comparison in CreativeModeTabEvent…
PTOM76 Apr 19, 2026
df50c98
gradle
PTOM76 Apr 19, 2026
3b1b151
gradle
PTOM76 Apr 19, 2026
6e5675d
feat: implement ExtendModInitializer and MCPitanLibFabric classes
PTOM76 Apr 21, 2026
05711e2
gradle
PTOM76 Apr 21, 2026
424a88c
tmp patch
PTOM76 Apr 26, 2026
f37998f
fix
PTOM76 Apr 28, 2026
98d89b7
[cp] feat: introduce compatibility interfaces and enhance existing cl…
PTOM76 May 2, 2026
3e30284
[cp] bump version 3.6.7
PTOM76 May 2, 2026
aa961e6
feat: add getModifiers method to CharEventArgs
PTOM76 May 2, 2026
bcf1dfe
gradle
PTOM76 May 2, 2026
920bf98
[cp] feat: add new FluidState and ITyped wrappers for enhanced fluid …
PTOM76 May 3, 2026
a6df298
[cp] chore: bump version 3.6.8
PTOM76 May 3, 2026
5ad0390
[cp] feat: introduce INonTypedSupplier interface and enhance item, bl…
PTOM76 May 10, 2026
7a5f8f6
[cp] bump version 3.6.9
PTOM76 May 10, 2026
de96ba8
feat: enhance SimpleContainerGui registration with custom ScreenFactory
PTOM76 May 10, 2026
c844619
[cp] refactor: update receiveSync method to use PacketByteBuf for imp…
PTOM76 May 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
74 changes: 33 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.13-SNAPSHOT" apply false
id 'com.matthewprenger.cursegradle' version '1.+'
id "architectury-plugin" version "3.5-SNAPSHOT"
id "dev.architectury.loom-no-remap" version "1.14-SNAPSHOT" apply false
id 'com.matthewprenger.cursegradle' version '1.5.0-SNAPSHOT' // FORK: maven.pitan76.net
id "com.modrinth.minotaur" version "2.+"
id "com.gradleup.shadow" version "9.4.0"
}

architectury {
Expand All @@ -26,18 +27,15 @@ allprojects {

subprojects {
apply plugin: "architectury-plugin"
apply plugin: "dev.architectury.loom"
apply plugin: "dev.architectury.loom-no-remap"
apply plugin: "maven-publish"
apply plugin: "com.modrinth.minotaur"
apply plugin: "com.matthewprenger.cursegradle"
apply plugin: "com.gradleup.shadow"

base {
// Set up a suffixed format for the mod jar names, e.g. `example-fabric`.
archivesBaseName = info.archives_base_name
}

loom {
silentMojangMappingsLicense()
archivesName = info.archives_base_name
}

repositories {
Expand All @@ -48,14 +46,6 @@ subprojects {

dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
// The following line declares the mojmap mappings, you may use other mappings as well
// mappings loom.officialMojangMappings()
// The following line declares the yarn mappings you may select this one as well.
//mappings "net.fabricmc:yarn:${rootProject.yarn_mappings}:v2"
mappings loom.layered() {
it.mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2")
it.mappings file("../mappings/121-1fix.tiny")
}

// https://mvnrepository.com/artifact/org.yaml/snakeyaml
implementation 'org.yaml:snakeyaml:2.0'
Expand All @@ -80,20 +70,21 @@ subprojects {
if (modLoader == "neoforge") {
addGameVersion "NeoForge"
}
addGameVersion '1.21.11'
addGameVersion "26.1"
addGameVersion "26.1.1"
addGameVersion "26.1.2"

relations {
if (modLoader == "fabric") {
requiredDependency "fabric-api"
}

requiredDependency 'architectury-api'
embeddedLibrary 'cloth-config'
embeddedLibrary 'compatdatapacks'
embeddedLibrary 'legacyitemmodels'
}

mainArtifact(tasks.remapJar)
mainArtifact(shadowJar)
}
options {
forgeGradleIntegration = false
Expand All @@ -102,37 +93,38 @@ subprojects {

}

if (System.getenv("MODRINTH_TOKEN") != null) {
modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = 'mcpitanlibarch'
versionNumber = info.mod_version + "-" + modLoader
gameVersions = ['1.21.11']
versionType = 'beta'
uploadFile = tasks.remapJar
changelog = info.changelog
loaders = [modLoader]
dependencies {
if (modLoader == "fabric") {
required.project "fabric-api" // Fabric API
afterEvaluate {
if (System.getenv("MODRINTH_TOKEN") != null) {
modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = 'mcpitanlibarch'
versionNumber = info.mod_version + "-" + modLoader + "-" + project.minecraft_version
gameVersions = ["26.1", "26.1.1", "26.1.2"]
versionType = 'beta'
uploadFile = tasks.named("shadowJar").get().archiveFile.get().asFile
changelog = info.changelog
loaders = [modLoader]
dependencies {
if (modLoader == "fabric") {
required.project "fabric-api" // Fabric API
}
embedded.project "cloth-config"
embedded.project "compatdatapacks"
embedded.project "legacyitemmodels"
}
required.project "architectury-api"
embedded.project "cloth-config"
embedded.project "compatdatapacks"
embedded.project "legacyitemmodels"
}
}
}
}

tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.release = 21
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
options.release = 25
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}

java {
withSourcesJar()
}
}
}
14 changes: 9 additions & 5 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
dependencies {
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies
// Do NOT use other classes from fabric loader
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
// Remove the next line if you don't want to depend on the API
modApi "dev.architectury:architectury:${rootProject.architectury_version}"
implementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
}

architectury {
Expand All @@ -14,6 +10,14 @@ loom {
accessWidenerPath = file("src/main/resources/mcpitanlib.accesswidener")
}

tasks.shadowJar {
enabled = false
}

tasks.jar {
setArchiveClassifier(null)
}

publishing {
publications {
mavenCommon(MavenPublication) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

package net.pitan76.mcpitanlib;

import net.minecraft.util.Identifier;
import net.minecraft.resources.Identifier;
import net.pitan76.easyapi.config.Config;
import net.pitan76.easyapi.config.JsonConfig;
import net.pitan76.mcpitanlib.api.registry.CompatRegistry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.pitan76.mcpitanlib.api;

import net.minecraft.util.Identifier;
import net.minecraft.resources.Identifier;
import net.pitan76.mcpitanlib.api.registry.v2.CompatRegistryV2;
import net.pitan76.mcpitanlib.api.util.CompatIdentifier;
import net.pitan76.mcpitanlib.api.util.IdentifierUtil;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package net.pitan76.mcpitanlib.api.block;

import net.minecraft.block.Block;
import net.minecraft.component.type.TooltipDisplayComponent;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemStack;
import net.minecraft.item.tooltip.TooltipType;
import net.minecraft.text.Text;
import net.minecraft.world.item.Item.Properties;
import net.minecraft.world.item.Item.TooltipContext;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.item.component.TooltipDisplay;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.network.chat.Component;
import net.pitan76.mcpitanlib.api.event.item.ItemAppendTooltipEvent;

import java.util.function.Consumer;
Expand All @@ -15,18 +17,18 @@ public class BlockItemByExtendBlock1215 extends BlockItem {
private ExtendBlock block;
private ExtendBlockProvider provider;

public BlockItemByExtendBlock1215(ExtendBlock block, Settings settings) {
public BlockItemByExtendBlock1215(ExtendBlock block, Properties settings) {
super(block, settings);
this.block = block;
}

public BlockItemByExtendBlock1215(ExtendBlockProvider provider, Settings settings) {
public BlockItemByExtendBlock1215(ExtendBlockProvider provider, Properties settings) {
super((Block) provider, settings);
this.provider = provider;
}

@Override
public void appendTooltip(ItemStack stack, TooltipContext context, TooltipDisplayComponent displayComponent, Consumer<Text> textConsumer, TooltipType type) {
public void appendHoverText(ItemStack stack, TooltipContext context, TooltipDisplay displayComponent, Consumer<Component> textConsumer, TooltipFlag type) {
if (block != null)
block.appendTooltip(new ItemAppendTooltipEvent(stack, context, displayComponent, textConsumer, type));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
package net.pitan76.mcpitanlib.api.block;

import net.minecraft.block.BlockRenderType;
import net.minecraft.world.level.block.RenderShape;

public class CompatBlockRenderType {

public static final CompatBlockRenderType MODEL = of(BlockRenderType.MODEL);
public static final CompatBlockRenderType ENTITYBLOCK_ANIMATED = of(BlockRenderType.MODEL);
public static final CompatBlockRenderType INVISIBLE = of(BlockRenderType.INVISIBLE);
public static final CompatBlockRenderType MODEL = of(RenderShape.MODEL);
public static final CompatBlockRenderType ENTITYBLOCK_ANIMATED = of(RenderShape.MODEL);
public static final CompatBlockRenderType INVISIBLE = of(RenderShape.INVISIBLE);

@Deprecated
public final BlockRenderType renderType;
public final RenderShape renderType;

public CompatBlockRenderType(BlockRenderType renderType) {
public CompatBlockRenderType(RenderShape renderType) {
this.renderType = renderType;
}

public static CompatBlockRenderType of(BlockRenderType renderType) {
public static CompatBlockRenderType of(RenderShape renderType) {
return new CompatBlockRenderType(renderType);
}

public BlockRenderType toMinecraft() {
public RenderShape toMinecraft() {
return renderType;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package net.pitan76.mcpitanlib.api.block;

import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;

public class CompatBlocks {
public static final Block AIR = Blocks.AIR;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package net.pitan76.mcpitanlib.api.block;

import net.minecraft.block.BlockState;
import net.minecraft.block.ChestBlock;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.block.entity.ChestBlockEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.level.block.state.BlockBehaviour.Properties;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.ChestBlock;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.entity.ChestBlockEntity;
import net.minecraft.core.BlockPos;
import net.pitan76.mcpitanlib.api.block.v2.CompatBlockProvider;
import net.pitan76.mcpitanlib.api.block.v2.CompatibleBlockSettings;
import net.pitan76.mcpitanlib.api.event.block.TileCreateEvent;
Expand All @@ -14,7 +15,7 @@
import java.util.function.Supplier;

public class CompatChestBlock extends ChestBlock implements CompatBlockProvider {
public CompatChestBlock(Settings settings, Supplier<BlockEntityType<? extends ChestBlockEntity>> supplier) {
public CompatChestBlock(Properties settings, Supplier<BlockEntityType<? extends ChestBlockEntity>> supplier) {
super(supplier, CompatSoundEvents.BLOCK_CHEST_OPEN.get(), CompatSoundEvents.BLOCK_CHEST_CLOSE.get(), settings);
}

Expand All @@ -29,15 +30,15 @@ public CompatChestBlock(CompatibleBlockSettings settings, Supplier<BlockEntityTy
*/
@Deprecated
@Override
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
return createBlockEntity(new TileCreateEvent(pos, state));
}

/**
* @see ExtendBlockEntityProvider#createBlockEntity(TileCreateEvent)
*/
public BlockEntity createBlockEntity(TileCreateEvent event) {
return super.createBlockEntity(event.getBlockPos(), event.getBlockState());
return super.newBlockEntity(event.getBlockPos(), event.getBlockState());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package net.pitan76.mcpitanlib.api.block;

import com.mojang.serialization.MapCodec;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.PillarBlock;
import net.minecraft.item.ItemPlacementContext;
import net.minecraft.state.StateManager;
import net.minecraft.util.math.Direction;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockBehaviour.Properties;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.RotatedPillarBlock;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.core.Direction;
import net.pitan76.mcpitanlib.api.block.v2.CompatBlockProvider;
import net.pitan76.mcpitanlib.api.block.v2.CompatibleBlockSettings;
import net.pitan76.mcpitanlib.api.event.block.AppendPropertiesArgs;
Expand All @@ -15,9 +16,9 @@
import net.pitan76.mcpitanlib.api.state.property.EnumProperty;
import net.pitan76.mcpitanlib.core.serialization.CompatMapCodec;

public class CompatPillarBlock extends PillarBlock implements CompatBlockProvider {
public class CompatPillarBlock extends RotatedPillarBlock implements CompatBlockProvider {

public static final EnumProperty<Direction.Axis> AXIS = CompatProperties.of(PillarBlock.AXIS);
public static final EnumProperty<Direction.Axis> AXIS = CompatProperties.of(RotatedPillarBlock.AXIS);

public CompatibleBlockSettings settings;

Expand All @@ -26,7 +27,7 @@ public CompatibleBlockSettings getCompatSettings() {
return settings;
}

public CompatPillarBlock(Settings settings) {
public CompatPillarBlock(Properties settings) {
super(settings);
}

Expand All @@ -36,22 +37,22 @@ public CompatPillarBlock(CompatibleBlockSettings settings) {
}

public void appendProperties(AppendPropertiesArgs args) {
super.appendProperties(args.builder);
super.createBlockStateDefinition(args.builder);
}

public BlockState getPlacementState(PlacementStateArgs args) {
return super.getPlacementState(args.ctx);
return super.getStateForPlacement(args.ctx);
}

@Deprecated
@Override
public void appendProperties(StateManager.Builder<Block, BlockState> builder) {
public void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
appendProperties(new AppendPropertiesArgs(builder));
}

@Deprecated
@Override
public BlockState getPlacementState(ItemPlacementContext ctx) {
public BlockState getStateForPlacement(BlockPlaceContext ctx) {
return getPlacementState(new PlacementStateArgs(ctx));
}

Expand All @@ -70,11 +71,11 @@ public BlockState getPlacementState(PlacementStateArgs args, Options options) {

@Deprecated
@Override
public MapCodec<? extends PillarBlock> getCodec() {
public MapCodec<? extends RotatedPillarBlock> codec() {
return getCompatCodec().getCodec();
}

public CompatMapCodec<? extends PillarBlock> getCompatCodec() {
return CompatMapCodec.of(super.getCodec());
public CompatMapCodec<? extends RotatedPillarBlock> getCompatCodec() {
return CompatMapCodec.of(super.codec());
}
}
Loading
Loading