Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/16/17 in all areas

  1. No it does not need a TileEntity. You only need a TileEntity if you want to save the slots. You return a Container in getServerGuiElement and a Gui in getClientGuiElement. The container is the Server sided object of a Gui and the Gui is the Client sided one GuiScreen extends Gui. You add slots to it. When you add the Slots to the Container it will have it's position automatically made relative to the Gui and it will be measured in pixels. You use the Gui methods drawTexturedModelRect... to draw images on to the screen. You should draw that using Minecraft#fontRenderer or this.fontRenderer in your Gui in the method drawGuiContainerForeground, and you should be using GuiContainer as your super class for your Gui. Use EntityPlayer#openGui in Block#onBlockActivated This would take way to long for me to explain, but I suggest looking in the vanilla Crafting Table Container. Capabilities are basically does this Object have an Inventory or IItemHandler Capability? If so give it to me and let me access it from a particular direction. As stated above GuiContainer or the Crafting Tables Gui if you can salvage some of it's methods and Container or the Crafting Tables Container once again if you can salvage anything from it.
    2 points
  2. And the item name has to be lower case.
    1 point
  3. That's because you have to put the modid in "layer0" as well.
    1 point
  4. You mentioned an ore recipe, but you didn't mention that the ingredient was an ore dictionary entry. In that case, you need to use OreDictionary.WILDCARD_VALUE when adding your item to the ore dictionary.
    1 point
  5. So your one of them? Be sure to wear your tinfoil hat! Seriously, if you ever developed any website ever, you'd know it is damn annoying to add support to IE because it doesn't follow the standards. Edge does it a lot better, Chrome and Firefox do follow them. It is unnecessary work to support IE.
    1 point
  6. You are returning super.getContainerItem, which is null.
    1 point
  7. That's not what Draco told you to do. You damage the ItemStack, but then you return the result of the super method (a completely separate ItemStack). The original ItemStack that you damaged is ignored. You need to return the ItemStack that you damaged.
    1 point
  8. You can cancel WorldEvent.PotentialSpawns to prevent any entities from being spawned passively, but structures spawn their entities directly and don't fire any events apart from EntityJoinWorldEvent. PopulateChunkEvent.Pre is fired before a chunk is populated (i.e. before most structures are generated) and PopulateChunkEvent.Post is fired after a chunk has been populated (i.e. after most structures are generated), so you can use these to set a per-chunk boolean value and use this in conjunction with EntityJoinWorldEvent to prevent any entities from being spawned during structure generation. Unfortunately mod world generators all run after PopulateChunkEvent.Post, as do structures generated in IChunkGenerator#generateStructures rather than IChunkGenerator#populate. The only vanilla structure to do this is the Ocean Monument. You could suggest that entities spawned by structures fire a unique event (either on the forums or on GitHub), but there's no guarantee that it will be accepted (and very little chance it will be added to 1.10.2).
    1 point
  9. It should be a new Thread as it is a completely different subject than what the title suggests.
    1 point
  10. The ID of the tag type that the list will contain. Use the values from the Constants.NBT class.
    1 point
  11. You're also using the wrong annotation for your ClientConnectedToServerEvent handler: @Mod.EventHandler is only for FML lifecycle events (classes that extend net.minecraftforge.fml.common.event.FMLEvent) and only works in your @Mod class. @SubscribeEvent is for gameplay events (classes that extend net.minecraftforge.fml.common.eventhandler.Event) and only works in a class that's had the Class object or an instance registered with the appropriate EventBus.
    1 point
  12. If this is related to your previous topic, and you're using the BreakEvent, you can set the XP to drop in there.
    1 point
  13. ok at the top put apply plugin: 'maven-publish' if you dont need the api stuff you can remove it jar { } //for the api task apiJar(type: Jar) { baseName "publishing-api" from sourceSets.main.output include '**/api/**/*' classifier = "api" } publishing { publications { impl(MavenPublication) { groupId 'org.gradle.sample' artifactId 'project2' version '2' from components.java } //for the api api(MavenPublication) { groupId 'org.gradle.sample' artifactId 'project2' version '2' artifact apiJar } } } publishing { repositories { maven { // change to point to your repo, e.g. http://my.org/repo url "$buildDir/repo" } } } ones you have done that click refresh all gradle projects and a new task folder will appear see pic
    1 point
  14. Should be obvious. The first one you want to return true and in the second one you want to take the item stack passed in, damage it, and return it.
    1 point
×
×
  • Create New...

Important Information

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