Add hooks to make it easier to add custom TNT blocks (#6290)

This commit is contained in:
Richard Freimer authored and LexManos committed 2019-11-20 19:19:34 -08:00
1 parent d8d70e8b35
commit 0e65f20f22
10 files changed
+269 -9

No files matched your search

@@ -923,6 +923,17 @@ public interface IForgeBlock
return state.getFlammability(world, pos, face) > 0;
}
/**
* If the block is flammable, this is called when it gets lit on fire.
*
* @param state The current state
* @param world The current world
* @param pos Block position in world
* @param face The face that the fire is coming from
* @param igniter The entity that lit the fire
*/
default void catchFire(BlockState state, World world, BlockPos pos, @Nullable Direction face, @Nullable LivingEntity igniter) {}
/**
* Called when fire is updating on a neighbor block.
* The higher the number returned, the faster fire will spread around this block.
@@ -771,6 +771,19 @@ public interface IForgeBlockState
return getBlockState().getBlock().isFlammable(getBlockState(), world, pos, face);
}
/**
* If the block is flammable, this is called when it gets lit on fire.
*
* @param world The current world
* @param pos Block position in world
* @param face The face that the fire is coming from
* @param igniter The entity that lit the fire
*/
default void catchFire(World world, BlockPos pos, @Nullable Direction face, @Nullable LivingEntity igniter)
{
getBlockState().getBlock().catchFire(getBlockState(), world, pos, face, igniter);
}
/**
* Called when fire is updating on a neighbor block.
* The higher the number returned, the faster fire will spread around this block.
@@ -99,6 +99,7 @@ public net.minecraft.entity.ai.brain.memory.MemoryModuleType <init>(Ljava/util/O
public net.minecraft.entity.ai.brain.schedule.Activity <init>(Ljava/lang/String;)V
public net.minecraft.entity.ai.brain.sensor.SensorType <init>(Ljava/util/function/Supplier;)V
public net.minecraft.entity.item.ExperienceOrbEntity field_70530_e # xpValue
protected net.minecraft.entity.item.TNTEntity func_70515_d()V # explode - make it easier to extend TNTEntity with custom explosion logic
public net.minecraft.entity.merchant.villager.VillagerProfession <init>(Ljava/lang/String;Lnet/minecraft/village/PointOfInterestType;Lcom/google/common/collect/ImmutableSet;Lcom/google/common/collect/ImmutableSet;)V
protected net.minecraft.entity.monster.AbstractSkeletonEntity func_190727_o()Lnet/minecraft/util/SoundEvent; # getStepSound - make AbstractSkeletonEntity implementable
protected net.minecraft.entity.monster.SkeletonEntity func_190727_o()Lnet/minecraft/util/SoundEvent; # getStepSound - make AbstractSkeletonEntity implementable