Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. You mean http://www.minecraftforge.net/wiki/ ? The wiki has all kinds of things http://www.minecraftforge.net/forum/index.php/board,120.0.html ? This board has tutorials, though dominated by 1.8 things, but there's still 1.7 stuff in the archives http://www.minecraftforge.net/forum/index.php/board,118.0.html ? This board has everything to do with Forge Gradle, the "replacement" to MCP
  2. This is basic stuff dude. The block and the renderer are separate and distinct classes. To register the renderer, you need to do this (from my own project): TileEntitySpecialRenderer render = new TESRWindvane(); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWindvane.class, render); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(OresBase.blockvane), new ItemModelRenderer(render, new TileEntityWindvane()));
  3. I noticed something: ticket.getModData().setInteger("coreX",xCoord);//set X to X ticket.getModData().setInteger("coreX",yCoord);//set X to Y ticket.getModData().setInteger("coreX",zCoord);//set X to Z Uh?
  4. Also, your TileEntity's constructor MUST take NO parameters or things will go weird, fast.
  5. Also, cache the result of Item.getItemFromBlock(WinterBlocks.icedStone) so you don't have to do the lookup every time.
  6. You need a TileEntitySpecialRenderer class, that class holds a reference to your ModelWhatever class.
  7. More like "whatever it is you're trying to do you need a TileEntity." Because seriously, either you're given coordinates or its a method where the coordinates are irrelevant (or its an overloaded function in which case, both).
  8. The block class is a singleton and is used as a reference for ALL blocks of that type in the word, regardless of their position. That's why a world, x, y, and z coordinates are passed to most methods. Why do you need these outside of those methods, what are you trying to do?
  9. Having not worked with 1.8, I unfortunately can't tell you. I'm basing my information off what I've gleaned from reading the forums and maybe I'm wrong.
  10. That's because the metadata is handled INSIDE the json file.
  11. No...you use the ItemStack's damage value or you use the ItemStack's NBT. Those are your options.
  12. This bit: public class ItemToolGas extends Item { private int storedGas = 0; That variable is effectively static because ItemToolGas is only ever instantiated once (its a singleton class). Each copy of it that exists in your in-game inventory is actually an instance of ItemStack which references the shared[/s] singleton.
  13. Actually javac compiles these two to the same thing: int i = 1; i++; int i = 1; ++i; If the value is not used, it does not matter. Ah, cool. The last time I saw the test done for various ways was on AS3 (which does create a temporary variable).
  14. Well, your "models" folder isn't inside "resources" that's why. The path its trying to load is, "src/main/resources/assets/objloader/models/mymodel.obj"
  15. This is pretty much true. You'd have to be calling instanceof like 10,000 times a tick to see a difference. There are other, similar "micro optimizations" you can make as well, for instance using ++i instead of i++ (because of the way values are returned, i++ has to use a little extra stack space and a pop). But for the most part you'd only notice a difference when it's being used tens, if not hundreds, of thousands of times every frame.
  16. Or you could use my custom arrow: https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/entity/EntitySpecialArrow.java Which doesn't have any non-Minecraft imports, already deals with the onImpact problem, and is easily modifiable to add potion effects. See line 321.
  17. Unity has one of the better explanations. Its talking about shader code, but GL11 uses the same parameters. http://docs.unity3d.com/Manual/SL-Blend.html It's still bare-bones, but it does have the four most commonly used blends listed out.
  18. You need an ItemBlock class, like so: package com.draco18s.ores.item; import java.util.List; import com.draco18s.ores.OresBase; import com.draco18s.ores.block.BlockOreFlower; import cpw.mods.fml.common.Loader; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockColored; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemDye; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; public class ItemBlockOreFlower extends ItemBlock { private IIcon[] icons; public static final String[] names = new String[] {"poorjoe","horsetail","horsetail","vallozia","flame_lily","flame_lily", "tansy","tansy","hauman","leadplant","primrose"}; private String[] flowerDescript = {"indicator.iron","indicator.gold","indicator.gold","indicator.diamond","indicator.redstone","indicator.redstone", "indicator.tin","indicator.tin","indicator.copper","indicator.lead","indicator.uranium"}; public ItemBlockOreFlower(Block b) { super(b); setHasSubtypes(true); } @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean flag) { if(stack.getItemDamage() < 6 || Loader.isModLoaded("IC2")) { list.add(StatCollector.translateToLocal(flowerDescript[stack.getItemDamage()])); } } @Override @SideOnly(Side.CLIENT) public IIcon getIconFromDamage(int p_77617_1_) { return this.field_150939_a.getIcon(2, p_77617_1_); } @Override public int getMetadata(int p_77647_1_) { return p_77647_1_; } @Override public String getUnlocalizedName(ItemStack itemStack) { return "item." + names[itemStack.getItemDamage()]; } }
  19. HAHAHA! That's a great line.
  20. Note that DataWatchers have a specific number of things that they watch and once they're used up, they're used up. All the vanilla entities are already using about half that limit, plus or minus two (e.g. the dogs have a datawatcher object for their collar color, chickens do not).
  21. ...are you doing GameRegistry stuff inside a class inside your item!? What the hell?
  22. Well. Thread.sleep is not going to make the arrow "wait a second" before exploding. It will cause the game to "freeze entirely for a second" then explode.
  23. Good question. I was seeing something similar the other day when making a drowning effect for "this isn't water, stop making it act like water" block. I had copied over the bubble particle call figuring I could use it and I wasn't getting bubbles either. I've since removed it (both because it wasn't working and because I did another, better, effect).
  24. Please include BlockTuileSlab.java

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.