Giter Club home page Giter Club logo

mcfpp's Introduction

Introduce

MCFPP is a brand new objected-oriented language that can be compiled into Minecraft Datapack. It aims to write datapacks in a syntax similar to C language, and introduces commonly used concepts in programming, thereby making the writing of datapacks more efficient.

This project is still in the early stage of development and cannot be used for actual use. Some functions have not been implemented, and features may change in future versions. The library is also not complete.

QuickStart

MCFPP API

Relative Projects

MCSharp is a CSharp library. Using MCSharp, developers can develop datapacks using CSharp. However, this project has been stopped due to technical issues. MCFPP inherits part of the ideas of MCSharp.

JustMCF is a project to simplify mcfunction projects. Using JustMCF, you can not only use the original commands, but also use the simplified commands designed by the project, which can make your commands more concise and efficient.

  • Code optimization
  • Garbage collection mechanism
  • More variable features (const, dynamic, import)
  • Interface
  • Inheritance and polymorphism
  • Struct
  • Operator overload
  • Inline Function
  • Sandbox
    • Syntactic sugar form of native
  • Versioned compilation
  • Basic library
  • Enum

Features

Basic logical statements

func example(){
  int i = @s.nbt.pos[0];
  if(i > 0){
    @s.say("Hello Minecraft!");
  }
}

Object-oriented programming

class Example{
  int i;
  public Example(int i){
    this.i = i;
  }
  public func print(){
    print(this.i);
  }
}

Libraries

import mcfpp.math;

void example{
    float i = 1.5;
    float out;
    out = pow(i, 2);
    print(out);
}

Generics

class Example<type T>{
  T i;
  public Example(T i){
    this.i = i;
  }
  public func print(){
    print(this.i);
  }
}

func test<type T>(T i){
    print(i);
}

Original Minecraft Command

func test(){
  /execute as @a run say Hello Minecraft!
}

To see more features, please refer to the MCFPP API

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.