Jump to content

GalianRyu

Members
  • Posts

    55
  • Joined

  • Last visited

Everything posted by GalianRyu

  1. Is magically finding your mod hosted on Skydaz.com without you being aware of it normal? I went to check on AdFly today and noticed I suddenly had new links hosted through my AdFly. Theses pointed to an installer for my Mod on skyworx.com. I found that there is an EXE version of my mod on skyworx now and the links are being used like mad (way, way more than the original curse link). But the links still go through my adfly and are earning the tiny little pittance that adfly gives, and the mod is fully credited to me. I just don't understand how this happened without my knowledge, is this just something that happens? How do they add it to my adfly without my consent? Should I be concerned?
  2. Fixed the rendering problem as well. Do not register custom Item Entities like regular entities. Apparently it is not necessary.
  3. Okay, found the problem with it not existing, it was actually a problem where I declared the object in the Item class, now I'd just really need to know how to make it render. Is there some sort of special rendering function I need to call?
  4. I am trying to make an Item that, when it is dropped on the ground it doesn't group together but remains as separate entities. I have made a custom EntityItem class and overrode onUpdate. I copied everything from the original function except the bit where it tests for combining items. The problem is no entity gets made at all now, and I'm not sure why. Any ideas? (Even when it is creating an Entity, it's not rendering and is invisible, but I suspect that's by design for custom item entities and a whole other kettle of complicated fish). package net.rpcraft.rpcraft; import java.util.Iterator; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.stats.AchievementList; import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class EntityLifeshard extends EntityItem { protected int delayBeforeCanPickup; protected int age; public EntityLifeshard(World worldIn, double x, double y, double z, ItemStack stack) { super(worldIn, x, y, z, stack); } public EntityLifeshard(World worldIn, double x, double y, double z) { super(worldIn, x, y, z); } public EntityLifeshard(World worldIn) { super(worldIn); } @Override public void onUpdate() { ItemStack stack = this.getDataWatcher().getWatchableObjectItemStack(10); if (stack != null && stack.getItem() != null && stack.getItem().onEntityItemUpdate(this)) return; if (this.getEntityItem() == null) { System.out.println("no item death"); this.setDead(); } else { this.onEntityUpdate(); if (this.delayBeforeCanPickup > 0 && this.delayBeforeCanPickup != 32767) { --this.delayBeforeCanPickup; } this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; this.motionY -= 0.03999999910593033D; this.noClip = this.pushOutOfBlocks(this.posX, (this.getEntityBoundingBox().minY + this.getEntityBoundingBox().maxY) / 2.0D, this.posZ); this.moveEntity(this.motionX, this.motionY, this.motionZ); boolean flag = (int)this.prevPosX != (int)this.posX || (int)this.prevPosY != (int)this.posY || (int)this.prevPosZ != (int)this.posZ; if (flag || this.ticksExisted % 25 == 0) { if (this.worldObj.getBlockState(new BlockPos(this)).getBlock().getMaterial() == Material.lava) { this.motionY = 0.20000000298023224D; this.motionX = (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F); this.motionZ = (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F); this.playSound("random.fizz", 0.4F, 2.0F + this.rand.nextFloat() * 0.4F); } } float f = 0.98F; if (this.onGround) { f = this.worldObj.getBlockState(new BlockPos(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.getEntityBoundingBox().minY) - 1, MathHelper.floor_double(this.posZ))).getBlock().slipperiness * 0.98F; } this.motionX *= (double)f; this.motionY *= 0.9800000190734863D; this.motionZ *= (double)f; if (this.onGround) { this.motionY *= -0.5D; } if (this.age != -32768) { ++this.age; } this.handleWaterMovement(); ItemStack item = getDataWatcher().getWatchableObjectItemStack(10); if (!this.worldObj.isRemote && this.age >= lifespan) { int hook = net.minecraftforge.event.ForgeEventFactory.onItemExpire(this, item); if (hook < 0) this.setDead(); else this.lifespan += hook; } if (item != null && item.stackSize <= 0) { System.out.println("aged out"); this.setDead(); } } }
  5. I may be going mad, but I swear when I first dipped my toe into modding, somewhere back in the not-easily-remembered past, that there were functions in Item for changing behavior on an item being picked up or set down in an inventory, but now I'm not seeing anything even remotely similar. Does anyone know how you could achieve this in 1.8 or 1.7.10? Say like you wanted to have two items that could be combines by dropping one on the other in the inventory.
  6. that is the longest I've seen a thread go with no answer at all. Is this a weird thing to ask? Is there no way to do either of the things I asked? if that's the case, is there plans to add it to Forge?
  7. I'm hoping someone can help me. I have a block that is being rendered purely by it's TileEntitySpecialRenderer. It has angles which the regular JSON model renderer cannot do. (Triangles in Minecraft, oh my). I have run into two very specific problems: 1.) Minecraft is still hunting for a Blockstate and model files for the Block, is there a way to tell the game it won't need those? 2.) Is there a way to render it in the inventory, like chests/skulls/banners are? The only answers I've found are several months past or older and reference a thread or threads that appears to be gone. Has any figured out the best way to do this yet?
  8. Found what I was missing! Even though blockContainer overrides the standard render rules with getRenderType() return -1... You still have to override IsOpaqueCube yourself to return false. Seems like BlockContainer should do that as well, since your only going to use a TESR for something not cube-like lol.
  9. Well, as you can see from my code, I haven't overridden any functions that control light level. Do you know where the light level is usually controlled from so I can attempt to locate the default function or emulate it? I checked the vanilla code for chests and skulls, but found no functions that resembled yours or looked obviously related to light level.
  10. So I have a TileEntitySpecialRenderer set up and I did everything pretty much the same way I did my last TESR, but for some reason it renders the shape correctly, but doesn't have the texture, or even the purple/black default texture, its just solid black. I have double and triple checked that the Resource Location is correct and there's no typo in the filepath, and I even made certain that it was seeing the correct textures after each drawing. Here's the code for the renderer: package net.rpcraft.rpcraft; import org.lwjgl.opengl.GL11; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.rpcraft.rpcraft.RPSpikes.TileEntitySpikes; public class TileEntitySpikesRenderer extends TileEntitySpecialRenderer { private ResourceLocation spikeTexture; private ResourceLocation bottomTexture; @Override public void renderTileEntityAt(TileEntity tileEntityIn, double posX, double posY, double posZ, float partialTick, int damage) { if(!(tileEntityIn instanceof TileEntitySpikes)) return; TileEntitySpikes tileEntity = (TileEntitySpikes)tileEntityIn; if(tileEntity.getBlockMetadata() == 0) { spikeTexture = new ResourceLocation(RPCraft.MODID, "textures/blocks/spikesNormal.png"); bottomTexture = new ResourceLocation(RPCraft.MODID, "textures/blocks/spikesNormal.png"); } else if(tileEntity.getBlockMetadata() == 1) { spikeTexture = new ResourceLocation(RPCraft.MODID, "textures/blocks/spikesStained.png"); bottomTexture = new ResourceLocation(RPCraft.MODID, "textures/blocks/spikesNormal.png"); } else if(tileEntity.getBlockMetadata() == 2) { spikeTexture = new ResourceLocation(RPCraft.MODID, "textures/blocks/spikesDarkened.png"); bottomTexture = new ResourceLocation(RPCraft.MODID, "textures/blocks/spikesDarkened.png"); } else if(tileEntity.getBlockMetadata() == 3) { spikeTexture = new ResourceLocation(RPCraft.MODID, "textures/blocks/spikesDarkAndStained.png"); bottomTexture = new ResourceLocation(RPCraft.MODID, "textures/blocks/spikesDarkened.png"); } else { spikeTexture = new ResourceLocation(RPCraft.MODID, "textures/blocks/spikesNormal.png"); bottomTexture = new ResourceLocation(RPCraft.MODID, "textures/blocks/spikesNormal.png"); } Tessellator tess = Tessellator.getInstance(); WorldRenderer worldrenderer = tess.getWorldRenderer(); GL11.glPushMatrix(); GL11.glPushAttrib(GL11.GL_ENABLE_BIT); this.bindTexture(spikeTexture); GlStateManager.translate(posX, posY, posZ); worldrenderer.startDrawing(4); TriangleVertices(worldrenderer); tess.draw(); this.bindTexture(bottomTexture); worldrenderer.startDrawingQuads(); worldrenderer.addVertexWithUV(1.0D, 0.0D, 0.0D, 1.0D, 1.0D); worldrenderer.addVertexWithUV(1.0D, 0.0D, 1.0D, 1.0D, 0.0D); worldrenderer.addVertexWithUV(0.0D, 0.0D, 1.0D, 0.0D, 0.0D); worldrenderer.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 1.0D); tess.draw(); GL11.glPopAttrib(); GL11.glPopMatrix(); } private void TriangleVertices(WorldRenderer worldrenderer) { worldrenderer.addVertexWithUV(1.0D, 0.0D, 1.0D, 1.0D, 1.0D); worldrenderer.addVertexWithUV(0.75D, 1.0D, 0.75D, 0.75D, 0.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 1.0D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 1.0D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.25D, 1.0D, 0.75D, 0.25D, 0.0D); worldrenderer.addVertexWithUV(0.0D, 0.0D, 1.0D, 0.0D, 1.0D); worldrenderer.addVertexWithUV(1.0D, 0.0D, 0.5D, 1.0D, 1.0D); worldrenderer.addVertexWithUV(0.75D, 1.0D, 0.25D, 0.75D, 0.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 0.5D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 0.5D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.25D, 1.0D, 0.25D, 0.25D, 0.0D); worldrenderer.addVertexWithUV(0.0D, 0.0D, 0.5D, 0.0D, 1.0D); worldrenderer.addVertexWithUV(0.0D, 0.0D, 0.0D, 1.0D, 1.0D); worldrenderer.addVertexWithUV(0.25D, 1.0D, 0.25D, 0.75D, 0.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 0.0D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 0.0D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.75D, 1.0D, 0.25D, 0.25D, 0.0D); worldrenderer.addVertexWithUV(1.0D, 0.0D, 0.0D, 0.0D, 1.0D); worldrenderer.addVertexWithUV(0.0D, 0.0D, 0.5D, 1.0D, 1.0D); worldrenderer.addVertexWithUV(0.25D, 1.0D, 0.75D, 0.75D, 0.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 0.5D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 0.5D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.75D, 1.0D, 0.75D, 0.25D, 0.0D); worldrenderer.addVertexWithUV(1.0D, 0.0D, 0.5D, 0.0D, 1.0D); worldrenderer.addVertexWithUV(1.0D, 0.0D, 0.0D, 1.0D, 1.0D); worldrenderer.addVertexWithUV(0.75D, 1.0D, 0.25D, 0.75D, 0.0D); worldrenderer.addVertexWithUV(1.0D, 0.0D, 0.5D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(1.0D, 0.0D, 0.5D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.75D, 1.0D, 0.75D, 0.25D, 0.0D); worldrenderer.addVertexWithUV(1.0D, 0.0D, 1.0D, 0.0D, 1.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 0.0D, 1.0D, 1.0D); worldrenderer.addVertexWithUV(0.25D, 1.0D, 0.25D, 0.75D, 0.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 0.5D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 0.5D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.25D, 1.0D, 0.75D, 0.25D, 0.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 1.0D, 0.0D, 1.0D); worldrenderer.addVertexWithUV(0.0D, 0.0D, 1.0D, 1.0D, 1.0D); worldrenderer.addVertexWithUV(0.25D, 1.0D, 0.75D, 0.75D, 0.0D); worldrenderer.addVertexWithUV(0.0D, 0.0D, 0.5D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.0D, 0.0D, 0.5D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.25D, 1.0D, 0.25D, 0.25D, 0.0D); worldrenderer.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 1.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 1.0D, 1.0D, 1.0D); worldrenderer.addVertexWithUV(0.75D, 1.0D, 0.75D, 0.75D, 0.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 0.5D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 0.5D, 0.5D, 1.0D); worldrenderer.addVertexWithUV(0.75D, 1.0D, 0.25D, 0.25D, 0.0D); worldrenderer.addVertexWithUV(0.5D, 0.0D, 0.0D, 0.0D, 1.0D); } } So far the block is just extending blockContainer and the TileEntity is literally just public static class TileEntitySpikes extends TileEntity {} since I only needed it for the renderer. Did I miss something?
  11. Okay, I think I got it now, you have to get the player interacting with the block and test if "player.opencontainer" is your container. That seems simple enough. I still want to know how the BlockChest OnBlockActivated works though. It calls player.openGUIChest(IInventory) and it's an empty function and I couldn't find it overridden anywhere.
  12. I want to make a block that is similar to a chest, but not exactly a chest, it doesn't open like a chest does so the common method of "copy chest code" won't help me. Does anyone know how I make a TileEntitySpecialRenderer know when the GUI is opened and closed? I cannot find any good tutorials on it.
  13. I select that one this time and instead of saying "cannot find methods.csv", it says "cannot find packaged.srg or joined.srg". And then same thing, if I try 3-4 times, it failed to that same output in OP. If I search for all these names, methods.csv is in the folder you mentioned, but packaged.srg is in the other folder, and selecting the highest common folder between them (.../caches/minecraft) cannot find either. Is my environment just borked somehow? I'd accept that as an answer since no matter how many times I reinstall forge and gradlew and no matter how fervently I add '--refresh-dependencies', I still cannot open any of the .json files in the forge library. I always have to go to my normal minecraft install on the C:/ drive, and open them in Notepad from there. Any further ideas are most welcome. At this point, I'm working around it by removing CCC and NEI from the dev environment entirely and just accepting that my NEIRPCraftConfig file shows errors. I have build.gradlew pointing to a completely separate folder with them in it for compiling and it compiles without issue. I'd just really like to know why it seems I cannot add CCC to Eclipse to save my life.
  14. I see that it say to set the mappings directory in the config, but I don't know what the mappings directory is and it only loads half the CCC config before it crashes. If I move the Jar files for CCC and NEI to the Eclipse/Mods folder, then it actually prompts me to "Select MCP folder for deobfuscation" but when I select .C:\Users\Me\.gradle\caches\minecraft\net\minecraftforge\forge\1.8-11.14.3.1446\unpacked\conf it throws a different error and says "cannot find methods.csv file" after which this same error pops up again. I'm sorry if I'm missing something obvious, but I don't know what exactly I need to do and really would like some help.
  15. I'm hoping someone can help me. I am trying to add NEI support to my mod, and I have the code I need and have even made the necessary classes... I followed tutorials for adding an API to my library and have both CodeChickenCore-1.8 and NotEnoughItems-1.8 added to my library, but every time I try to run the debug test client, I get the following errors I have tried every tweak and slight variation on adding the files I can find, but it will not work. What else do I need to do?
  16. I'm not very familiar with github. I know how to code (since I teach computer science), but my background was always networking, not software dev. I've never really used tools like github before, but if you can give me the steps to do what your suggesting, I will happily try it.
  17. I Choose C:\Users\Galian\.gradle\caches\minecraft\net\minecraftforge\forge\1.8-11.14.1.1306\unpacked\conf as you suggested, no luck though.
  18. I just selected "open with editor" in Eclipse. Are you not supposed to do that? How am I supposed to know what I'm supposed to fix to ensure compatibility if I can't even view the mod? Also I pointed it at that folder and it failed to open:
  19. I did that, but when I try to view them in Eclipse they are just garbage text. Also when I run the client, I get a pop up asking me to "Select an mcp dir for the deobfuscator". So am I missing something in Eclipse or Forge?
  20. I need to fix a problem with my mod in NEI and I'm trying to add it to my dev environment, but my Google-Fu is failing me. Any tutorial I find for adding mods into the dev environment is for older versions of Minecraft and references folders that don't exist in my current environment (At least not anywhere I can find). Can someone tell me where to put the dev jar files and how to have them show up in Eclipse?
  21. Thank you!!!!!!!!!!! I have been trying for weeks to figure out how to fix this in my mod! I would hug you, if such things were possible over an ethernet cable.
  22. Yeah, I just don't want to fill that model folder up with more stuff than it already has in it. I'm already certain anyone make a resource pack for 1.8 will end up looking at a lot of the mods and just going 'deer in the headlights' at all the extra stuff, but thank you for at least getting what I'm trying to do
  23. Still getting the error, dang that looked like the right way to go too.
  24. I did try that (I assume you mean just declaring a model for it anyway even though I didn't make one, still gives the error. So does trying to have it use a different model, I tried setting it to the door item's model and didn't work either). Any other ideas?
  25. Did you actually read my post? I have everything modeled and rendered correctly, these block items don't appear in the inventory at all and I shouldn't need to put a bunch of extra model files in my assets just to stop an error that doesn't even prevent Minecraft from opening. I just wondered if someone more experienced than me had also made blocks that never get rendered in the inventory and knew how to stop the error from being displayed, it doesn't display on vanilla doors or beds.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.