
nyankatze
Members-
Posts
15 -
Joined
-
Last visited
Everything posted by nyankatze
-
[1.7.2 1061] Can't start server in dev enviroment
nyankatze replied to nyankatze's topic in Modder Support
Oh, thank you! Removing extra configurations works =) -
When I wrote some code and checked it in singleplayer, it works perfectly. Somebody installed my mod on server, and it didn't want to work. So, I wanted to run my mod on server in dev inveroment. Console output Server configurations It's obvious that minecraft missed method "main" in net.minecraft.server.MinecraftServer, but when I checked it, it was there. Am I missed something? Maybe I need to install server sources separatly?
-
Umm... Try to delete .gradle folder in your user folder and try to run "gradlew setupDecompWorkspace eclipse" again. Yes, in cmd
-
No, he means something different. Run gradlew eclipse!
-
no problem
-
Oh, you! Try this: setBlockTextureName("extrastuff:blockMatter");
-
Hi, guys! I can't get how to add pre-written book in creative tab. I made itemstack with nbt like in this topic. Help noob, please!
-
I'm trying to replace vanilla axes.
-
I am not advansed in java, my bad, sorry :-/
-
Hi, guys! I have one question. How to replace vanilla item class with my new class? Does anybody know? I seen topic where were BlockReplaceHelper, but my attempts end in failure when I tried to rewrite to fit my needs. [spoiler=BlockReplaceHelper] import com.google.common.collect.BiMap; import cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry; import cpw.mods.fml.common.registry.GameData; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.util.ObjectIntIdentityMap; import net.minecraft.util.RegistryNamespaced; import java.lang.reflect.Field; import java.lang.reflect.Modifier; public class BlockReplaceHelper{ public static boolean replaceBlock(Block toReplace, Class<? extends Block> blockClass){ Field modifiersField=null; try{ modifiersField=Field.class.getDeclaredField("modifiers"); modifiersField.setAccessible(true); for(Field field:Blocks.class.getDeclaredFields()){ if (Block.class.isAssignableFrom(field.getType())){ Block block=(Block)field.get(null); if (block==toReplace){ String registryName=Block.blockRegistry.getNameForObject(block); int id=Block.getIdFromBlock(block); ItemBlock item=(ItemBlock) Item.getItemFromBlock(block); System.out.println("Replacing block - "+id+"/"+registryName); Block newBlock=blockClass.newInstance(); FMLControlledNamespacedRegistry<Block> registry= GameData.blockRegistry; registry.putObject(registryName,newBlock); Field map=RegistryNamespaced.class.getDeclaredFields()[0]; map.setAccessible(true); ((ObjectIntIdentityMap)map.get(registry)).func_148746_a(newBlock,id); map=FMLControlledNamespacedRegistry.class.getDeclaredField("namedIds"); map.setAccessible(true); ((BiMap)map.get(registry)).put(registryName,id); field.setAccessible(true); int modifiers=modifiersField.getInt(field); modifiers&=~Modifier.FINAL; modifiersField.setInt(field,modifiers); field.set(null,newBlock); Field itemblock=ItemBlock.class.getDeclaredFields()[0]; itemblock.setAccessible(true); modifiers=modifiersField.getInt(itemblock); modifiers&=~Modifier.FINAL; modifiersField.setInt(itemblock,modifiers); itemblock.set(item,newBlock); System.out.println("Check field: "+field.get(null).getClass()); System.out.println("Check registry: "+Block.blockRegistry.getObjectById(id).getClass()); System.out.println("Check item: "+((ItemBlock)Item.getItemFromBlock(newBlock)).field_150939_a.getClass()); } } } }catch(Exception e){ e.printStackTrace(); return false; } return true; } } P.S.:sorry for my bad english
-
Can someone tell me how to register biomes in 1.7.2? Please!
-
Oh, forgot. I also tried to substitute vanilla biome colors, but it doesn't want to work too.
-
Please, help me, somebody
-
I used decimal value of hex color #c1de00. Registered biome this way public static final BiomeGenBase Autumn = (new BiomeGen(18));
-
I wanna port my 1.6.4 mod for 1.7.2 (1029), but setColor() doesn't work for biomes. Is that bug or this is my fault? //biome code public class BiomeGen extends BiomeGenBase { public BiomeGen(int par1) { super(par1); this.spawnableMonsterList.clear(); this.spawnableCreatureList.clear(); this.setColor(12705280); this.theBiomeDecorator.treesPerChunk = 3; this.waterColorMultiplier = 0x2167FF; this.setBiomeName("Autumn forest"); } } Interesting that waterColorMultiplier works clear.