-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
Ok, here's a container I have https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/block/BlockPedestal.java https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/entity/TileEntityDisplayPedestal.java https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/client/GuiContPedestal.java https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/inventory/ContainerPedestal.java I think that's everything except the custom slot (it is just set to allow only certain item types)
-
TileEntity render change all at once not individually
Draco18s replied to Bantasaurusrex's topic in Modder Support
That should work. -
Changing the texture isn't guaranteed to make the block update visually. You will need to cause a block update (world.scheduleBlockUpdate) or vanilla won't know that something changed.
-
TileEntity render change all at once not individually
Draco18s replied to Bantasaurusrex's topic in Modder Support
Can't help you without seeing the new code. -
[SOLVED][Other quest.]render an item on a block
Draco18s replied to Casual Dutchman's topic in Modder Support
and if I want to render the item as a sword rendered in hand. full3d. This is great, but if you could help me with that, that would be amazing Above code does render in 3D. Because I'm rendering an item entity which (in vanilla) is a 3D object. See? http://s2.postimg.org/9u6haor3t/2013_09_28_14_38_32.png[/img] -
[SOLVED]Textures Not Working in Inventory, but do in World
Draco18s replied to mardiff's topic in Modder Support
Minecraft is weird. In the inventory the furnace has a metadata of 0 (obviously: it's not placed) but that renders it 180 degrees away from where it needs to in order for the front to be the rendered face (you're actually seeing the back and right side). Even vanilla has to do a kind of a hack to get the furnace to render the right way around. -
TileEntity render change all at once not individually
Draco18s replied to Bantasaurusrex's topic in Modder Support
Specifically the TESR's model is static. He's creating a new TESR every time, as expected, and each time it's created it creates a new model, as expected, but the variable holding that reference is static. -
Vanilla Icon for modded Block, warning [SOLVED]
Draco18s replied to Tairoon's topic in Modder Support
Actually, it doesn't. 1) The code you were instructed to include doesn't register a new icon. 2) The texture manager is smart enough to recognize icons that have already been registered and not add them to the sprite sheet a second time. -
You need to multiply chunkX and chunkZ by 16, as they are chunk coordinates, not world coordinates. int x = chunkX*16 + random.nextInt(16);
-
TileEntity render change all at once not individually
Draco18s replied to Bantasaurusrex's topic in Modder Support
Mmm~ Static properties. <3 -
Just to clarify this portion. He's talking about these lines: int x = chunkX + random.nextInt(32); int z = chunkZ + random.nextInt(32); You shouldn't generate a value higher than 15 with your random, or you're not generating inside that chunk, you're generating in a neighboring chunk. And while you can, you shouldn't.
-
If the API doesn't exist, then you can't create new machines for it. Not with out a LOT of work, extracting and decompiling TE and converting all the vanilla functions and fields back to their deobfuscated forms manually.
-
[SOLVED][Other quest.]render an item on a block
Draco18s replied to Casual Dutchman's topic in Modder Support
Artifacts to the rescue (again)! https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/client/ModelPedestal.java That's my model for my custom block. I render an item from there as well. If you want the item bigger, why gl11.glScale() will do wonders. -
Use your IDE's code hinting abilities. event.blockMetadata
-
[Help] isValidArmor Can't get item to work.
Draco18s replied to PeterRDevries's topic in Modder Support
1) You MUST extend ItemArmor or your armor will not provide any protection when worn, even if you do get the isValidArmor working. 2) Custom renders can be done just fine by extending ItemArmor. -
Gradle subforum for Gradle questions.
-
The only enchantment stuff I did was using the inbuilt system. Specifically I'd check what kind of item I had, or close approximation, modified a tiny bit randomly, then: ItemStack stack = new ItemStack(item); //the vanilla item that is similar to my item stack = EnchantmentHelper.addRandomEnchantment(rand, stack, level); //add enchantments per existing rules if(stack.stackTagCompound != null) { artifact.stackTagCompound.setTag("ench", stack.stackTagCompound.getTag("ench").copy()); //copy enchantments to my item //other stuff }
-
slots droping items on ground on click [Solved]
Draco18s replied to TripleXGaming's topic in Modder Support
Yeah. I messed with it once. I never did find a solution. -
My Texture Isn't Loading Correctly[SOLVED]
Draco18s replied to starwarsmace's topic in Modder Support
Gradle subforum, for all your issues using Gradle. -
Copy everything but the imports. Import classes as needed (hit ctrl-O I think it is, to organize imports. It'll automagically import any class it recognizes and will promt when there's more than one possible match).
-
Forge events. There's one, I believe, for entity spawns, but you could also use EntityLivingEvent which occurs every tick. Just test to see if the entity passed is an instance of EntityBat, and if it is, kill the entity (setDead() will just remove it from the world without triggering death sounds, etc. unlike kill())
-
Please ask in the Gradle forum or include the fact that you're using Gradle in your opening post or we will "take a guess" at what setup you're using and end up being wrong.
-
Division is magic. You don't need to check anything. 0 / 3 is still 0.
-
How can I learn about Forge modding... and armor?
Draco18s replied to riderj's topic in Modder Support
I also messed around with armor recently. https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/item/ItemArtifactArmor.java Might help you out some.