mrkarp
-
Posts
24 -
Joined
-
Last visited
Posts posted by mrkarp
-
-
Well after reading more and more, It looks like instead of tryin the advanced way, making a byte array, Looks like i should use the .gif method:
public void onTick() { Object imageData; switch (frame) { case 0: imageData = frame1; break; case 1: imageData = frame2; break; case 2: imageData = frame3; break; case 3: imageData = frame4; break; default: break; } }
But, what does the frame 1-4 mean, I think I replace them with the texture slot I want right?
-
So to my understanding, this is how you get a block to look animated right, such as:
http://xycraft.wikispaces.com/Xychoridite+Bricks
They look all wavey and liquid like. Ive seen multiple listings on how to accomplish this, but I am still unable to even get the code right.
Here is the example code I have been following.
private byte bg[] = new byte[1024]; public TextureSomethingFX() { super(myIconIndex); try { loadBG(ImageIO.read(this.getClass().getResource("textures/background.png"))); } catch (IOException e) { e.printStackTrace(); } } private void loadBG(BufferedImage bi) { for (int row=0;row<16;row++) for (int col=0;col<16;col++) { int pixel = bi.getRGB(col, row); bg [((col+(row*16))*4)+0] = (byte)((pixel>>16)&0xFF); //Red bg[((col+(row*16))*4)+1] = (byte)((pixel>>&0xFF); //Green bg [((col+(row*16))*4)+2] = (byte)((pixel)&0xFF); //Blue bg [((col+(row*16))*4)+3] = (byte)((pixel>>24)&0xFF); //Alpha } }
Now, I know to replace the
loadBG(ImageIO.read(this.getClass().getResource("textures/background.png")));
With the png I have, but do I put this code in my block code, or my core mod file?
And also, this will have 16 diffrent cycles right?
Appreciate it.
-
Hmm, so thats what the par1 == 7 is about, the metadata! oh, so at its last instance before it breaks it decieds if it drops a ore or a gem?
And love the Star Trek Skin.
-
Ya I can kinda understand the code of the tileEntty, but I just cant manage to get it down enough to make my own furnace for instance, Ive gotten it written out and placeable and working, but boy did I not understand anything about the code I was following.
I love learning it though, and my Java programming class is helping, Il get there!
I appreciate all this input. Thanks Gentlemen.
-
Ok, well still havent got tile entities working, or the understanding of them enough to try one yet.
I appreciate the help!
-
Ok so I guess :
FurnaceRecipes.smelting().addSmelting(ITEM OR BLOCK, int, new ItemStack(ITEM OR BLOCK, int, int), float);
is used for smelting things with metadata like wool or something. So not what I am looking for.
-
Is this possible? Ive been poking around on the net, and didnt find anything conclusive yet, so far this has interested me,
FurnaceRecipes.smelting().addSmelting(ITEM OR BLOCK, int, new ItemStack(ITEM OR BLOCK, int, int), float);
is this used for what I am seeking? or can I add code to the ussual:
GameRegistry.addSmelting(item or block), new ItemStack(item or block, int), float);
-
Hello, I am stuck on having an ore that is generated in the world drop and item, and another item.
Ive looked at the crops block to see how wheat did that with seeds and wheat, but I cannot figure it out.
protected int getGemItem() { return KarbideCore.tungstenite.itemID; } protected int getOreItem() { return KarbideCore.karbide.itemID; } public int idDropped(int par1, Random par2Random, int par3) { return par1 == 7 ? this.getOreItem() : this.getGemItem(); } public int quantityDropped(int meta, int fortune, Random random){ return 1 + random.nextInt(2); }
-
Question, what is the bbv?
Im tryin to see what I should be looking for.
-
Well shoot, So my rendering is tryin to fetch a client side only class.
Thank you sir, Lets see if I can fix it.
-
So Im tryin to start up my server after updating my mod, and now im getting this.
[iNFO] Starting minecraft server version 1.4.7 [WARNING] To start the server with more ram, launch it as "java -Xmx1024M -Xms1024M -jar minecraft_server.jar" [sEVERE] Encountered an unexpected exception NoClassDefFoundError java.lang.NoClassDefFoundError: bbv at karbide.common.KarbideCore.<clinit>(KarbideCore.java:60) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:418) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) at com.google.common.eventbus.EventBus.post(EventBus.java:268) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) at com.google.common.eventbus.EventBus.post(EventBus.java:268) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83) at cpw.mods.fml.common.Loader.loadMods(Loader.java:479) at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:86) at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:350) at ho.c(DedicatedServer.java:64) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458) at fy.run(SourceFile:849) Caused by: java.lang.ClassNotFoundException: bbv at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:185) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 29 more Caused by: java.lang.NullPointerException at org.objectweb.asm.ClassReader.<init>(Unknown Source) at codechicken.core.asm.ClassHeirachyManager.transform(ClassHeirachyManager.java:80) at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:228) at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:173) ... 31 more [sEVERE] This crash report has been saved to:\crash-reports\crash-2013-02-19_02.30.13-server.txt
at karbide.common.KarbideCore.<clinit>(KarbideCore.java:60)
Thats mine, wth library am I missing? and or Ive recently created my own mob, and was unclear on how to use my own sounds, so I poked around and got it to work, would that cause this? But, like always its probally right in fron of my face.
-
Aw, well sorry for not seein that in the ItemFood, but i really appreciate the info! thank you guys so much.
-
Eat some food, mostly a custom food when your hunger bar is full.
I know its possible, i saw it somewhere on teh webs, but for the past 3 hours of searching i cannot,
someone shed some light on this?
-
well anyone having this issue, here was my fix
public static ClientProxy proxy = new ClientProxy();
should been
public static CommonProxy proxy = new ClientProxy();
yay! learning!
-
An error occured trying to load a proxy into {clientSide=kbulb.client.ClientProxy, serverSide=kbulb.common.CommonProxy}.kbulb.common.kcore
thats probally my problem right?
Hrm...
-
I can load up single player just fine,
tried to load up a SMP server and kept getting this, I have a SidedProxy that extends.
Hrm?
2013-01-26 10:08:02 [FINE] [ForgeModLoader] Attempting to inject @SidedProxy classes into MrKarp_Karbide
2013-01-26 10:08:02 [sEVERE] [ForgeModLoader] Attempted to load a proxy type kbulb.common.CommonProxy into kbulb.common.kcore.proxy, but the types don't match
2013-01-26 10:08:02 [sEVERE] [ForgeModLoader] An error occured trying to load a proxy into {clientSide=kbulb.client.ClientProxy, serverSide=kbulb.common.CommonProxy}.kbulb.common.kcore
cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:62)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:479)
at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:86)
at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:345)
at ho.c(DedicatedServer.java:64)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458)
at fy.run(SourceFile:849)
2013-01-26 10:08:02 [sEVERE] [ForgeModLoader] The following problems were captured during this phase
2013-01-26 10:08:02 [sEVERE] [ForgeModLoader] Caught exception from MrKarp_Karbide
cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:479)
at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:86)
at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:345)
at ho.c(DedicatedServer.java:64)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458)
at fy.run(SourceFile:849)
Caused by: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:62)
... 26 more
2013-01-26 10:08:02 [iNFO] [sTDERR] cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException
2013-01-26 10:08:02 [iNFO] [sTDERR] at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69)
2013-01-26 10:08:02 [iNFO] [sTDERR] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
2013-01-26 10:08:02 [iNFO] [sTDERR] at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
2013-01-26 10:08:02 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-01-26 10:08:02 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2013-01-26 10:08:02 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2013-01-26 10:08:02 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-01-26 10:08:02 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2013-01-26 10:08:02 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2013-01-26 10:08:02 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2013-01-26 10:08:02 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
2013-01-26 10:08:02 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-01-26 10:08:02 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-01-26 10:08:02 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-01-26 10:08:02 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2013-01-26 10:08:02 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2013-01-26 10:08:02 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-01-26 10:08:02 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2013-01-26 10:08:02 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2013-01-26 10:08:02 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2013-01-26 10:08:02 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
2013-01-26 10:08:02 [iNFO] [sTDERR] at cpw.mods.fml.common.Loader.loadMods(Loader.java:479)
2013-01-26 10:08:02 [iNFO] [sTDERR] at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:86)
2013-01-26 10:08:02 [iNFO] [sTDERR] at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:345)
2013-01-26 10:08:02 [iNFO] [sTDERR] at ho.c(DedicatedServer.java:64)
2013-01-26 10:08:02 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458)
2013-01-26 10:08:02 [iNFO] [sTDERR] at fy.run(SourceFile:849)
2013-01-26 10:08:02 [iNFO] [sTDERR] Caused by: cpw.mods.fml.common.LoaderException
2013-01-26 10:08:02 [iNFO] [sTDERR] at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:62)
2013-01-26 10:08:02 [iNFO] [sTDERR] ... 26 more
2013-01-26 10:08:02 [sEVERE] [Minecraft] Encountered an unexpected exception LoaderException
cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:479)
at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:86)
at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:345)
at ho.c(DedicatedServer.java:64)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458)
at fy.run(SourceFile:849)
Caused by: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:62)
... 26 more
-
Hey man im having the same issue, what was your fix?
-
Ok well ive fied my issues, but can someone tell me why this has to be in my class?
public Item setIconIndex(int par1)
{
this.iconIndex = par1;
return this;
}
-
well adding this to my item class
public Item setIconIndex(int par1)
{
this.iconIndex = par1;
return this;
}
has done it, but now its rendering the purple background...
-
Hello, I am fairly new to modding with forge, although I have beenspending alot of time learning its ways and methods.
I am having trouble rendering an item icon i have made and put into my mod.
here is my proxy
@Override
public void registerRenders(){
MinecraftForgeClient.preloadTexture("/kimg/kore.png");
MinecraftForgeClient.preloadTexture("/kimg/kitem.png"); <--- that is the png i use for my items
Here is my code in my core file:
kfilament = new kfilament(kfilamentID).setItemName("K Filament").setIconIndex(0); <--- is a iron helmet, not mine.
What am I doing wrong? every tutorial Ive seen just uses setIconIndex() and bam, it works, not me ;(
Appreciate the help in advanced.
TextureFX
in Modder Support
Posted
Wow was i tryin to hard! But im still struggling, almost!!!! almost!
Here is my FX class:
and here is the block that im tryin to animated:
I also noticed that I need
And
In my client proxy.
I know im close becuase its no longer the original texture, its clear, see through, but thats a start. Im catching on, just need some help in what is causing it to not read the png file.
Appreciate all the help.