Skip to content

Commit 44b6556

Browse files
author
BuildTools
committed
- Fixed readme
- Started tweaking hitbox
1 parent e95e16e commit 44b6556

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

ReadMe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ Maven:
127127
<dependency>
128128
<groupId>com.magmaguy</groupId>
129129
<artifactId>FreeMinecraftModels</artifactId>
130-
<version>1.1.3-SNAPSHOT</version>
130+
<version>VERSION.HERE-SNAPSHOT</version>
131131
<scope>provided</scope>
132132
</dependency>
133133
```
134134

135135
Gradle:
136136

137137
```kotlin
138-
compileOnly group : 'com.magmaguy', name: 'FreeMinecraftModels', version: '1.1.2-SNAPSHOT'
138+
compileOnly group : 'com.magmaguy', name: 'FreeMinecraftModels', version: 'VERSION.HERE-SNAPSHOT'
139139
```
140140

141141
*Note FreeMinecraftModels is mean to be used as an API, and will require installation of the plugin on the server. Do

src/main/java/com/magmaguy/freeminecraftmodels/customentity/DynamicEntity.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ public void spawn(LivingEntity entity) {
5757
RegisterModelEntity.registerModelEntity(entity, getSkeletonBlueprint().getModelName());
5858
super.spawn();
5959
syncSkeletonWithEntity();
60-
if (getSkeletonBlueprint().getHitbox() != null)
61-
NMSManager.getAdapter().setCustomHitbox(entity, (float) getSkeletonBlueprint().getHitbox().getWidth(), (float) getSkeletonBlueprint().getHitbox().getHeight(), true);
60+
setHitbox();
6261
}
6362

6463
private void syncSkeletonWithEntity() {
@@ -83,6 +82,11 @@ public void remove() {
8382
if (skeletonSync != null) skeletonSync.cancel();
8483
}
8584

85+
private void setHitbox() {
86+
if (getSkeletonBlueprint().getHitbox() != null)
87+
NMSManager.getAdapter().setCustomHitbox(super.livingEntity, (float) getSkeletonBlueprint().getHitbox().getWidth(), (float) getSkeletonBlueprint().getHitbox().getHeight(), true);
88+
}
89+
8690
@Override
8791
public BoundingBox getHitbox() {
8892
if (livingEntity == null) return null;

0 commit comments

Comments
 (0)