Package net.minecraftforge.event.level
Class AlterGroundEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.level.AlterGroundEvent
public class AlterGroundEvent
extends net.minecraftforge.eventbus.api.Event
This event is fired when 
AlterGroundDecorator.placeBlockAt(TreeDecorator.Context, BlockPos)
 attempts to alter a ground block when generating a feature. An example of this would be large spruce trees converting grass blocks into podzol.
 This event is not cancellable.
This event is fired on the main Forge event bus only on the logical server.
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final LevelSimulatedReaderprivate BlockStateprivate final BlockStateprivate final BlockPosprivate final RandomSource
- 
Constructor SummaryConstructorsConstructorDescriptionAlterGroundEvent(LevelSimulatedReader level, RandomSource random, BlockPos pos, BlockState altered) 
- 
Method SummaryModifier and TypeMethodDescriptiongetLevel()Returns the new block state to be placed by the ground decorator.Returns the original block state that would be placed by the ground decorator.getPos()Returns the position of the block that will be altered.voidsetNewAlteredState(BlockState newAltered) Methods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
- 
Field Details- 
level
- 
random
- 
pos
- 
originalAltered
- 
newAltered
 
- 
- 
Constructor Details- 
AlterGroundEvent@Internal public AlterGroundEvent(LevelSimulatedReader level, RandomSource random, BlockPos pos, BlockState altered) 
 
- 
- 
Method Details- 
getLevel
- 
getRandom
- 
getPosReturns the position of the block that will be altered.- Returns:
- the position of the block that will be altered
 
- 
getOriginalAlteredStateReturns the original block state that would be placed by the ground decorator.- Returns:
- the original block state that would be placed by the ground decorator
 
- 
getNewAlteredStateReturns the new block state to be placed by the ground decorator.- Returns:
- the new block state to be placed by the ground decorator
 
- 
setNewAlteredState- Parameters:
- newAltered- the new block state to be placed by the ground decorator
 
 
-