Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

mossyblog

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by mossyblog

  1. Also, tree's usually have their own box radius, in that even within a roofed forest you have a limit imposed, so really it's about scoring weight per block within that radius that depends on the distance between logs. You could do recursive but i suspect that's also a bit of an overkill given the nature of Tree Generation... the first pass in a loop could just audit the 16x16 area using the player as a centre point. Put this into two arrays (leaves and logs). Then using the SQRT functions you can simply infer likelihood that the block belongs to the trunk of an adjacent tree by its type and distance from root (which you'd define as being the source of the hit or objectMouseOver position). I've done this already and although its not "accurate" the illusion stays intact and that's all that really matters, if the player believes it to be so, it is honest to goodness true For the leaves you can create a random noise true/false statement for all blocks say 8x8 away from your harvest zone...that way it will look less like you took out a clean square of blocks but more so that some linger. If they are orphan leaf blocks the server will clean that up for you aswell.
  2. Try this https://gist.github.com/mossyblog/bf5313c1e6596142edff Essentially it will render any cube you feed it in 3D space with animation capabilities ... This is part of the equation as you can put that in the doRender() methods, but the rest of the collider and packet updates to let others see it etc will need still need to occur via normal routes.
  3. Take a look at the RenderEntityFrame class as it has a lot of hidden wins there for a concept like this. In that EntityFrame acts as a container, and you can then inject an "item" of your choosing (block or item) as its subordinate child. In your case you could make the "ItemFrame" a "plate" and the child either a Block or EntityItem (take your pick either way). It really is up to you on how you form that relationship but the point is inside that one class there's a lot of code to re-use or poach for your bidding. I did something similar, in that when you place a chest below a "slab" it renders a 3D icon of whats inside above the slab. Giving a "shelf" like visualisation. My concept hasn't got colliders etc in it but the way I "paint" it in 3d space is via this method: public static void RenderFloatingItemIcon(float x, float y, float z, Item item, float partialTickTime, boolean animate) { BlockPos pos = new BlockPos(x,y,z); // Create Empty EntityItem to help with Rendering Positionining. EntityItem entity = new EntityItem(mc.theWorld,pos.getX(),pos.getY(), pos.getZ()); if (entity.ticksExisted == 0) { entity.lastTickPosX = entity.posX; entity.lastTickPosY = entity.posY; entity.lastTickPosZ = entity.posZ; } double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double)partialTickTime; double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partialTickTime; double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)partialTickTime; // TODO: Keep local version of the renderXYZ positions double renderPosX = HaxeUtil.GetFieldByReflection(RenderManager.class, mc.getRenderManager(),"renderPosX"); double renderPosY = HaxeUtil.GetFieldByReflection(RenderManager.class, mc.getRenderManager(),"renderPosY"); double renderPosZ = HaxeUtil.GetFieldByReflection(RenderManager.class, mc.getRenderManager(),"renderPosZ"); GlStateManager.pushMatrix(); renderPosX = (double)pos.getX() - entity.posX + (d0 - renderPosX); renderPosY = (double)pos.getY() - entity.posY + (d1 - renderPosY); renderPosZ = (double)pos.getZ() - entity.posZ + (d2 - renderPosZ); GlStateManager.translate(renderPosX + 0.5D, renderPosY + 1.3, renderPosZ + 0.5D); float time = (mc.thePlayer.ticksExisted % 360); GL11.glScaled(0.8D,0.8D,0.8D); if(animate) GL11.glRotatef(-mc.getRenderManager().playerViewY-time*20, 0.0F,1F, 0.0F); else GL11.glRotatef(-mc.getRenderManager().playerViewY, 0.0F,1F, 0.0F); mc.getRenderItem().renderItem(new ItemStack(item), ItemCameraTransforms.TransformType.FIXED); GlStateManager.popMatrix(); } [embed=425,349]<iframe width="560" height="315" src="https://www.youtube.com/embed/yfOUhiZolv4" frameborder="0" allowfullscreen></iframe>[/embed]
  4. Looks like you've not got the ForegBin src location setup correctly. 1) make sure you get the latest MDK and run two commands via terminal - first being "SetupDevWorkspace" as this will ensure all the gradle caches etc are aligned with that version and what not. 2) make sure you then run "gradle idea" as this should generate the IDEA files needed for you automatically. 3) Now, should that still fail, it could be a minor mapping issue in which case you go into Module Settings -> Dependencies. Add a dependency and locate your gradle cache directory (mine is C:\users\myname\.gradle\caches\minecraft\net\minecraftforge\forge\ 4) There should be two directories with noting here, the first being "start" and second being "start". Add the Start directory by choosing just start and hit ok. 5) Then add another via the + in that same dialog, and this time navigate until you find forgeBin-1.8.x-XX.XX.X.XXXX.jar and choose it. 6) This should set you straight. Failing this you've probably gone in a different direction that the IntilliJ IDEA herd in which case you probably should go back to the start and start with re-downloading the MDK into a clean directory, then run the above steps. HTH.
  5. I'd prefer to use Java 1.8 and sure its a whole "All boats rise with the same tide" issue - meaning if someone in the mod family disgarees wants to keep things at 1.6 well...expect forum comments on your mod That aside, should you wish to proceed inside your build.gradle add this to your plugins area apply plugin: 'java' compileJava { sourceCompatibility = '1.8' }
  6. Thanks for taking the time to explain, appreciate it.
  7. Yeah that answered it ... Basically i was confused as to why the Forge-Dev is behind the MDK in mappings (out of the box - as in the current repo branch)... given well Forge-dev has a subfolder "MDK".. The assumption that I made was if you swapped out the mcp mappings between snapshot_nodoc_20141130 to stable_16 the gradle tasks would update the patchings or something to that effect to map the mcp mappings.
  8. Hi, I noticed in the MinecraftForge source that there's the following: minecraft { version = "1.8" mappings = 'stable_16' //mappings = "snapshot_nodoc_20141130" workspaceDir = "projects" versionJson = "jsons/1.8-dev.json" buildUserdev = true buildInstaller = true installerVersion = "1.4" Yet if i flip the mappings around to stable_16 the builds fail. I've noticed that the mappings obviously in snapshot_nodoc_20141130 are behind than stable_16 but i'm not sure where the actual source files correlate back via Github? (ie is there a branch i'm not seeing that we can access or is that a private repo?) Just curious as to how the public version of MinecraftForge ends up as a MDK build as if i were to use https://github.com/MinecraftForge/MinecraftForge out of the box after setup/setupForge tasks do their job, the gradle builds fail (for stable_16 not for snapshot_nodoc_20141130) to resolve symbols etc. Am i missing a step or hidden RTFM moment here? (Note: I'm aware modders are supposed to use MDK as-is, but i'm keen to also setup MinecraftForge source to learn how it all snaps together and maybe contribute if possible later on).
  9. My hope was to somehow hook into an event where the textures get applied on a block itself pseudocode "If BlockModel.Render.Block == Blocks.Dirt && BlockPos == MyIntendedPos THEN insert custom texture...else revert back to normal registry" I started looking into that last night before bed via TheyGreyGhost persons github examples but i failed to wrap my head around that logic... i can see symptoms of an answer here... I mean i realise its not a "oh look instant copy paste look mah i'm shipping da mods here" moment hehehe but ...i sure hope it wasn't going to be too hard or painful without injecting hacks into the actual Minecraft client source (which then immediately negates it from being a mod to a whole client / version of mc download)... I suspect as you pointed out that i'll probably have to just encase the existing blocks within a custom block that has a transparent overlay as its sides? (if that's how i'm interpreting your reply correctly)
  10. My hope was to somehow hook into an event where the textures get applied on a block itself pseudocode "If BlockModel.Render.Block == Blocks.Dirt && BlockPos == MyIntendedPos THEN insert custom texture...else revert back to normal registry" I suspect as you pointed out that i'll probably have to just encase the existing blocks within a custom block that has a transparent overlay as its sides? (if that's how i'm interpreting your reply correctly)
  11. Hi, I'm working on a mod that basically illustrates the TNT charge radius as you place it into the world. In that when you inject a TNT cube into a wall the surrounding cubes have an overlay texture on all sides that have a little explosion icon in the middle, this then signifies the blast radius of that TNT. I'm struggling to navigate my way to making this happen via Forge without hijacking the actual Minecraft source code itself, in that finding the home or approach with this is a lot harder than i anticipated. I started out with just setBlockState but the trouble I have is that i'd have to make mirror copies of each block type (which i'm avoiding) ..i'd rather hook into the actual rendering process of the texture/icon for a block and just swap out the textures or overlay them with my own. That or using worldrenderer addVertexWithUV it somehow... but yeah, I'm struggling with the right or appropriate way to navigate this one. Any pointers / help / example code would be greatly appreciated.
×
×
  • Create New...

Important Information

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