GithubHelp home page GithubHelp logo

n-zer / customportalapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kyrptonaught/customportalapi

0.0 0.0 0.0 2.59 MB

Developer Api for creating custom portals to any dimension

License: MIT License

Java 100.00%

customportalapi's Introduction

Custom Portal Api

Library mod allowing developers to easily create portals to their custom dimensions. These custom portals will function exactly like nether portals except being fully customizable. You can control the frame block, portal block or tinting of the default, ignition source, and destination and more!

Some example of portals
p p

Usage:

Versions:

1.16 Maven metadata URL
1.17 Maven metadata URL
1.18 Maven metadata URL
1.19.X Maven metadata URL
1.19.3 Maven metadata URL
1.19.4 Maven metadata URL
1.20 Maven metadata URL
1.20.2 Maven metadata URL
1.20.4 Maven metadata URL
1.20.5 Maven metadata URL
1.20.6 Maven metadata URL

Add the repository to your build.gradle.

maven {url = "https://maven.kyrptonaught.dev"}

Add the dependency.

  modImplementation 'net.kyrptonaught:customportalapi:<version>'
  include 'net.kyrptonaught:customportalapi:<version>'

Now onto creating and registering the portal itself, this is very simple thanks to the CustomPortalBuilder class. We will make use of this in your mod initializer.

The following is a very simple portal that will take us to the end, and is lit by right clicking the frame with an Eye of Ender.

CustomPortalBuilder.beginPortal()  
        .frameBlock(Blocks.DIAMOND_BLOCK)  
        .lightWithItem(Items.ENDER_EYE)  
        .destDimID(new Identifier("the_end"))  
        .tintColor(45,65,101)  
        .registerPortal();

A nether portal would be registered as follows:

CustomPortalBuilder.beginPortal()  
        .frameBlock(Blocks.OBSIDIAN)  
        .destDimID(new Identifier("the_nether"))  
        .tintColor(131, 66, 184)  
        .registerPortal();

CustomPortalBuilder is filled with plenty of methods to customize the functionality of your portal, all of which are documented in the class.

Some noteworthy methods to mention:

  • lightWithWater/Item/Fluid - These allow you to control how the portal is lit.
  • onlyLightInOverworld - Only allow the portal to be used in the overworld to your destination of choice
  • flatPortal - Flat Portal similar to the End or the Twilight Forest portal.

customportalapi's People

Contributors

kyrptonaught avatar soldev69 avatar jack-papel avatar modderwizard avatar warior456 avatar kedispl avatar prplrose avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.