Category: PortalGun

Then (left) and now (right)

The Portal Gun (PG) mod has been around for Minecraft for a very very long time. Last month, it turned seven. Yesterday, I myself aged another year. Lately, I’ve been thinking, woah, I’ve been making mods for Minecraft for seven years now. I started out barely knowing Java, thinking that it couldn’t be much different from JavaScript. I wasn’t wrong, but I wasn’t right either.

Anyway, I was thinking back to how PG used to be, and how it has gone through multiple iterations as its been rewritten at least 4 times now, I’ve lost count to be honest, but every time I rewrote the mod, I had already learnt more and more about Java and programming in general. And so, with that, I wanted to highlight to you all how much seven years of being persistent, of regular practice, and of learning new things, can do to a project.

I’ve went back and found the very first version of PG ever released for Minecraft Beta 1.3_01 (thanks to modmuss50), used the textures and sounds from back then, and rewrote the earlier versions of PG for Minecraft 1.12.2. When I first started modding, PG took me about two weeks to write and test and eventually release, in its own little buggy state. This rewrite, took 9 hours (over two days). This took a lot less time because I was much more familiar with Minecraft’s code base, I was much better with Java, and (you could say) I knew what I was doing.

My point is: Keep at it. It gets easier. You get better.

Now, on to the mod, which I’m calling Portal Gun Classic.


Make a Portal Core as so:

Use the core to make the portal gun as so:

Press the G key to “flick the switch” on the gun and use the portal of the other colour.
Press the R key to reboot the gun, wiping out the pair of portals on the map. (This was a feature from the second ever update of PG)
Press the Shift+R key to wipe just the portal that the gun is configured to fire. (This is new altogether)

The on-screen overlay for the portal gun was also brought back for PG Classic. The early versions never had it.


This mod was made mainly for nostalgic reasons, and to allow a clear comparison between the current day PG and the early versions. Do not expect it to be updated beyond MC 1.12.2 nor for it to receive any support. As expected, the mod will need ModLoader, ModLoaderMP and AudioMod Minecraft Forge.

One last thing I’d like to add. I’m making the source of this mod open source for people just starting out, to reference and possibly learn a thing or two from my code (and possibly even contribute to themselves!).

 

Download (GitHub)

Alternative Download (DropBox)

Source (GitHub)

 

 

Cheers,
iChun

 

EDIT: I feel like I need to clarify that this is talking about a Portal Gun Classic version. Portal Gun has been available for Minecraft 1.12.2 for quite a while now but can only be downloaded off CurseForge at this moment.

iChunUtil:
6.3.2
– Properly implement some shader stuff to improve performance.
– Fix accidental double-spawning of particles which was causing some crashing issues with other mods (and vanilla) when breaking blocks.
– Fix being unable to use items when a world portal was rendering in first person.
– Fix weird rendering when holding two dual handed items whilst rendering a world portal in first person.
– Fix EULA alert never showing up in obfuscated environment.
– Fix World Portals kicking clients off the server when a non-player entity went into it.

6.3.1
– Fixed server crashing with World Portals
– Updated render code to match 1.10.2’s. Might reduce some rendering artifacts of World Portals

Portal Gun:
– Fix being unable to turn off Fancy Portals config.
– Fix crash when a block next to a portal changes whilst the portal is being placed.
– Fix fancy portal “aura” overlapping with another portal causing the overlapped area to show the block behind the portal.
– Fix changing to an empty hand whilst grabbing a block/entity allowing the entity to remain grabbed.
– Fix “moving portal” render when camera is in third person facing the player.
– Fix portals not pairing properly when on dedicated servers.
– Fancy portal “aura” only renders if MC’s graphics are set to fancy, with PG’s configs set to fancy portals as well.
– Properly set the uniform fields in the shader which may have been causing the green/black/invalidly-open portals. #BlameAma
– Portal Guns given via command (or similar) will now have NBT tags assigned when the player first tries to use it.
– Ender Pearl dust is now properly localized.
– Miniature black hole item now renders with glint.

