-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to 1.21.1, runtime error due to architectury/architectury-api#579
Signed-off-by: 秋雨落 <[email protected]>
- Loading branch information
Showing
115 changed files
with
1,318 additions
and
1,548 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
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
15 changes: 4 additions & 11 deletions
15
fabric/src/main/java/cuteneko/catsplus/fabric/CatsPlusDataImpl.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 |
---|---|---|
@@ -1,18 +1,11 @@ | ||
package cuteneko.catsplus.fabric; | ||
|
||
import cuteneko.catsplus.fabric.data.CatPlayerFabric; | ||
import cuteneko.catsplus.fabric.data.GeniusCatFabric; | ||
import cuteneko.catsplus.data.ICatPlayer; | ||
import cuteneko.catsplus.data.entity.GeniusCat; | ||
import net.minecraft.entity.passive.CatEntity; | ||
import net.minecraft.entity.player.PlayerEntity; | ||
import cuteneko.catsplus.fabric.mixins.impl.ICatEntityMixin; | ||
import net.minecraft.world.entity.animal.Cat; | ||
|
||
public class CatsPlusDataImpl { | ||
public static ICatPlayer getCatPlayer(PlayerEntity player) { | ||
return new CatPlayerFabric(player); | ||
} | ||
|
||
public static GeniusCat getGeniusCat(CatEntity cat) { | ||
return new GeniusCatFabric(cat); | ||
public static GeniusCat getGeniusCat(Cat cat) { | ||
return ((ICatEntityMixin) cat).catsplus$getGeniusCat(); | ||
} | ||
} |
24 changes: 2 additions & 22 deletions
24
fabric/src/main/java/cuteneko/catsplus/fabric/CatsPlusFabric.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 |
---|---|---|
@@ -1,31 +1,11 @@ | ||
package cuteneko.catsplus.fabric; | ||
|
||
import cuteneko.catsplus.CatsPlus; | ||
import cuteneko.catsplus.item.ModItems; | ||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.api.ModInitializer; | ||
import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry; | ||
import net.minecraft.item.DyeableItem; | ||
|
||
public class CatsPlusFabric implements ModInitializer, ClientModInitializer { | ||
private final CatsPlus mod; | ||
|
||
public CatsPlusFabric() { | ||
mod = new CatsPlus(); | ||
} | ||
|
||
public class CatsPlusFabric implements ModInitializer { | ||
@Override | ||
public void onInitialize() { | ||
mod.init(); | ||
} | ||
|
||
@Override | ||
public void onInitializeClient() { | ||
mod.initClient(); | ||
|
||
ColorProviderRegistry.ITEM.register( | ||
(stack, tintIndex) -> tintIndex == 0 ? ((DyeableItem) stack.getItem()).getColor(stack) : -1, | ||
ModItems.CAT_BAG.get() | ||
); | ||
CatsPlus.init(); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
fabric/src/main/java/cuteneko/catsplus/fabric/client/CatsPlusFabricClient.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,24 @@ | ||
package cuteneko.catsplus.fabric.client; | ||
|
||
import cuteneko.catsplus.client.CatsPlusClient; | ||
import cuteneko.catsplus.item.ModItems; | ||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry; | ||
import net.minecraft.core.component.DataComponents; | ||
|
||
public class CatsPlusFabricClient implements ClientModInitializer { | ||
@Override | ||
public void onInitializeClient() { | ||
CatsPlusClient.initClient(); | ||
|
||
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> { | ||
if (tintIndex == 0) { | ||
var color = stack.get(DataComponents.DYED_COLOR); | ||
if (color != null) { | ||
return color.rgb(); | ||
} | ||
} | ||
return -1; | ||
}, ModItems.CAT_BAG.get()); | ||
} | ||
} |
35 changes: 0 additions & 35 deletions
35
fabric/src/main/java/cuteneko/catsplus/fabric/data/CatPlayerFabric.java
This file was deleted.
Oops, something went wrong.
59 changes: 0 additions & 59 deletions
59
fabric/src/main/java/cuteneko/catsplus/fabric/data/GeniusCatFabric.java
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
fabric/src/main/java/cuteneko/catsplus/fabric/data/gen/ModBlockTagProvider.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,19 @@ | ||
package cuteneko.catsplus.fabric.data.gen; | ||
|
||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; | ||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider; | ||
import net.minecraft.core.HolderLookup; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider { | ||
|
||
public ModBlockTagProvider(FabricDataOutput output, CompletableFuture<HolderLookup.Provider> registriesFuture) { | ||
super(output, registriesFuture); | ||
} | ||
|
||
@Override | ||
protected void addTags(HolderLookup.Provider provider) { | ||
|
||
} | ||
} |
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.