Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DarkGuardsman

Forge Modder
  • Joined

  • Last visited

Everything posted by DarkGuardsman

  1. ;/ ok, but i still want to finish my testing of it. Need to make sure it fits the original need for one of my mods.
  2. i was posting the code for people to make suggestions before i finished and make a pull request. Also too see if i missed anything in make this work right.
  3. Ok i got somethings, don't know what it is but its something . I took how forge did custom item rendering and tried to make my code a custom player name render. It will do a check too see if the mod wants to use the normal name render. If it doesn't it calls to the mod's playerName render. At least that how it should work. Here my code if anyone want to comment on it. I'm still trying to understand how to make hooks, and how to use them. At the bottom of the ForgeHooksClient.class public static boolean ShouldRenderNameOther() { for (IPlayerName handler : playerNameHandlers) { if (handler.shouldRenderNameOther()) { return true; } } return false; } static LinkedList<IPlayerName> playerNameHandlers = new LinkedList<IPlayerName>(); public static void renderPlayerName(IPlayerName customRenderer, EntityPlayer par1EntityPlayer, double par2, double par4, double par6) { if(customRenderer != null) { customRenderer.renderNewName(par1EntityPlayer,par2, par4, par6); } } at the bottom of the MinecraftForgeCleint.class private static IPlayerName customPlayerNameRender; public static void registerPlayerNameRenderer(IPlayerName renderer) { customPlayerNameRender = renderer; } public static IPlayerName getPlayerNameRender() { return customPlayerNameRender; } My handler class package net.minecraft.src.forge; import net.minecraft.src.*; public interface IPlayerName { /** Called when RenderPlayer goes to render player name. * @return true if player's name should be rendered another way */ public boolean shouldRenderNameOther(); public void renderNewName(EntityPlayer par1EntityPlayer, double par2, double par4, double par6); } changed made to renderPlayer.class if(ForgeHooksClient.ShouldRenderNameOther()) { //normal renderName Stuff } else { IPlayerName customRenderer = MinecraftForgeClient.getPlayerNameRender(); ForgeHooksClient.renderPlayerName(customRenderer, par1EntityPlayer,par2,par4, par6); }
  4. i know being busy too well I would find them fascinating if i understood java better. Still working out in my head how it goes together.
  5. ty, your doing a good job at not hand holding. I'll just try something and post back here if i need code help.
  6. Use world.getBlockMetadata to get the metadata of the block the tilen entity is in. Thank you. Might actual get something done for the barracks block of my mod.
  7. I'd like to see a tut on ore dictionary too. Its probably simple for the more experience modders but newer modders don't know how. Also more tuts in the tutorial section would be rather nice too. I think the last time i was in there i saw only 3 that explained image index and config file making. If non of the forum staff have the time too add them you could make a sub forum on here for users to make there own tuts. Might also want to add a code help sub forum since general Discussions turned into one basically.
  8. ty after i posted and finish work on one of my mods i finally got to google how. I'm a little stuck on how to start going about creating a hook. I'm going to do a little research later on it but you think you can start me in the right direction. Maybe with an example or guide of how forge does hooks.
  9. you think you can show how you got the metadata from your tile entity. I've been trying to make some tile entities and haven't figure that one out.
  10. I don't know any open src mods that do what you want but minecraft src has what you need most of the time. If not Google what your looking for or search minecraft forum. It may take time but by reading threw the minecraft code you can learn alot.
  11. ty i found the where but i'm confused on how. Do i edit the code with the changes i want or is there some button i press to make the request. I've never used GitHub or open source stuff. Also i'm not even sure how to make a hook for something.
  12. To be honest you don't really need java experience to make mods but it helps a lot. Also be best if you go to minecraft forum's modding section and read some of the tutorials. but i'll answer some questions really quick. TileEntity is an entity that acts in the same space as a block, its mainly used to do simple tasks and save data to the block location. as for you question #2 what you need to do is make a crafting recipe that will get the items current damage, outputs the item with 1 less use, and leave it in the crafting window. I actual don't have or know the code for this but if you search the minecraft code, parts of it will be there. If you need code for something else just think what already does this and go find it's code.
  13. i had this happen for a while when coding NPCs what you need to do is add another constuctor that just predefines varables. For example public EntityGuardBase(World world) { this(world,0,0); } both of the zero are varables i defined in the actual constructor that are not pulled until Nbt data is read.
  14. too quote forge's gitHub from what i'm reading it will read a file from the world file when loading the world and change the block ids based on that file.
  15. I was on git hub trying to see if i could submit a request for a hook and found this https://github.com/MinecraftForge/MinecraftForge/pull/27 from what i read this looks a lot like an answer too this http://minecraftforge.net/forum/index.php/topic,8.0.html which if it is how is it used in place of the current BlockID system.
  16. Ok i got it working. What i needed to do was get the entity to reset its texture, type and team on EntityUpdate. the only problem i have now is that Guard Entities are not rendering tile the chunk is updated. eg i click. place, destroy or cause an update of somethings. Also i seem not too be able to set the item in the Entities hand. I'm using the same approach that other mobs use but nothing seems too work.
  17. How and where do i do that at?
  18. Even though this causes issues with other mods you could null out the block id and replace the id with your own. For example you can null out id 20(glass) and then make a new glass block with id 20 to replace it. should work for other blocks like tnt, flowers, wood and such. Though i think this breaks crafting and such.
  19. i don't think you use a blank render file, i do think there need to be a few things in there. maybe a call to do the actual render of the the entity. Also may i ask is your entity an entity like a mob that just doesn't move or is it a TileEntity because if it is a tileEntity this might help http://www.minecraftforum.net/topic/1154044-12520412-duckys-modding-tutorials-make-your-blocks-nice-now-with-cables-api/page__hl__render
  20. I think they do from what i've read out of the code and on forums. If they are that means i'm doing something wrong. Either something is overriding the data or server side is not spawning the guard right. Think you can show me how you do it in your code? then i can compare and find my mistake. I just copied how EntityWolf did it was all actually. k guess i'll recode my EntityClass again off the wolf class. I'm getting packet handler errors when spawning them Smp anywyas. So its best i restart fresh, get it working and then add in my own code Edit: i recoded my code. descided not use the wolf.class as my base but villager.class. I'm still getting this error: java.lang.NullPointerException at net.minecraft.src.NetClientHandler.handleMobSpawn(NetClientHandler.java:758) at net.minecraft.src.Packet24MobSpawn.processPacket(Packet24MobSpawn.java:88) at net.minecraft.src.NetworkManager.processReadPackets(NetworkManager.java:343) at net.minecraft.src.NetClientHandler.processReadPackets(NetClientHandler.java:68) at net.minecraft.src.WorldClient.tick(WorldClient.java:62) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1867) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:819) at net.minecraft.client.Minecraft.run(Minecraft.java:747) at java.lang.Thread.run(Unknown Source) --- END ERROR REPORT c6232b2f ---------- Edit: fixed that error turns out you need something like this public EntityGuardBase(World par1World) { this(par1World, 0,0); } at the being on the class. Though i still can't get the texture updated for smp yet.
  21. i tend not to promote my mods but rather just post them and let them be. I mostly mod for myself or my server then public release my mods for other. The harder part i've found about modding is getting modding help and find that the code i need.
  22. In the renderPlayer.class i tend to rewrite the RenderName method to make my mod ComeCloser work. Since forge changes that class i tend to have to rewrite my mod every update to be safe. It would be nice if there were some hooks to mess around with the rendering of player names. For example changing the size of the name tag, The name being displayed, the colors of the name, or for my mod the range at which it renders for other players. i would be grateful if they were added to forge. Especially since i plan to edit the player's name to show his Team in another mod i'm working on. I think a few other mods would take advantage of this if the hooks existed.
  23. this is a very good ideal. Running a server one of the hardest parts are configs. If someone even has one setting off they will crash on connect, crafting or using a GUI. This usually scares players off from using mods or playing smp with mods. So I've been working on in a few of my mods having the config changed by server packets. For example my ComeCloser mod controls render range of the player name. My original way of changing the range setting was with a config and with the mod version containing the config number. Now with packets i can send the range setting when the player logs in, and Since the render player name is called every update it will use the new setting. this way the player doesn't have to change the setting for range ever server he logs into. However, i don't think this would work with blocks since there ids are registered when the game starts. Unless someone rewrites the blocks to not be register till the player loads a world. This in mind a mod could be written that would get the config list from a server and send it to the player. Then backing up the old configs first, delete them and write over with a new temp list. The player can then restart his client and connect to the server with the correct settings. Once logged out the mod will then store the server list in a folder called "ServerConfigs/ServerName". Which can be retrieved latter if the player decides to restore the original configs. Another option playing on the same ideal is to redirect where minecraft looks for its mod configs to a new folder containing the servers configs. This way the player doesn't have to restart twice after switching the configs folder from the server.
  24. i think it does requires a render to go with the entity
  25. I think they do from what i've read out of the code and on forums. If they are that means i'm doing something wrong. Either something is overriding the data or server side is not spawning the guard right. Think you can show me how you do it in your code? then i can compare and find my mistake.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.