Gravity Gun:
– Fix changing to an empty hand whilst grabbing a block/entity allowing the entity to remain grabbed.
– Fix fixing a bug in iChunUtil causing another bug.

Bee Barker, Trail Mix, Torched:
– Fix fixing a bug in iChunUtil causing another bug.

Hey all!

So I don’t know if you caught it but I released Portal Gun for Minecraft 1.10.2 yesterday, but I didn’t get round to writing about what’s new. This is going to be a bit of a long post as I write about what’s new with Portal Guns and what’s planned for the future, and it will get a little technical. A bunch of screenshots I’ll be showing here will be from the development version so you get a little bit of insight on the process as well.

Aesthetics


The image used to announce the release of Portal Gun.

So I’m sure a lot of you have noticed, but you can see through the portals again. This work is a combination of what you guys saw in Doors and what you guys saw in Blocksteps. Code changes in Minecraft 1.8 however, essentially meant I had to rewrite most of the code that was from Doors again anyways.

However, as these see through portals are what you would call a “live render”, your FPS will, effectively, be reduced by ~40-60% as what I am doing is essentially moving the camera and re-rendering the entire scene, with extra bits and pieces to make sure the render looks right. But on the bright side, you can see portals in portals!


Recursive rendering works. But of course, FPS will tank. In-dev GraviPortalGun also seen here.

Portals also now have a new fancy portal border render made by amadornes, who helped make the shader that we’re using and some of the background code in how portals actually work.

To try and accommodate for everyone’s various setups, there are a bunch of configs available for you to tweak. In the future there may be more added as I try and improve the performance or reduce the load on players. You can read the tooltips on the settings themselves to figure out what they do.

Go to: Mods -> iChunUtil or PortalGun -> Config, and an in-game config editor like this should show up.

Next up on the list, say hi to the new portal gun model by RazzleberryFox. You can already see it in the first image, but it also animates (to a degree) when you’re firing portals and grabbing blocks. However, the animation was rushed (the model was literally added and animated a day or two before release), and may be subject to change, but here, have some fancy in-dev shots of me getting the model in-game.


That’s a really weird looking lightsaber… Oh wait a new mod idea! (I’m joking)


I have made a monster. Say hi to the many-clawed portal-gun.


(Also known as the monstrosogun, portal shader in this image was still WIP)


Also to note, the portal gun core and indicator glows in the dark.


Mmm… electrical arches.

Another thing to note is that portals will also render their outlines if they’re obstructed and you’re holding the portal gun of that type.


I totally did not just place that block of grass and chicken just to show off the outlines.

That’s pretty much all I have to say for aesthetics. I do have to add that for all of them to work properly, (getting technical here!) Minecraft has to think that you can use framebuffers, and your graphics card should be able to support stencil buffers and shaders. Unless your computer is incredibly old (or, if you’re using integrated graphics potentially), most of you should be perfectly fine. If not, drop me a message somewhere and I’ll try and troubleshoot it with you.

Gameplay

Okay so for gameplay, the basic essentials hasn’t really changed. Shoot portal here, shoot portal there, speedy thing goes in, speedy thing goes out.


Ignore the round portal. I’ll explain that later

However, there is a new mechanic to portals. Portals now have collision around the portal. Gone are the days where you could touch a ghast (which is 4x4x4) against a 1×2 (width x height) portal and suddenly have it pop out on the other side. Entities have to physically enter the portal to be able to teleport through the portal. The same applies for players but due to an oversight (that I hope to fix in 1.11.2), I have to teleport the player sooner than other entities. It is very, very satisfying to fire portals on the ground now and watch entities drop into it 😉

Yes, your camera WILL roll when you go in through a portal in the ground/ceiling. Just imagine that you’re reorienting yourself after you came out of a portal sideways.


Half in, half out


I quite liked this picture actually. This was pretty much immediately after I finally got the entity renders within a portal working right. See next image.


Entities in the portal had to be special cased to be sure they rendered on the “other side”. If they weren’t, you’d see something like this.

