Changes

Line 99: Line 99:  
* Making a block update detector block
 
* Making a block update detector block
   −
== CreateFluidSourceEvent ==
+
==CreateFluidSourceEvent==
 
This event controls creation of fluid sources. This is different than cancellable events, because it has a <code>Result</code>. Setting it to <code>ALLOW</code> causes a source block to created, even if that's not normally what would happen. Setting it to <code>DENY</code> always prevents source creation.
 
This event controls creation of fluid sources. This is different than cancellable events, because it has a <code>Result</code>. Setting it to <code>ALLOW</code> causes a source block to created, even if that's not normally what would happen. Setting it to <code>DENY</code> always prevents source creation.
    
Example usage:
 
Example usage:
 
<syntaxhighlight lang="java">
 
<syntaxhighlight lang="java">
public void onNeighborNotify(final BlockEvent.CreateFluidSourceEvent event)
+
public void onFluidSourceCreate(final BlockEvent.CreateFluidSourceEvent event)
 
     {
 
     {
 
         if (!world.isClientSide() && event.getPos().getY() > 100)
 
         if (!world.isClientSide() && event.getPos().getY() > 100)
16

edits