I just had a bit of a major crash when trying to put 0.10.3b on my server. Initially I thought it was due to the fact I use MCPC+, but I tested it against a clean plain Vanilla+Forge server jar and still received the same crash.
The MCPC+ build (latest from their Jenkins) is using 7.8.0.716, and the Vanilla+Forge jar I was using was 7.8.0.732
Here's the crash:
Description: Exception in server tick loop
cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/gui/inventory/GuiContainer
at cpw.mods.fml.common.LoadController.transition(LoadController.java:147)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:697)
at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:93)
at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:355)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:141)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:431)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573)
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/gui/inventory/GuiContainer
at cubex2.cs2core.addon.nei.NEIHelper.registerHandlers(NEIHelper.java:48)
at cubex2.cs2core.addon.NEI.initialize(NEI.java:22)
at cubex2.cs2core.CustomStuff2Core.postInit(CustomStuff2Core.java:83)
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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.GeneratedMethodAccessor1.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:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:186)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:166)
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:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:103)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:696)
... 5 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.gui.inventory.GuiContainer
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:139)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 34 more
I just had a bit of a major crash when trying to put 0.10.3b on my server. Initially I thought it was due to the fact I use MCPC+, but I tested it against a clean plain Vanilla+Forge server jar and still received the same crash.
The MCPC+ build (latest from their Jenkins) is using 7.8.0.716, and the Vanilla+Forge jar I was using was 7.8.0.732
Here's the crash:
Description: Exception in server tick loop
cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/gui/inventory/GuiContainer
at cpw.mods.fml.common.LoadController.transition(LoadController.java:147)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:697)
at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:93)
at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:355)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:141)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:431)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573)
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/gui/inventory/GuiContainer
at cubex2.cs2core.addon.nei.NEIHelper.registerHandlers(NEIHelper.java:48)
at cubex2.cs2core.addon.NEI.initialize(NEI.java:22)
at cubex2.cs2core.CustomStuff2Core.postInit(CustomStuff2Core.java:83)
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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.GeneratedMethodAccessor1.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:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:186)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:166)
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:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:103)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:696)
... 5 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.gui.inventory.GuiContainer
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:139)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 34 more
Try 0.10.3c, it should fix it.
Rollback Post to RevisionRollBack
I'm on twitter: @CubeX2_. Follow me for upcoming features and other stuff ;).
CubeX2, can you do if block has canFaceTop attribute to false texture for facing block will be looks like pumpkin in inventory? My English is bad and i can't say more. If you understand me - please say. If now - i try to tell more good. =\
ALL RIGHT! CS2 is working fine now, new update is cool, thanks dude
Back to the common problems of us CS users the coding^^
Still trying to implement an "Auto-Repair" Sword...
It's basicly working, but I'm not able to destroy any block with it (not even a snow layer lol)
If I leftclick a grass block it will just shortly show the destroying-animation, like 0,2-3 seconds...
Then the grass block is showen as never touched before and it will start again^^
if(itemstack.getIntData("repairCounter") >= 100) {
//triggers ever 5 seconds (100/20=5)
itemstack.setIntData("repairCounter", 0); //resets counter regardless of damage
if(itemstack.getDamage() > 0) {
//Only triggers if item is damaged and previous if statement succeeded
itemstack.setDamage(itemstack.getDamage() - 1);
}
} else {
itemstack.setIntData("repairCounter", itemstack.getIntData("repairCounter") + 1);
}
Thanks for everything appreciate the help of all here!
Just to be clear, does the sword not break blocks even if it is undamaged (damage showing as 0)? If it only has problems while it is damaged, then you may need to add a line to the onBlockDestroyed event so that "repairCounter" is set to -1100 so that there is a 1 minute cooldown [ (1100+100)/20=60 seconds] between when you break a block and the item starts self-repairing. Unfortunately, once you stop mining for 1 minute, the tool would be unusable until fully repaired or a weak block is broken.
Alternatively, you could make the auto-repair be slower so that a block can be broken before auto-repair interrupts breaking the block. Unfortunately, this method still allows the auto-repair to randomly interrupt you.
If the problem was only present when the tool is damaged, then my overall suggestion would be to combine both the cooldown after last block broken and a longer auto-repair cycle for the reasons listed above.
If the problem is that you can't break any blocks even while the tool is undamaged, then I will have to do some testing. It is possible that setting the int data could be causing the tool to stop mining for an instant. If this is the case, it may be difficult to find a working solution. =\
So now that Thermal Expansion support is in, what would be the proper language to create an Induction Smelter recipe? I'd assume mod.addISmelterRecipe( ); but not a clue what order the values should go into it
I made the auto-repair slower, it still won't let me harvest any block...
maybe combine it with right click the item?
when using a sword it's not that important with harvesting, but blocking on the right click... so it's fine the way it is
but I want to add several items like shovels etc.
when adding a pickaxe, am I able to set the repairing to start if i rightclick the item?
So the person using the pickaxe can mine... til the damage counter is to 50 or lower, right click and wait till the item is full again to start mining again?
If yes.... please enlighten my coding-skills xD
some suggesion
Why not use new Date to get the current time\
And use onBlockDestroyed to record the time¤t damage
And when next time you break block with it , get the saved time & damage
And compare to current time ,
ex : if it is 5 minute later after you use the item last time ,repair the item by 1
if 10 ; by 2
By the Date object in javascript ; you can make it self-repair even you are not online.
edited : it seems the scripts cancel the progress you are destroy the block when it is excuted,so maybe onBlockDestroyed will also not work
some suggesion
Why not use new Date to get the current time\
And use onBlockDestroyed to record the time¤t damage
And when next time you break block with it , get the saved time & damage
And compare to current time ,
ex : if it is 5 minute later after you use the item last time ,repair the item by 1
if 10 ; by 2
By the Date object in javascript ; you can make it self-repair even you are not online.
edited : it seems the scripts cancel the progress you are destroy the block when it is excuted,so maybe onBlockDestroyed will also not work
Using a time object instead of a counter is a great idea! I haven't used the time object at all so will need to experiment a bit with it.
I though onBlockDestroyed was supposed to activate after the block was destroyed... that sucks if it resets progress even with onBlockDestroyed. >.<
So far it is sounding like automatically repairing tools won't work very well until tickrate is added for items. =(
Edit: Thought of a nice way to get around the problem. If you add a condition that the onUpdate script only runs while the tool isn't the active item, then there is no problem with it updating while the player is mining. Refer to the code at the end of this post to see what I mean.
I made the auto-repair slower, it still won't let me harvest any block...
maybe combine it with right click the item?
when using a sword it's not that important with harvesting, but blocking on the right click... so it's fine the way it is
but I want to add several items like shovels etc.
when adding a pickaxe, am I able to set the repairing to start if i rightclick the item?
So the person using the pickaxe can mine... til the damage counter is to 50 or lower, right click and wait till the item is full again to start mining again?
If yes.... please enlighten my coding-skills xD
It would be possible to use the onRightClick trigger to set a variable that would start the auto-repair process. You would need to add another condition to your onUpdate trigger to either check if the tool is greater than or equal to 0 if you set the value to -1 when not in use. Alternatively, you could add a bool value that gets set to true by onRightClick and set to false by onUpdate being done repairing.
I think I have come up with an easier and less restrictive method to the auto-repair setup though. Just make it so the tool only auto-repairs while the tool is not the active item. In other words, when the tool is in the player's inventory but not in his hand. Here is all you would need to change:
This is the code for the old bucket item in CS1. What parts will I need to change to make it function in CS2?
Why are you trying to use the old bucket workaround for CS2? The bucket item type does a much better and less glitchy job of making custom liquids work in buckets. Are you trying to make a bottle of the liquid or something?
Regardless, since someone seems to have partially edited it to CS2 already the only line that I know needs changing is the following line needs to be changed from origin to position:
Why are you trying to use the old bucket workaround for CS2? The bucket item type does a much better and less glitchy job of making custom liquids work in buckets. Are you trying to make a bottle of the liquid or something?
Regardless, since someone seems to have partially edited it to CS2 already the only line that I know needs changing is the following line needs to be changed from origin to position:
Command "onWalkingPlayer[0] = "world.createExplosion(position, 5.0, false);";" does not work. Block does not react to the player. onWalkingLiving - not work too, for player and for mobs
When used onWalking [0] = "world.createExplosion (position, 5.0, false);"; to create mines everything works, but after the explosion blocks disappear, but their ghosts remain. The player got stuck in the air and explosions continue.
I guess you mean "ingameMods". That folder is for mods created ingame. It isn't available yet and I forgot to remove the creation of that folder.
I just had a bit of a major crash when trying to put 0.10.3b on my server. Initially I thought it was due to the fact I use MCPC+, but I tested it against a clean plain Vanilla+Forge server jar and still received the same crash.
The MCPC+ build (latest from their Jenkins) is using 7.8.0.716, and the Vanilla+Forge jar I was using was 7.8.0.732
Here's the crash:
The help is welcomed! Though, you using 7.8.0.684 is seriously older than the minimum for 0.10.3b. Cube states that 7.8.0.710 or newer be used.
Try 0.10.3c, it should fix it.
I regret
Just to be clear, does the sword not break blocks even if it is undamaged (damage showing as 0)? If it only has problems while it is damaged, then you may need to add a line to the onBlockDestroyed event so that "repairCounter" is set to -1100 so that there is a 1 minute cooldown [ (1100+100)/20=60 seconds] between when you break a block and the item starts self-repairing. Unfortunately, once you stop mining for 1 minute, the tool would be unusable until fully repaired or a weak block is broken.
Alternatively, you could make the auto-repair be slower so that a block can be broken before auto-repair interrupts breaking the block. Unfortunately, this method still allows the auto-repair to randomly interrupt you.
If the problem was only present when the tool is damaged, then my overall suggestion would be to combine both the cooldown after last block broken and a longer auto-repair cycle for the reasons listed above.
If the problem is that you can't break any blocks even while the tool is undamaged, then I will have to do some testing. It is possible that setting the int data could be causing the tool to stop mining for an instant. If this is the case, it may be difficult to find a working solution. =\
some suggesion
Why not use new Date to get the current time\
And use onBlockDestroyed to record the time¤t damage
And when next time you break block with it , get the saved time & damage
And compare to current time ,
ex : if it is 5 minute later after you use the item last time ,repair the item by 1
if 10 ; by 2
By the Date object in javascript ; you can make it self-repair even you are not online.
edited : it seems the scripts cancel the progress you are destroy the block when it is excuted,so maybe onBlockDestroyed will also not work
Using a time object instead of a counter is a great idea! I haven't used the time object at all so will need to experiment a bit with it.
I though onBlockDestroyed was supposed to activate after the block was destroyed... that sucks if it resets progress even with onBlockDestroyed. >.<
So far it is sounding like automatically repairing tools won't work very well until tickrate is added for items. =(Edit: Thought of a nice way to get around the problem. If you add a condition that the onUpdate script only runs while the tool isn't the active item, then there is no problem with it updating while the player is mining. Refer to the code at the end of this post to see what I mean.
It would be possible to use the onRightClick trigger to set a variable that would start the auto-repair process. You would need to add another condition to your onUpdate trigger to either check if the tool is greater than or equal to 0 if you set the value to -1 when not in use. Alternatively, you could add a bool value that gets set to true by onRightClick and set to false by onUpdate being done repairing.
I think I have come up with an easier and less restrictive method to the auto-repair setup though. Just make it so the tool only auto-repairs while the tool is not the active item. In other words, when the tool is in the player's inventory but not in his hand. Here is all you would need to change:
Hopefully, that fixs the problem. Enjoy!
This is the code for the old bucket item in CS1. What parts will I need to change to make it function in CS2?
Why are you trying to use the old bucket workaround for CS2? The bucket item type does a much better and less glitchy job of making custom liquids work in buckets. Are you trying to make a bottle of the liquid or something?
Regardless, since someone seems to have partially edited it to CS2 already the only line that I know needs changing is the following line needs to be changed from origin to position:
I will look again after I have had some sleep to see if I am missing anything else that needs changed, but it looks like that is everything.
I want to make an empty bucket, e.g. Wooden Bucket, Golden Bucket, etc. that can pick up liquids and place them and give me back the new bucket
That does not work... Is it possible, and if it is, how?
You need your commas to be inside of the quotes just like in the example from the documentation, shown below:
You have also forgot a few plus signs between your text and your next config call. Here is the fixed version for reference.
Hope that works for you. If not, try using variables instead.
Command "onWalkingPlayer[0] = "world.createExplosion(position, 5.0, false);";" does not work. Block does not react to the player. onWalkingLiving - not work too, for player and for mobs
When used onWalking [0] = "world.createExplosion (position, 5.0, false);"; to create mines everything works, but after the explosion blocks disappear, but their ghosts remain. The player got stuck in the air and explosions continue.
Variables don't work either:
Or am I just stupid?
EDIT:
Setting up a custom toolClass worked!
EDIT 2:
Does not work for the ObsiFurnace... Why?
The very last item should not have a comma at the end.
Still doesn't work...
Hmm... I don't know what the problem is then, there should have been a crash if it couldn't use the config scripting functions. =\
As for the furnace, make sure you set the toolClass for both damage value 0 and 1.
Hope that works for you. I will try to figure out what the exact problem is with harvestBlocks and effectiveBlocks later. =\