Crafting, at the moment, still uses the same recipes. This is subject to change. There is something new I want to add later that I wasn’t able to put in due to time constraints. I will write about it in a bit. If you look at the tooltip for the portal gun you can kind of gather what I might be planning. Crafting a new portal gun will randomly create a channel for you with random colour allocations. Don’t like the colours? Keep crafting new portal guns. The “Global” portal guns, Chell, Atlas, P-body, can all be found in the creative inventory.


Yay for new textures/models?

That’s actually it for gameplay. It hasn’t really changed as much from the old mod, really. MC’s attack key for shooting left portal, MC’s use item key for shooting right portal, middle mouse to zoom, G for grab, R for reset, hold R and hit LMB/RMB for individual resets. (QWERTY layout).

What’s to come?

This is where it gets interesting. There will be a lot more text here rather than pictures. Trying to adapt a concept as gold as portals and the portalgun for MC survival is going to be hard. I have some ideas that I would like to share with you here first.


1×2 left, 5×5 right

For starters, portal guns are meant to be upgraded and their portals meant to be highly customizable. The rewrite was done with this in mind so most of the underlying structure is already there… There’s just no way to modify it yet. Firstly, portals will come in various shapes and sizes. I’m planning for the basic portal gun to start off as a simple 1×2 portal, upgradable in width and height individually up to 5×5.

Next up, if you didn’t catch it when I mentioned “Global” portal guns, portal guns are meant to be a personal object now. When you make a portal gun it will be assigned to you and you can apply/create a channel and choose your own colours. A portal gun made and configured by a specific person will only provide access to that specific channel. Global portal guns are essentially a set of channels that aren’t locked to any particular player and is meant to be shared between one another on servers. For now, when you craft a portal gun, you are allocated a random channel with a random colour and a paired colour on the opposite end of the colour hue spectrum. You should be able to change these in the future.

Speaking of crafting, I’m also targeting to make portal guns a mid-game item (because it can be upgraded over time), meaning the recipe will be changed to adjust for mid-game. Midgame here meaning vanilla of course, mod pack makers are welcome to change this recipe as they wish in the future and adjust the balance of it all. Feel free to drop me a message when the time comes on how you would like to discuss balance.

Grab strength is also going to be an upgradable feature. For now I’ve gone and given you the strongest grab capabilities of the portal gun, close to combating the gravity gun in functionality, actually.

In terms of the upgradable system. Portal guns and portals are likely to require fuel, and eventually upgradable to not require it. Though I understand some of you (myself included) might not like this change (you could say it’s not true to Portal lore), like I said, it is hard to try and adapt something like this for MC survival and to keep it somewhat balanced. A lot of the factors will be part of an upgradable system, fuel requirement, portal firing distance, portal upkeep/use, grab use, size, etc. I am, of course looking for feedback on this in the reddit post I’ll link below.

I’m also thinking of changing the animation of the portal gun and the portal projectile renders. Those were rushed to meet yesterday’s release.

That’s pretty much it for portal guns. Over time more elements of Portal and Portal 2 will be making a return as well, when I can get round to it. In fact, right now the mod uses Portal 2’s sounds rather than Portal 1’s (yes, there actually is a difference).

Soo… besides that, you might have seen mention of something called “World Portals” in the config screenshot earlier. What is that? It is a part of iChunUtil, and essentially, is what powers the portals in the mod. It does the rendering of another perspective, the teleportation, those sort of things. It basically permits illusions like this, this, and if tweaked properly, could be as powerful as this (note that this mod is discontinued). Devs, you can find the source code here. Temp branch, soon to be pushed to master.

Eventually, I will write a mod that will allow people to take full control of World Portals. I could see this really being a very interesting and powerful concept to play around with in the future but that’s for a different time.

Known issues

  • Anything reported here.
  • Crashing on dedicated servers.
  • Incompatibility with foamfix, codechickenlib.
  • You can’t use portals or see through them over long distances. (I think)
  • Lag when you pair a set of portals.
  • The shader renders have bad z-fighting (#BlameAma)
  • Parts of the world will not render if there is camera roll involvement.
  • You can’t grab entities through portals and there’s no interaction with Gravity Gun yet.
  • You can’t shoot portals through iron grills.
  • We’re lacking a lot of aesthetics and config options as well.
  • Dispensers do not fire portals when triggered.
  • Fancy Portals config does not work.

Final note

This mod took an excruciating amount of time to rewrite. Part of it was already done last year, as some of you may remember. Unfortunately, I got burnt out working on it and shelved it. About a month ago I took it out and blew the dust off it and the result of continuing that work is what you see out now. Personally, I feel like I spent more time on it over the last month than I did last year.

Both World Portals and Portal Gun are not easy mods to write. As I stated yesterday, I felt that this release was not up to my usual standard of mod releases. I sought the help of several developers on stuff I had trouble on and not many could help me solve those issues proper. I will have to admit, that I am pooped out once again and will have to take a bit of a break to focus on life and recuperate.

I will be spending the next few days trying to fix issues with the mod reported, with the main issue tracker being here. I won’t be able to get the server crash fix out today, it’s a little more complicated than I expected but I’ll try and tackle it tomorrow instead. After that, development will slow, but hopefully be steady.

I have a few people to thank as well. Firstly, Direwolf20 for testing and for collaborating on getting this video released around the time the mod was released:

amadornes for working on the code and the shaders. RazzleberryFox for the portal gun model. Gigabit101 for testing. heldplayer for trying, and for listening to all my rants. euclideanspace.com for massively helping me figure out quaternions. The various others who knew I was working on this but kept it a secret. Apologies for those who I’ve left out though, and to Darkosto for dealing with my teasing.

That’s all for now. Gonna take a breather. I generally don’t respond to comments on this site, so discussion will be over here on Reddit.

 

Cheers!
– iChun

Heyo!

I’ve been rushing like crazy to try and get this release out, and it’s 20 minutes to midnight and I was supposed to pop out like 10 minutes ago.

Anyways, Portal Gun’s now available for Minecraft 1.10.2. Requires iChunUtil 6.3.0. Get it here. I’ll write more later.

HOWEVER: Do note that although released, there are still many changes and alterations and known issues that I’ll have to address as time comes. Notable: Portal rendering can be finicky at times and flicker. You can’t grab entities through portals. You can’t shoot portals through iron grills. You can’t (I don’t know, I didn’t try) use portals over long distances (yet!). Having a new pair of portals can occasionally lag the client (badly!). Lacking a lot of particles and effects.

Recipe for the moment is as in the old mod, still subject to change. Portal projectile render may or may not be final.

Again though, like I said, gotta run, I’ll write later! Discussion (issue reports, suggestions, anything in general) over here on Reddit!

 

Cheers!
– iChun

 

EDIT: I feel the need to add that the mod is very much so still a WIP. A lot of issues need to be ironed out and I feel that this release actually isn’t up to my typical standard, but I’ve been targeting a release for PG today for over a month now and here it is. So for now, enjoy.

EDIT2: The mod is crashing on dedicated servers! My bad! I’ll fix it tomorrow.

Happy birthday Portal Gun! It was six years ago today that I released the first ever version of the Portal Gun mod for Minecraft 1.3_03 beta, and man, time has has passed. Sadly, Portal Gun has not had an update for over year now, and is not on the latest version of (modable) Minecraft. That is actually partially the reason I’m writing this post.

I first wrote Portal Gun in my last year of high school. Back then I had a lot of free time. Over time I released more and more mods to the point that I’ve lost count on how many I’ve even made. I’ve gone through college, and I’ve midway through university now. Many thought, with my history and experience with photo editing, various scripting languages and Minecraft modding, I would have gone into Computer Science or a computing field.

I did not.

I went into medicine. And if you didn’t know, medicine is a really long course, and a tough one at that. It ranges from four to six years and I’m only just a bit more than halfway to a medical degree now. Understandably so, my free time began to lessen as time went by. More time had to be allocated to working towards my degree and less time for other things such as Minecraft modding. Even now as I write this I think about several case write ups I have to prepare after this post. I won’t bore you with the details but I can assure you I am happy where I am now.

Anyways, my point is, I can’t mod as much as I used to. I still want to, but my lack of free time limits me from doing so. I do have every intention of updating my mods to the latest modable Minecraft version when I can, but that’ll be a slow process. If, on the mod page, it does not state that the mod has been discontinued, I will at my best ability, try to update it whenever possible.

Why don’t I give them to someone else to update? People have offered. People have also tried to do so themselves. But I have declined them. My mods, my work, they all have a very special meaning to me. They have brought me much joy (and frustration), connected me with some of my bestest of friends from all around the world, gained me people that I know I can trust in a heartbeat. To hand them over to someone else would be, to me, admitting defeat. I have, however, stated that if I finally decide to hang up my hat, I will release the sources for all my mods. But until then, I will handle updating them when I can.

That’s really all I have to say at this time. Now, back to those case write ups.

 

Cheers!
– iChun

 

It’s that time of the year again, 5 years ago I released the very first version of Portal Gun on Minecraft Forums. About a week ago, I posted this video on YouTube:


I’m not one to want to disappoint, but I had tweeted a while ago, not to expect anything too great out of today. So those of your expecting a release today, I’m sorry to have to say that this is just an announcement. I was planning on releasing it today but due to various circumstances, being abroad and unexpected bugs during development being a few of them, the mod is not ready to be published just yet. I won’t be posting an ETA on here though, it’ll be released when it’s done, which hopefully will be Soon™.

 

So, what is this announcement for?

I’d like to announce now that Portal Gun is being rewritten. What, again? Yes, again, that’s like the 4th time now. Thing is, last time I did a proper rewrite of Portal Gun, was over 3 years ago, and since then, I have learnt a lot. I’m sure a lot of you have seen Doors, or maybe even the new Gravity Gun, so I dare say a lot of things will be different with the new Portal Gun.

Also, since development for this is active, I will also be streaming development of the mod when I can, so if you want sneak peeks, do watch out for them.

What’s “new” with Portal Gun? (summary)

First off, if you haven’t noticed already from the teaser video, see through portals will be making a return. The last time they were used in Portal Gun was back in Minecraft 1.2.5, and it was written by ChickenBones, but they were removed due to performance issues, so many of you may not have known it even existed. With rendering being a lot more efficient in MC1.8, I tried once again to bring it back, and to do it to my best ability this time round. As of the current development build of the mod it’s still not perfect, but it’s getting there! Doors taught me quite a bit in that regard as well.

Next up, next big thing is that you’ll be able to configure your own channels for portal guns. Previously all you had is the default, p-body, atlas, personal PotatOS, and personal bacon portal guns. That left you with only 2 personal channels and 3 global channels with little to no use. That’s gone now and you can make as many channels as you’d like, and they’d all be unique per player.

Third, I’m trying to think of the mod of a more “survival” point of view. Portals can now be of various sizes. The smallest being a 1×2 portal, it’s size can be upgraded. At this time I’m thinking of letting the max be of a 5×5. “Why this change? The Portal game didn’t have that!” you ask? Like I said, I’m trying to think of the mod from a more survival PoV. Have you ever found it strange that a 4x4x4 ghast, lightly bumping into a 1×2 portal, suddenly appearing on the other side of the portal? Well, that leads to the 4th point.

Fourth, entities larger than the portal will no longer be able to fit through the portal. Gone are the days a where a 2x2x1 spider can fit through a 1×2 portal in the floor. Entities will have to be smaller than the portal to actually fit them now, and frankly, that’s how it should have been to begin with.

Fifth, gameplay changes, for starters, no more dungeon loot. That just didn’t make sense, really. Recipes are likely to be changed from before, oh, and also, no more naggy “WIP” items. Yay!

Sixth, I want to say that the mod overall works better and looks nicer, but since I’ve not gone to the “prettify” stage of development yet, that can’t be said for sure.

Tl;dr

Portal Gun turns 5. Portal Gun being rewritten, many changes. Release when it’s ready. Sorry to disappoint.

 


 

And that’s about it guys, Portal Gun is once again under active development for the time being, and I hope you guys will be happy with it when it’s finally out.

Also shoutouts to the many, many people I met over the past 2 weeks whilst I was frantically trying to write this mod on a 2015 MacBook Air (which to my surprise actually supports see through portals).

 

Cheers,
iChun

 

EDIT: As I don’t read the comments anywhere on here, discussion available on Reddit.

EDIT2: I also just remembered that grabbing entities have been nerfed and can be upgraded over time to grab tile entities as well.

Hey guys, it’s my birthday today! Wooot! Anyways, instead of being showered in gifts *ahem*, I’m gonna be the one giving the gifts now. What is it though? Crazily/Funnily/Ironically enough, it’s PortalGun and GravityGun 4.0.0-beta. Here’s the “changelog”:

– Ported to Minecraft 1.7.10.
– Fuel configs have been removed, but are still generated in the config.
– Fixed invalid sound playing when using GravityGun.
– Fixed “stuck in floor” bug prevalent in PortalGun for MC1.6.4.

Why “beta”?

It’s called a beta because this port was never meant to happen and was never planned. Work on this port was rushed but although there was some testing done, I cannot guarantee it to be bug-free and I am not going to be supporting the mod until the MC 1.8 version is released, unless it’s a critically breaking bug. I do not want to be wasting any more time on this especially considering the fact that I cannot reuse most of the code for 1.8. PortalGun itself took >13 hours just to port, so that’s just time I’d rather be spending on something else.

 

Right, so, the port is done, I now have every right to say, stop bothering me about it. Shoo. Let me work on 1.8 in peace.

Anyways, you can get the mod on here in the usual places or on CurseForge.

 

Cheers folks,
iChun

UPDATE: My mods now come with the MC version they’re intended for in the file name before the version number from 1.10.2 onwards. Just look for the bunch of numbers after the name but before the dash (-).

 

Hey guys,

I’ve been seeing a few posts asking what mod version is for what version of Minecraft, so I’d just like to point out this old post of mine from a while back that explains how my version numbering works.

Anyhow, let’s get to it:

  • The version number starts with a number equal to or larger than 2. This is the start of the new versioning system I’m currently using. Mods with this versioning system will require iChunUtil.
    • 2.X.X is for Minecraft 1.6.2/4
    • 3.X.X is for Minecraft 1.7.2
    • 4.X.X is for Minecraft 1.7.10
    • 5.X.X is for Minecraft 1.8.0
    • 6.X.X is for Minecraft 1.10.2 (1.8.9, 1.9.0 and 1.9.4 do not exist because I have no mods on those that use this system)
  • The version number is <Minecraft Version>-1.X.X. These mods have the MC version labelled next to the download and does not require iChunUtil.
  • The version number starts with 0.X.X. These mods would normally have the MC version labelled next to the download, since it deviates from my norm. The only mods fitting this category are Morph and any ModJam-build versions of mods.
  • The version number is 1.X.XvY. The “1.X.X” denotes the Minecraft version while the “vY” part denotes the build for that version of Minecraft. Basically, <Minecraft>v<Build>. If the version is just 1.0.X, it is for Minecraft 1.5.X.

I’ll probably update this list in the future and link back here so that people don’t get confused and stuff. If you stumbled upon here looking for a version number that’s after the listed versions, try to go logically in order of major Minecraft releases and you should have your answer.

Some mods may have a “Deobf” download. If you’re not a modder, you probably won’t need this.

 

 

Oh. I probably should add that PortalGun and Gravity Gun are skipping 1.7 entirely. Because reasons. Some of it being life (I’ve moved to Ireland!), some of it being code-related. So please, just stop asking for it. I’ll try my best to bring it back in 1.8, GraviGun first then PortalGun after.

Cheers,
iChun