Skip to content

Commit

Permalink
Update to 1.20.2-pre4
Browse files Browse the repository at this point in the history
Signed-off-by: shedaniel <daniel@shedaniel.me>
  • Loading branch information
shedaniel committed Sep 13, 2023
1 parent 24083c1 commit 5422b8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
package dev.architectury.core.item;

import dev.architectury.registry.registries.RegistrySupplier;
import net.minecraft.core.BlockSource;
import net.minecraft.core.Direction;
import net.minecraft.core.dispenser.BlockSource;
import net.minecraft.core.dispenser.DefaultDispenseItemBehavior;
import net.minecraft.core.dispenser.DispenseItemBehavior;
import net.minecraft.nbt.CompoundTag;
Expand All @@ -47,18 +47,18 @@ protected static DispenseItemBehavior createDispenseItemBehavior() {
return new DefaultDispenseItemBehavior() {
@Override
public ItemStack execute(BlockSource source, ItemStack stack) {
Direction direction = source.getBlockState().getValue(DispenserBlock.FACING);
Direction direction = source.state().getValue(DispenserBlock.FACING);
EntityType<?> entityType = ((SpawnEggItem) stack.getItem()).getType(stack.getTag());

try {
entityType.spawn(source.getLevel(), stack, null, source.getPos().relative(direction), MobSpawnType.DISPENSER, direction != Direction.UP, false);
entityType.spawn(source.level(), stack, null, source.pos().relative(direction), MobSpawnType.DISPENSER, direction != Direction.UP, false);
} catch (Exception var6) {
LOGGER.error("Error while dispensing spawn egg from dispenser at {}", source.getPos(), var6);
LOGGER.error("Error while dispensing spawn egg from dispenser at {}", source.pos(), var6);
return ItemStack.EMPTY;
}

stack.shrink(1);
source.getLevel().gameEvent(null, GameEvent.ENTITY_PLACE, source.getPos());
source.level().gameEvent(null, GameEvent.ENTITY_PLACE, source.pos());
return stack;
}
};
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ org.gradle.daemon=false

platforms=fabric

minecraft_version=1.20.2-pre2
supported_version=1.20.2-pre2
minecraft_version=1.20.2-pre4
supported_version=1.20.2-pre4

artifact_type=beta

Expand All @@ -14,7 +14,7 @@ base_version=10.0
maven_group=dev.architectury

fabric_loader_version=0.14.22
fabric_api_version=0.88.3+1.20.2
fabric_api_version=0.88.4+1.20.2
mod_menu_version=7.0.0

forge_version=46.0.1
Expand Down

0 comments on commit 5422b8c

Please sign in to comment.