Fabric Entity Events API compatibility
This commit is contained in:
parent
479f506ca8
commit
08d104b49b
4 changed files with 6 additions and 4 deletions
|
@ -15,6 +15,6 @@
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
patchouli_version = 48-FABRIC
|
patchouli_version = 48-FABRIC
|
||||||
fabric_version = 0.29.1+1.16
|
fabric_version = 0.29.2+1.16
|
||||||
canvas_version = 1.0.+
|
canvas_version = 1.0.+
|
||||||
rei_version = 5.8.10
|
rei_version = 5.8.10
|
|
@ -8,6 +8,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.entity.event.v1.ServerEntityWorldChangeEvents;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.server.world.ServerWorld;
|
import net.minecraft.server.world.ServerWorld;
|
||||||
|
@ -69,10 +70,11 @@ public abstract class EntityMixin implements TeleportingEntity {
|
||||||
}
|
}
|
||||||
this.removed = true;
|
this.removed = true;
|
||||||
this.world.getProfiler().pop();
|
this.world.getProfiler().pop();
|
||||||
((ServerWorld) this.world).resetIdleTimeout();
|
((ServerWorld) world).resetIdleTimeout();
|
||||||
destination.resetIdleTimeout();
|
destination.resetIdleTimeout();
|
||||||
this.world.getProfiler().pop();
|
this.world.getProfiler().pop();
|
||||||
this.beExitPos = null;
|
this.beExitPos = null;
|
||||||
|
ServerEntityWorldChangeEvents.AFTER_ENTITY_CHANGE_WORLD.invoker().afterChangeWorld(Entity.class.cast(this), entity, (ServerWorld) world, (ServerWorld) entity.world);
|
||||||
info.setReturnValue(entity);
|
info.setReturnValue(entity);
|
||||||
info.cancel();
|
info.cancel();
|
||||||
}
|
}
|
||||||
|
|
|
@ -348,7 +348,7 @@ public class InfusionRecipes {
|
||||||
.setOutput(createEnchantedBook(Enchantments.SILK_TOUCH, 1))
|
.setOutput(createEnchantedBook(Enchantments.SILK_TOUCH, 1))
|
||||||
.addCatalyst(0, EndItems.ENCHANTED_PETAL)
|
.addCatalyst(0, EndItems.ENCHANTED_PETAL)
|
||||||
.addCatalyst(2, Blocks.COBWEB)
|
.addCatalyst(2, Blocks.COBWEB)
|
||||||
.addCatalyst(4, Blocks.COBWEB)
|
.addCatalyst(4, EndItems.ETERNAL_CRYSTAL)
|
||||||
.addCatalyst(6, Blocks.COBWEB)
|
.addCatalyst(6, Blocks.COBWEB)
|
||||||
.addCatalyst(1, Items.LAPIS_LAZULI)
|
.addCatalyst(1, Items.LAPIS_LAZULI)
|
||||||
.addCatalyst(3, Items.LAPIS_LAZULI)
|
.addCatalyst(3, Items.LAPIS_LAZULI)
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.10.0",
|
"fabricloader": ">=0.10.0",
|
||||||
"fabric": ">=0.26.0",
|
"fabric": ">=0.29.0",
|
||||||
"minecraft": ">=1.16.3"
|
"minecraft": ">=1.16.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue