Everything posted by GotoLink
-
[1.6.2] Send string to server
Huh... packets. Most of them are vanilla.
-
Regular Error
Entity ent = dmgSource.getEntity(); EntityPlayer player = (EntityPlayer) ent; ItemStack weapon = player.getCurrentEquippedItem(); if (!(ent instanceof EntityPlayer)) {return;} if (event.source.getDamageType().equals("player")) Again, you are casting to EntityPlayer before checking it is safe to do. And the last check seems useless.
-
Entity questions
1. It depends on what you want to do. Entity has less implemented methods (so they can't spawn "naturally" like mobs) but it can be enough for a lot of things. Boats and Minecarts are entities for example. There is EntityLivingBase now too. 2. Look at the SharedMonsterAttributes, this is where the data is dealt with. 3. Look at the mob tutorial, it is up to date. 4. I don't know. You can render "moving blocks" without entities, with a custom block renderer.
-
Saving data externally without NBT?
There is a persistent NBT tag for players You could also use WorldSaveData and set the player data at spawn event.
-
NBT not saving
It is a rendering class, all the same.
-
help pressure plate
Extend pressure plate. Find the trigger method, override it with if(entitytrigger instanceof SomeEntity) super.foo(...);
-
MCPBot Eclipse plugin
I think the MCP team shipped a tool within the pack. Can't remember the name, it is like updatemcp or the like. This tool would submit unofbufscated names that you introduced directly in the decompiled code. You can surely find more help about this on #mcp.
-
NBT not saving
So, no Container means you send your own packets. Before opening the GUI would be a good starting point i think.
-
Src ascii Error
There is a custom letter in you folder path which isn't supported. "á" -> change it
-
Help with creating a Forestry addon
Forestry isn't part of Forge, so I don't know. Maybe the Squeezer holds a Map with block to fluid id ?
-
NBT not saving
world.markBlockForUpdate(x,y,z); would also send the description packet automatically.
-
Spawning a damaged item into the world
if (!this.worldObj.isRemote) { this.setDead(); if(!hasImpacted) { //Spawn new damaged spear in world ItemStack newSpear = new ItemStack(RecipeExpansionPack.spearIron,1,spearDurability); //newSpear.damageItem(384 - (spearDurability - 1), this.getThrower()); Entity entity = new EntityItem(worldObj, par1MovingObjectPosition.blockX, par1MovingObjectPosition.blockY, par1MovingObjectPosition.blockZ, newSpear); worldObj.spawnEntityInWorld(entity); hasImpacted = true; } } Would be better.
-
Minecraft crashing in eclipse after making config file
public final static Block plutoniumBlock = new PlutoniumBlock(BlockIds.PLUTONIUMBLOCK_ID, Material.iron); public final static Block plutoniumOre = new PlutoniumOre(BlockIds.PLUTONIUMORE_ID, Material.rock); You will never use the correct id with this. Set the blocks after loading the config file.
-
How to use setBlock on a server?
http://www.minecraftforge.net/wiki/Packet_Handling
-
How to replace a Minecraft base class?
http://www.minecraftforge.net/wiki/Using_Access_Transformers
-
How to replace a Minecraft base class?
Coremod.
-
How to use setBlock on a server?
You called your ScheduleUpdate in your Gui class, which is client side only. You'd better send a packet to the server, which will then call the SheduleUpdate and perform changes.
-
Help! Can Still fly (in survival) once you take the armor allowing it off.
private boolean isWearingGravitite; is never set to false. But you can do without that variable anyway.
-
Minecraft crashing in eclipse after making config file
Use config.getItem and config.getBlock for those. Your package isn't lowercase.
-
Vanilla base mod -> forge conversion
Maybe there are better ways with Forge than editing the base class.
-
Rasterization
1. Look at the options file. (guiScale/overrideHeight/overrideWidth) Resolution is directly proportional to the screen size. 2. RenderGlobal ? Question is too vague.
-
TileEntity bugging out metadata [Solved]
@Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); isLoaded=compound.getBoolean("loaded"); fuse=compound.getInteger("fuse"); blockMetadata=compound.getInteger("meta"); } Would be better this way.
-
Tool meta data
EntityItem holds the ItemStack. Damage it before spawn in world. Most likely, the method you are overriding doesn't exist any more.
-
Keyboard usage
Hardcoded in Minecraft class. for (i = 0; i < 9; ++i) { if (Keyboard.getEventKey() == 2 + i) { this.thePlayer.inventory.currentItem = i; } } This means you can't change it.
-
Can you damage an item on smelting
Make your fuel item damageable.
IPS spam blocked by CleanTalk.