Everything posted by f1rSt1kChannel
-
[1.7.2]Publish my mod on github
Have you worked with github? How convenient for me to publish my mod?
-
[1.7.2]Publish my mod on github
Well all mods 1.7.2 repository looks the same, it seems to me, this is done automatically somehow, no?
-
[1.7.2]Publish my mod on github
As is normal upload your mod on github? To my repository looked like here: https://github.com/Glitchfiend/BiomesOPlenty Help, please!
-
Open GUI on new world creation
Do not need to create anything. And instead of "checkWorld" write MODID + "BlaBlaBla".
-
Open GUI on new world creation
@SubscribeEvent public void playerLoggedIn(PlayerLoggedInEvent event){ if(event.player.getEntityData().hasKey("checkWorld")){ return; } event.player.getEntityData().setBoolean("checkWorld", true); System.out.println("Open your GUI"); }
-
getIcon arguments
1 - side, 2 - metadata
-
How to check if Entity is on fire?
entity.isBurning()
-
Drawing on MC Main-Menu with RenderGameOverlayEvent
@ForgeSubscribe public onChangeGUI(GuiOpenEvent e){ if(e.gui instanceof GuiMainMenu){ e.gui = new CustomGuiMainMenu(); } }
-
Potion Effect Particles
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 5, 0, false));
-
[1.7.2] Model Rendering Upsidedown
GL11.glRotated(180, 0, 0, 0);
-
[1.6.4] 3 Questions about custom mobs (2 SOLVED)
>EntityRegistry.addSpawn(MyMob.class, 80, 6, 10, EnumCreatureType.monster, Mycustombiome); Change EnumCreatureType.monster to EnumCreatureType.creature.
-
send partialTick in RenderLivingEvent and RenderPlayerEvent
UP
-
[1.6.4]Scaling item in IItemRenderer
UP.
-
[1.6.4]Scaling item in IItemRenderer
And how to render the item?
-
[1.6.4]Scaling item in IItemRenderer
I need to render the object as usual, but increased its size to shift his position. How do I do this? Sorry for my english, I'm from Ukraine.
-
[1.7.2]Best way to add an entity spawn
Use this: public static BiomeGenBase[] biomesWithout(BiomeGenBase... biomesWithout){ ArrayList<BiomeGenBase> biomes = new ArrayList<BiomeGenBase>(); for(BiomeGenBase biome : BiomeGenBase.biomeList){ for(int i = 0; i < biomesWithout.length; i++){ if(biome != null && biome != biomesWithout[i]){ biomes.add(biome); } } } return biomes.toArray(new BiomeGenBase[biomes.size()]); } And: EntityRegistry.addSpawn(EntityPig2.class, 1, 1, 1, EnumCreatureType.creature, biomesWithout(/** here write biomes in which the mob will not spawn */));
-
[1.7.2]Best way to add an entity spawn
No, this will crash, since biomeList contains null values! Look here for a solution: http://www.minecraftforge.net/forum/index.php/topic,17455.msg88353.html#msg88353 I am sorry to have confused.
-
[1.7.2]Best way to add an entity spawn
EntityRegistry.addSpawn(EntityPig2.class, 1, 1, 1, EnumCreatureType.creature, BiomeGenBase.biomeList);
-
[1.7.2] Change item angles/position/scale
Very thanks!
-
[1.7.2] Change item angles/position/scale
more detail, please
-
[SOLVED][1.6.4] Infinite durability of tools
Do durability 0 or -1.
-
Replace an block
Create class: 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; } } And BlockReplaceHelper.replaceBlock(Block.farmLand, NewFarmLand.class)
-
How to find an empty place in the nether?
for(int i = 0; i < 9; i++){ if(world.getBlockId(x, y + i, z) == 0){ //generation } }
-
[1.7.2] [SOLVED] Custom potion effect to armor
onArmorTickUpdate.
-
Sending Message to All Players?
Use Packet3Chat.
IPS spam blocked by CleanTalk.