Skip to content

Instantly share code, notes, and snippets.

View Prospector's full-sized avatar

Prospector

View GitHub Profile
package crystek.modules;
import crystek.Crystek;
import crystek.modules.materials.MaterialsModule;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import java.util.ArrayList;
@Prospector
Prospector / Primer.md
Created February 1, 2016 05:06 — forked from williewillus/Primer.md
1.8 rendering primer

1.8 Rendering Primer by williewillus (formatted to markdown by gigaherz)

Note: This primer assumes you are using MinecraftForge 1.8.9 build 1670 or above. Correctness not guaranteed otherwise.

This guide is intended for those with a clear knowledge of general modding and want a quick up to speed on how new things work. If you are confused, please hop on IRC and ask for help!

Blocks and Items

  • 1.7: EVERY BLOCK SHAPE EVER was hardcoded into RenderBlocks. Oh God, just look at that class. Actually don’t, if you value your sanity.
  • 1.8: Block shapes are all declared using models
package com.thedoctorsoda.mechconstruct.tileentity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import com.thedoctorsoda.mechconstruct.init.ModItems;
public class TileEntitySturdyTableTDS extends TileEntityTDS {
@Override
@Override
public void updateEntity() {
if (worldObj.getBlock(xCoord, yCoord + 2, zCoord) == Blocks.anvil) {
if (worldObj.getBlock(xCoord, yCoord + 1, zCoord) == Blocks.diamond_block) {
if (!worldObj.isRemote) {
worldObj.setBlockToAir(xCoord, yCoord + 1, zCoord);
EntityItem itemCarbonDust = new EntityItem(worldObj, xCoord, yCoord + 1, zCoord, new ItemStack(ModItems.carbon_dust, 32));
worldObj.spawnEntityInWorld(itemCarbonDust);
}
}