Skip to content

Instantly share code, notes, and snippets.

View elucent's full-sized avatar
🐛
compiling

elucent elucent

🐛
compiling
View GitHub Profile
public class PropertyEntry {
Class<? extends IProperty> propertyClass;
Identifier name;
Map<Integer, Constructor<? extends IProperty>> ctors = new HashMap<>();
public PropertyEntry(Identifier name, Class<? extends IProperty> propertyClass) {
this.propertyClass = propertyClass;
this.name = name;
}
@elucent
elucent / Gadgetry Plans
Created December 10, 2017 09:12
Gadgetry Plans
Phase I (initial release):
[x] Modular machine backend
[x] Wrenches and face config
[x] Cable network support
[x] Furnace generator - FE from furnace fuel
[x] Solar panel - FE from sunlight
[x] Powered furnaces - Smelts items for FE
[x] Powered grinders - Doubles ores, crushes items for FE
[x] Alloy furnaces - Used for creating materials
[x] Powered alloy furnaces
@elucent
elucent / Mods
Created November 22, 2017 00:29
Generally, I'm listing these by order of belonging in a modpack. Many of them have some potential cons, and while they're still good mods, may change gameplay significantly from the norm. So I'm mentioning those in descriptions down the list, and will place them lower.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rustic (https://minecraft.curseforge.com/projects/rustic). This mod is sorta like a less focused Growthcraft. It adds a couple new crops, all with unique purposes, most with unique ways of growing them. It adds an alchemy system that lets you create vanilla potions using growable herbs, along with a couple new effects. It contains a brewing system, where you can increase the quality of different brewed drinks which give you fairly useful buffs. It lets you craft furniture and chandeliers and candles to decorate your builds. And there is a form of simplified beekeeping where you can place a couple apiaries near your crops to help them grow. Very simple and vanilla
The EluKit game framework is a simple LWJGL-based library for creating 2D or 3D games.
Dependency libraries used:
- LWJGL 3 (https://www.lwjgl.org/download)
- PNGDecoder (http://forum.lwjgl.org/index.php?topic=3340.0)
- Guava (https://github.com/google/guava)
Capabilities of the framework:
- Simplified vertex array and vertex buffer rendering.
- Mathematical utilities -- fract and clamp functions, rotation transformations, hash functions, noise generation.
@Override
public void render(TileDistillery te, double x, double y, double z, float partialTicks, int destroyStage, float alpha){
IInventory chamber = (IInventory)te.modules.get(te.CHAMBER);
if (!chamber.getStackInSlot(0).isEmpty()){
GlStateManager.pushMatrix();
GlStateManager.translate(x+0.5, y+0.5, z+0.5);
GlStateManager.rotate(-te.face.getHorizontalAngle()+180, 0, 1, 0);
GlStateManager.translate(0d, 12d/16d, -16d/16d);
GlStateManager.rotate((ELEvents.ticks%360+partialTicks), 0, 1, 0);
package elucent.elulib.model;
import java.util.List;
import java.util.function.Function;
import elucent.elulib.model.parts.Cube;
import elucent.elulib.model.parts.Segment;
import elucent.elulib.struct.Vec2d;
import elucent.elulib.struct.Vec2f;
import elucent.elulib.struct.Vec4d;
@Override
public void addGeometry(List<BakedQuad> quads, EnumFacing side, IBlockState state, TextureAtlasSprite[] texes, int tintIndex){
EnumHalf half = state.getValue(BlockStairs.HALF);
EnumShape shape = state.getValue(BlockStairs.SHAPE);
EnumFacing face = state.getValue(BlockStairs.FACING);
Cube cube_down, cube_up;
Cube c_down_nxnz, c_down_pxnz, c_down_pxpz, c_down_nxpz;
Cube q_down_nx, q_down_px, q_down_nz, q_down_pz;
Cube q_up_nx, q_up_px, q_up_nz, q_up_pz;
Cube e_down_nxnz, e_down_pxnz, e_down_pxpz, e_down_nxpz;
@Override
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand) {
List<BakedQuad> finalquads = new ArrayList<BakedQuad>();
if (state instanceof IExtendedBlockState && state.getBlock() instanceof IEditableBlock){
IBlockState texState = ((IExtendedBlockState)state).getValue(((IEditableBlock)state.getBlock()).getStateProperty());
String dataId = (texState == null ? "null" : texState.toString())+"_"+(side == null ? "null" : side.toString());
if (!data.containsKey(dataId)){
List<BakedQuad> quads = new ArrayList<>();
TextureAtlasSprite[] sprites = new TextureAtlasSprite[]{getParticleTexture()};
int[] tintIndices = new int[]{999};
[01:00:39] [Server thread/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: net.minecraft.world.IBlockAccess.func_180494_b(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/world/biome/Biome;
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_131]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_131]
at net.minecraft.util.Util.func_181617_a(SourceFile:47) [h.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:720) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:391) [nx.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:665) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:523) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
@Override
public int getBrightnessForRender(float partialTicks){
float f = 0.5F;
f = MathHelper.clamp_float(f, 0.0F, 1.0F);
int i = super.getBrightnessForRender(partialTicks);
int j = i & 255;
int k = i >> 16 & 255;
j = j + (int)(f * 15.0F * 16.0F);
if (j > 240)