Updates for Primal 0.6.67+ #17

Merged
kitsu merged 1 commits from primal-0.6.67 into master-1.12 2018-07-31 03:24:08 +00:00
8 changed files with 42 additions and 40 deletions

View File

@@ -20,6 +20,7 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.api.PrimalAPI;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.forgecraft.ModInfo;
@@ -107,7 +108,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
//makeEmbers(world, pos, world.rand);
@@ -118,7 +119,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -128,7 +129,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -138,7 +139,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -148,7 +149,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -180,7 +181,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -202,7 +203,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -224,7 +225,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -246,7 +247,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -256,7 +257,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -279,7 +280,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if (CommonUtils.randomCheck(2)) {
if (PrimalAPI.randomCheck(2)) {
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -300,7 +301,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if (CommonUtils.randomCheck(2)) {
if (PrimalAPI.randomCheck(2)) {
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -323,7 +324,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if (CommonUtils.randomCheck(2)) {
if (PrimalAPI.randomCheck(2)) {
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -346,7 +347,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if (CommonUtils.randomCheck(2)) {
if (PrimalAPI.randomCheck(2)) {
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -356,7 +357,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if (CommonUtils.randomCheck(2)) {
if (PrimalAPI.randomCheck(2)) {
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -379,7 +380,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -400,7 +401,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -423,7 +424,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -446,7 +447,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -456,7 +457,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -479,7 +480,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -500,7 +501,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -523,7 +524,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -546,7 +547,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;
@@ -556,7 +557,7 @@ public class CastingBlock extends CustomContainerFacing {
PlayerHelper.spawnItemOnGround(world, pos, dropStack);
PlayerHelper.spawnItemOnGround(world, pos, dropCrucible);
pItem.getTagCompound().setInteger("type", 0);
if(CommonUtils.randomCheck(2)){
if(PrimalAPI.randomCheck(2)){
tile.setSlotStack(0, ItemStack.EMPTY);
}
return true;

View File

@@ -18,6 +18,7 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.api.PrimalAPI;
import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.tiles.TileCastingForm;
@@ -58,7 +59,7 @@ public class CastingForm extends CustomContainerFacing implements CastingFormHan
public void updateTick(World world, BlockPos pos, IBlockState state, Random random)
{
if (!world.isRemote) {
if(CommonUtils.randomCheck(4)) {
if(PrimalAPI.randomCheck(4)) {
TileCastingForm tile = (TileCastingForm) world.getTileEntity(pos);
String[] tempArray = new String[25];
for (int i = 0; i < 25; i++) {

View File

@@ -48,7 +48,7 @@ public class YewStave extends BlockCustomBase {
if(world.getBlockState(pos.up()).getBlock() instanceof YewStave ) {
//world.playSound(player, player.posX, player.posY, player.posZ, PrimalSounds.TOOL_BLADE_SCRAPE, SoundCategory.PLAYERS, 1.0F, 1F);
world.playSound(null, pos, PrimalAPI.Sounds.SOUND_TOOL_BLADE_SCRAPE, SoundCategory.PLAYERS, 1.0F, 1.0F);
if(CommonUtils.randomCheck(3) ) {
if(PrimalAPI.randomCheck(3) ) {
PlayerHelper.spawnItemOnGround(world, pos, new ItemStack(ModItems.rawlongbow, 1));
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
world.setBlockState(pos.up(), Blocks.AIR.getDefaultState(), 2);

View File

@@ -965,7 +965,7 @@ public class ModCrafting {
empty,empty,diamond,empty,empty,
empty,empty,empty,empty,empty,
empty,empty,empty,empty,empty },
new ItemStack(PrimalAPI.Items.DIAMOND_KNAPP, CommonUtils.randomChanceReturn(2, 2, 3)),
new ItemStack(PrimalAPI.Items.DIAMOND_KNAPP, PrimalAPI.randomChanceReturn(2, 2, 3)),
"null"
);
@@ -1072,7 +1072,7 @@ public class ModCrafting {
empty,empty,emerald,empty,empty,
empty,empty,empty,empty,empty,
empty,empty,empty,empty,empty },
new ItemStack(PrimalAPI.Items.EMERALD_KNAPP, CommonUtils.randomChanceReturn(3, 2, 3)),
new ItemStack(PrimalAPI.Items.EMERALD_KNAPP, PrimalAPI.randomChanceReturn(3, 2, 3)),
"null"
);

View File

@@ -10,7 +10,7 @@ import net.minecraft.util.*;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import nmd.primal.core.common.entities.projectiles.EntityMud;
import nmd.primal.core.common.entities.projectiles.TypeMud;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModSounds;
import nmd.primal.forgecraft.items.BaseItem;
@@ -51,7 +51,7 @@ public class Musket extends BaseItem{
//if(player.getItemInUseCount() > 5) {
world.playSound( null, player.posX, player.posY, player.posZ, ModSounds.MUSKET_SHOT, SoundCategory.BLOCKS, 0.5F, 0.3F / (itemRand.nextFloat() * 0.4F + 0.8F));
EntityMud entity = new EntityMud(world, player);
TypeMud entity = new TypeMud(world, player);
entity.setType("muck");
entity.shoot(player, player.rotationPitch, player.rotationYaw, 0.0F, 7.0F, 0.5F);
world.spawnEntity(entity);

View File

@@ -42,13 +42,13 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
this.iteration++;
if (this.iteration == 100) {
RecipeHelper.fuelManager(world,this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) {
if(PrimalAPI.randomCheck(1000)) {
makeSmoke(world, pos);
}
}
if (this.iteration == 200) {
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) {
if(PrimalAPI.randomCheck(1000)) {
makeSmoke(world, pos);
}
}
@@ -63,7 +63,7 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
}
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) {
if(PrimalAPI.randomCheck(1000)) {
makeSmoke(world, pos);
}
}
@@ -152,7 +152,7 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
this.markDirty();
this.updateBlock();
}
if(CommonUtils.randomCheck(1000)) {
if(PrimalAPI.randomCheck(1000)) {
makeSmoke(world, pos);
}
}

View File

@@ -44,13 +44,13 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
if (this.iteration == 100) {
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) {
if(PrimalAPI.randomCheck(1000)) {
makeSmoke(world, pos);
}
}
if (this.iteration == 200) {
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) {
if(PrimalAPI.randomCheck(1000)) {
makeSmoke(world, pos);
}
}
@@ -65,7 +65,7 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
world.notifyBlockUpdate(pos, state, state, 2);
}
RecipeHelper.fuelManager(world, this, this.getSlotStack(0));
if(CommonUtils.randomCheck(1000)) {
if(PrimalAPI.randomCheck(1000)) {
makeSmoke(world, pos);
}
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
@@ -110,7 +110,7 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
this.markDirty();
this.updateBlock();
}
if(CommonUtils.randomCheck(1000)) {
if(PrimalAPI.randomCheck(1000)) {
makeSmoke(world, pos);
}
}

View File

@@ -13,7 +13,7 @@ import nmd.primal.core.common.helper.RecipeHelper;
import nmd.primal.forgecraft.blocks.CustomContainerFacing;
import nmd.primal.forgecraft.tiles.TileBreaker;
import static nmd.primal.core.common.helper.CommonUtils.randomChanceReturn;
import static nmd.primal.core.api.PrimalAPI.randomChanceReturn;
//import nmd.primal.forgecraft.CommonUtils;