Giter VIP home page Giter VIP logo

railcraft-api's Introduction

Railcraft-API

An API for interacting with Railcraft.

The latest version can be dowloanded from: https://dl.dropboxusercontent.com/u/38558957/Minecraft/Railcraft/Railcraft_latest-api.zip

The Railcraft API is provided as Open Source with no limitation on use (MIT License - http://choosealicense.com/licenses/mit/).

Package versioning follows the rules laid out by http://semver.org/

When packaging this API with your mod, please include ONLY the classes you need, deleting those you don't. This helps to reduce conflict if the API changes slighty between versions.

Ore Dictionary Tags:

  • blockSteel
  • dustCharcoal
  • dustObsidian
  • dustSaltpeter
  • dustSulfur
  • ingotSteel
  • oreSaltpeter
  • oreSulfur

##InterModComms: ##String:

Message Syntax Description
"ballast" "[modid]:[blockName]@[metadata]" Registers a block as a valid ballast for the Tunnel Bore and Undercutter.
"boiler-fuel-liquid" "[liquidName]@[fuelValuePerBucket]" Specifies a fuel value for a bucket of liquid fuel. The liquid name should be the English display name of the liquid (ie. the tag used to lookup the liquid in the LiquidDictionary).

##NBT: Rock Crusher:

public void addRockCrusherRecipe(ItemStack input, boolean matchMeta, boolean matchNBT, Map<ItemStack, Float> outputs) {
    NBTTagCompound nbt = new NBTTagCompound();

    NBTTagCompound inputNBT = new NBTTagCompound();
    input.writeToNBT(inputNBT);
    nbt.setTag("input", inputNBT);

    nbt.setBoolean("matchMeta", matchMeta);
    nbt.setBoolean("matchNBT", matchNBT);

    int outCount = 0;
    for (Entry<ItemStack, Float> output : outputs.entrySet()) {
        NBTTagCompound outputNBT = new NBTTagCompound();
        output.getKey().writeToNBT(outputNBT);
        outputNBT.setFloat("chance", output.getValue());
        nbt.setTag("output" + outCount++, outputNBT);
    }

    FMLInterModComms.sendMessage("Railcraft", "rock-crusher", nbt);
}

railcraft-api's People

Contributors

alexiil avatar covertjaguar avatar forecaster avatar generalcamo avatar liach avatar msticninja avatar solrabizna avatar ssotangkur avatar vexatos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

railcraft-api's Issues

Possible wrong use of the "@SideOnly(Side.CLIENT)"

The current file Charge.java consists 2 decorators of "@SideOnly(Side.CLIENT)" which will cause the mod built from trunk to crash. I was testing truck build due to the sponge incompatibility of the current beta 4 release.
In construction stage of loading module "charge", it throws an exception: "java.lang.RuntimeException: Attempted to load class mods/railcraft/api/charge/Charge$IZapEffectRenderer for invalid side SERVER". This implies the behavior of the decorator "@SideOnly(Side.CLIENT)" might be resisting the entire class/enum from loading instead of strip certain methods from a loadable class on the server side.
What I described here is not matching with the behavior documented here: ForgeDoc/Concepts/Sides , but removing the 2 "sideonly" decorations will make it load and work in the sponge server. Also the forge doc do suggest to not use this decoration except certain very specific circumstances.

Version numbers for your reference:
Forge: 14.23.5.2811
SpongeForge: 1.12.2-2768-7.1.5
Buildcraft: current git
Java: openjdk version "1.8.0_171"

Thank you for investigating into this.

User difficulty to place outfitted tracks

Currently, there is no way that an API user can place an outfitted track or get an item for an outfitted track. This disturbs my attempt to add compatibility to Steve's carts.

IElectricMinecart's ChargeHandler.balance method can be an issue

The method mods/railcraft/api/electricity/IElectricMinecart$ChargeHandler.balance simply splits the charge of two handlers exactly evenly between them, with no regard for the capacity of the two handlers, potentially leading to a situation where a very large capacity handler and a low capacity handler are made to balance with each other, massively overflowing the smaller one.

API for adding new multiblock tanks?

Hello, could an API be added for creating new tiers of multiblock tanks? Our modpack regularly deals with enormous quantities of fluids (tens of thousands of buckets - I've got 80k buckets of Benzene stored), and we love the visual look of the RC tanks. For example, titanium(pink), iridium(blue), etc. tanks would be great.

Thanks so much!

Add MIT header to API files

Files in main repo have license headers but they doesn't have headers here. Wanted to add them for better codestyle...

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.