-
Posts
444 -
Joined
-
Last visited
Everything posted by brandon3055
-
It may help if you posted some of the code related to the issue. If you haven't already i would recommend implementing an item NBT helper. It will make working with NBT much easier and may or may not help you solve your problem. Here is mine (You can copy it if you like) https://github.com/brandon3055/BrandonsCore/blob/master/src/main/java/com/brandon3055/brandonscore/common/utills/ItemNBTHelper.java
-
[SOLVED][1.7.10] GuiContainer/Container problem?
brandon3055 replied to p455w0rd's topic in Modder Support
You need to set this.xSize and this.ySize in your gui constructor otherwise the game assumes the gui is the default size of 176 x 166. So when you click on one of the lower slots it registers that you clicked the slot but the game also thinks that you clicked outside the gui which makes you drop the item on the ground. Edit: I just noticed you have defined private xSize and ySize variables in your gui class. Remove them and use the ones that already exist as i explained above. Also your ySize (82) Looks much smaller then the gui shown in your video. xSize and ySize need to be the same size as your gui as thay set the gui boundaries among other things. -
Thanks i will go have a chat with them. And if i can get it all figured out i may make a tutorial on it.
-
Hmm... I think thats actually related to opening multiple projects in one window. Not actually linking projects.
-
Yea... I just never stopped calling them workspaces. Thats not exactly what i need. That just shows you how to open multiple intellij windows. But i will have a look around that site because there seems to be a lot of info there. I found that i can link them by importing my library project as a module but that dosnt actually load when i run the game.
-
Just wondering if any of the experts here know how to link Intellij work spaces. What i would like to do. I am about to start working on a library mod to consolidate a lot of the code that i use in all of my separate mods. And i would like to know if there is a way i can link this work space to all of my mod work spaces in a way that any changes will automatically show up in all of my separate mod work spaces. And if possible have the ability to make changes to my library mod from the linked mod work spaces. Im sure i will eventually figure this out but a quick google search didn't tern up any helpful results so i figured it cant hurt to ask.
-
Ok so first of what i am trying to do. I am trying to use the vanilla scoreboard to display information to a specific player. This is for a server side mod so i cant just access the scoreboard client side. I have found a way to do this but its going to be a little tricky to implement so before i get started i want check if anyone knows a better way. After digging through the scoreboard code i have found that i can do this using the following packets. Sends the scoreboard objective to the client S3BPacketScoreboardObjective(scoreObjective, 0) Displays the objective in the sidebar S3DPacketDisplayScoreboard(1, scoreObjective) Updates a spacific score in the objecting. S3CPacketUpdateScore(score, 0) Working example The problem i encountered is if i use S3BPacketScoreboardObjective to add an objective that already exists or remove one that dose not exist it crashes the client. This means i am going to have to come up with a tracking system to keep track of what objective each player currently has displayed and make sure i dont remove or add an objective that already exists. It would also have to keep track of when a player relogs. Edit: On second thought i only need to send the player one objective which i can send on login. Then i can just change the name, contents and visibility of that objective as needed.
-
At this point im not really seeing any other options... Probably wouldn't be hard to figure out but dose anyone know what the maximum packet size is?
-
[1.7.10]Curious about crafting[Answerd]/[solved]
brandon3055 replied to SureShotM's topic in Modder Support
It depends on what exactly it is you want to do. You will need to ether make it a container item or create your own IRecipe implementation -
Since i didnt get a single reply to this thread http://www.minecraftforge.net/forum/index.php/topic,28231.0.html That tells me that I probably need to find a new way to do this. So what i need to do. I need to find a way to send an nbt compound to the server. The problem is the compound i need to send can range in size from just a few kilobytes to several megabytes which (correct me if i am wrong) is way to big for the standard packet system. I have considered trying break it up into smaller packets and then reassemble them on the other side. But i would really like to avoid something like that if possible. Dose anyone have any suggestions?
-
[1.7.10]Curious about crafting[Answerd]/[solved]
brandon3055 replied to SureShotM's topic in Modder Support
"// I don't fully know where I would put this cause the item will not be crafted but found in a chest" The best way to handle something like that is to check if the tag exists before you read it and if it dose not then you create it. It helps to have an NBT helper class to do all that for you. -
[1.8] [Unsolved] Tutorial Ore Generation
brandon3055 replied to UnknownAssassin's topic in Modder Support
If you take a look at ANY basic minecraft tutorial about adding blocks you will learn how to initialize a Block variable. Edit: How to add blocks. -
[1.8] [Unsolved] Tutorial Ore Generation
brandon3055 replied to UnknownAssassin's topic in Modder Support
If you don't know how to initialize a variable you really shouldn't be making a mod yet... You should be learning basic programming. Take a look at what value you are setting for "public static Block magicblock;" -
Min extends ShapedOreRecipe which implements IRecipe.
-
[1.8]Detecting When The Players Inv. Is Opened(Server Side).
brandon3055 replied to Mecblader's topic in Modder Support
Use playerMP.openContainer to get the container the player currently has open. Check if it is an instance of ContainerPlayer. -
If that is the case i highly suggest you go straight to 1.8 to avoid the rather large update from 1.7 (1 big update is better then 2) Regarding the problem. A more advanced solution would be to do what Ernio said except instead of replacing the water with ice replace it with a custom block that looks like water but is solid. Have that block check for a player abouve it every tick and when the player is no longer there have the block replace itself with water.
-
Override getCraftingResult. That gives you all the items in the crafting grid and you return the stack that those items will craft. Example: @Override public ItemStack getCraftingResult(InventoryCrafting var1) { ItemStack result = super.getCraftingResult(var1); // The itemstackthat this recipe creates // Add your nbt data to the itemstack return result; // Return the itemstack }
-
[1.8] [Unsolved] Tutorial Ore Generation
brandon3055 replied to UnknownAssassin's topic in Modder Support
"Modblocks.magicblock" should be "Block block" -
[1.8] [Unsolved] Tutorial Ore Generation
brandon3055 replied to UnknownAssassin's topic in Modder Support
The BlockPos class replaces the x, y, z coordinates from previous versions. (its just an object that contains the x, y, z coords) Edit: I should be used to this by now... (You beating me to the post) -
[1.8] [Unsolved] Tutorial Ore Generation
brandon3055 replied to UnknownAssassin's topic in Modder Support
I dont know if that changed in 1.8. Im guessing it did a little with the new BlockPos but it may still be similar. -
Having trouble sending a file to the server.
brandon3055 replied to brandon3055's topic in Modder Support
After a bit more troubleshooting i believe the connection is being blocked by the firewall on ether my router or my pc. If that is the case how can i get around that? (how dose minecrafts connection work?) Or better yet would there be a way i could use minecrafts existing connection to send the file? Any help with this would be greatly appreciated. -
[1.7.10] [Solved] How Do I Open a GUI on Server?
brandon3055 replied to SebasTheGreat's topic in Modder Support
Show your code please. -
Sneak pypasses block activation. Im not sure if you can change that for your block.
-
As part of a schematic system i am currently working on i am trying to make it possible to send schematic files from a client to the server. These files are potentially much to large to send via the default packet system so i am trying to create my own file transfer system. I didn't know anything about sending files so i did some research and came up with the following system. It works fine when sending to a server running on my local machine but when i try to actually send a file to a server over the net it throws "ConnectException: Connection timed out: connect" on the server side. I dont know a lot about sending files and its rather hard to debug code running on a server half way around the world so im hoping someone can help me out with this. FileSender (client side code) FileReceiver (server side code) The packet that handles the operation Server proxy Client proxy
-
That depends on what exactly you are tring to do. If its something simple like increment a value you can make it a container item. Otherwise you will probably need a custom IRecipe class.