NEW API PLANET

Nuclear

Member
Jun 24, 2013
27
0
3
26
// Hide certain items from NEI
GCCoreBlocks.hiddenBlocks.add(GCCoreBlocks.airLockSeal.blockID);

He is, he is simply hidden.
 

jasonB221

Member
Jul 27, 2013
124
9
18
Lost in Space
Guys, the way MC works when travelling to a new dimension is it creates a new entity in the new dimension, copies all the data, and then deletes the old entity. Now, there is an interface in the api to allow entities to breathe without oxygen. If you extended the player class from a new entity, and implemented that interface, you could watch for an entity spawn event and if that entity is a player, copy the data to the new type of entity, delete the old one, and you would be good to go. Is it complex? Absolutely. Is it over the top? Definitely. Will it work? Maybe. I didn't bother to try it.
 

jasonB221

Member
Jul 27, 2013
124
9
18
Lost in Space
I know the language of English and some Java just enough for coding I haven't done any collage classes though.
The way I learned java was through some classes and mostly looking at other people's code. I still do that when trying to make my addon. Mic's code is great for learning off of, and if you want to make an addon, you need to take a look at it.
 

Nuclear

Member
Jun 24, 2013
27
0
3
26
I've already seen it, but I still do not understand how to make the air on their planet. He may be added to Use API but not explained.
 

jasonB221

Member
Jul 27, 2013
124
9
18
Lost in Space
I've already seen it, but I still do not understand how to make the air on their planet. He may be added to Use API but not explained.
If you know basic forge, then he added an event. When that even is called, you would check to see if the dimension the entity being damaged is the dimension you want to have air in. If so, cancel the event.
Simple.
 

Nuclear

Member
Jun 24, 2013
27
0
3
26
If you know basic forge, then he added an event. When that even is called, you would check to see if the dimension the entity being damaged is the dimension you want to have air in. If so, cancel the event.
Simple.
I for some reason it does not work, you can give an example?
 

Nuclear

Member
Jun 24, 2013
27
0
3
26
Code:
public class GCPrometheusEvents
{
    WorldProvider provider;
   
    @ForgeSubscribe
    public void cancelDamage(Pre event)
    {
           
            try
            {
                if(provider.dimensionId == GCPrometheusConfigManager.dimensionIDPrometheus)
                {
                    event.setCanceled(true);
                }
                else
                {
                    event.setCanceled(false);
                }

            }
            catch (Exception e)
            {
                GCLog.info("Problem with air.");
                e.printStackTrace();
            }
       
           
    }
}
What is wrong here?
 

jasonB221

Member
Jul 27, 2013
124
9
18
Lost in Space
What's wrong is that you did not initialize the provider variable. Your problem is a basic java one. If you don't know java, there isn't much I can help you with. However, to initialize it, use provider = event.provider;
That is the line of code you are missing.
 

denis

Member
Apr 22, 2013
37
0
6
on a new planet with oxygen does not work:
1. the light and all that emits light
2. torches do not burn
3. constant message Oxygen Setup is Invalid!
4. blank background
 

Nuclear

Member
Jun 24, 2013
27
0
3
26
What's wrong is that you did not initialize the provider variable. Your problem is a basic java one. If you don't know java, there isn't much I can help you with. However, to initialize it, use provider = event.provider;
That is the line of code you are missing.
Thank you very much for your help!