Skip to content

Commit

Permalink
Bugfixes, add README
Browse files Browse the repository at this point in the history
- Remove a mixin error message
- Players will stand up if block underneath is broken
- Added README
- Bumped version to 1.0.1
  • Loading branch information
fill1890 committed Jun 14, 2022
1 parent e8052e1 commit 5f0484a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
9 changes: 9 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## FabSit: Sit mod for Fabric

Releases can be found in the releases section.

### Usage

Players can use `/sit` to sit down.

Permissions to use `/sit` are granted to all players by default but can be revoked using `fabsit.sit`.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.14.7

# Mod Properties
mod_version = 1.0.0+1.19
mod_version = 1.0.1+1.19
maven_group = net.fill1890
archives_base_name = fabsit

Expand Down
12 changes: 9 additions & 3 deletions src/main/java/net/fill1890/fabsit/entity/ChairEntity.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package net.fill1890.fabsit.entity;

import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.decoration.ArmorStandEntity;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.Text;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;

Expand Down Expand Up @@ -40,11 +43,14 @@ public boolean collides() {
public void tick() {
if(used && getPassengerList().size() < 1) { kill(); }

Entity passenger = this.getFirstPassenger();
if(passenger != null) {
this.setYaw(passenger.getHeadYaw());
ServerPlayerEntity player = (ServerPlayerEntity) this.getFirstPassenger();
if(player != null) {
this.setYaw(player.getHeadYaw());
}

BlockState sittingBlock = getEntityWorld().getBlockState(new BlockPos(getPos()).up());
if(sittingBlock.isAir()) { kill(); }

super.tick();
}
}
1 change: 0 additions & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
]
},
"mixins": [
"fabsit.mixins.json"
],

"depends": {
Expand Down
13 changes: 0 additions & 13 deletions src/main/resources/fabsit.mixins.json

This file was deleted.

0 comments on commit 5f0484a

Please sign in to comment.