Compare commits

..

No commits in common. "5c9a8a804a9b636151b83abb25050ae4f40e69ce" and "b99eb0cec2a332bf5eb91db95d8caab52ffb5ac1" have entirely different histories.

5 changed files with 39 additions and 242 deletions

View file

@ -1,49 +1,50 @@
#Because he's me #Because he's me
ellpeck=actuallyadditions:atomic_reconstructor_block ellpeck=actuallyadditions:blockAtomicReconstructor
#Because he submitted tons of ideas for the mod #Because he submitted tons of ideas for the mod
dqmhose=minecraft:torch dqmhose=minecraft:torch
#Because he does all of the textures #Because he does all of the textures
# twoofeight=actuallyadditions:blockHeatCollector #was this item removed? twoofeight=actuallyadditions:blockHeatCollector
#Because she is awesome and squids are cool #Because she is awesome and squids are cool
# larixine=actuallyadditions:blockBlackLotus #this item was removed i think larixine=actuallyadditions:blockBlackLotus
#Because he helps me with models and stuff #Because he helps me with models and stuff
canitzp=actuallyadditions:coffee_machine_block canitzp=actuallyadditions:blockCoffeeMachine
#Because he's an awesome guy and helps with lots of stuff #Because he's an awesome guy and helps with lots of stuff
xdjackiexd=actuallyadditions:drill_white xdjackiexd=actuallyadditions:itemDrill@14
#Because worms #Because worms
bootytoast=actuallyadditions:worm bootytoast=actuallyadditions:itemWorm
#Because he does the ActAdd doc on the FTB Wiki #Because he does the ActAdd doc on the FTB Wiki
xbony2=actuallyadditions:booklet xbony2=actuallyadditions:itemBooklet
#Patreon stuff #Patreon stuff
ftog_thorgal=actuallyadditions:restonia_crystal # 0 = Redstone, 1 = Lapis, 2 = Diamond, 3 = Coal, 4 = Emerald, 5 = Iron
minetechniker=actuallyadditions:diamatine_empowered_crystal ftog_thorgal=actuallyadditions:itemCrystal
3pixel=actuallyadditions:lens_of_the_killer minetechniker=actuallyadditions:itemCrystalEmpowered@2
kirindave=actuallyadditions:void_empowered_crystal 3pixel=actuallyadditions:itemMoreDamageLens
theonewhohunts=actuallyadditions:emeradic_empowered_crystal kirindave=actuallyadditions:itemCrystalEmpowered@3
garantiertnicht=actuallyadditions:handheld_filler theonewhohunts=actuallyadditions:itemCrystalEmpowered@4
heathcliff1998=actuallyadditions:emeradic_empowered_crystal garantiertnicht=actuallyadditions:itemFillingWand
saphrym=actuallyadditions:void_crystal heathcliff1998=actuallyadditions:itemCrystalEmpowered@4
lyxthegamer=actuallyadditions:emeradic_empowered_crystal saphrym=actuallyadditions:itemCrystal@3
skedone=actuallyadditions:emeradic_empowered_crystal lyxthegamer=actuallyadditions:itemCrystalEmpowered@4
r33s3s=actuallyadditions:diamatine_empowered_crystal skedone=actuallyadditions:itemCrystalEmpowered@4
roadrunner116=actuallyadditions:emeradic_crystal r33s3s=actuallyadditions:itemCrystalEmpowered@2
albrechtboucher=actuallyadditions:diamatine_empowered_crystal roadrunner116=actuallyadditions:itemCrystal@4
fobok=actuallyadditions:emeradic_crystal albrechtboucher=actuallyadditions:itemCrystalEmpowered@2
dankfrog=actuallyadditions:diamatine_empowered_crystal fobok=actuallyadditions:itemCrystal@4
deanwhufc=actuallyadditions:diamatine_empowered_crystal dankfrog=actuallyadditions:itemCrystalEmpowered@2
witsend66=actuallyadditions:palis_empowered_crystal deanwhufc=actuallyadditions:itemCrystalEmpowered@2
broccoli_bob=actuallyadditions:void_crystal witsend66=actuallyadditions:itemCrystalEmpowered@1
dolinmyster=actuallyadditions:emeradic_empowered_crystal broccoli_bob=actuallyadditions:itemCrystal@3
savos_darkran=actuallyadditions:emeradic_crystal dolinmyster=actuallyadditions:itemCrystalEmpowered@4
flanks255=actuallyadditions:void_empowered_crystal savos_darkran=actuallyadditions:itemCrystal@4
spectacular101=actuallyadditions:enori_crystal flanks255=actuallyadditions:itemCrystalEmpowered@3
scottradish=actuallyadditions:restonia_crystal spectacular101=actuallyadditions:itemCrystal@5
slothicornstudio=actuallyadditions:enori_empowered_crystal scottradish=actuallyadditions:itemCrystal
mecharm=actuallyadditions:enori_crystal slothicornstudio=actuallyadditions:itemCrystalEmpowered@5
DJAscendance=actuallyadditions:diamatine_crystal mecharm=actuallyadditions:itemCrystal@5
SneezySchoo=actuallyadditions:restonia_crystal DJAscendance=actuallyadditions:itemCrystal@2
Mistakin=actuallyadditions:void_crystal SneezySchoo=actuallyadditions:itemCrystal@0
Tonitch8=actuallyadditions:emeradic_crystal Mistakin=actuallyadditions:itemCrystal@3
Owlwix=actuallyadditions:enori_empowered_crystal Tonitch8=actuallyadditions:itemCrystal@4
3MJoey=actuallyadditions:palis_crystal Owlwix=actuallyadditions:itemCrystalEmpowered@5
3MJoey=actuallyadditions:itemCrystal@1

