20
20
21
21
package nova .core .wrapper .mc .forge .v18 .wrapper .entity .backward ;
22
22
23
+ import net .minecraft .client .Minecraft ;
23
24
import net .minecraft .entity .EntityLivingBase ;
24
25
import net .minecraft .entity .player .EntityPlayer ;
25
26
import net .minecraft .util .DamageSource ;
26
27
import nova .core .component .inventory .InventoryPlayer ;
27
28
import nova .core .component .misc .Damageable ;
29
+ import nova .core .component .renderer .DynamicRenderer ;
28
30
import nova .core .entity .Entity ;
29
31
import nova .core .entity .component .Living ;
30
32
import nova .core .entity .component .Player ;
33
+ import nova .core .render .model .CustomModel ;
31
34
import nova .core .wrapper .mc .forge .v18 .wrapper .entity .forward .MCEntityTransform ;
32
35
import nova .core .wrapper .mc .forge .v18 .wrapper .inventory .BWInventory ;
33
36
import org .apache .commons .math3 .geometry .euclidean .threed .Vector3D ;
@@ -41,6 +44,7 @@ public class BWEntity extends Entity {
41
44
42
45
public net .minecraft .entity .Entity entity ;
43
46
47
+ @ SuppressWarnings ("unchecked" )
44
48
public BWEntity (net .minecraft .entity .Entity entity ) {
45
49
this .entity = entity ;
46
50
components .add (new MCEntityTransform (entity ));
@@ -55,6 +59,12 @@ public void damage(double amount, DamageType type) {
55
59
}
56
60
});
57
61
62
+ components .add (new DynamicRenderer ()).onRender (model -> {
63
+ model .addChild (new CustomModel (self -> {
64
+ Minecraft .getMinecraft ().getRenderManager ().renderEntityWithPosYaw (entity , entity .posX , entity .posY , entity .posZ , entity .rotationYaw , 1 );
65
+ }));
66
+ });
67
+
58
68
if (entity instanceof EntityLivingBase ) {
59
69
if (entity instanceof EntityPlayer ) {
60
70
MCPlayer player = components .add (new MCPlayer (this ));
0 commit comments