Started by
SngLol
on
Topic category: Troubleshooting, bugs, and solutions
MCreator 1.7.5 for Minecraft 1.11.2
Here are 4 bugs I've found and figured out how to fix:
Shovels or "Spades"
MCreators "Spade" tool will not have any efficiency boost for blocks you normaly destroy with shovels/spades, and here's why:
If you click "Edit code of selected code element" while having selected your shovel/spade, you can scroll down till you find this:
static { Item.ToolMaterial enumt = EnumHelper.addToolMaterial("MyShovel", 2, 2250, 9F, 3, 40); block = (Item) (new ItemSpade(enumt) { public Set<String> getToolClasses(ItemStack stack) { HashMap<String, Integer> ret = new HashMap<String, Integer>(); ret.put("spade", 2); <-- You want to look here return ret.keySet(); } }).setUnlocalizedName("MyShovel"); block.setRegistryName("MyShovel"); GameRegistry.register(block); block.setCreativeTab(mcreator_gDMTab.tab); } find the line:ret.put("spade", 1); and simply change it to:
ret.put("shovel", 1); the number 1 on this line represents your shovel's "Harvest Level" Biomes When creating a biome you will get an error message no matter what you try to change. (atleast for me) Once again you click "Edit code of selected code element" and find this: static { customProps = new Biome.BiomeProperties("theDirtOnlyLand"); customProps.setRainfall(0.5F); customProps.setBaseHeight(0.1F); customProps.setHeightVariation(0.3F); customProps.setWaterColor(); <-- You want to look here biome = new BiomeGentheDirtOnlyLand(customProps); } simply delete the line:
customProps.setWaterColor(); and it will work fine. Item Names Item names in game are displayed like this: item.MyItem.name instead of like this: My Item there's an easy fix here too. Go to: MCreator\forge\src\main\resources
Here is a file named: pack.mcmeta
Open it and change pack_format from 3 to 2. Servers I found that if your mod doesn't work on servers theres 1 thing that might be the reason for it. Blocks that spawn particles seems to be 1 reason for making your mod unable to run on servers. Just remove the particles from those blocks and your mod is server ready. Or you can do this: (credit to LueLusten) "You need to remove the line around line 90 on a normal block" - LueLusten Find this code: public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random random) { EntityPlayer entity = Minecraft.getMinecraft().player; <-- Remove this line int i = pos.getX(); int j = pos.getY(); int k = pos.getZ(); World par1World = world; int par2 = i; int par3 = j; int par4 = k; Random par5Random = random;
Remove the line: EntityPlayer entity = Minecraft.getMinecraft().thePlayer; I hope the Pylo team take note of this so they can fix it in future updates.
Edited by SngLol on Tue, 10/10/2017 - 20:33
Thanks for this topic!
You can fix the biomes error also by adding custom biomes colors, but if you don't want, you need to fix it in the way you showed here.
Really? Shovels don't work? I need to fix my lavic shovel (lol I have made only one shovel in my mod)
@#1 Haha, yeah shovels doesn't work. I've double checked multiple times.
Glad my time helped someone ^-^
The new mistery of Minecraft :
The legend of the secret shovel that was borrowed by Herobrine with a not-working spade XD
@#2 Best comment ever xD
Ok i seems you missed one of the problems for blocks and servers you need to remove the line around line 90 on a normal block without adding contaners or any other silly options lol
Remove or comment out:
[spoiler]EntityPlayer entity = Minecraft.getMinecraft().thePlayer;[/spoiler]
If you check all the code you will find this is not even called on a default block, this fixed all my block problems, when this link is left in it will make the block not been seen by the server or other play when you place it or it will wig out and ad a negative number on your item and not place it.
Hello. I know these posts are old, but could this be what causes my mod to fail on servers? I'm in the 2021 snapshot
lava spawning magical logs in the element legends