Everything posted by Draco18s
-
Removing Recipes: What on Earth is up with the Stone Hoe?
Turns out I'm an idiot. Iterating over an array in the positive direction and removing elements causes everything to shift downwards.
-
[1.7.10][Solved]New rail recipe only works when playtesting in Eclipse.
Jesus F-ing Christ! YOU can't find one of YOUR desired recipe removals (but its in my list) and I can't find one of MINE (but its in your list)! ...And I think I know what the issue is. Add an i-- right after you remove the recipe (or change the iteration to start at list.size()-1 and count backwards). Because we're both itterating over the array from front to back, we're accidentally skipping over array elements. I'm such an idiot. (I blame it on being sick and overworked: 36.5 hours logged last week and I wasn't in the office Monday or Tuesday).
-
[1.7.10][Solved]New rail recipe only works when playtesting in Eclipse.
Does the gold rail show up in the console log anywhere? It should: 192: net.minecraft.item.ItemBlock@c94504 -- tile.goldenRail
-
Removing Recipes: What on Earth is up with the Stone Hoe?
So in my own kerjiggering of recipes, I want to replace the recipes for the stone tools. Axe, pick, shovel, gone. Hoe...apparently does not have a recipe in the CraftingManager. In part of debugging why the hell it isn't being removed, I printed out every damn entry: 210: wood hoe 213: iron hoe 215: diamond hoe 217: gold hoe No stone hoe. Code:
-
[1.7.10][Solved]New rail recipe only works when playtesting in Eclipse.
Having just now started poking at the removal of vanilla recipes... You can't remove a recipe by its output. You need to find ShapedRecipes object that has a getRecipeOutput().getItem() that matches the result you're trying to remove. Note, this might not be the best way, but here's what I'm trying now: (And I'm sure that if I'm wrong, someone will step in and correct me) ArrayList list = (ArrayList) CraftingManager.getInstance().getRecipeList(); //get all recipes IRecipe recipe; int recipesFound = 0; for(int i=0; i<list.size(); i++) { //loop through them Object o =list.get(i); if(o instanceof IRecipe) { recipe = (IRecipe) o; if(recipe.getRecipeOutput() != null) { //your missing this line. Sometimes a result can be null (no, I don't know why) System.out.println(i + ": " + recipe.getRecipeOutput().getItem().getUnlocalizedName()); if(recipe.getRecipeOutput().getItem() == Items.stone_pickaxe) { //if the item result is the item result I am looking for list.remove(recipe); //remove it } } } } This is compiled and running along side other mods:
-
[1.7.10] Messing with stack sizes
I meant a helper for the specific purpose of overwriting vanilla items. It's a "relatively" common task, but there's no explicit helper function.
-
[1.7.10][Solved]New rail recipe only works when playtesting in Eclipse.
Item.getItemFromBlock(some_block)
-
[1.7.10] Messing with stack sizes
Reflection can do anything. Problem is: you have to know how to do reflection. I don't believe there are any helper functions for this.
-
[1.7.10][Solved]New rail recipe only works when playtesting in Eclipse.
All you did was wrap his parameters in a new Object[] {} which is already done by the compiler. http://www.minecraftforge.net/forum/index.php/topic,25202.msg128448.html#msg128448
-
Multiple custom CreativeTabs for custom item/block
Wasn't:
-
Multiple custom CreativeTabs for custom item/block
I don't think so. Looking at the functions involved it does not appear so.
-
Problem with buckets (1.7.10)
setContainerItem(Items.bucket); in your bucket class.
-
[1.7.10][SOLVED]Using multiple Guis with the IGuiHandler?
See that spot that says "switch(ID)"? That's where you add more IDs.
-
[1.7.10] Custom Tab Background?
try .setBackgroundImageName(MODID + ":" + "creativeTab") And if that doesn't work, check your console for errors, it will tell you if it failed to load an image. Copy that error and post it.
-
[1.7.10][Solved] Sending custom data to Client GUI.
I'd create a static class that all it does is hold onto the data received and then the GUI can just read those variables when it draws. Short answer: yes.
- [1.7.2]Spawn block
-
[1.7.10] Custom dim folder
I know Mystcraft does it (it names them MYST_xxx) but yeah, why? Mystcraft is really the only dimension adding mod I can think of that would need that.
-
Help with full bright block
Did you register it?
-
[Sovled] [1.7.10] Strobe Light Effect
Don't even need a tile entity. world.scheduleBlockUpdate(x,y,z,this,1) in the block's update function will suffice.
-
[1.7.10] Messing with stack sizes
Remove and replace its recipe so that it craft "I can't believe it's not a diamond sword" instead of a diamond sword.
-
[1.7.10]onImpact not called when using onUpdate method?
...and if there's some part of super.onUpdate() you don't want, go look at it and find the bits you DO want and copy them.
-
Adding particles
Try this out: https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/client/RadarParticle.java
-
Drop set not working
If i do this it still drops its self Negative. CDrop is of type Item and Items don't drop Items, Blocks drop Items (or Blocks, but Blocks are also Items).
-
Improving my crafting bench
Those slots can already, natively, hold items. Apply damage to the item stack. The whole bench would then be a TileEntity that has an internal inventory (like a chest) to hold and contain those items.
-
[Sovled] [1.7.10] Strobe Light Effect
So congradulations on writing an infinite loop. This is basic programming and you have failed it.
IPS spam blocked by CleanTalk.