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.

61352151511

Forge Modder
  • Joined

  • Last visited

Everything posted by 61352151511

  1. Botania is open source, you can try taking a look through it yourself. https://github.com/Vazkii/Botania
  2. Methods/Functions are called by numbers because when minecraft is compiled it also gets obfuscated, people then find out what these functions do and put it into the MCP Bot to help make it readable. I'm not sure if there's a benefit to the code being obfuscated other than preventing people from easily reading it. func_111124_b -> removeModifier func_111121_a -> applyModifier func_111167_a -> getID func_111183_a -> getAttributeModifierAmount func_111169_c -> getOperation
  3. If you don't realise that if (slot >= 0 && slot <= 3) this.forge.cookTime = newValue; Has the exact same functionality of if(slot == 0) this.forge.cookTime = newValue; if(slot == 1) this.forge.cookTime = newValue; if(slot == 2) this.forge.cookTime = newValue; if(slot == 3) this.forge.cookTime = newValue; And if you don't know how to write out code for what you want to do, you need to learn some java. We can give tips on how to do it (I.E saying what you already know, check if the item matches and the amount in the slot) but we won't write the code for you. It's actually quite simple to do, take a look at how vanilla recipes are stored.
  4. I think what he's trying to say is, in his custom tile entity, he doesn't want people to throw stuff on the ground when the gui is closed. So if there is an item on the cursor it normally throws it into the world but he doesn't want that to happen. I don't know how this would be done. You probably wouldn't use the ItemToolTipEvent but rather some event that tracks which slot they click.
  5. Nit Picks if(slot == 0) this.forge.cookTime = newValue; if(slot == 1) this.forge.cookTime = newValue; if(slot == 2) this.forge.cookTime = newValue; if(slot == 3) this.forge.cookTime = newValue; Why not if (slot >= 0 && slot <= 3) this.forge.cookTime = newValue; Also the reason it's not working probably has something to do with you checking the vanilla furnace recipes rather than the ones you registered. ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]); Make your own class for registering your recipes, keep them in an ArrayList (I'd assume) and then check that array list
  6. 61352151511 replied to PenguinW's topic in Modder Support
    From what I understand it now finds the model file but not the texture file "layer0": "pw:items/copper_ingot" Which is apparently what's missing.
  7. 61352151511 replied to PenguinW's topic in Modder Support
    item.getUnlocalizedName().substring(5) It still has .name on the end of it, which means the model file it looks for would have to be "copper_ingot.name.json"
  8. Post your build.gradle Also do what it says and run with --stacktrace so we have some actual information to help you off of
  9. Sorry I don't know anything about world generation. I do however have experience with the nether portal issue. FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().transferPlayerToDimension(thePlayer, mystical_epicarno_mod.dimension, new TeleporterWithoutPortal((WorldServer) thePlayer.worldObj, mystical_epicarno_mod.dimension, X, Y, Z, 0F, 0F)); // Set the X, Y, Z somehow public class TeleporterWithoutPortal extends Teleporter { public int dimension; public int xPos; public int yPos; public int zPos; public float playerYaw; public float playerPitch; public TeleporterWithoutPortal(WorldServer par1WorldServer) { super(par1WorldServer); } public TeleporterWithoutPortal(WorldServer server, int dimensionId, int posX, int posY, int posZ, float yaw, float pitch) { this(server); dimension = dimensionId; xPos = posX; yPos = posY; zPos = posZ; playerYaw = yaw; playerPitch = pitch; } public void placeInPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { par1Entity.setLocationAndAngles((double) xPos + 0.5D, (double) yPos, (double) zPos + 0.5D, playerYaw, playerPitch); par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; } @Override public void removeStalePortalLocations(long par1) {}
  10. Singleplayer runs an integrated server. When an entity collides with a block, check to see if it's an instance of EntityPlayer rather than EntityPlayerMP, this will work on both sides. Check all the conditions you are currently checking. Send (EntityPlayerMP) par5Entity to the dimension you want.
  11. Derpity derp, I did it before and forgot, I'm dumb.
  12. This is the code package com.sixonethree.randomutilities.block.tile; import java.util.List; import java.util.UUID; import com.sixonethree.randomutilities.init.ModBlocks; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import cpw.mods.fml.common.FMLCommonHandler; public class TileEntityMagicChest extends TileEntity implements IInventory { private String owner; private int facing; private ItemStack stack; public TileEntityMagicChest() { super(); this.owner = ""; } @Override public boolean canUpdate() { return true; } @SuppressWarnings("unchecked") @Override public void updateEntity() { if (this.owner.isEmpty() || this.owner.equalsIgnoreCase("")) return; if (!this.worldObj.isRemote) { List<EntityPlayerMP> players = FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().playerEntityList; for (EntityPlayerMP player : players) { if (player.getUniqueID().equals(UUID.fromString(this.owner))) { if (this.stack != null) { stack.getItem().onUpdate(stack, this.worldObj, player, 0, false); } break; } } } } public void setOwner(String owner) { this.owner = owner; markDirty(); } @Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); this.owner = compound.hasKey("owner") ? compound.getString("owner") : ""; } @Override public void writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); compound.setString("owner", owner); } public int getFacing() { return this.facing; } public void setFacing(int facing2) { this.facing = facing2; } /* IInventory */ @Override public int getSizeInventory() { return 1; } @Override public ItemStack getStackInSlot(int slot) { if (slot != 0) return null; return this.stack; } @Override public ItemStack decrStackSize(int slot, int amount) { if (this.stack != null) { this.stack.stackSize -= amount; if (this.stack.stackSize <= 0) this.stack = null; markDirty(); } return this.stack; } @Override public ItemStack getStackInSlotOnClosing(int slot) { return slot == 0 ? this.stack : null; } @Override public void setInventorySlotContents(int slot, ItemStack content) { if (slot == 0) this.stack = content; } @Override public String getInventoryName() { return "Magic Chest"; } @Override public boolean isUseableByPlayer(EntityPlayer player) { if (worldObj == null) { return true; } if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { return false; } if (player.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D) return player.getUniqueID().equals(UUID.fromString(this.owner)); return false; } @Override public void openChest() { if (worldObj == null) return; worldObj.addBlockEvent(xCoord, yCoord, zCoord, ModBlocks.magicChest, 1, 1); } @Override public void closeChest() { if (worldObj == null) return; worldObj.addBlockEvent(xCoord, yCoord, zCoord, ModBlocks.magicChest, 1, 0); } @Override public boolean isCustomInventoryName() { return false; } @Override public int getInventoryStackLimit() { return 64; } @Override public boolean isItemValidForSlot(int index, ItemStack stack) { return true; } } This is the error java.lang.RuntimeException: class com.sixonethree.randomutilities.block.tile.TileEntityMagicChest is missing a mapping! This is a bug! at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96) ~[TileEntity.class:?] at com.sixonethree.randomutilities.block.tile.TileEntityMagicChest.writeToNBT(TileEntityMagicChest.java:55) ~[TileEntityMagicChest.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:395) [AnvilChunkLoader.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:204) [AnvilChunkLoader.class:?] at net.minecraft.world.gen.ChunkProviderServer.saveChunkData(ChunkProviderServer.java:276) [ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:329) [ChunkProviderServer.class:?] at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:863) [WorldServer.class:?] at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:374) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:640) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:489) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:756) [MinecraftServer$2.class:?]
  13. iChun uses UUID's https://github.com/iChun/iChunUtil/blob/79db170e6e18462f72ccd2a2dfbbdec00de5ae54/src/main/resources/assets/ichunutil/mod/patrons.json Check if a player is online with any UUID's stored in a list, if they are, add the potion effect. Edit: I believe what he does is check when the client launches the game if the player logged in is a patron, if so it sets a variable to true. When they join a server it sends a packet to the server saying "This UUID is a patron" storing it in a list, so it knows who to give the effects to.
  14. Firstly I did say "Obviously without the : in the middle" for the code tags. Secondly the issue is here "Don't know how to convert shelvesmod:shelfBlock[facing=north] back into data..." "facing=north,section=top,shape=straight": { "model": "shelfBlock", "x": 180, "y": 270, "uvlock": true } You have a value for "facing" in your blocks possible states, but no "section" or "shape" so it's looking for a model with just the value of "facing=north" which you don't have one of. Try adding the "section" and "shape" properties to your block state as well
  15. [co:de] Your code here [/co:de] Obviously without the : in the middle
  16. http://www.minecraftforge.net/forum/index.php/topic,28075.msg144173.html#msg144173
  17. ScaledResolution Scaled = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); this.drawNonStandardTexturedRect(xPos, yPos, 0, 0, mc.displayWidth, mc.displayHeight, 420, 250); You have a variable for a scaled resolution, yet you don't use it. Use this: ScaledResolution Scaled = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); this.drawNonStandardTexturedRect(xPos, yPos, 0, 0, Scaled.getScaledWidth(), Scaled.getScaledHeight(), 420, 250); //if (((EntityPlayer)mc.thePlayer).inventory.armorInventory[3].getItem() == halocraft.Main.SpartanHelmet){ Check if inventory.armorInventory[3] != null first
  18. I have no idea how forge patches work but could something like that be put into a patch to allow the setting of fall speed? If so someone should do that.
  19. Talking about a plugin I'd assume you're using bukkit/spigot or something similar. If you are using forge then unless you set it up right, the client would also need the mod to join the server.
  20. If for some reason your working directory is called "forge-1.8-11.14.1.1321-src" then yes, I don't know why it wouldn't be called something more accurate like "MinePlus" but that's your decision. Yes that is the correct path to put the file in.
  21. Well give us your code so we can compare it to the tutorial, I never followed the tutorial so I don't know if it's accurate, however if you get errors in your IDE (Eclipse/Intellij) it should tell you how to fix it, if there are no errors and no fluid, you probably missed a part.
  22. @SideOnly(Side.CLIENT) public void getSubBlocks(Item itemIn, CreativeTabs tab, List list) { list.add(new ItemStack(itemIn, 1, 0)); } Call this method, give it an item, CreativesTabs, and List. after the method is called the instance of the List will have ItemStacks with the blocks in it.
  23. "layer0": "MinePlus:items/itemIronNugget" Surely your texture.png should be called itemIronNugget YourItem should be an instance of your item. The same way you do GameRegistry.registerItem(YourItem, Name) to register your item
  24. No solution, I posted an issue on the MinecraftForge github and Lex said he forgot about the VillagerRegistry, it needs a complete rewrite and will probably come at a later time.
  25. Example: https://github.com/SlimeKnights/TinkersConstruct/blob/master/src/main/java/tconstruct/world/blocks/OreberryBush.java Registers different icons for fast/fancy and on the getIcon method it checks for fancy graphics and returns the icon accordingly

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.