Everything posted by GotoLink
-
Item pickup help.
GameRegistry.registerPickupHandler(new PickupHandler()); Once is enough. The rest sounds good.
-
Damage and Meta for Items?
You can have damage and NBT. See vanilla enchanted/named tools.
-
Set/Get word on a GUI to/from NBT
Make the change as soon as the packet is received. You can't know if an outside code can be executed before the next packet arrives. Ho and do some checks, like the packet channel.
-
Set/Get word on a GUI to/from NBT
I don't know if you still have this in your Packet handler, but just in case: private static String identificationName; @Override public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { ByteArrayDataInput reader = ByteStreams.newDataInput(packet.data); identificationName = reader.readUTF(); } Don't store a (static : value, actually do something to the tile entity.
-
A piece of tileentity code aint working
You added the player's inventory slots first to your container, so they get the first slots.
-
Hooking my forge mod into a Bukkit plugin
I don't know anything about Bukkit, but I'll give my opinion (on your ideas ) Option 1: Reflection. If Bukkit are good and give an appropriate answer to their registering methods, this could be as simple as any code, except you catch more exceptions. Option 2: Brings the syncing issue. I don't know how Forge+Bukkit would load mod+plugin (order, dependency ?), might be messy. About the syncing, I'll say that Forge should keep priority. Isn't the purpose of the Bukkit part for compatibility only ?
-
Set/Get word on a GUI to/from NBT
You are using two different variables. They don't know about each other unless read/write NBT happens, which doesn't that often. The one "name" variable was good.
-
Entity Server/Client update issues
You are calling a client only class in a common file. Instant server crash.
-
Help Getting from Eclipse to Main Game
No, you shouldn't.
-
Reobfuscating bug
...and what do you get in the reobf folder ?
-
Particles (strange error)
EntityFX particle = new EntitySpellFXDamage(w, player.posX, player.posY, player.posZ,a,-b,c); FMLClientHandler.instance().getClient().effectRenderer.addEffect(particle); Where did you put this ?
-
Random tick
setTickRandomly(true); @Override public void updateTick(World world, args) { if(!world.isRemote) world.spawnEntityInWorld(new EntityItem(...)); }
-
[SOLVED] GuiContainer inventory bug in multiplayer [Dedicated server]
It makes sense with what addSlotToContainer(Slot) does. Man, extend TileEntityFurnace, use GuiFurnace and ContainerFurnace, and you'll be done with it. Seriously.
-
Max Size world gen structures?
Don't assume any logic behind it, benchmarking on Minecraft terrain generation is useless. Mew probably felt like it had an impact, while any other change could have done that. Obviously you need to iterate over the blocks, it would be utterly stupid not to. I prefer to use Iterator by the way
-
Making a new Event?[SOLVED]
That the receiving hand of the event system. Don't forget to post the event when it should be sent. Event myEvent = new CustomEvent(args); MinecraftForge.EVENT_BUS.post(myEvent); //if(myEvent.isCanceled) ...
-
[solved]null pointer exception when rendering custom block in inventory.
@Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { // TODO Auto-generated method stub return true; } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { // TODO Auto-generated method stub return true; } Try return false ? Did you ClientRegistry.bindTileEntitySpecialRenderer(args); ?
-
Modify the health and position of an offline player
Changing the player dat file would only affect it if you do it before the player logs in. If you do it after, your saved data will be overwritten on player log out and won't come into effect at all. Make an external program for the client to run before he starts his game. Why do you want to change that data ?
-
Change the HUD Position?
RenderGameOverlayEvent.
-
can i set the critical hit damage on a sword/tool
Man, if you don't understand how to use the code... learn Java, seriously.
-
NBT Tag Help (Fetching it Client / Server Side)
Packets. Send the needed info to client side.
-
[1.6.2] Passive mob attack player?
EntityAIHurtByTarget ?
-
[Solved]Question About attributes.
Man, if you want to keep it simple and don't care about modifiers, AttributeInstance oldSpeed = player.func_110148_a(SharedMonsterAttributes.field_111263_d); oldSpeed.func_111128_a(oldSpeed.func_111125_b()*change); that is all.
-
[SOLVED] GuiContainer inventory bug in multiplayer [Dedicated server]
Not only is it good practice, but more efficient and doesn't breach Minecraft license. Check your transferStackInSlot method in Container, i see some magic numbers that could be wrong. Also make sure you use mergeItemStack(ItemStack, int, int , boolean) correctly. Be aware that you added your slots first, then the player internal inventory, then the player inventory bar. The order is important.
-
[Solved] Working with NEI in dev workspace MC1.6
I'd rather think it is downloaded automatically.
-
Max Size world gen structures?
@Mazetar If you have organized the generation in chunks, it is a good idea, indeed. Don't expect much improvement though.
IPS spam blocked by CleanTalk.