1.8 is good, in regards that it uses modern OpenGL a bit more. I haven't dipped into 3d graphics, too much, but I'm pretty sure that VBOs are the modern way to go. In the 1.7.10 code, Mojang uses OpenGL 1.1 - it was released in 1997! Now that's old. At least in 1.8 they're probably using more modern graphics.
I can't add support because Bontania does not have an API (mod APIs allow other mods to interact with that mod's items, in this case, if Botania had an API, it would allow me to interact with its items and add recipes for those items).
it would be nice if this supported render player api...
I might make a Clothing Craft 2 or something like that, but that would be in the far future - I'm already working on another biggish mod. This mod is rather discontinued at the moment.
The thing that is happening here is that the child's x-y-z plane gets ROTATED based on the parent's rotation. So you could have a child that looks fine for a second but then the parent messes its coordinate plane up and you have really weird stuff happening.
Tabula supports child-parts, and you can actually import your model from Techne. You can convert all your parts to children, and then you should play around with the rotations of the arms, legs, wings, etc. to see how they rotate. Tip: set rotation-points, the point in which parts rotate around, via offsets.
The weird thing about Tabula is it's a Minecraft mod; you should see here for installation:
For adding .JARs to the workspace (eclipse):
1. Right-click on minecraft project -> build path
2. Configure Build Path
3. Click on libraries tab
4. Add external JARs
5. Pick the one you want
6. OK -> okyt
How to get one of iChun's mods
1. Look up the mod on google
2. Go on the page that is on ichun.us
3. Click on the "Download" tab, next to "Info"
4. Download the latest version, that must be deobf
5. Add that jar to the workspace (see above)
Actualy installing Tabula:
1. You need iChunUtil first: downlaod it and install it to the workspace
Actually, your problem is that your inventory class uses separate ItemStacks than your tile-entity class. But your tile-entity class already IS an inventory (it implements IInventory). So delete the inventory class, and only use your Tile-entity, or put it away somewhere that's not in the workspace in case you want it again. I have a feeling there's some kind of mix-up with the not-useful inventory class and the useful tile-entity class for using for inventories.
Note: This is assuming that you are not sure what everything does yet. This is to help you figure out what the code does so you can change it.
Well, we just have to inspect each piece of the code, then figure out what it does. Once we do that, you can begin to make edits.
Explanations of classes:
In your container class
In com.Hmod.container.ContainerBasic.(InventoryPlayer, TileEntityInventoryBasic):
The container class is used on both sides (server & client), and basically adds the slots to the container, keeps track of them, etc. In this section of code, you add the slots of the player's inventory to the container so that they can be used in the GUI (it's not done for you):
final int SLOT_X_SPACING = 18;
final int SLOT_Y_SPACING = 18;
final int HOTBAR_XPOS = 8;
final int HOTBAR_YPOS = 109;
// Add the players hotbar to the gui - the [xpos, ypos] location of each
// item
for (int x = 0; x < HOTBAR_SLOT_COUNT; x++) {
int slotNumber = x;
addSlotToContainer(new Slot(invPlayer, slotNumber, HOTBAR_XPOS + SLOT_X_SPACING * x, HOTBAR_YPOS));
}
final int PLAYER_INVENTORY_XPOS = 8;
final int PLAYER_INVENTORY_YPOS = 51;
// Add the rest of the players inventory to the gui
for (int y = 0; y < PLAYER_INVENTORY_ROW_COUNT; y++) {
for (int x = 0; x < PLAYER_INVENTORY_COLUMN_COUNT; x++) {
int slotNumber = HOTBAR_SLOT_COUNT + y * PLAYER_INVENTORY_COLUMN_COUNT + x;
int xpos = PLAYER_INVENTORY_XPOS + x * SLOT_X_SPACING;
int ypos = PLAYER_INVENTORY_YPOS + y * SLOT_Y_SPACING;
addSlotToContainer(new Slot(invPlayer, slotNumber, xpos, ypos));
}
}
So now you are adding the slots of your tile-entity:
final int TILE_INVENTORY_XPOS = 50;
final int TILE_INVENTORY_YPOS = 20;
// Add the tile inventory container to the gui
for (int x = 0; x < TE_INVENTORY_SLOT_COUNT; x++) {
int slotNumber = x;
addSlotToContainer(new Slot(tileEntityInventoryBasic, slotNumber,
TILE_INVENTORY_XPOS + SLOT_X_SPACING * x,
TILE_INVENTORY_YPOS));
}
Now we know what the container class does.
Gui Class:
This just renders the stuff on to the screen, and is completely client-side (the server does not use it). NOTE: There is a CLIENT and a SERVER ALWAYS in minecraft, even in singleplayer! (the server is an internal, or integrated, server)
Tile entity class
Tile entities (AKA "block entities" in 1.8) are things stored along with blocks in the world. Blocks can only have a number from 0-15, which is the metadata, which can store some info - like wool, which uses metadata to store its colour - but some blocks need more than just a number to store their data (e.g. chests, which need to store lots of ItemStacks). Those blocks use tile entities. Your block uses a tile entity because it needs that extra data storage to keep track of its inventory.
Your tile entity class defines the tile entity, provides read/write methods, and connects to adjacent blocks of your type.
Inventory class:
IInventories provide access to an inventory. For example, there is a class called InventoryLargeChest which allows access to the ItemStacks in a large chest.
Now you can start editing stuff. To change the amount of slots, you have to change it in
1. The texture, so the slots will be rendered (you don't need to change anything in the GUI class, which is nice)
2. The IInventory Class
3. The TileEntity class so that it will store the new amount of slots
4. Not the block class
5. The Container class
The problem you probably had is with child parts - child parts get all screwy becayse the x,y,z get rotated based on the parent's rotation... you should use Tabula, which is a life-saver when it comes to children parts.
I agree, animation in minecraft is quite tedious/annoying. It seems like it should be designed a bit easier to use, considering that the models in minecraft are rotating boxes and rectangles.
0
I must say:
1.8 is good, in regards that it uses modern OpenGL a bit more. I haven't dipped into 3d graphics, too much, but I'm pretty sure that VBOs are the modern way to go. In the 1.7.10 code, Mojang uses OpenGL 1.1 - it was released in 1997! Now that's old. At least in 1.8 they're probably using more modern graphics.
0
Please don't double-post.
0
No, sorry; this does not support Botania.
I can't add support because Bontania does not have an API (mod APIs allow other mods to interact with that mod's items, in this case, if Botania had an API, it would allow me to interact with its items and add recipes for those items).
0
If you mean rose red, then yes. You can see here for the examples of the crafting recipes.
0
I might make a Clothing Craft 2 or something like that, but that would be in the far future - I'm already working on another biggish mod. This mod is rather discontinued at the moment.
0
If you have Smart moving or something like that it might be the problem.
0
Strange. What other mods are you using? Try moving around a bit or reloading your world.
0
0
Tabula supports child-parts, and you can actually import your model from Techne. You can convert all your parts to children, and then you should play around with the rotations of the arms, legs, wings, etc. to see how they rotate. Tip: set rotation-points, the point in which parts rotate around, via offsets.
The weird thing about Tabula is it's a Minecraft mod; you should see here for installation:
1. Right-click on minecraft project -> build path
2. Configure Build Path
3. Click on libraries tab
4. Add external JARs
5. Pick the one you want
6. OK -> okyt
How to get one of iChun's mods
1. Look up the mod on google
2. Go on the page that is on ichun.us
3. Click on the "Download" tab, next to "Info"
4. Download the latest version, that must be deobf
5. Add that jar to the workspace (see above)
Actualy installing Tabula:
1. You need iChunUtil first: downlaod it and install it to the workspace
2. Then download tabula
0
1
Well, we just have to inspect each piece of the code, then figure out what it does. Once we do that, you can begin to make edits.
Explanations of classes:
In your container class
The container class is used on both sides (server & client), and basically adds the slots to the container, keeps track of them, etc. In this section of code, you add the slots of the player's inventory to the container so that they can be used in the GUI (it's not done for you):
So now you are adding the slots of your tile-entity:
Now we know what the container class does.
Gui Class:
Tile entity class
Your tile entity class defines the tile entity, provides read/write methods, and connects to adjacent blocks of your type.
Inventory class:
Now you can start editing stuff. To change the amount of slots, you have to change it in
1. The texture, so the slots will be rendered (you don't need to change anything in the GUI class, which is nice)
2. The IInventory Class
3. The TileEntity class so that it will store the new amount of slots
4. Not the block class
5. The Container class
Good luck! Let me know if you have any questions.
0
I agree, animation in minecraft is quite tedious/annoying. It seems like it should be designed a bit easier to use, considering that the models in minecraft are rotating boxes and rectangles.
0
0
0