Jump to content

strumshot

Members
  • Posts

    133
  • Joined

  • Last visited

Everything posted by strumshot

  1. Also, I see you are new to the boards; dont be afraid to click that thank you button in the corner if anyone wasof help to you!
  2. Well it would be wise to post the question in a new thread, but you will have to hook an EntityPlayer event... is this something you are familiar with? You can most likely find a 5 minute tutorial video on the subject and theforge github references every event you can subscribe to.
  3. One more thing... add .toString () at the end of the chat formatting.
  4. First off put the chat formatting line at the beginning of your loop, before you add the split string. Also I see you made an edit to your post... maybe comment out the snitch replace method thing to see if it is what causes you problems. I personally am having browser issues trying to view your entire class on my mobile device or I could get more in depth
  5. For complete clarity, can you please post the entire method containing the lines in question? Then we can make specific edits instead of theoretical ones and get you squared away.
  6. That's much cleaner than what I did - although it works - I would listen to d over me! (Obviously)
  7. Well you certainly have to adapt the concepts for your own usage... are you saying you got it fixed or that it still does not work?
  8. Exactly. if I am not mistaken your iproxy and commonproxy are both a waste, and your client proxy can simply extend your server proxy. Then you can call the method in your serverproxy after registering the items, and you should be all set, or at least on your way!
  9. I am on a mobile device some navigating your code is difficult right now however I do not see where you called your proxy methods and I also had a similar issue but I was calling the registrations in the proxy methods before registering my items. Make sure you register the icons after registering the items if that makes sense.
  10. I really feel like I should have thought of that. I did however simply change my approach to my mod. Now using the book will create a paper and the books contain 10 papers. Simple, clean, and makes sense.
  11. My suggestion is to find a workaround in your mod design. Ie I have a coin I added in my mods that I wanted to stack to 1024, but instead created another coin that was "worth" 1024 coin. Problem solved.
  12. I sure will; in about 10 hours... off to work. Mine fixed when I added only that method above, but I added all the other methods containing it for good measure. I will post the whole file when I get home!
  13. I can only assume you do not have these properly in your resources/assets folders? Can you post some code/screenshots of your references to these textures and the package hierarchy they are in?
  14. an example from some of my code (the string is already split into params[]): String msg = ""; for(int i = 0; i < params.length; i++){ msg += params[i]; msg += " "; msg += EnumChatFormatting.GRAY.toString() + EnumChatFormatting.ITALIC.toString(); }
  15. Your best bet is to take the string you want to send, and String.split(" "), and add your formatting between each word.
  16. SOLVED. in TileChestEntity, chestContents is private, but we have overridden this variable. I would grab any methods that use this, particularly /** * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). */ public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { this.chestContents[p_70299_1_] = p_70299_2_; if (p_70299_2_ != null && p_70299_2_.stackSize > this.getInventoryStackLimit()) { p_70299_2_.stackSize = this.getInventoryStackLimit(); } this.markDirty(); }
  17. Not that this is any help, but now that you mention it, I have this problem too... Your post inspired me to test for this issue, and bingo! (opposite of bingo) Im curious if you followed a tutorial for this?
  18. Is there a way to access the NBT data of a crafting ingredient upon crafting without writing a new crafting GUI? I need to simply transfer an NBT value to the resulting item. I found that maps use the onCreated() method, but this does not pass the ingredient items. I'm willing to accept different approaches to my mod... I have a custom book with specific coordinates stored in NBT (for teleportation: the book does not get consumed upon teleporting), and I have a new item, a sheet of paper, that I want to receive these exact same coordinates. My initial plan is to basically craft this custom book with a blank sheet of paper, and the paper will be single use teleporting for the same coordinates. If the NBT of the ingredient is not readily accessible without overriding the vanilla crafting GUI, then I need to approach the mod differently. Thanks much!
  19. I got it!! I put this proxy.registerTileEntities(); proxy.RegisterRenderThings(); after this... ShopChest = new ShopChest(0).setBlockName("shopchest").setCreativeTab(CreativeTabs.tabDecorations).setBlockTextureName(MODID + ":shopchest"); GameRegistry.registerBlock(ShopChest, "shopchest"); That simple. So yes, basically I wasn't "holding my tongue the right way," as my dad used to say.
  20. First let me applaud you for reading through all of that... But how is that even possible? Doesn't minecraft render its own item based off the model and texture of the block? And I'm using 'ShopChest.' I want you to be right, but I don't even know how to go about applying that...
  21. My guess is either the player or the world is null at the time of error, maybe its being called early? Try a if(player != null) and a if(world != null) in onBlockActivated. Separately, one at a time, for debug purposes. Ultimately I would check for both to ensure no null errors during runtime down the road. Just a shot.
  22. I have made a custom chest with a custom model texture. Long story short, everything works - the block itself uses the new texture - however the 'item' is still displaying as a traditional chest. Following is a lot of code, starting in what I believe is the order of importance for this issue. ClientProxy ItemRenderer the TileEntity The chest itself the mod file There is obviously more code than this, so feel free to ask if you need to see it. I've reviewed three tutorials and scoured for about 7 hours now. It's always something so simple... am I not holding my head at the right angle while pressing play? Seriously!
  23. So the container is accessed through the GUI... That's the missing link; and the very thing I was trying to avoid. Java and coding concepts, I'm fine with; learning an API is the hard part! You can consider this one solved and yourself helpful; I don't care what everyone else says!
  24. Yes, and I am ready to do that, for sure. But there are no fields, methods, or the like for me to replace; at least that I can find. So I guess clarifying the question is how does the BlockChest/TileEntityChest/IInventory chain implement the Container class? I can write a new one, but how will my custom chest know to use it instead of the base class? For complete clarity I will share my classes so far... overridden BlockChest Overridden TileEntityChest Thanks again, your expertise truly is appreciated. (/BTC tip?)
  25. Alright, hopefully this is the last question I need to get the ball rolling, but I found this in EntityPlayer: public Container openContainer; and this line in TileEntityChest: if (entityplayer.openContainer instanceof ContainerChest) I have no problems locating the Slot class here and the methods are indeed clear, but I can't seem to find any references or connections to the actual Container class through the chest itself... Surely it has to be referenced somewhere else... I'm beginning to think perhaps this is out of my scope or that I'm overlooking an obvious connection. You've been very helpful already, here's to once more!
×
×
  • Create New...

Important Information

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