Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Java Classs Decomiler free

import com.stal111.forbidden_arcanus.block.EdelwoodLadderBlock;
import com.stal111.forbidden_arcanus.init.ModParticles;
import com.stal111.forbidden_arcanus.init.NewModItems;
import com.stal111.forbidden_arcanus.util.RenderUtils;
import net.minecraft.block.Block;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.MoverType;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.network.play.server.SSpawnParticlePacket;
import net.minecraft.particles.IParticleData;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.world.World;
@@ -47,9 +51,20 @@ public static void onLivingUpdate(LivingEvent.LivingUpdateEvent event) {
                    double posY = (float)entity.getPosY() + rand.nextFloat();
                    double posZ = entity.getPosZ() + rand.nextFloat() * (double) k;
                    double ySpeed = ((double) rand.nextFloat() - 0.4D) * 0.125D;
                    RenderUtils.spawnAurealMoteParticle(ModParticles.AUREAL_MOTE.get(), (ServerWorld) world, posX, posY, posZ, 0, 0, ySpeed, 0, 1.0);
                    spawnAurealMoteParticle(ModParticles.AUREAL_MOTE.get(), (ServerWorld) world, posX, posY, posZ, 0, 0, ySpeed, 0, 1.0);
                }
            }
        }
    }

    public static <T extends IParticleData> void spawnAurealMoteParticle(T type, ServerWorld world, double posX, double posY, double posZ, int particleCount, double xOffset, double yOffset, double zOffset, double speed) {
        SSpawnParticlePacket sspawnparticlepacket = new SSpawnParticlePacket(type, false, posX, posY, posZ, (float)xOffset, (float)yOffset, (float)zOffset, (float)speed, particleCount);

        for(int j = 0; j < world.getPlayers().size(); ++j) {
            ServerPlayerEntity player = world.getPlayers().get(j);
            if (player.inventory.hasItemStack(NewModItems.Stacks.LENS_OF_VERITATIS)) {
                world.sendPacketWithinDistance(player, false, posX, posY, posZ, sspawnparticlepacket);
            }
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: android httpurlconnection post multipart/form-data 
Java :: javafx stage always on top 
Java :: org.springframework.data.mapping.model.mappinginstantiationexception: failed to instantiate java.util.list using constructor no_constructor with arguments 
Java :: how to convert string to space separated int in java 
Java :: how to print multi dimension array in java using for each loop 
Java :: java writing an object 
Java :: text blocks 
Java :: how many public classes can be allowed in java 
Java :: java static inner class 
Java :: what is serialization in rest assured 
Java :: grepper editor 
Java :: Java Single-line Comment 
Java :: How to set the java.library.path from Eclipse 
Java :: Txt to Json in java 
Java :: Java Program to illustrate the Concept of Association 
Java :: java using the segment Information already before the for-loop 
Java :: how do i get DefaultTableModel rows sum in column in java 
Java :: Java Access Members of a Class 
Java :: TYPE_INT_ARGB 
Java :: records java final 
Java :: Create dynamic tree view using JavaScript 
Java :: Java Floating-point Literals 
Java :: validate data type in request body spring validation 
Java :: Goodbye to "Inspect Element" 
Java :: Java Target annotations attributes 
Java :: pgzint install windows 10 
Java :: Selenium TestNG delay before actions 
Java :: java vererbung methoden 
Java :: java setting logging with rotation logback 
Java :: ChangeElementsOfHashMap 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =