Everything posted by 61352151511
-
How rendering particle effects
Botania is open source, you can try taking a look through it yourself. https://github.com/Vazkii/Botania
-
[1.7.10] Problem with detecting armor and setting walk speed.
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
-
[1.6.4] Making a custom Furnace with 4 input slots
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.
-
[1.7.10]Finding the item slot number from ItemToolTipEvent
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.
-
[1.6.4] Making a custom Furnace with 4 input slots
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
-
texture
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.
-
texture
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"
-
[1.8] Exuction failed for task ':reobf'. Try run with --stacktrace PLEASE ANSWER
Post your build.gradle Also do what it says and run with --stacktrace so we have some actual information to help you off of
-
How to trasfer player to dimension single player?!?!?
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) {}
-
How to trasfer player to dimension single player?!?!?
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.
-
[1.7.10] Tile Entity missing mapping
Derpity derp, I did it before and forgot, I'm dumb.
-
[1.7.10] Tile Entity missing mapping
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:?]
-
[1.8]How do i make special effects unique to player usernames
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.
-
[1.8] Error on block rendering - can't convert back into data
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
-
How do you insert code?
[co:de] Your code here [/co:de] Obviously without the : in the middle
-
[1.7.10] Making custom "grass" block with all of its functions.
http://www.minecraftforge.net/forum/index.php/topic,28075.msg144173.html#msg144173
-
[1.8] Render a Custom Overlay When Helmet is Equipped
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
-
Best way to manipulate gravity?
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.
-
1.8 Serverplugin create empty dimensions and play sound
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.
-
Updating your mod to 1.8
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.
-
[1.7.10] Still Cannot Create Liquids!
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.
-
Item Renderer with sublblocks (metadata)
@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.
-
Updating your mod to 1.8
"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
-
[1.8] Manipulate villager trades on custom villagers.
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.
-
[1.7.10] Fast/Fancy Textures
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
IPS spam blocked by CleanTalk.