Skip to content

Instantly share code, notes, and snippets.

@ajman1101
Last active April 8, 2016 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajman1101/d02d2bdc755622273af115e44e028237 to your computer and use it in GitHub Desktop.
Save ajman1101/d02d2bdc755622273af115e44e028237 to your computer and use it in GitHub Desktop.
2016-04-08 15:36:22,507 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2016-04-08 15:36:22,508 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[15:36:22] [main/INFO] [GradleStart]: Extra: []
[15:36:22] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/andrewm/.gradle/caches/minecraft/assets, --assetIndex, 1.8, --accessToken{REDACTED}, --version, 1.8.9, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[15:36:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[15:36:22] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[15:36:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[15:36:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[15:36:22] [main/INFO] [FML]: Forge Mod Loader version 11.15.1.1722 for Minecraft 1.8.9 loading
[15:36:22] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_73, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre1.8.0_73
[15:36:22] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[15:36:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[15:36:22] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[15:36:22] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[15:36:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:36:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[15:36:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[15:36:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:36:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:36:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[15:36:22] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[15:36:23] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[15:36:23] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[15:36:23] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[15:36:23] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[15:36:23] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[15:36:23] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[15:36:23] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
2016-04-08 15:36:24,038 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2016-04-08 15:36:24,059 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2016-04-08 15:36:24,060 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[15:36:24] [Client thread/INFO]: Setting user: Player849
[15:36:27] [Client thread/INFO]: LWJGL Version: 2.9.4
[15:36:27] [Client thread/WARN] [FML]: =============================================================
[15:36:27] [Client thread/WARN] [FML]: MOD HAS DIRECT REFERENCE System.exit() THIS IS NOT ALLOWED REROUTING TO FML!
[15:36:27] [Client thread/WARN] [FML]: Offendor: com/sun/jna/Native.main([Ljava/lang/String;)V
[15:36:27] [Client thread/WARN] [FML]: Use FMLCommonHandler.exitJava instead
[15:36:27] [Client thread/WARN] [FML]: =============================================================
[15:36:28] [Client thread/INFO] [STDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:246]: ---- Minecraft Crash Report ----
// Hi. I'm Minecraft, and I'm a crashaholic.
Time: 4/8/16 3:36 PM
Description: Loading screen debug info
This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.8.9
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_73, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 357981904 bytes (341 MB) / 707264512 bytes (674 MB) up to 3806855168 bytes (3630 MB)
JVM Flags: 0 total;
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML:
Loaded coremods (and transformers):
GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 361.91' Renderer: 'GeForce GTX 980/PCIe/SSE2'
[15:36:28] [Client thread/INFO] [FML]: MinecraftForge v11.15.1.1722 Initialized
[15:36:28] [Client thread/INFO] [FML]: Replaced 204 ore recipies
[15:36:28] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[15:36:28] [Client thread/INFO] [FML]: Searching C:\PreforceDepots\moose\tech\DevEnv\run\mods for mods
[15:36:28] [Client thread/INFO] [examplemod]: Mod examplemod is missing the required element 'name'. Substituting examplemod
[15:36:29] [Client thread/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[15:36:29] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, examplemod, testing] at CLIENT
[15:36:29] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, examplemod, testing] at SERVER
[15:36:29] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:examplemod, FMLFileResourcePack:THE TEST MOD
[15:36:30] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[15:36:30] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations
[15:36:30] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
[15:36:30] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
[15:36:30] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[15:36:30] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[15:36:30] [Client thread/INFO] [FML]: Applying holder lookups
[15:36:30] [Client thread/INFO] [FML]: Holder lookups applied
[15:36:30] [Client thread/INFO] [FML]: Injecting itemstacks
[15:36:30] [Client thread/INFO] [FML]: Itemstack injection complete
[15:36:30] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: UP_TO_DATE Target: null
[15:36:30] [Sound Library Loader/INFO]: Starting up SoundSystem...
[15:36:30] [Thread-9/INFO]: Initializing LWJGL OpenAL
[15:36:30] [Thread-9/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[15:36:30] [Thread-9/INFO]: OpenAL initialized.
[15:36:30] [Sound Library Loader/INFO]: Sound engine started
[15:36:33] [Client thread/INFO] [FML]: Max texture size: 16384
[15:36:33] [Client thread/INFO]: Created: 16x16 textures-atlas
[15:36:34] [Client thread/INFO] [STDOUT]: [com.example.examplemod.ExampleMod:init:18]: DIRT BLOCK >> tile.dirt
[15:36:34] [Client thread/INFO] [FML]: Injecting itemstacks
[15:36:34] [Client thread/INFO] [FML]: Itemstack injection complete
[15:36:34] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods
[15:36:34] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:examplemod, FMLFileResourcePack:THE TEST MOD
[15:36:34] [Client thread/INFO]: SoundSystem shutting down...
[15:36:34] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
[15:36:34] [Sound Library Loader/INFO]: Starting up SoundSystem...
[15:36:34] [Thread-11/INFO]: Initializing LWJGL OpenAL
[15:36:34] [Thread-11/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[15:36:34] [Thread-11/INFO]: OpenAL initialized.
[15:36:35] [Sound Library Loader/INFO]: Sound engine started
[15:36:36] [Client thread/INFO] [FML]: Max texture size: 16384
[15:36:36] [Client thread/INFO]: Created: 512x512 textures-atlas
[15:36:37] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
[15:38:26] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
[15:38:27] [Server thread/INFO]: Starting integrated minecraft server version 1.8.9
[15:38:27] [Server thread/INFO]: Generating keypair
[15:38:27] [Server thread/INFO]: Converting map!
[15:38:27] [Server thread/INFO]: Scanning folders...
[15:38:27] [Server thread/INFO]: Total conversion count is 0
[15:38:27] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
[15:38:27] [Server thread/INFO] [FML]: Applying holder lookups
[15:38:27] [Server thread/INFO] [FML]: Holder lookups applied
[15:38:27] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@4e50a4e4)
[15:38:27] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@4e50a4e4)
[15:38:27] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@4e50a4e4)
[15:38:27] [Server thread/INFO]: Preparing start region for level 0
[15:38:28] [Server thread/INFO]: Preparing spawn area: 15%
[15:38:29] [Server thread/INFO]: Preparing spawn area: 33%
[15:38:30] [Server thread/INFO]: Preparing spawn area: 49%
[15:38:31] [Server thread/INFO]: Preparing spawn area: 67%
[15:38:32] [Server thread/INFO]: Preparing spawn area: 86%
[15:38:33] [Server thread/INFO]: Changing view distance to 12, from 10
[15:38:33] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
[15:38:34] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2
[15:38:34] [Netty Server IO #1/INFO] [FML]: Client protocol version 2
[15:38:34] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 5 mods : FML@8.0.99.99,testing@1.0,Forge@11.15.1.1722,mcp@9.19,examplemod@1.0
[15:38:34] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
[15:38:34] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
[15:38:34] [Server thread/INFO]: Player849[local:E:bc3ad6de] logged in with entity id 124 at (234.5, 62.0, 215.5)
[15:38:34] [Server thread/INFO]: Player849 joined the game
[15:38:35] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@1a1f4e3[id=4dd6af1c-c8e5-371b-9918-b4c6bffd152f,name=Player849,properties={},legacy=false]
com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time
at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:65) ~[YggdrasilAuthenticationService.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:175) [YggdrasilMinecraftSessionService.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:59) [YggdrasilMinecraftSessionService$1.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:56) [YggdrasilMinecraftSessionService$1.class:?]
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:165) [YggdrasilMinecraftSessionService.class:?]
at net.minecraft.client.Minecraft.func_181037_M(Minecraft.java:2915) [Minecraft.class:?]
at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:130) [SkinManager$3.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_73]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_73]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_73]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_73]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_73]
[15:38:35] [Server thread/INFO]: Saving and pausing game...
[15:38:35] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
[15:38:37] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
[15:38:37] [Server thread/INFO]: Saving chunks for level 'New World'/The End
[15:38:38] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2140ms behind, skipping 42 tick(s)
[15:41:12] [Server thread/INFO]: Saving and pausing game...
[15:41:12] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
[15:41:13] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
[15:41:13] [Server thread/INFO]: Saving chunks for level 'New World'/The End
[15:41:54] [Server thread/INFO]: Player849 has just earned the achievement [Taking Inventory]
[15:41:54] [Client thread/INFO]: [CHAT] Player849 has just earned the achievement [Taking Inventory]
[15:42:08] [Server thread/INFO]: [Player849: Set own game mode to Survival Mode]
[15:42:08] [Client thread/INFO]: [CHAT] Your game mode has been updated
[15:42:24] [Server thread/INFO]: Saving and pausing game...
[15:42:24] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
[15:42:24] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
[15:42:24] [Server thread/INFO]: Saving chunks for level 'New World'/The End
[15:42:26] [Server thread/INFO]: Stopping server
[15:42:26] [Server thread/INFO]: Saving players
[15:42:26] [Server thread/INFO]: Saving worlds
[15:42:26] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
[15:42:26] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
[15:42:26] [Server thread/INFO]: Saving chunks for level 'New World'/The End
[15:42:27] [Server thread/INFO] [FML]: Unloading dimension 0
[15:42:27] [Server thread/INFO] [FML]: Unloading dimension -1
[15:42:27] [Server thread/INFO] [FML]: Unloading dimension 1
[15:42:27] [Server thread/INFO] [FML]: Applying holder lookups
[15:42:27] [Server thread/INFO] [FML]: Holder lookups applied
[15:42:27] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
[15:42:28] [Client thread/INFO]: Stopping!
[15:42:28] [Client thread/INFO]: SoundSystem shutting down...
[15:42:29] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
package com.sixfoot.elderarcanum;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class CoralNecroBlock extends BlockContainer {
private static String unlocalizedName = "coralNecroBlock";
private static String modelLocation = Test.MODID + ":" + unlocalizedName;
public CoralNecroBlock()
{
super(Material.iron);
this.setUnlocalizedName(unlocalizedName);
this.setCreativeTab(CreativeTabs.tabBlock);
this.setResistance(5.0F);
this.setHardness(10.0F);
this.setLightLevel(0.0F);
this.setDefaultState(this.blockState.getBaseState().withProperty(BlockProperties.percent, BlockProperties.percentFilled.EMPTY));
}
public static void init()
{
Item CoralNerco = GameRegistry.findItem(Test.MODID, unlocalizedName);
ModelResourceLocation CoralNercoBlockModel = new ModelResourceLocation(modelLocation, "inventory");
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(CoralNerco, 0, CoralNercoBlockModel);
GameRegistry.registerTileEntity(TileEntityInv.class, "tileEntityInv");
}
@Override
protected BlockState createBlockState()
{
return new BlockState(this, new IProperty[] {BlockProperties.percent});
}
@Override
public int getMetaFromState(IBlockState state)
{
BlockProperties.percentFilled percentEnum = (BlockProperties.percentFilled) state.getValue(BlockProperties.percent);
return percentEnum.getID();
}
@Override
public int damageDropped(IBlockState state) {
return getMetaFromState(state);
}
@Override
public IBlockState getStateFromMeta(int meta)
{
return getDefaultState().withProperty(BlockProperties.percent, findStateFromMeta(meta));
}
private BlockProperties.percentFilled findStateFromMeta(int meta)
{
switch(meta)
{
case 1:
return BlockProperties.percentFilled.EMPTY;
case 25:
return BlockProperties.percentFilled.QUARTER;
case 50:
return BlockProperties.percentFilled.HALF;
case 75:
return BlockProperties.percentFilled.THREEQUARTER;
case 100:
return BlockProperties.percentFilled.FULL;
}
return BlockProperties.percentFilled.EMPTY;
}
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) {
switch(getMetaFromState(state))
{
case 1:
world.setBlockState(pos, state.withProperty(BlockProperties.percent, BlockProperties.percentFilled.QUARTER));
break;
case 25:
world.setBlockState(pos, state.withProperty(BlockProperties.percent, BlockProperties.percentFilled.HALF));
break;
case 50:
world.setBlockState(pos, state.withProperty(BlockProperties.percent, BlockProperties.percentFilled.THREEQUARTER));
break;
case 75:
world.setBlockState(pos, state.withProperty(BlockProperties.percent, BlockProperties.percentFilled.FULL));
break;
case 100:
world.setBlockState(pos, state.withProperty(BlockProperties.percent, BlockProperties.percentFilled.EMPTY));
break;
}
return true;
}
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
{
if(worldIn.isRemote)
{
double posX = pos.getX() + 0.5;
double posY = pos.getY() + 1.0;
double posZ = pos.getZ() + 0.5;
double velX = 0.0;
double velY = 0.0;
double velZ = 0.0;
int[] otherInfo = new int[0];
Vec3 fireballDirection;
fireballDirection = new Vec3(0.0, 1.0, 0.0);
final double SPEED_IN_BLOCKS_PER_SECOND = 2.0;
final double TICKS_PER_SECOND = 20;
final double SPEED_IN_BLOCKS_PER_TICK = SPEED_IN_BLOCKS_PER_SECOND / TICKS_PER_SECOND;
velX = SPEED_IN_BLOCKS_PER_TICK * fireballDirection.xCoord; // how much to increase the x position every tick
velY = SPEED_IN_BLOCKS_PER_TICK * fireballDirection.yCoord; // how much to increase the y position every tick
velZ = SPEED_IN_BLOCKS_PER_TICK * fireballDirection.zCoord;
TestFX testFX = new TestFX(worldIn, posX, posY, posZ, velX, velY, velZ);
Minecraft.getMinecraft().effectRenderer.addEffect(testFX);
}
}
@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
// TODO Auto-generated method stub
return new TileEntityInv();
}
public EnumWorldBlockLayer getBlockLayer()
{
return EnumWorldBlockLayer.SOLID;
}
@Override
public boolean isOpaqueCube() {
return true;
}
@Override
public boolean isFullCube() {
return false;
}
@Override
public int getRenderType() {
return 3;
}
}
package com.sixfoot.elderarcanum;
import java.util.Random;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.client.event.TextureStitchEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class TestFX extends EntityFX{
private final ResourceLocation TextFxRL = new ResourceLocation("testing:entity/particles");
public TestFX(World world, double posX, double posY, double posZ, double velX, double velY, double velZ)
{
super(world, posX, posY, posZ, velX, velY, velZ);
particleGravity = 100;
particleMaxAge = 100;
//less than 1 turns on Alpha blending
particleAlpha = 0.99F;
//adding our own movement speed to the particles
motionX = velX;
motionY = velY;
motionZ = velZ;
Vec3 fireballDirection;
fireballDirection = new Vec3(0.0, 1.0, 0.0);
final double SPEED_IN_BLOCKS_PER_SECOND = 2.0;
final double TICKS_PER_SECOND = 20;
final double SPEED_IN_BLOCKS_PER_TICK = SPEED_IN_BLOCKS_PER_SECOND / TICKS_PER_SECOND;
velX = SPEED_IN_BLOCKS_PER_TICK * fireballDirection.xCoord; // how much to increase the x position every tick
velY = SPEED_IN_BLOCKS_PER_TICK * fireballDirection.yCoord; // how much to increase the y position every tick
velZ = SPEED_IN_BLOCKS_PER_TICK * fireballDirection.zCoord;
TextureAtlasSprite sprite = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(TextFxRL.toString());
setParticleIcon(sprite);
}
public int getFXLayer()
{
//returning 0 means i am using a particle from vanilla's particle sheet
//returning 1 means that i am not using a particle from vanilla's particle sheet
//returning 0 means i am using a particle from vanilla's particle sheet and it should be lit by world lighting
//returning 3 means that it should be lit based on world lighting and use my own sheet
return 1;
}
public int getBrightnessForRender(float partialTick)
{
return 0xf000f0;
}
public float getAlpha()
{
return 1.0F;
}
public void onUpdate()
{
prevPosX = posX;
prevPosY = posY;
prevPosZ = posZ;
moveEntity(motionX,motionY,motionZ);
if(isCollided || this.particleMaxAge-- <= 0)
{
this.setDead();
}
}
// public void renderParticle(WorldRenderer worldRenderer, Entity entity, float partialTick, float edgeLRdirectionX,
// float edgeUDdirectionY, float edgeLRdirectionZ, float edgeUDdirectionX, float edgeUDdirectionZ)
// {
// Minecraft.getMinecraft().renderEngine.bindTexture(TextFxRL);
// double minU = this.particleIcon.getMinU();
// double maxU = this.particleIcon.getMaxU();
// double minV = this.particleIcon.getMinV();
// double maxV = this.particleIcon.getMaxV();
//
// double scale = 0.1F * this.particleScale; // vanilla scaling factor
// final double scaleLR = scale;
// final double scaleUD = scale;
// double x = this.prevPosX + (this.posX - this.prevPosX) * partialTick - interpPosX;
// double y = this.prevPosY + (this.posY - this.prevPosY) * partialTick - interpPosY;
// double z = this.prevPosZ + (this.posZ - this.prevPosZ) * partialTick - interpPosZ;
//
// int combinedBrightness = this.getBrightnessForRender(partialTick);
// int skyLightTimes16 = combinedBrightness >> 16 & 65535;
// int blockLightTimes16 = combinedBrightness & 65535;
//
// worldRenderer.pos(x - edgeLRdirectionX * scaleLR - edgeUDdirectionX * scaleUD,
// y - edgeUDdirectionY * scaleUD,
// z - edgeLRdirectionZ * scaleLR - edgeUDdirectionZ * scaleUD)
// .tex(maxU, maxV)
// .color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha)
// .lightmap(skyLightTimes16, blockLightTimes16)
// .endVertex();
//
// worldRenderer.pos(x - edgeLRdirectionX * scaleLR + edgeUDdirectionX * scaleUD,
// y + edgeUDdirectionY * scaleUD,
// z - edgeLRdirectionZ * scaleLR + edgeUDdirectionZ * scaleUD)
// .tex(maxU, minV)
// .color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha)
// .lightmap(skyLightTimes16, blockLightTimes16)
// .endVertex();
//
// worldRenderer.pos(x + edgeLRdirectionX * scaleLR + edgeUDdirectionX * scaleUD,
// y + edgeUDdirectionY * scaleUD,
// z + edgeLRdirectionZ * scaleLR + edgeUDdirectionZ * scaleUD)
// .tex(minU, minV)
// .color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha)
// .lightmap(skyLightTimes16, blockLightTimes16)
// .endVertex();
//
// worldRenderer.pos(x + edgeLRdirectionX * scaleLR - edgeUDdirectionX * scaleUD,
// y - edgeUDdirectionY * scaleUD,
// z + edgeLRdirectionZ * scaleLR - edgeUDdirectionZ * scaleUD)
// .tex(minU, maxV)
// .color(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha)
// .lightmap(skyLightTimes16, blockLightTimes16)
// .endVertex();
// }
}
package com.sixfoot.elderarcanum;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.TextureStitchEvent;
public class TextureStitcher {
public void preInit(TextureStitchEvent.Pre event)
{
ResourceLocation TextFxRL = new ResourceLocation("testing:entity/particles");
event.map.registerSprite(TextFxRL);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment