Skip to content

Commit

Permalink
fix: update class names to the latest forge renames
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah41 committed Jul 12, 2022
1 parent b2dde18 commit 140f473
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ dependencies {
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.19-41.0.93'
minecraft 'net.minecraftforge:forge:1.19-41.0.94'

implementation 'org.spongepowered:mixin:0.8.5'
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static void onPlayerUpdate(TickEvent.PlayerTickEvent event) {
public static void playerClone(PlayerEvent.Clone event) {
event.getOriginal().reviveCaps();
event.getOriginal().getCapability(NINJA_DATA).ifPresent(original -> {
event.getPlayer().getCapability(NINJA_DATA).ifPresent(future -> {
event.getEntity().getCapability(NINJA_DATA).ifPresent(future -> {
future.deserializeNBT(original.serializeNBT());
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class RenderEvents {
*/
@SubscribeEvent
public static void playerRenderEvent(RenderPlayerEvent.Pre event) {
event.getPlayer().getCapability(NinjaCapabilityHandler.NINJA_DATA).ifPresent(ninjaData -> {
event.getEntity().getCapability(NinjaCapabilityHandler.NINJA_DATA).ifPresent(ninjaData -> {
if(ninjaData.getInvisible()) {
event.setCanceled(true);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.sekwah.narutomod.datagen;

import net.minecraft.data.DataGenerator;
import net.minecraftforge.data.event.GatherDataEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.forge.event.lifecycle.GatherDataEvent;

@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
public class NarutoDataGenerators {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public Direction copy(Direction value) {
}
};

private static final DeferredRegister<EntityDataSerializer<?>> DATA_SERIALIZERS = DeferredRegister.create(ForgeRegistries.Keys.DATA_SERIALIZERS, NarutoMod.MOD_ID);
private static final DeferredRegister<EntityDataSerializer<?>> DATA_SERIALIZERS = DeferredRegister.create(ForgeRegistries.Keys.ENTITY_DATA_SERIALIZERS, NarutoMod.MOD_ID);

public static final RegistryObject<EntityDataSerializer> ATTACH_FACE_ENTRY = DATA_SERIALIZERS.register("attach_face", () -> ATTACH_FACE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@Mod.EventBusSubscriber(modid = NarutoMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class NarutoEntities {

private static final DeferredRegister<EntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES, MOD_ID);
private static final DeferredRegister<EntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, MOD_ID);

public static final RegistryObject<EntityType<KunaiEntity>> KUNAI = register("kunai",
EntityType.Builder.<KunaiEntity>of(KunaiEntity::new, MobCategory.MISC).sized(0.5F, 0.5F).setTrackingRange(8));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class PlayerEvents {

@SubscribeEvent
public static void onEntityUpdate(LivingEvent.LivingUpdateEvent event) {
public static void onEntityUpdate(LivingEvent.LivingTickEvent event) {
// Do chakra updates and other stuff here unless handled in capabilities
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A mod that adds new items and other features to the game that are from/based on
[[dependencies.narutomod]]
modId="forge"
mandatory=true
versionRange="[41.0.69,)"
versionRange="[41.0.94,)"
ordering="NONE"
side="BOTH"

Expand Down

0 comments on commit 140f473

Please sign in to comment.