mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Adjust charge obtained when using grogar's bell and allow for stealing a charged creeper's charge
This commit is contained in:
parent
5a88206bf5
commit
81c7f8c25c
2 changed files with 15 additions and 4 deletions
|
@ -34,7 +34,6 @@ import net.minecraft.util.math.Vec3d;
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class BellItem extends Item implements ChargeableItem {
|
||||
|
||||
public BellItem(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
@ -149,10 +148,18 @@ public class BellItem extends Item implements ChargeableItem {
|
|||
if (living.asEntity() instanceof MobEntity mob) {
|
||||
mob.setTarget(null);
|
||||
}
|
||||
amountDrawn = Math.max(living.asEntity().getWidth(), living.asEntity().getHeight()) + living.asEntity().getHealth();
|
||||
|
||||
if (living.asEntity() instanceof CreeperEntity creeper) {
|
||||
creeper.setFuseSpeed(0);
|
||||
creeper.setFuseSpeed(-1);
|
||||
|
||||
if (creeper.getDataTracker().get(CreeperEntity.CHARGED)) {
|
||||
creeper.getDataTracker().set(CreeperEntity.CHARGED, false);
|
||||
amountDrawn += 60;
|
||||
}
|
||||
creeper.getDataTracker().set(CreeperEntity.IGNITED, false);
|
||||
}
|
||||
amountDrawn = Math.max(living.asEntity().getWidth(), living.asEntity().getHeight());
|
||||
|
||||
if (living.asEntity() instanceof IllagerEntity) {
|
||||
particleType = ParticleTypes.ANGRY_VILLAGER;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@ accessWidener v1 named
|
|||
accessible class net/minecraft/client/render/RenderLayer$MultiPhaseParameters
|
||||
accessible method net/minecraft/client/render/RenderLayer of (Ljava/lang/String;Lnet/minecraft/client/render/VertexFormat;Lnet/minecraft/client/render/VertexFormat$DrawMode;IZZLnet/minecraft/client/render/RenderLayer$MultiPhaseParameters;)Lnet/minecraft/client/render/RenderLayer$MultiPhase;
|
||||
accessible class net/minecraft/client/render/item/HeldItemRenderer$HandRenderType
|
||||
|
||||
accessible method net/minecraft/world/GameRules register (Ljava/lang/String;Lnet/minecraft/world/GameRules$Category;Lnet/minecraft/world/GameRules$Type;)Lnet/minecraft/world/GameRules$Key;
|
||||
accessible method net/minecraft/world/GameRules$BooleanRule create (Z)Lnet/minecraft/world/GameRules$Type;
|
||||
accessible method net/minecraft/world/GameRules$IntRule create (I)Lnet/minecraft/world/GameRules$Type;
|
||||
accessible method net/minecraft/world/GameRules$IntRule create (I)Lnet/minecraft/world/GameRules$Type;
|
||||
|
||||
accessible field net/minecraft/entity/mob/CreeperEntity CHARGED Lnet/minecraft/entity/data/TrackedData;
|
||||
accessible field net/minecraft/entity/mob/CreeperEntity IGNITED Lnet/minecraft/entity/data/TrackedData;
|
Loading…
Reference in a new issue