Jump to content


  • Posts

  • Joined

  • Last visited


  • Gender
  • Location
    In sunny *coughs* SUNNY Britiain
  • Personal Text

Recent Profile Visitors

1059 profile views

jordsta95's Achievements

Creeper Killer

Creeper Killer (4/8)



  1. Simple question, how do you create a blockstate based on a registry name. What I essentially want to do is to be able to pass regName as a parameter, and have said block be created above the current block. BlockPos pos = getPos(); String regName = "minecraft:stone"; world.setBlockState(new BlockPos(pos.getX(), (pos.getY() + 1), pos.getZ()), regName); However, I understand that the second parameter is an instance of IBlockState, but I'm a little lost as to how I can create this using the registry name of a block, which I can then pass in as the variable. Thanks, Jordan
  2. Because when you install a mod pack you download the mods and configs folders (generally), and if the images that the pack dev want the user to see (maybe it's a themed pack, for example) are in the configs folder the user will see the intended textures (as long as they don't delete the images from the config folder)
  3. Because that requires the user using a resource pack (even if bundled with a mod pack, it doesn't mean the user will activate/not deactivate it)
  4. Load from outside the jar, in the mymod folder. And the reason for that is because I have a few items which are there for modpack developers which can be fully customized, apart from the textures (at the minute) and it would be great if they could just replace those textures/add their own in there (so either replace texture.png with the image they want, or put image.png in the folder, and put that filename in the config file to replace the default)
  5. Hi there, I was wondering how to move the .cfg from the main config folder into a subfolder e.g. minecraft/configs/mymod and how I could call a texture from e.g. /mymod/texture.png instead of it being taken from the assets folder in the jar. Thank you
  6. Hey there, Someone has asked me to make a small thing for them, which seems easy enough to do, when I get home. I was just wondering if it would be following to do something like this (without having any coding stuff infront of me to be able to check the spelling, etc.) public void onNeighborBlockChange(World world, int posX, int posY, int posZ, Block neighbourBlock){ if(world.getBlock(posX, posY+1, posZ) == Blocks.stone){ setBlock(posX, posY+1, posZ, world.getBlock(poxX, posY-1, posZ)); } } Just in case this is wrong, what I am looking for is: If a play places stone on top of this block, it will replace the stone, with the block that is below it (essentially copying the block)
  7. According to this link: http://www.minecraftinfo.com/smoothstoneslabdouble.htm the ID you are looking for is: double_stone_slab:8
  8. The potion will be a custom potion I add, yes. And I already have the code: List<EntityPlayer> list = SpellHelper.getPlayersInRange(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 15, 15); // for (EntityPlayer player : list) // { // PotionEffect regenEffect = player.getActivePotionEffect(Potion.regeneration); // if (regenEffect != null && regenEffect.getAmplifier() > 0) // { // if(AlchemicalWizardry.causeHungerChatMessage && !player.isPotionActive(Potion.hunger.id)) // { // player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("message.altar.hunger"))); // } // player.addPotionEffect(new PotionEffect(Potion.hunger.id, 40, regenEffect.getAmplifier() * 2 - 2)); // } // } (Ignore that it is commented out) That is what (used to be) there, and I want to replicate what I am doing, but instead of causing hunger it will fill the altar, slowly. I already know how I will do this bit though. I just need to know how to "inject" my bit of code into the class file for the Blood Altar (which is a tile entity). i.e. Blood Altar's tile entity file, which is where this code goes, will load with my bit of code added in.
  9. Sorry for the terribly worded title, but here's what I want to do: When a player is standing near a blood altar with <potion effect> then <thing happens>. I have the code to do this, but I don't know how I would do this.
  10. Alright, so this is in the client proxy: @Override public void postInit(FMLPostInitializationEvent event){ super.postInit(event); Main.versionChecker = new CheckVersion(); Thread versionCheckThread = new Thread(Main.versionChecker, "Version Check"); versionCheckThread.start(); } @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) public void onEvent(PlayerTickEvent event1) { if (!Main.haveWarnedVersionOutOfDate && event1.player.worldObj.isRemote && !Main.versionChecker.isLatestVersion()) { ClickEvent versionCheckChatClickEvent = new ClickEvent(ClickEvent.Action.OPEN_URL, "http://jabelarminecraft.blogspot.com"); ChatStyle clickableChatStyle = new ChatStyle().setChatClickEvent(versionCheckChatClickEvent); ChatComponentText versionWarningChatComponent = new ChatComponentText("Your Magic Beans Mod is not latest version! Click here to update."); versionWarningChatComponent.setChatStyle(clickableChatStyle); event1.player.addChatMessage(versionWarningChatComponent); Main.haveWarnedVersionOutOfDate = true; } } However, it still doesn't notify (it gets the version number "4" from the URL, and I have the version number set to 3, to test.) So it should notify now, but it doesn't
  11. I did as you said here, everything still works as it did before... and that includes the update checker not working... It prints to the Log, but not in game
  12. It's probably easier to link the full thing, because it may be something unrelated: https://github.com/ThisIsASuperAwesomeAccount/AMod/tree/master/main/java/com/aa/mod Ignore the fact there's two separate version checker thingies (I was trying to get yours to work, so that I could figure out how to get the other to work -- If that makes sense)
  13. The only log stuff I get that contains anything to do with versions and my mod is: And that is obviously not it. So, I added: public void run(){ System.out.println("Client Proxy Loaded"); } To the client proxy, just as a test. But it doesn't print anything... So I would assume it is that, however, I don't know what it wouldn't get called. As I have the same proxy calling thing as I have seen in dozens of other places: @SidedProxy(clientSide = Reference.CLIENT_PROXY, serverSide = Reference.COMMON_PROXY) public static CommonProxy proxy; with the correct folder structure in Reference for them: public static final String CLIENT_PROXY = "com.aa.mod.proxies.ClientProxy"; public static final String COMMON_PROXY = "com.aa.mod.proxies.CommonProxy"; I have never had to use the client proxy before, so I never knew about this not working. But I don't get why it doesn't work.
  14. Here's the only things I have in the main class that talk about proxies: @Mod(modid = Reference.MODID, version = Reference.VERSION) public class Main { @SidedProxy(clientSide = Reference.CLIENT_PROXY, serverSide = Reference.COMMON_PROXY) public static CommonProxy proxy; public static Configuration config; public static Logger logger; @Mod.Instance(Reference.MODID) public static Main instance; public static CheckVersion versionChecker; public static boolean haveWarnedVersionOutOfDate = false; As for it not working... No console message, no message when you log in; not working As for getting the version number, I can only assume it finds that, as that seemed pretty simple. And RealMcrafter, I tried it in the Init, not PostInit, just to see if that was the issue. I tried it there, and it didn't work.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.