Everything posted by GotoLink
-
[Need Help Again]Particle effect is dark?
Yes because it is better to extend classes. And sometimes vanilla classes are used in special cases where they are expected to work, which you may not fulfil. Vanilla EntityFX are spawned in RenderGlobal, check if anything special happens for the class you copied over. I would investigate getBrightness(int) or getBrightnessForRender(int) if i were you.
-
[1.6.2] Problem with capabilities.setPlayerWalkSpeed
By using setAttribute, and getBaseValue() you are overwriting any modifiers already existing, potion effects for the most part. Here is how i do it in the LevelUp! mod update: AttributeInstance atinst = player.getEntityAttribute(SharedMonsterAttributes.movementSpeed);//enter the attribute speed without triggering any calculation AttributeModifier mod; skill = getSkill(player,6);//consider this a whatever value you want if(skill!=0) { //Here is the modifier we want to apply, the speedID needs to be unique (!= from any other speed modifier id) //see func_111129_g() in ModifiableAttributeInstance to understand what the values do //in this case, the modifier will do speed*=1+skill/100, where "speed" is a intermediate calculated value with previous modifiers mod = new AttributeModifier(speedID,"SprintingSkillSpeed",skill/100F,2); if(player.isSprinting())//we apply when conditions are met { if(atinst.getModifier(speedID) == null)//you'll get a crash if you apply twice the same modifier, thus we check with the unique modifier id { atinst.applyModifier(mod); } } else if(atinst.getModifier(speedID) != null)//we remove when conditions are not met { atinst.removeModifier(mod); } Here is a suggested modifier for your case: new AttributeModifier(wtvID,"MySpeedModifier",2.5,2);
-
[1.6.4] Potion Effect Texture In Player's GUI
You probably want to use the bindTexture(...) one. Though it would be easier to help if you showed some code.
-
meta sensitive input furnace
Don't see anything random in your code... Do you really want to duplicate your chisel when it is on the crafting bench ? (stacksize = 2 ) And you are checking all slots here, without stopping at the first chisel found. What is the recipe calling your crafting handler ? it should contain a chisel.
-
[Need Help Again]Particle effect is dark?
Did you copied that code from another class instead of extending said class ?
-
[1.6.2] Creating and registering your own ResourcePack class
Localisation handled by the server ? Are you crazy ? This would mean different packet length for each receiving part depending on the receiver settings...this a f* nightmare ! Let that to client, please... Or next time you are going to try handling the rendering on server side.
-
[1.6.2] Problem with capabilities.setPlayerWalkSpeed
Use the attribute system. Any entity speed can be changed there.
-
Loader.isModLoaded version checking
No, this is based on modid. Use Loader#getModList(), this will give you the complete list of ModContainer. Then you can check whatever you want inside that.
-
[1.6.2] Creating and registering your own ResourcePack class
Personally, i would use Minecraft.getMinecraft().mcResourcePackRepository.setRepositoryEntries(array); to add a custom ResourcePackRepositoryEntry which override updateResourcePack() to call your custom ResourcePack. As a side note, there is no "last call to refreshResources()". Minecraft itself does it regularly. So you can do that anytime, i assume. And how is that a drawback for a ResourcePack ? A server doesn't need multiple versions of the same thing...
-
Solved[1.6.4]List of changed methodnames
Sort of, look at mcp/conf folder.
-
Arbitrary file storage?
Config files are already doing this, so yes it is OK. Loader#getConfigDir(); As for images/textures. Resource packs are now a built-in feature of Minecraft. That means users don't have to open your jar. They only need to make a resource pack following your jar structure and add whatever textures they want to change.
-
[1.6.2] Need help with item doing damage to the player.
@ForgeSubscribe public void onPlayerLeftClick(PlayerInteractEvent event){ if(event.action==Action.LEFT_CLICK_BLOCK && event.entityPlayer.getHeldItem()!=null && event.player.getHeldItem().itemID==your_Item_ID && event.entityplayer.worldObj.getBlockId(event.x,event.y,event.z)==Block.grass.blockID){ //do things } }
-
How to get unique itemID???
@TheyCallMeDanger Nice idea. But think about servers. And... This had me laughing so hard. ... Sadly.
-
Trying to double all smelting recipes including modded items help!
@Mazetar No events, but an interface: ICraftingHandler
-
Making a addon, need Help
Actually, how you would do things depends on how the API is made. If the API is good, it provides events classes linked to the Nuclear Reactor, which you can subscribe to and give new results/functions. Forge provides the event system, I hope IC2 authors were nice enough to use it.
-
[1.6.2] Need help with item doing damage to the player.
You should use PlayerInteractEvent with left click block as action.
-
custom furnace burning
Extend TileEntityFurnace and BlockFurnace, then remove every piece of code that you didn't make yourself. We will all see much better what you did wrong.
-
How to get unique itemID???
There is a finite number of items and nothing prevents a mod from using them all. In other words, there is no such thing as unique item id. If you are looking for unused item id, you can check for Item.itemsList[id] == null . You can also use Forge methods, like Configuration#getItem(args).
-
How do I check for and consume more than 1 item on item use?
Get stack in slot and decrease stack size. You'll need loops in the worst case that the player has redstone all over its inventory.
-
Block getIcon(par1, par2) called every render when it's an item?
First: If it is not placed on the world grid, it is not a block. It is an Item (ItemBlock by default) or an EntityItem. Second: It needs to be called that much, since the renderer doesn't know when the texture is going to change. Because, yes, it can change. You can return a random icon if you like.
-
Problem with big tree generation
Well if you can't use id above 256, use id below 256...
-
Keybind-ed GUI toggling
My bad, you use mc.ingameGUI ,right ?
-
Trying to double all smelting recipes including modded items help!
What is the point you can always access the actual list with getSmeltingList() in FurnaceRecipes.
-
Keybind-ed GUI toggling
if(!mc.currentScreen instanceof MyNewScreen) //open MyNewScreen else //close
-
[1.5.2] Rendering Problems
public static Icon getBlueStone_Wire(String string) { return null; } ...I am afraid null isn't any of your icons.
IPS spam blocked by CleanTalk.