ScriptParticle:

-The spawnInWorld() function now requires a ScriptWorld object to be passed in as the first parameter.
-New spawnInWorld() function with its only parameter being a ScriptWorld object. Spawns in the world with the particle's x,y,z variables.
This commit is contained in:
Luis C.M committed 2022-05-07 01:40:41 -05:00
1 parent a825d885f5
commit d49a31a4fe
5 files changed
+47 -15

No files matched your search

@@ -19,6 +19,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Util;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import noppes.npcs.CustomNpcs;
import noppes.npcs.NoppesUtilPlayer;
import noppes.npcs.Server;
@@ -125,9 +126,13 @@ public class NoppesUtil {
int animEnd = buffer.readInt();
int entityID = buffer.readInt();
int dimensionID = buffer.readInt();
World worldObj = DimensionManager.getWorld(dimensionID);
World worldObj = Minecraft.getMinecraft().theWorld;
Entity entity = worldObj.getEntityByID(entityID);
if(entity != null)
worldObj = entity.worldObj;
CustomFX fx = new CustomFX(
worldObj, entity,