File tree 5 files changed +20
-3
lines changed
java/com/ferreusveritas/dynamictrees
resources/data/dynamictrees/tags/entity_types
5 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
1
modName =DynamicTrees
2
2
modId =dynamictrees
3
- modVersion =1.4.1
3
+ modVersion =1.4.2
4
4
5
5
group =com.ferreusveritas.dynamictrees
6
6
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ public final class DTEntityTypeTags {
14
14
15
15
public static final TagKey <EntityType <?>> CAN_PASS_THROUGH_LEAVES = bind ("can_pass_through_leaves" );
16
16
public static final TagKey <EntityType <?>> FALLING_TREE_DAMAGE_IMMUNE = bind ("falling_tree_damage_immune" );
17
+ public static final TagKey <EntityType <?>> FALLING_TREE_COLLISION_BLACKLIST = bind ("falling_tree_collision_blacklist" );
17
18
18
19
private static TagKey <EntityType <?>> bind (String identifier ) {
19
20
return TagKey .create (Registries .ENTITY_TYPE , DynamicTrees .location (identifier ));
Original file line number Diff line number Diff line change 3
3
import com .ferreusveritas .dynamictrees .api .TreeHelper ;
4
4
import com .ferreusveritas .dynamictrees .block .branch .TrunkShellBlock ;
5
5
import com .ferreusveritas .dynamictrees .block .rooty .RootyBlock ;
6
+ import com .ferreusveritas .dynamictrees .data .DTEntityTypeTags ;
6
7
import com .ferreusveritas .dynamictrees .entity .animation .AnimationHandler ;
7
8
import com .ferreusveritas .dynamictrees .entity .animation .AnimationHandlers ;
8
9
import com .ferreusveritas .dynamictrees .entity .animation .DataAnimationHandler ;
12
13
import com .ferreusveritas .dynamictrees .models .ModelTracker ;
13
14
import com .ferreusveritas .dynamictrees .tree .species .Species ;
14
15
import com .ferreusveritas .dynamictrees .util .BlockBounds ;
15
- import com .ferreusveritas .dynamictrees .util .BlockStates ;
16
16
import com .ferreusveritas .dynamictrees .util .BranchDestructionData ;
17
17
import com .ferreusveritas .dynamictrees .util .CoordUtils .Surround ;
18
18
import com .google .common .collect .Iterables ;
@@ -419,6 +419,12 @@ public boolean shouldDie() {
419
419
return tickCount > 20 && currentAnimationHandler .shouldDie (this ); //Give the entity 20 ticks to receive it's data from the server.
420
420
}
421
421
422
+ @ Override
423
+ public boolean canCollideWith (Entity pEntity ) {
424
+ if (pEntity .getType ().is (DTEntityTypeTags .FALLING_TREE_COLLISION_BLACKLIST )) return false ;
425
+ return super .canCollideWith (pEntity );
426
+ }
427
+
422
428
@ OnlyIn (Dist .CLIENT )
423
429
public boolean shouldRender () {
424
430
return currentAnimationHandler .shouldRender (this );
Original file line number Diff line number Diff line change 33
33
34
34
public class FalloverAnimationHandler implements AnimationHandler {
35
35
36
+ public static int TICKS_BEFORE_CHECKING_COLLISION = 10 ;
37
+
36
38
@ Override
37
39
public String getName () {
38
40
return "fallover" ;
@@ -206,7 +208,7 @@ public void handleMotion(FallingTreeEntity entity) {
206
208
}
207
209
}
208
210
209
- if (fallSpeed > 0 && testCollision (entity )) {
211
+ if (entity . tickCount > TICKS_BEFORE_CHECKING_COLLISION && fallSpeed > 0 && testCollision (entity )) {
210
212
playEndSound (entity );
211
213
flingLeavesParticles (entity , fallSpeed );
212
214
addRotation (entity , -fallSpeed );//pull back to before the collision
Original file line number Diff line number Diff line change
1
+ {
2
+ "values" : [
3
+ {
4
+ "id" : " snowrealmagic:snow" ,
5
+ "required" : false
6
+ }
7
+ ]
8
+ }
You can’t perform that action at this time.
0 commit comments