-
Posts
2638 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Ernio
-
You need to use implementation of IResourcePack. For this particular case you can use FileResourcePack that will allow you to load file as a resource pack. You will need to put that resource pack into defaultResourcePacks in Minecraft.class (using reflection - note: use forge's reflection helper). After adding it to list you need to refresh resources - to do that you simply call method which is also in Minecraft.class I think (#refreshResources?). To find it you can look at Gui class of resource pack lists (which call it after changing pack)
-
Seriously, just google IItemRenderer tutorial. 1. Inside your render methods you have ItemRenderType - you need to make switch or if statements for each type you want to handle. For 3rd or 1st person the rendering is different. You will need scaling/translating that will fit given type. 2. Yes, just that. 3. "bauble" - meaning? What - jewelery? Overally - R.I.P english, bruh. http://i1276.photobucket.com/albums/y465/Ameer_da_Gilgamesh/elvish-math_zps27b2be3a.jpg[/img]
-
public PapPapEnum fielda; Is null. (Or the x/y values). Print it, you'll see. Fix: Make sure you set the field before getting objects from it.
-
[1.8] [RESOLVED] Breaking particles of custom blocks
Ernio replied to xJon's topic in Modder Support
http://minecraft.gamepedia.com/Models You don't "add" this. It IS your model. Simply add particle to textures. Also - we can't see your code. -
One output is server-side, the "0" is on client. You need packets to update client's value. Note that you don't always need all data on clients (mostly for rendering).
-
WARNING: coremods are present: Contact their authors BEFORE contacting forge // Don't be sad. I'll do better next time, I promise! java.lang.NullPointerException: Stitching texture atlas at shadersmod.client.ShadersTex.readImage(ShadersTex.java:464) You need to contact the author - we can't help you.
-
wat? This deserves a duck!
-
#setDead is almost an internal method. At least I strongly diagree with using it. Lookup CommandKill.class, Use: player.onKillCommand() EDIT Btw. you can simply send kill command instead of whole packet, just saying. EDIT 2 throw new CommandException("commands.generic.permission"); // IN YOU FACE (Note: comment is quote from actual Mojang code, just for shits and giggles. <3 u Dinnerbunny). I actually forgot that /kill != /suicide. That's an admin command indeed.
-
*facepalms* You need to actually override method from Block, not make your own. Learn Java before modding, please :C
-
1. PlayerInteractEvent 2. RIGHT_CLICK_BLOCK 3. player.getCurrentEquippedItem() 4. if (stack != null) 5. stack.getItem() == Items.apple
-
What you need is just the EntityPlayer from the onBlockActivated() method. In there just do player.addChatmessage(new ChatComponentMessage(new ChatComponentText("Your message here"))); player.addChatComponentMessage(new ChatComponentText("MSG"));
-
[1.8] Shooting with a custom bow damage the player itself
Ernio replied to JimiIT92's topic in Modder Support
1. Please rename your variables to more readable (you literally copied whole vanilla class). 2. Print if your shooter is being set to the actual shooter. 3. You can extend timeInAir check - see if it works (arrow might be too slow to escape player's box in 5ticks). Finally - if you copied this in 1.7.10, what stops you from looking into 1.8 code? -
[1.8] acceptedMinecraftVersions documentation
Ernio replied to LordMastodon's topic in Modder Support
Why does nobody ever look into code anymore? Oh, wait - you looked. /** * The acceptable range of minecraft versions that this mod will load and run in * The default ("empty string") indicates that the currently RUNNING minecraft version is acceptable. * This means ANY version that the end user adds the mod to. Modders PLEASS set this. * FML will refuse to run with an error if the minecraft version is not in this range across all mods. * @return A version range as specified by the maven version range specification or the empty string */ String acceptedMinecraftVersions() default ""; -
Question tho - is there even UgoCraft version for forge (1.7.10+)? I don't think I saw one last time I checked (something might have changed).
-
Well, there is client-side MouseEvent that would allow you to display client messages (server doesn't know about it). Then there is PlayerInteractEvent ran on server and client which would allow to send message from server (server knows about it).
-
Need to be more specific - do I understand correctly - when block is in world, you want some tool to destroy that block and drop item in its place?
-
You need to be more specific - you want to display msg on click on block, on click anywhere, on click with item, if with item - with vanilla or your own?
-
Entity Registration - What do all those methods do?
Ernio replied to Bedrock_Miner's topic in Modder Support
You should only use: EntityRegistry.registerModEntity(entityClass, entityName, id, mod, trackingRange, updateFrequency, sendsVelocityUpdates) trackingRange is the range in meters (blocks) at which this entity's data will be sent to players around. updateFrequency is time in ticks this entity will be sending position updates (movement and few more values probably). Note: You should use 3 as default. sendVelocityUpdates causes sending not only normal update packets, but velocity aswell: if (this.sendVelocityUpdates) { double d0 = this.trackedEntity.motionX - this.lastTrackedEntityMotionX; double d1 = this.trackedEntity.motionY - this.lastTrackedEntityMotionY; double d2 = this.trackedEntity.motionZ - this.motionZ; double d3 = 0.02D; double d4 = d0 * d0 + d1 * d1 + d2 * d2; if (d4 > d3 * d3 || d4 > 0.0D && this.trackedEntity.motionX == 0.0D && this.trackedEntity.motionY == 0.0D && this.trackedEntity.motionZ == 0.0D) { this.lastTrackedEntityMotionX = this.trackedEntity.motionX; this.lastTrackedEntityMotionY = this.trackedEntity.motionY; this.motionZ = this.trackedEntity.motionZ; this.func_151259_a(new S12PacketEntityVelocity(this.trackedEntity.getEntityId(), this.lastTrackedEntityMotionX, this.lastTrackedEntityMotionY, this.motionZ)); } } This probably smoothens movement, but idk really Edit: As to other stuff: (questions) 1. Nowhere, I personally think this method is useless - just look at it's code. 2. NEVER use this - use forge's version (the one mentioned at beginning of post)! 3. Told before. 4. Don't use it, again - use forge's method. -
Been there, done that. Also - I am not only one (lookup Tinkers Construct). Answer is clear 'yes, it is possible'. You can colorize blocks, items and with a bit of knowledge - even fluids. You can store colors, blend them inside NBT (for block you need TE).
-
Thing you might want to check out is scheluded block ticks. For good example look at BlockCrops#updateTick, many don't know about those.
-
1. You (and apparently many people) don't need event, but to learn how to use new systems. 2. IItemRenderer is deprecated and will NOT come back. 3. For any kind of item you can replace normal model with ISmartItemModel (or other IBakedModel interface) that lets you (in any way) manipulate how item is rendered, from what angle and for what ItemStack and who knows what else. 4. New model system allows you to do almost anything, only problems that might appear would be when you would want to render some super-gl-specific stuff (crazy stuff really). For examples: https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe15_item_smartitemmodel Side-note: "what is wrong to people that were updating minecraft to 1.8" Actually, after about a month - you will start appreciating new model system (if that is the case, because this is like only thing that changed in 1.8 really). System is actually very nice (on both performance and design levels) + it was more for "resource-packers", not modders directly. Yet still - read my signature
-
Few things 1st: 1. Event gives you resolution, use that, m8. @SubscribeEvent public void onRenderOvelay(RenderGameOverlayEvent.Pre event) { int w = event.resolution.getScaledWidth(); int h = event.resolution.getScaledHeight(); 2. private static Minecraft mc = Minecraft.getMinecraft(); I don't think it can be static, Minecraft.class needs to be initialized (it's null on startup), so does your object (ArrowCount), after Minecraft. But I might be wrong. 3. int x = width / 2; int y = (height / 2) + 82; This will cause your arrow count to ALWAYS render with 82 offset from exact center - the 82 value is dependent to gui size - thus with different gui size it will be different offset. Use e.g: int x = width / 2; int y = height - 50;
-
Need help with PacketHandling for IExtendedEntityProperties[1.8]
Ernio replied to ItsAMysteriousYT's topic in Modder Support
Soooo, where? -
Need help with PacketHandling for IExtendedEntityProperties[1.8]
Ernio replied to ItsAMysteriousYT's topic in Modder Support
1. You don't need to call this() in constructor (unless it does domething, which it doesn't). 2. Same goes for super() - empty constructors don't need it ;_; 3. Hint: Don't access same data multiple times - get RLMPlayerProps ONCE, then use instance. 4. Finally after simple fixes: What exacly? What can be wrong: When sending packet: you are passing null/empty strings. (most likely) When receiving packet: your #get is not working correctly. 5. Tip: Make server close player's start-game gui, only after name/surname are correct. (packet might not arrive or data might be "bad").