Everything posted by fr0st
-
[1.7.10]Help with this suggestion
Oh, I have already dealt with this kind of problem. I have basically created a dynamic alloy system (The crafting class of the alloy tool checks the metals used in the crafting and adds all of the components' attributes, like durability, efficiency and all kinds of custom values), which is quite an analogy here, or I misunderstood everything; if that's the case, don't bother keeping to read, just give me an heads up on that. Let me try to explain you how I've done it.. First of all I created a crafting class implementing IRecipe. I will skip IRecipe#matches, and get right to the one we need: IRecipe#getCraftingResult. Here you can get the components used in the recipe (IRecipe#getCraftingResult has an InventoryCrafting argument, which is basically the crafting grid inventory). So, you check if one of the components is a diamond, you add 5 to a "durability" value, for example. That's just to give you the idea. Then when you have checked through all of your components and rods, and adjusted your values, you return an ItemStack containing your custom tool (Don't forget Item#setMaxDamage(yourDurabilityValue) to set your tool's custom durability) Hope I made that clear enough. To summarize things up: You make a custom IRecipe class which will handle your custom tool's crafting. Use then IRecipe#getCraftingResult to grab all the components you need, and after checking them, add for example an int to a durability value. When you are done, return an itemstack containing your custom tool, with all the proper adjustments. This is quite basic (that's how I see it), you just need to tell me what you don't understand, okay?
-
collision problems
Don't let sieben read! Quick, hide the evidence!
-
[1.7.10][Solved]Custom portal wont activate.
event.x, event.y, and event.z are the coordinates of the block you interacted with. You obviously check if the block at those coords is a sandstone block. Note that the event fires even if you left click, so add a check for event.action aswell! Then you need to check the item that the player is holding, and we have an event.entityPlayer. Finally, the side of the block the player has interacted with: event.face. 1 is the top face, so you should go with that. At this point we checked if the player right clicked with a flint and steel in hand, on the top side of a sandstone block. Now you should set your portal blocks with event.world.setBlock. But be careful, because you also need to check for the shape of the portal around (and by that I also mean its orientation) I won't provide any code for now, you have to try by yourself!
-
[solved]Textures on custom mob not rendering
strings.MODID is "animals" right? That needs to be lowercase. Also, an error about the file not found should pop up on the console.. you might try and spot it, and see what minecraft is actually looking for.
-
[solved]Textures on custom mob not rendering
*Double post, my connection derped*
-
[1.7.10] 'API' that registers your block and item
I also noticed that when you use addRecipe, you do "B", instead of " B ".. spaces matter, as there should be 3 chars.. space = no item in the crafting recipe. By the way.. you should post the crash log and the main class.. we aren't wizards
-
[1.7.10][Solved]Custom portal wont activate.
Wait... why not just using a PlayerInteractEvent, which is easier? You have everything you need in that event. Making a new fire block is pointless, in my opinion..
-
Ghost Item slot
You should open a new thread, instead of necrobumping..
-
[1.7.2] How to make a block drop a random item on right click and it destroys
Well... he's here to learn, not to copy-paste ready code.. Also, what are you talking about? itemList should have been a List<Item>, or an item array.. whereas obviously for the random part you need the randomInt as an integer... you might have gotten that wrong..
-
How to detect if player is pressing shift
Like when hovering an item, you hold shift and it shows more info? Easy! In your addInformation you want this: if(GuiScreen.isShiftKeyDown()){ do some stuff } If that's not what you needed... apologies, my english confused me!
-
New weather effect?
Ok, so today I looked inside minecraft's src, and I saw that rain and snow are rendered inside EntityRender.. so is there a way to add a new weather effect without changing base classes, which is something i don't want to?
-
[1.7.10] [Solved] Custom Armour Models
Could you please provide an ingame screenshot, and a techne one of your model? I would like to understand a bit more
-
[1.7.10] [Solved] Custom Armour Models
I did, to make my backpack wearable.. @Override public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { return yourmodel; }
-
New weather effect?
Basically, after 30 minutes of testing some volcano codes [spoiler=..exactly] i came up with the right function (2gudatmaths).. but then suddenly my mind was overrun by an idea.. what about a new weather effect? (Before you ask it, no, i can't stick to one task. That is bad. That is me. Sorry) What I would like to do, is like snow biomes do.. when it's raining, instead of rain render a snowfall.. I wanted to make something similar for my custom biome (Which i will create, I don't have it right now).. so instead of water, i want ashes to rain. I don't really think I saw this before in any other mod, so that is why i am asking.. is this even possible? Thanks in advance.
-
change the texture of a custome item on rigth click.
Inside your registerIcons you need to register the textures from your mod's assets folder.. add "yourmodid:" before the texture name.
-
Energy network
Progress was made.. at least now my generator transfers energy correctly to adjacent blocks, the problem here is going to be wires.
-
Energy network
I know that, but still I don't want to use apis.. i wouldn't be asking for help then ^^
-
[1.7.10]Adjusting the speed a fluid pushes a player
You aren't overriding it correctly, that method doesn't only pass an Entity parameter. If you are using eclipse, use the Ctrl + Space shortcut to automatically have the method overridden, and then of course use the parameters you are given
-
Energy network
Because not everyone wants to use and depend on someone else's api.. my goal is to make it myself, but to achieve it i need this forum
-
[1.7.10]Adjusting the speed a fluid pushes a player
Multiply entity.motionX, entity.motionY, entity.motionZ by whatever you want.
-
Energy network
I should have said that in the op, but.. i am already doing that! package coalpower.api.energy; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; public class EnergyBuffer implements IEnergySink{ private int energy, maxEnergy, intakeRate, extractRate; public EnergyBuffer(int maxEnergy, int rate){ this(maxEnergy, rate, rate); } public EnergyBuffer(int maxEnergy, int receiveRate, int extractRate){ this.maxEnergy = maxEnergy; this.intakeRate = receiveRate; this.extractRate = extractRate; } public int getEnergy(){ return energy; } public int getMaxEnergy(){ return maxEnergy; } public void readFromNBT(NBTTagCompound nbt){ this.energy = nbt.getInteger("EnergyBuffer"); } public void writeToNBT(NBTTagCompound nbt){ nbt.setInteger("EnergyBuffer", energy); } @Override public int receiveEnergy(int amount) { int energyAmount = Math.min(maxEnergy - energy, Math.min(intakeRate, amount)); this.energy += energyAmount; return energyAmount; } @Override public int extractEnergy(int amount) { int energyAmount = Math.min(energy, Math.min(extractRate, amount)); this.energy -= energyAmount; return energyAmount; } } (IEnergySink is just an interface for receiveEnergy, extractEnergy, getMaxEnergy and getEnergy) What I need is an efficient way to build a network.. with my java skills. Like when a block is added into the world, add it to a network aswell (If there is one, else build a new one), then transfer this energy over the network..
-
[1.7.10]Adjusting the speed a fluid pushes a player
onEntityCollidedWithBlock passes an Entity argument
-
Energy network
Here i am with this question again.. i have a block that is able to connect to other energy-based blocks (only rendering). Energy is just a variable, no magic, and i know that.. i just need to know how to actually go for making a network. Doing what i think i should do isn't a good way to go.. which is: I am a wire. If i have energy and i detect a block that needs it, after scanning all the blocks around myself, i pass it to said block. but the error here would be that the wire would also detect its source of power and give the power back.. My java skills generally are pretty basic. I have been in the modding section of minecraft for an year or so, and learnt java all from modding.. Is someone willing to point me in the right direction here? I am not in a rush to implement this.. Also keep in mind that I want to have things as tidy and efficient as they can get.. that is why i rewrote my mod from scratch.... 2 times..
-
[1.7.10] Made Techne Model Too Small
Scale it before rendering?
-
Crafting make game crash
Yep, you are right, since he can understand english aswell. Enough off topic from me, let's wait for him now
IPS spam blocked by CleanTalk.