View file

@ -7,7 +7,6 @@ import de.ellpeck.actuallyadditions.common.config.Config;
import de.ellpeck.actuallyadditions.common.container.ActuallyContainers; import de.ellpeck.actuallyadditions.common.container.ActuallyContainers;
import de.ellpeck.actuallyadditions.common.items.ActuallyItems; import de.ellpeck.actuallyadditions.common.items.ActuallyItems;
import de.ellpeck.actuallyadditions.common.tiles.ActuallyTiles; import de.ellpeck.actuallyadditions.common.tiles.ActuallyTiles;
import de.ellpeck.actuallyadditions.special.SpecialRenderInit;
import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.RenderTypeLookup; import net.minecraft.client.renderer.RenderTypeLookup;
import net.minecraft.command.Commands; import net.minecraft.command.Commands;
@ -54,7 +53,6 @@ public class ActuallyAdditions {
eventBus.addListener(this::clientSetup); eventBus.addListener(this::clientSetup);
MinecraftForge.EVENT_BUS.addListener(this::serverLoad); MinecraftForge.EVENT_BUS.addListener(this::serverLoad);
MinecraftForge.EVENT_BUS.addListener(SpecialRenderInit::onPlayerRender);
MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(this);
} }
@ -72,8 +70,6 @@ public class ActuallyAdditions {
RenderTypeLookup.setRenderLayer(ActuallyBlocks.CRYSTAL_CLUSTER_DIAMATINE.get(), RenderType.getTranslucent()); RenderTypeLookup.setRenderLayer(ActuallyBlocks.CRYSTAL_CLUSTER_DIAMATINE.get(), RenderType.getTranslucent());
RenderTypeLookup.setRenderLayer(ActuallyBlocks.CRYSTAL_CLUSTER_EMERADIC.get(), RenderType.getTranslucent()); RenderTypeLookup.setRenderLayer(ActuallyBlocks.CRYSTAL_CLUSTER_EMERADIC.get(), RenderType.getTranslucent());
RenderTypeLookup.setRenderLayer(ActuallyBlocks.GREENHOUSE_GLASS.get(), RenderType.getCutout()); RenderTypeLookup.setRenderLayer(ActuallyBlocks.GREENHOUSE_GLASS.get(), RenderType.getCutout());
SpecialRenderInit.fetch();
} }
private void serverLoad(FMLServerStartingEvent event) { private void serverLoad(FMLServerStartingEvent event) {

View file

@ -1,88 +0,0 @@
/*
* This file ("RenderSpecial.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.special;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.model.ItemCameraTransforms;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerModelPart;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Util;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.math.vector.Vector3f;
public class RenderSpecial {
private final ItemStack theThingToRender;
public RenderSpecial(ItemStack stack) {
this.theThingToRender = stack;
}
public void render(MatrixStack matrixStack, IRenderTypeBuffer buffer, int combinedLight, PlayerEntity player, float partialTicks) {
if (this.theThingToRender.isEmpty() || player.isInvisible() || !player.isWearing(PlayerModelPart.CAPE) || player.isElytraFlying()) {
return;
}
matrixStack.push();
Vector3d currentPos = Minecraft.getInstance().player.getEyePosition(partialTicks);
Vector3d playerPos = player.getEyePosition(partialTicks);
matrixStack.translate(playerPos.x - currentPos.x, playerPos.y - currentPos.y, playerPos.z - currentPos.z);
matrixStack.translate(0D, 2.575D - (player.isSneaking()
? 0.125D
: 0D), 0D);
matrixStack.push();
boolean isBlock = this.theThingToRender.getItem() instanceof BlockItem;
if (isBlock) {
matrixStack.translate(0D, -0.1875D, 0D);
}
matrixStack.rotate(Vector3f.ZP.rotationDegrees(180));
float size = isBlock
? 0.5F
: 0.4F;
matrixStack.scale(size, size, size);
//Make the floaty stuff look nice using sine waves \o/ -xdjackiexd
//Peck edit: What do you mean by "nice" you jackass? >_>
double boop = Util.milliTime() / 1000D;
matrixStack.translate(0D, Math.sin(boop % (2 * Math.PI)) * 0.25, 0D);
matrixStack.rotate(Vector3f.YP.rotationDegrees((float) (boop * 40D % 360)));
GlStateManager.disableLighting();
matrixStack.push();
if (!isBlock) {
matrixStack.translate(0D, 0.5D, 0D);
}
matrixStack.rotate(Vector3f.XN.rotationDegrees(180F));
Minecraft.getInstance().getItemRenderer().renderItem(theThingToRender, ItemCameraTransforms.TransformType.FIXED, combinedLight, OverlayTexture.NO_OVERLAY, matrixStack, buffer);
matrixStack.pop();
GlStateManager.enableLighting();
matrixStack.pop();
matrixStack.pop();
}
}

View file

@ -1,72 +0,0 @@
/*
* This file ("SpecialRenderInit.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.special;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderPlayerEvent;
import net.minecraftforge.eventbus.api.EventPriority;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.registries.ForgeRegistries;
import java.util.HashMap;
import java.util.Locale;
import java.util.Properties;
public class SpecialRenderInit {
public static final HashMap<String, RenderSpecial> SPECIAL_LIST = new HashMap<>();
public static void fetch() {
new ThreadSpecialFetcher();
}
// TODO: [port][note] ensure that this still works with the special people stuff
public static void parse(Properties properties) {
for (String key : properties.stringPropertyNames()) {
ResourceLocation resLoc = new ResourceLocation(properties.getProperty(key));
ItemStack stack = findItem(resLoc);
if (!stack.isEmpty()) {
SPECIAL_LIST.put(key.toLowerCase(Locale.ROOT), new RenderSpecial(stack));
}
}
}
private static ItemStack findItem(ResourceLocation resLoc) {
if (ForgeRegistries.ITEMS.containsKey(resLoc)) {
Item item = ForgeRegistries.ITEMS.getValue(resLoc);
if (item != null) {
return new ItemStack(item);
}
} else if (ForgeRegistries.BLOCKS.containsKey(resLoc)) {
Block block = ForgeRegistries.BLOCKS.getValue(resLoc);
if (block != null) {
return new ItemStack(block);
}
}
return ItemStack.EMPTY;
}
public static void onPlayerRender(RenderPlayerEvent.Pre event) {
if (event.getPlayer() != null) {
String name = event.getPlayer().getName().getString();
String lower = name.toLowerCase(Locale.ROOT); // TODO: Maybe convert the special people list to UUIDs?
RenderSpecial render = SPECIAL_LIST.get(lower);
if (render != null) {
render.render(event.getMatrixStack(), event.getBuffers(), event.getLight(), event.getPlayer(), event.getPartialRenderTick());
}
}
}
}

View file

@ -1,40 +0,0 @@
/*
* This file ("ThreadSpecialFetcher.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.special;
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.Properties;
public class ThreadSpecialFetcher extends Thread {
public ThreadSpecialFetcher() {
this.setName(ActuallyAdditions.MOD_ID + " Special Fetcher");
this.setDaemon(true);
this.start();
}
@Override
public void run() {
ActuallyAdditions.LOGGER.info("Fetching Special People Stuff...");
try {
URL url = new URL("https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/clean-start/specialPeopleStuff.properties");
Properties specialProperties = new Properties();
specialProperties.load(new InputStreamReader(url.openStream()));
SpecialRenderInit.parse(specialProperties);
ActuallyAdditions.LOGGER.info("Fetching Special People Stuff done!");
} catch (Exception e) {
ActuallyAdditions.LOGGER.error("Fetching Special People Stuff failed! (You can ignore this error technically.)", e);
}
}
}