• 0

    posted a message on [Help] My model just renders as a pink block! PLEASE PUT BACK IN UNMODIFIED HELP (NOT MODDING OR MOD DEVELOPMENT.)

    I believe the problem is your texture path:

    "0": "items/tardistexit"

    It's looking in the minecraft asset ...

    You want to use: "modid:items/tardistexit" to point it to you mod assets.

    You might have the same problem in the BlockState?


    Nice Greetings

    TechMage

    Posted in: Modification Development
  • 0

    posted a message on What do I need to add to this code that would make this zombie spawn wearing armor?

    That will throw an error that the method isn't always returning a value. You'll want to change that so that it'll return null by default.


    No it shouldn't because he is returning null in the default statement of his switch.
    Please remove the breakes after your return statements because they're redundant.


    Nice Greetings

    TechMage

    Posted in: Modification Development
  • 1

    posted a message on Modding Team - Looking for members

    Hey everybody o/


    TheOfficialyAwsome, thermite305 and me recently started on building up a Modding - Team and now we are searching for some people who'd like to join us.


    Information about the team

    - We've setup up Discord - Channel for Team - Communication

    - We want to learn together and do the different

    - We're currently drawing up two different Mod - Ideas:

    - GetTechy: An realistic, in-depth Tech - Mod
    - TBD: Magic - Mod around the concept of conjuring

    What we are searching for

    - Artists / Modeler

    - Coder (mostly beginner - level)


    Questions?

    If you've got any questions about our Team and/or Mod - Ideas feel free to ask here or send us a PM.


    Interested?

    You are interested in joining our little Team? Please send us a PM and we'll invite you to our Discord - Channel.


    Nice Greetings

    TechMage66

    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on Need help creating a container GUI

    In your GUI you are using this.containerInscription.grid[x][y] = true; to update the grid in your container. But this will only update your container on the client side (Because your GUI is only client side). So instead of using this you wanna send a packet to the server which will update the grid of your container and then call ContainerRuneInscription#onMatrixChanged to get your output item. As I said before the container should update it's server side on it's own.

    If you need more info free feel to ask


    Nice Greetings

    TechMage66

    Posted in: Modification Development
  • 0

    posted a message on Need help creating a container GUI

    You'll probably have to use a packet for that ... Actually I think its enough if you set the output item only on the server side, because the container will update the client on it's own (At least how far I know .... or are only TE's doing that)


    The container is both sided. It should be only updated by the server side but can be accessed by the client as well.


    I hope I don't mess something up with TE and Container ... has been a while since a last done some actual coding on minecraft ;(


    Nice Greetings

    TechMage66

    Posted in: Modification Development
  • 0

    posted a message on Need help creating a container GUI

    The problem is that you are setting your output item only on the client side. So the server doesn't even know about it what will cause a lot of glitches. In your ContainerRuneInscription#onMatrixChanged you also wanna update the server side.


    Nice Greetings

    TechMage66

    Posted in: Modification Development
  • 0

    posted a message on Is their any way to scale down a texture bound to a tessalator?

    You are using Gui#drawTexturedModalRect to render your textured square. The problem is this method assumes that your texture is a 256 x 256 image. If you have a texture with different size you wanna call Gui.drawModalRectWithCustomSizedTexture which also takes the texture size as parameters.


    Nice Greetings

    TechMage66

    Posted in: Modification Development
  • 0

    posted a message on Need help creating a container GUI

    For comparing two Arrays I'd suggest to use the Arrays.equals() method. It's only working for 1D Arrays so you have to loop through the outer Array and then compare each of the inner ones using this method.

    I've created a little helper method here


    Nice Greetings

    TechMage66

    Posted in: Modification Development
  • 1

    posted a message on Need help creating a container GUI

    Ok, I'll give you a brief explanation on how I would go about this, assuming that you've already setup your Container and TileEntity.


    1. Adding the slots to your container. You wanna add 2 slots in total, one for your dye and one for your output. For this go into the constructor of your container and call addSlotToContainer(new Slot(IInventory inventoryIn, int index, int xPosition, int yPosition)). As the IInventory argument you wanna pass in your TileEntity.


    2. Go into your TileEntity and implement ISidedInventory (You'll have to override a bunch of methods now, you probably wanna take a look at the vanilla furnace or my shelf)


    3. Next you wanna create a public static int storing the size of your inventory (2) and a private ItemStack[] for storing the items. in the constructor you wanna initialize the array:inventory = new ItemStack[INVENTORY_SIZE];


    4. I don't know how many different runes your wanna add but I would suggest creating a registry class for that. Add a method for adding a new recipe (This will take a ItemStack for the result, a ItemStack for the dye and a Boolean[][] for the carving), a method for returning an crafting result based on an ItemStack for the dye and an Boolean[][] (It will return null if it isn't a valid recipe), and maybe some other helper methods. (You could take a look at the FurnaceRecipes class for that)


    5. I would store the grid in the TileEntity rather then in the GUI (I think it will be easier to work with). Of course you have to create getter and setter methods now ... (If you click a piece on the GUI now, you'll have to send a packet to the server, calling the setter method of your TileEntity)


    6. It depends on you when you wanna check if there is a valid recipe. I've two ideas right now:

    update: If you wanna override the update() method your TileEntity has to implement ITickable. This will check every tick if there is a valid recipe.

    check when ever the dye / grid changes: This will probably be a bit more efficient ... You can use your setter method to check if there is a valid crafting recipe. And you can use the setInventorySlotContents(). method to check if there is a new dye placed in the inventory. Then you wanna check for a valid crafting as well. (Using your registry class)


    7. If you detect a valid recipe you wanna use one of your dyes (and reset the carving grid?) and place the rune in the output slot.


    DONE


    Hope you can follow me ... and hope that I didn't forget something. If you have any problems with one of the steps, feel free to ask me (Or look for a tutorial)


    Nice Greetings

    TechMage66

    Posted in: Modification Development
  • 0

    posted a message on Need help creating a container GUI

    Ok I'll take a look into it.

    I had a bit spare time today so I created the rendering code for my self (For testing purpose). So if you wanna take a look into it: GuiRunes


    Nice Greetings

    TechMage66

    Posted in: Modification Development
  • 0

    posted a message on Need help creating a container GUI

    You should have access to guiLeft and guiTop.

    If these are not working correctly (Had this problem one time before) you can calculate them easily by your self:

    this.guiLeft = (this.width - this.xSize) / 2;
    this.guiTop = (this.height - this.ySize) / 2;


    Nice Greetings

    TechMage66

    Posted in: Modification Development
  • 0

    posted a message on Need help creating a container GUI

    Yeah I meant Rectangles ... Sorry if that confused you ;(


    Nice Greetings

    TechMage66

    Posted in: Modification Development
  • 1

    posted a message on Need help creating a container GUI

    There are probably a lot of different approaches to this one. But just let me explain how I would go about doing this:


    1. Create a private two - dimensional array of booleans to store which parts are carved out.

    For example: private boolean[][] grid = new boolean[gridWidth][gridHeight];


    2. Create a method for rendering the grid. In this method you loop through your array and render some quads (Select the texture based off the boolean is true / false (The part is carved out or not)


    3. Call your rendering method from the drawGuiContainerBackgroundLayer() method of your GUI


    4. In your mouseClicked() method you wanna check if the coordinates where the player has clicked, is one of grid pieces (Would create a separate method for that). If it is one of your grid components, than set it to true (If it was false before)


    5. For checking the result ... you wanna create either a button for that or check it every tick. I would create a two - dimensional boolean array for each possible rune and then compare it with your grid. If it is the same than give the rune to the player


    Hope you kinda understand what I'm trying to explain you. (I know I'm pretty bad with explaining ;( ) If you need some more information to one of the steps feel free to ask me. But like I said there a probably a lot of different ways to go about that. For sure some better ones then mine (It's similar to what I've done in my research system)


    Nice Greetings

    TechMage66

    Posted in: Modification Development
  • 1

    posted a message on How to update from 1.8.9 to 1.10

    You wanna return a new AxisAlignedBB with the size of your bounding box. Like this one:

    return new AxisAlignedBB(0.05F, 0F, 0F, 0.95F, 0.95F, 0.95F);


    Nice Greetings

    TechMage66

    Posted in: Modification Development
  • 0

    posted a message on Custom Inventory GUI Rendering Issues

    Oh sorry, I misread your previous post (Haven't seen that NOT)

    I'm sure you can change the parameters to get it working ... but I've recreated the drawTexturedModalRect() method here. (Because I have different placed where I want to render smaller textures)

    As you can see, I've added two new parameters for the texture size. Haven't got any problems with this method yet.


    Edit:

    Just took a look over the method I've posted ... and noticed that the calculation was kinda wrong ;(

    If you wanna render the whole texture you can use the method I've linked now.


    Nice Greetings

    TechMage66

    Posted in: Modification Development
  • To post a comment, please or register a new account.