Skip to content

Commit

Permalink
hat stand stuf
Browse files Browse the repository at this point in the history
  • Loading branch information
MehVahdJukaar committed Dec 29, 2024
1 parent 04b5ea4 commit d1b3a37
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ subprojects {
it.officialMojangMappings {
setNameSyntheticMembers(false)
}
it.parchment("org.parchmentmc.data:parchment-${rootProject.parchment_version}")
//it.parchment("org.parchmentmc.data:parchment-${rootProject.parchment_version}")
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import net.mehvahdjukaar.supplementaries.common.entities.HatStandEntity;
import net.mehvahdjukaar.supplementaries.reg.ModEntities;
import net.minecraft.core.BlockPos;
import net.minecraft.core.BlockSource;
import net.minecraft.core.Direction;
import net.minecraft.core.dispenser.BlockSource;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.EntityType;
Expand All @@ -23,13 +23,14 @@ public PlaceHatStandBehavior(Item item) {

@Override
protected InteractionResultHolder<ItemStack> customBehavior(BlockSource blockSource, ItemStack itemStack) {
Direction direction = blockSource.state().getValue(DispenserBlock.FACING);
BlockPos blockPos = blockSource.pos().relative(direction);
ServerLevel serverLevel = blockSource.level();
Direction direction = blockSource.getBlockState().getValue(DispenserBlock.FACING);
BlockPos blockPos = blockSource.getPos().relative(direction);
ServerLevel serverLevel = blockSource.getLevel();
Consumer<HatStandEntity> consumer = EntityType.appendDefaultStackConfig((armorStandx) -> {
armorStandx.setYRot(direction.toYRot());
}, serverLevel, itemStack, null);
HatStandEntity armorStand = ModEntities.HAT_STAND.get().spawn(serverLevel, consumer, blockPos, MobSpawnType.DISPENSER, false, false);
HatStandEntity armorStand = ModEntities.HAT_STAND.get().spawn(serverLevel, itemStack.getTag(),
consumer, blockPos, MobSpawnType.DISPENSER, false, false);
if (armorStand != null) {
itemStack.shrink(1);
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ neo_version_range = [47.1,)
loader_version_range = [4,)


moonlight_version = 1.20-2.13.25
moonlight_version = 1.20-2.13.44

required_moonlight_version = 1.20-2.13.25
mixin_extras_version = 0.4.1
Expand Down

0 comments on commit d1b3a37

Please sign in to comment.